/* ── Inmoffy custom styles ── */

:root {
  --airbnb:       #FF5A5F;
  --airbnb-dark:  #E31C5F;
  --teal:         #00A699;
  --teal-dark:    #00877A;
  --text-dark:    #484848;
  --text-gray:    #767676;
  --bg-light:     #F7F7F7;
}

/* ── Glassmorphism ─────────────────────────────────────────────────────────── */

.glass {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.glass-card {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.20);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 90, 95, 0.15);
}

/* ── Gradients ─────────────────────────────────────────────────────────────── */

.hero-gradient {
  background: linear-gradient(135deg, #FF5A5F 0%, #E31C5F 35%, #00A699 100%);
}

.card-gradient {
  background: linear-gradient(135deg, rgba(255,90,95,0.85) 0%, rgba(0,166,153,0.85) 100%);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn-primary {
  background: linear-gradient(135deg, #FF5A5F, #E31C5F);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(255, 90, 95, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 90, 95, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-teal {
  background: linear-gradient(135deg, #00A699, #00877A);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 166, 153, 0.4);
}

.btn-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 166, 153, 0.55);
}

/* ── Property Cards ────────────────────────────────────────────────────────── */

.property-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.property-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

.property-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-venta    { background: rgba(255,90,95,0.12); color: #E31C5F; }
.badge-alquiler { background: rgba(0,166,153,0.12); color: #00877A; }

/* ── Stars ─────────────────────────────────────────────────────────────────── */

.stars {
  display: inline-flex;
  gap: 2px;
  color: #FFB800;
}

.star-empty { color: #D4D4D4; }

/* ── ROI Panel ─────────────────────────────────────────────────────────────── */

.roi-panel {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 100vw;
  max-width: 480px;
  z-index: 50;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.roi-panel.open {
  transform: translateX(0);
}

.roi-metric-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
}

/* ── ROI rating colors ──────────────────────────────────────────────────────── */
.rating-excellent { color: #00A699; }
.rating-good      { color: #3B82F6; }
.rating-fair      { color: #F59E0B; }
.rating-poor      { color: #EF4444; }

/* ── Floating hero cards ───────────────────────────────────────────────────── */

.hero-card-1 {
  transform: rotate(-4deg) translateY(10px);
  animation: float1 6s ease-in-out infinite;
}
.hero-card-2 {
  transform: rotate(2deg) translateY(-5px);
  animation: float2 7s ease-in-out infinite;
  z-index: 2;
}
.hero-card-3 {
  transform: rotate(-2deg) translateY(8px);
  animation: float3 5.5s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: rotate(-4deg) translateY(10px); }
  50%       { transform: rotate(-4deg) translateY(-4px); }
}
@keyframes float2 {
  0%, 100% { transform: rotate(2deg) translateY(-5px); }
  50%       { transform: rotate(2deg) translateY(10px); }
}
@keyframes float3 {
  0%, 100% { transform: rotate(-2deg) translateY(8px); }
  50%       { transform: rotate(-2deg) translateY(-6px); }
}

/* ── Analytics charts ──────────────────────────────────────────────────────── */

.chart-container {
  position: relative;
  height: 250px;
}

.kpi-card {
  background: white;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border-left: 4px solid var(--airbnb);
}

.kpi-card.teal  { border-left-color: var(--teal); }
.kpi-card.blue  { border-left-color: #3B82F6; }
.kpi-card.gold  { border-left-color: #F59E0B; }

/* ── Pricing cards ─────────────────────────────────────────────────────────── */

.plan-card {
  border-radius: 24px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.plan-card.featured {
  background: linear-gradient(135deg, #FF5A5F, #E31C5F);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 16px 50px rgba(255, 90, 95, 0.4);
}

.plan-card.featured:hover {
  transform: scale(1.05) translateY(-6px);
}

/* ── Loader ────────────────────────────────────────────────────────────────── */

.spinner {
  border: 3px solid rgba(255,90,95,0.2);
  border-top: 3px solid #FF5A5F;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Misc ──────────────────────────────────────────────────────────────────── */

.score-badge {
  background: linear-gradient(135deg, #FF5A5F, #E31C5F);
  color: white;
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 700;
}

.ai-badge {
  background: linear-gradient(135deg, #7C3AED, #4F46E5);
  color: white;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 40;
  display: none;
}

.overlay.active { display: block; }

/* ── Flash messages ─────────────────────────────────────────────────────────  */

.flash-success { background: #ECFDF5; border-left: 4px solid #10B981; color: #065F46; }
.flash-error   { background: #FEF2F2; border-left: 4px solid #EF4444; color: #991B1B; }
.flash-info    { background: #EFF6FF; border-left: 4px solid #3B82F6; color: #1E40AF; }

/* ── Scrollbar ──────────────────────────────────────────────────────────────── */

::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #FF5A5F; border-radius: 3px; }

/* ── Analysis markdown body (dark panel) ────────────────────────────────── */
.analysis-body h1,.analysis-body h2,.analysis-body h3 {
  font-weight: 800; margin-top: 0.75rem; margin-bottom: 0.25rem; color: #fff;
}
.analysis-body h2 { font-size: 0.9rem; }
.analysis-body h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7; }
.analysis-body p  { margin-bottom: 0.4rem; opacity: 0.85; }
.analysis-body blockquote { opacity: 0.6; font-style: italic; margin-bottom: 0.5rem; padding-left: 0.5rem; border-left: 2px solid rgba(255,255,255,0.3); }
.analysis-body ul { list-style: disc; padding-left: 1.2rem; margin-bottom: 0.4rem; }
.analysis-body ul li { margin-bottom: 0.2rem; opacity: 0.85; }
.analysis-body strong { color: #fff; font-weight: 700; }
.analysis-body hr { border-color: rgba(255,255,255,0.15); margin: 0.5rem 0; }
