/* ==========================================================================
   GERO - ASISTENCIA DOMICILIARIA
   Sistema de Estilos de Élite (Editorial & High-Ticket UI)
   ========================================================================== */

/* Importación de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

/* Variables y Fichas de Diseño */
:root {
  /* Paleta Cromática Estricta Gero */
  --color-bg-primary: #F5F0E8;       /* Beige/Crema orgánica suave */
  --color-bg-card: rgba(255, 255, 255, 0.45); /* Vidrio esmerilado translúcido */
  --color-bg-card-hover: rgba(255, 255, 255, 0.8);
  --color-teal: #1B5E4E;             /* Verde Teal Profundo (Autoridad/Calma) */
  --color-teal-light: #287a67;       /* Teal secundario para interacciones */
  --color-teal-rgb: 27, 94, 78;      /* Para transparencias */
  --color-terracotta: #C4845A;       /* Terracota Orgánico (Cercanía/Sofisticación) */
  --color-terracotta-light: #d6976d;
  --color-text-main: #121A16;        /* Negro Carbón Orgánico */
  --color-text-muted: #565F5B;       /* Gris Teal Muted para descripciones */
  --color-white: #FFFFFF;
  --color-border: rgba(27, 94, 78, 0.08);
  --color-border-hover: rgba(27, 94, 78, 0.18);

  /* Tipografía */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Transiciones y Duraciones */
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Radios de borde */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

/* Reset de Estilos & Configuración Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 1. TEXTURA DE GRANO ANALÓGICO (Luxury Grain Overlay) */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035; /* Efecto sutil, casi imperceptible pero que da textura orgánica */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 2. RESPIRACIÓN DE FONDOS ("Breathing Blobs") */
.blob-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  mix-blend-mode: multiply;
  animation: breathe 25s infinite alternate ease-in-out;
}

.blob-1 {
  background-color: var(--color-teal);
  width: 600px;
  height: 600px;
  top: -150px;
  right: -100px;
}

.blob-2 {
  background-color: var(--color-terracotta);
  width: 500px;
  height: 500px;
  bottom: -100px;
  left: -150px;
  animation-delay: -7s;
}

.blob-3 {
  background-color: var(--color-teal);
  width: 450px;
  height: 450px;
  top: 50%;
  left: 30%;
  opacity: 0.06;
  animation-duration: 35s;
  animation-delay: -12s;
}

@keyframes breathe {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  33% {
    transform: translate(60px, -40px) scale(1.1) rotate(120deg);
    border-radius: 50% 50% 60% 40% / 40% 60% 50% 50%;
  }
  66% {
    transform: translate(-50px, 80px) scale(0.9) rotate(240deg);
    border-radius: 40% 60% 30% 70% / 70% 30% 60% 40%;
  }
  100% {
    transform: translate(0, 0) scale(1) rotate(360deg);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}

/* 3. BARRA DE NAVEGACIÓN FLOTANTE (Navbar) */
.navbar-wrapper {
  padding: 0 1.5rem;
  width: 100%;
}

.navbar {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: 1200px;
  height: 80px;
  background: var(--color-bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  top: 12px;
  height: 68px;
  background: rgba(245, 240, 232, 0.85);
  box-shadow: 0 10px 40px rgba(27, 94, 78, 0.05);
  border: 1px solid rgba(27, 94, 78, 0.15);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.navbar.scrolled .nav-brand-logo {
  height: 34px;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
}

.nav-brand-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-teal);
  line-height: 1.1;
}

.nav-brand-tagline {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

/* Botones de Estilo Gero */
.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  border: none;
}

.btn-teal {
  background-color: var(--color-teal);
  color: var(--color-bg-primary);
  box-shadow: 0 4px 20px rgba(27, 94, 78, 0.15);
}

.btn-teal:hover {
  background-color: var(--color-teal-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(27, 94, 78, 0.25);
}

.btn-border {
  background-color: transparent;
  color: var(--color-teal);
  border: 1px solid rgba(27, 94, 78, 0.25);
}

.btn-border:hover {
  background-color: rgba(27, 94, 78, 0.05);
  border-color: var(--color-teal);
  transform: translateY(-2px);
}

.btn-terracotta {
  background-color: var(--color-terracotta);
  color: var(--color-bg-primary);
  box-shadow: 0 4px 20px rgba(196, 132, 90, 0.15);
}

.btn-terracotta:hover {
  background-color: var(--color-terracotta-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(196, 132, 90, 0.25);
}

/* Efecto Magnético Sutil */
.btn-magnetic {
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 4. SECCIONES Y CONTENEDORES */
section {
  padding: 8rem 2rem;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* 5. ANIMACIONES DE REVELACIÓN (Scroll Triggered) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Animación de retraso para elementos en grilla */
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* 6. HERO SECTION (Maquetación Asimétrica) */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 160px; /* Para darle aire abajo del navbar */
  padding-bottom: 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Animación de Revelado de Título (Mask Fade-Up) */
.text-reveal-mask {
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-teal);
  opacity: 0;
  transform: translateY(100%);
  animation: revealText 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealText {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  max-width: 600px;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0;
  transform: translateY(20px);
  animation: revealFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.4s;
}

@keyframes revealFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-actions {
  opacity: 0;
  transform: translateY(20px);
  animation: revealFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.6s;
}

/* Gráfico del Hero - Escultura Visual */
.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0.95);
  animation: revealScale 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}

@keyframes revealScale {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-editorial-card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(27, 94, 78, 0.03);
  position: relative;
  z-index: 2;
}

.hero-editorial-image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  background-color: rgba(27, 94, 78, 0.05);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.05);
}

.hero-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(27, 94, 78, 0.05);
  padding-top: 1rem;
}

.hero-meta-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-teal);
}

.hero-meta-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Sello de Calidad circular */
.badge-quality {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 90px;
  height: 90px;
  background: var(--color-terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(196, 132, 90, 0.3);
  z-index: 3;
  color: var(--color-bg-primary);
  text-align: center;
  padding: 8px;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-quality svg {
  animation: rotateBadge 15s linear infinite;
  width: 100%;
  height: 100%;
}

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

/* 7. PIVOTE DE EMPATÍA (Look Editorial Rompedor) */
.empatia-section {
  background-color: rgba(27, 94, 78, 0.02);
  border-top: 1px solid rgba(27, 94, 78, 0.03);
  border-bottom: 1px solid rgba(27, 94, 78, 0.03);
  text-align: center;
}

.empatia-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-teal);
  max-width: 950px;
  margin: 0 auto;
  position: relative;
  padding: 3rem 0;
}

.empatia-quote::before {
  content: '“';
  font-size: 8rem;
  font-family: var(--font-serif);
  color: var(--color-terracotta);
  opacity: 0.15;
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
}

.empatia-quote span {
  color: var(--color-terracotta);
  font-weight: 500;
}

/* 8. EL ESTÁNDAR GERO (Excelencia Operativa) */
.estandar-section {
  background-color: transparent;
}

.section-header {
  margin-bottom: 5rem;
  max-width: 700px;
}

.section-tag {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-terracotta);
  font-weight: 700;
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-teal);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.estandar-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: start;
}

.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.estandar-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.estandar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--color-teal);
  opacity: 0;
  transition: var(--transition-fast);
}

.estandar-card:hover {
  background: var(--color-bg-card-hover);
  transform: translateX(10px);
  border-color: rgba(27, 94, 78, 0.15);
  box-shadow: 0 15px 40px rgba(27, 94, 78, 0.04);
}

.estandar-card:hover::before {
  opacity: 1;
}

.card-header-flex {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.card-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(27, 94, 78, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-teal);
  transition: var(--transition-smooth);
}

.estandar-card:hover .card-icon-wrapper {
  background: var(--color-teal);
  color: var(--color-bg-primary);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--color-teal);
  font-weight: 500;
}

.card-text {
  color: var(--color-text-muted);
  line-height: 1.65;
  font-size: 1rem;
  font-weight: 300;
}

/* Botón de acción interno para mostrar vista previa de reporte */
.btn-toggle-report {
  margin-top: 1.25rem;
  background: none;
  border: none;
  font-family: var(--font-sans);
  color: var(--color-terracotta);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-toggle-report:hover {
  color: var(--color-terracotta-light);
  text-decoration: underline;
}

/* 9. SIMULADOR DE WHATSAPP INTERACTIVO (Motion Graphic) */
.simulator-wrapper {
  position: sticky;
  top: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  background: #111A16; /* Negro clínico profundo */
  border: 14px solid #1C2722;
  border-radius: 48px;
  box-shadow: 0 40px 90px rgba(18, 26, 22, 0.15);
  overflow: hidden;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9/18.5;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Muesca (Notch) de teléfono */
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 24px;
  background: #1C2722;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 10;
}

/* Interfaz Interna de Whatsapp Gero */
.phone-screen {
  flex: 1;
  background-color: #EFEAE2; /* Fondo de chat de WhatsApp */
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}

.phone-header {
  background: #1B5E4E;
  color: #ffffff;
  padding: 12px 16px 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.phone-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.phone-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-user-info {
  display: flex;
  flex-direction: column;
}

.phone-username {
  font-weight: 600;
  font-size: 0.9rem;
}

.phone-status {
  font-size: 0.7rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.phone-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #00E676; /* Indicador En Línea */
  border-radius: 50%;
}

.phone-chat-area {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  position: relative;
}

/* Globos de Mensaje */
.chat-msg {
  max-width: 85%;
  padding: 12px;
  border-radius: 12px;
  line-height: 1.4;
  position: relative;
  font-size: 0.82rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-msg-received {
  background: #ffffff;
  align-self: flex-start;
  border-top-left-radius: 0;
}

.chat-msg-sent {
  background: #D9FDD3; /* Color verde WhatsApp */
  align-self: flex-end;
  border-top-right-radius: 0;
}

.chat-msg-time {
  font-size: 0.65rem;
  color: #8696a0;
  text-align: right;
  margin-top: 4px;
  display: block;
}

/* Reporte Estructurado de Gero */
.gero-report-message {
  background: #ffffff;
  border-left: 4px solid var(--color-teal);
  border-radius: 8px;
  padding: 10px;
  margin-top: 4px;
  font-size: 0.8rem;
}

.report-header {
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(27, 94, 78, 0.08);
  padding-bottom: 4px;
}

.report-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.report-item-label {
  font-weight: 500;
  color: var(--color-text-muted);
}

.report-item-val {
  font-weight: 600;
  color: var(--color-text-main);
}

/* Gráfico Dinámico de Signos Vitales (Heart rate animation) */
.report-graph-container {
  margin-top: 10px;
  background: rgba(27, 94, 78, 0.02);
  border: 1px dashed rgba(27, 94, 78, 0.15);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.graph-title-flex {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-teal);
}

.heart-rate-svg {
  width: 100%;
  height: 40px;
  stroke: var(--color-terracotta);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}

/* Animación del trazado SVG */
@keyframes drawCurve {
  to {
    stroke-dashoffset: 0;
  }
}

.heart-rate-svg.animate {
  animation: drawCurve 3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Slot de Registro Fotográfico */
.report-photo-slot {
  margin-top: 8px;
  border-radius: 6px;
  overflow: hidden;
  height: 100px;
  position: relative;
  background-color: rgba(27, 94, 78, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) sepia(0.1); /* look vintage/cálido */
  transition: var(--transition-smooth);
  opacity: 0;
}

.report-photo-slot img.loaded {
  opacity: 1;
}

.photo-placeholder-text {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  position: absolute;
  z-index: 1;
}

/* 10. NUESTRO ORIGEN (Composición Editorial) */
.origen-section {
  background: var(--color-bg-primary);
  border-top: 1px solid rgba(27, 94, 78, 0.04);
}

.origen-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 6rem;
  align-items: center;
}

.origen-media {
  position: relative;
  display: flex;
  justify-content: center;
}

.origen-frame {
  position: relative;
  border: 1px solid rgba(27, 94, 78, 0.1);
  padding: 1.25rem;
  border-radius: 4px; /* look clásico de cuadro */
  background: var(--color-white);
  box-shadow: 0 30px 70px rgba(27, 94, 78, 0.04);
}

.origen-image {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 3/2;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: sepia(0.15) contrast(0.95) saturate(0.9); /* Look analógico */
}

/* Capitular (Drop Cap) y Maquetación Editorial */
.origen-content .section-title {
  margin-bottom: 2.5rem;
}

.editorial-story {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--color-text-main);
  line-height: 1.8;
  text-align: justify;
}

.editorial-story p {
  margin-bottom: 1.5rem;
}

.editorial-story p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 4rem;
  line-height: 0.8;
  padding-right: 12px;
  padding-top: 4px;
  color: var(--color-teal);
  font-weight: 700;
}

.editorial-signature {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-terracotta);
  font-size: 1.2rem;
  margin-top: 2rem;
}

/* 11. CTA FINAL */
.cta-final-section {
  padding: 6rem 2rem;
}

.cta-banner {
  background-color: var(--color-teal);
  border-radius: var(--radius-lg);
  padding: 5rem 4rem;
  color: var(--color-bg-primary);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(27, 94, 78, 0.15);
}

.cta-banner .blob {
  opacity: 0.08;
}

.cta-banner-content {
  position: relative;
  z-index: 2;
  max-width: 750px;
  margin: 0 auto;
}

.cta-banner-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--color-bg-primary);
}

.cta-banner-sub {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  margin-bottom: 3rem;
  opacity: 0.9;
  line-height: 1.6;
}

/* 12. MODAL DOCKING (Planificador Personalizado de Cuidado) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(18, 26, 22, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden; /* Evitar que el fondo negro se desplace en iOS */
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background-color: var(--color-bg-primary);
  border: 1px solid rgba(27, 94, 78, 0.12);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 580px;
  max-height: 85vh; /* Altura máxima para forzar el scroll interno */
  overflow-y: auto; /* Habilitar el scroll dentro de la propia tarjeta (solución definitiva iOS) */
  -webkit-overflow-scrolling: touch; /* Scroll inercial táctil */
  padding: 3rem;
  box-shadow: 0 30px 70px rgba(18, 26, 22, 0.2);
  transform: translateY(40px) scale(0.95);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-teal);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--color-teal);
  margin-bottom: 1rem;
}

.modal-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* Formulario del planificador */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-select, .form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(27, 94, 78, 0.15);
  background: var(--color-white);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-select:focus, .form-input:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(27, 94, 78, 0.1);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.option-card {
  border: 1px solid rgba(27, 94, 78, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: var(--color-white);
  font-weight: 600;
  font-size: 0.9rem;
}

.option-card.selected {
  border-color: var(--color-teal);
  background: rgba(27, 94, 78, 0.05);
  color: var(--color-teal);
}

#care-pathology-grid .option-card:last-child {
  grid-column: span 2;
}

/* 13. FOOTER */
footer {
  background-color: #0E1613; /* Casi negro carbón muy profundo */
  color: rgba(245, 240, 232, 0.7);
  padding: 5rem 2rem 3rem;
  border-top: 1px solid rgba(27, 94, 78, 0.15);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  margin-bottom: 4rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.85); /* Logo en blanco */
}

.footer-desc {
  max-width: 450px;
  line-height: 1.7;
  font-size: 0.95rem;
  font-weight: 300;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link-item {
  color: rgba(245, 240, 232, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.footer-link-item:hover {
  color: var(--color-terracotta);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(245, 240, 232, 0.08);
  padding-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.45);
}

.footer-legal-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-disclaimer {
  line-height: 1.6;
  max-width: 900px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries Mobile-First)
   ========================================================================== */

/* Tablets y pantallas medianas (min-width: 768px) */
@media (max-width: 991px) {
  section {
    padding: 6rem 1.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-media {
    order: -1; /* Poner la tarjeta/imagen arriba en móviles/tablets */
  }

  .estandar-layout {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .simulator-wrapper {
    position: relative;
    top: 0;
    margin-top: 2rem;
  }

  .origen-layout {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .origen-media {
    order: -1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Dispositivos Móviles Pequeños (max-width: 480px) */
@media (max-width: 480px) {
  .navbar {
    padding: 0 1.25rem;
    height: 72px;
  }

  .nav-brand-tagline {
    display: none; /* Ocultar en móviles muy chicos para ahorrar espacio */
  }

  .btn-premium {
    padding: 0.75rem 1.5rem;
    font-size: 0.88rem;
  }

  .hero-section {
    padding-top: 130px;
  }

  .estandar-card {
    padding: 1.75rem;
  }

  .cta-banner {
    padding: 3rem 1.5rem;
  }

  .modal-overlay {
    padding: 0;
  }

  .modal-container {
    padding: 2rem 1.25rem 2.5rem 1.25rem;
    max-height: 90vh; /* Ocupa hasta el 90% de la pantalla útil en el celular */
  }
}

/* ==========================================================================
   14. SECCIÓN RECURSOS Y GUÍAS DE APOYO
   ========================================================================== */
.recursos-section {
  background-color: transparent;
  border-top: 1px solid rgba(27, 94, 78, 0.04);
}

.recursos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 4rem;
}

.recurso-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 3rem 2.2rem;
  border-top: 4px solid var(--color-teal);
  box-shadow: 0 15px 40px rgba(18, 26, 22, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.recurso-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(18, 26, 22, 0.06);
}

.recurso-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-teal);
  margin-bottom: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
}

.recurso-desc {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
  font-weight: 300;
}

@media (max-width: 991px) {
  .recursos-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
