/* =============================================================
   FISIOCENTRUM — Estilos compartidos del sitio.
   ============================================================= */

/* ----- 1. Reset & Configuración de Base ----- */
[hidden] {
  display: none !important;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100000000;
  padding: 12px;
  background: #fff;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--color-text);
  background: radial-gradient(circle at 50% 0%, #FAF9F4 0%, #FAF7ED 60%, #F5F2E6 100%);
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}


body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  
  background-image: 
    url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' 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"),
    url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 h40 M20 0 v40' fill='none' stroke='rgba(181, 153, 87, 0.12)' stroke-width='0.5'/%3E%3Cpath d='M0 10 h40 M10 0 v40 M0 30 h40 M30 0 v40' fill='none' stroke='rgba(181, 153, 87, 0.08)' stroke-width='0.25'/%3E%3C/svg%3E");
  opacity: 0.065; 
  pointer-events: none;
  z-index: 9999;
}


:root {
  /* Paleta Cromática: Verde Botella Profundo, Oro Muteado y Blanco Seda */
  --color-brand:       #b59957; /* Oro champán satinado (para acentos y texto destacado) */
  --color-brand-light: rgba(181, 153, 87, 0.08); /* Oro translúcido para badges */
  --color-brand-dark:  #071f15; /* Verde bosque profundo para elementos destacados/footer */
  --color-accent:      #a38541; /* Oro champán satinado (más visible en fondos claros) */
  --color-accent-hover:#e8d4a7; /* Oro champán más brillante e iluminado en hover */
  --color-bg:          #f8f6f0; /* Seda Champán Cálido */
  --color-surface:     rgba(255, 255, 255, 0.72); 
  --color-surface-hover: rgba(255, 255, 255, 0.88); /* Cristal más opaco en hover para resalte */
  
  /* Tonos neutros arquitectónicos en Light Mode */
  --color-text:        #08331e; /* Texto principal verde bosque imperial ultra-oscuro */
  --color-text-muted:  #354a3c; /* Verde sage grafito de alto contraste para descripciones */
  --color-border:      rgba(163, 133, 65, 0.20); /* Bordes de cristal finos en tono champán */
  --color-border-light:rgba(163, 133, 65, 0.12);
  
  /* Sombras etéreas */
  --shadow-subtle:  0 2px 12px rgba(181, 153, 87, 0.05);
  --shadow-premium: 0 16px 48px rgba(7, 31, 21, 0.04);
  --shadow-glass:   0 8px 32px 0 rgba(7, 31, 21, 0.03);
  
  /* Radios de borde rectos y limpios (precisión clínica, no redondeado infantil) */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  /* Estructura */
  --container-width: 1200px;
  --page-gutter: clamp(16px, 4vw, 40px);
  --container-narrow: 760px;
  --navbar-height: 90px;
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Tipografía */
  --font-heading: 'Cormorant Garamond', serif;
  --font-body:    'Inter', sans-serif;
}


h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400; 
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1.1;
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 500; /* Peso medio legible para subencabezados */
  letter-spacing: normal;
  color: var(--color-text);
  line-height: 1.3;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 300;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 300;
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
}

p {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: 1rem;
  font-weight: 400; /* Aumentado a 400 para mejorar legibilidad y contraste */
  letter-spacing: 0.01em;
}

/* Enlaces limpios */
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Los hijos de flex y grid pueden encogerse sin desbordar su contenedor. */
:where(.container, .cards-grid, .blog-grid, .comp-grid, .contact-grid,
       .precios-container, .footer__grid, .card--horizontal) > * {
  min-width: 0;
}
:where(h1, h2, h3, h4, h5, h6, p, a, li) {
  overflow-wrap: anywhere;
}
:where(video, iframe, embed, object) {
  max-width: 100%;
}
.content-rich table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* ----- 4. Estructura y Contenedores ----- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.container--sm {
  max-width: var(--container-narrow);
  padding: 0 var(--page-gutter);
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}
.section:nth-of-type(even) {
  background-color: transparent;
  background-image: radial-gradient(rgba(163, 133, 65, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.section:nth-of-type(odd) {
  background-color: transparent;
  background-image: radial-gradient(rgba(163, 133, 65, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

.section--green {
  background-color: var(--color-brand-dark);
  color: #ffffff;
  border-bottom: none;
}
.section--green h2, .section--green p {
  color: #ffffff;
}

/* Cabeceras de sección minimalistas */
.section-header {
  max-width: 800px;
  margin-bottom: 80px;
}
.section-header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-header h2 {
  margin-top: 16px;
  margin-bottom: 24px;
  font-size: clamp(2rem, 5vw, 3.2rem);
}
.section-header p {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.7;
}

/* Etiquetas elegantes superiores */
.accent-tag {
  display: inline-flex;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

/* ----- 5. Botones Arquitectónicos (Sin bordes redondeados toscos) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px clamp(16px, 3vw, 36px);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(181, 153, 87, 0.25);
}

.btn--primary {
  background-color: var(--color-brand);
  color: #060e0a; /* Texto oscuro sobre fondo dorado para máximo contraste */
  border-color: var(--color-brand);
}
.btn--primary:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #060e0a;
  box-shadow: 0 8px 24px rgba(181, 153, 87, 0.35);
}

.btn--accent {
  background-color: var(--color-accent);
  color: #060e0a; /* Texto oscuro sobre fondo dorado */
  border-color: var(--color-accent);
}
.btn--accent:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #060e0a;
  box-shadow: 0 8px 24px rgba(181, 153, 87, 0.35);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}
.btn--outline:hover {
  background-color: var(--color-text);
  color: #ffffff; /* Texto blanco en hover sobre fondo verde oscuro */
  box-shadow: 0 8px 24px rgba(12, 66, 40, 0.15);
}

.btn--outline-brand {
  background-color: transparent;
  color: var(--color-brand);
  border-color: var(--color-brand);
}
.btn--outline-brand:hover {
  background-color: var(--color-brand);
  color: #060e0a;
  box-shadow: 0 8px 24px rgba(181, 153, 87, 0.30);
}

.btn--emerald {
  background-color: var(--color-text); /* Verde bosque imperial sólido */
  color: #ffffff;
  border-color: var(--color-text);
  border-radius: var(--radius-xs);
}
.btn--emerald:hover,
.card:hover .btn--emerald {
  background-color: #165335; /* Verde esmeralda más claro/suave */
  border-color: #165335;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(22, 83, 53, 0.25);
}
.btn--white {
  background-color: var(--color-brand-dark);
  color: #ffffff;
  border-color: var(--color-brand-dark);
}
.btn--white:hover {
  background-color: var(--color-accent);
  color: #060e0a;
  border-color: var(--color-accent);
  box-shadow: 0 8px 24px rgba(181, 153, 87, 0.35);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.btn--lg {
  padding: 20px 44px;
  font-size: 0.88rem;
}


.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  z-index: 1000;
  transition: var(--transition-smooth);
  background: rgba(248, 246, 240, 0.9); /* Seda Champán Cálido */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  height: 80px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 10px 35px rgba(163, 133, 65, 0.08);
}

/* Desktop Floating Capsule Menu */
@media (min-width: 1200px) {
  .navbar {
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 64px);
    max-width: var(--container-width);
    height: 76px;
    border-radius: 38px;
    box-shadow: 0 12px 40px rgba(163, 133, 65, 0.05);
    border: 1px solid var(--color-border-light);
    background: rgba(255, 255, 255, 0.85); /* Blanco satinado */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }
  .navbar.scrolled {
    top: 12px;
    height: 70px;
    width: calc(100% - 48px);
    border-radius: 35px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  }
  .navbar__logo {
    padding: 0;
  }
  .navbar.scrolled .navbar__logo {
    padding: 0;
  }
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

@media (min-width: 1200px) {
  .navbar__inner {
    padding: 0 28px; /* Tighter padding for pill container */
  }
}

.navbar__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  transition: var(--transition-smooth);
}
.navbar__logo img {
  height: 38px !important;
  width: auto;
  background-color: transparent;
  padding: 0;
  border-radius: 50%;
  transition: var(--transition-smooth);
}
.navbar.scrolled .navbar__logo {
  padding: 0;
}
.navbar.scrolled .navbar__logo img {
  height: 30px !important;
}
.navbar__logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--color-text); /* Verde oscuro corporativo */
  letter-spacing: 0.01em;
  transition: var(--transition-smooth);
}
.navbar.scrolled .navbar__logo-text {
  font-size: 1.25rem;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.navbar__links a:not(.btn) {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  position: relative;
  padding: 6px 0;
}
.navbar__links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.navbar__links a:not(.btn):hover {
  color: var(--color-accent);
}
.navbar__links a:not(.btn):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.navbar__hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background-color: var(--color-text);
  transition: var(--transition-smooth);
}

.nav-cta-mobile {
  display: none;
  border-radius: var(--radius-full) !important;
}
.navbar__cta .btn {
  border-radius: var(--radius-full) !important;
}

/* ----- 7. Hero Section (Arquitectura de Espacio y Composición) ----- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--navbar-height);
  background-color: transparent;
  background-image: radial-gradient(rgba(163, 133, 65, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  overflow: hidden;
}

.hero__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 60px 40px 80px 40px;
}

.hero__content-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}

.hero__logo-container {
  position: relative;
  max-width: 720px;
  width: 100%;
  margin: 16px auto 60px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Offset gold decorative frame behind logo */
.hero__logo-container::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: -15px;
  bottom: -15px;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-sm);
  z-index: 1;
  pointer-events: none;
}

.hero__logo-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  background-color: #ffffff;
  padding: 24px 44px;
}

.hero__logo-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}
.hero__label::before {
  content: '';
  width: 24px;
  height: 1px;
  background-color: var(--color-accent);
}
.hero__label::after {
  content: '';
  width: 24px;
  height: 1px;
  background-color: var(--color-accent);
}

.hero__title {
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 5.5vw, 4.8rem);
  white-space: nowrap;
}
.hero__title span {
  font-style: italic; 
  font-family: var(--font-heading);
  color: var(--color-brand);
}

.hero__subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: 44px;
  max-width: 1100px;
  line-height: 1.7;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Distintivos de confianza */
.hero__trust-badges {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

.hero__trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.hero__buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Offset gold decorative frame behind picture */
.hero__visual::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  border: 1px solid rgba(181, 153, 87, 0.35); /* Elegant gold border */
  border-radius: var(--radius-sm);
  z-index: 1;
  pointer-events: none;
}

.hero__image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  border-radius: var(--radius-sm); /* Corte arquitectónico limpio */
  overflow: hidden;
  position: relative;
  z-index: 2;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-premium);
}
.hero__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.95); 
}


.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
  margin-top: 48px;
  padding-bottom: 40px; /* Espacio extra para compensar desplazamientos */
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-subtle);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, z-index 0.5s;
  background: var(--color-bg-card);
}
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  z-index: 10;
}
.gallery-item:hover .gallery-img {
  transform: scale(1.04);
}

/* Distribución moderna de distintos tamaños sin superposiciones (Desktop) */
@media (min-width: 992px) {
  .gallery-grid {
    grid-template-rows: auto auto auto;
  }
  /* Foto 1 (Gabinete 1 - Vertical izquierda) */
  .gallery-item:nth-child(1) {
    grid-column: 1 / 4;
    grid-row: 1 / 4;
    aspect-ratio: 3 / 5;
    position: relative;
    top: 60px;
  }
  /* Foto 2 (Indiba - Horizontal arriba centro) */
  .gallery-item:nth-child(2) {
    grid-column: 4 / 9;
    grid-row: 1 / 3;
    aspect-ratio: 4 / 3;
  }
  /* Foto 3 (Gabinete clínico - Horizontal arriba derecha) */
  .gallery-item:nth-child(3) {
    grid-column: 9 / 13;
    grid-row: 1;
    aspect-ratio: 16 / 9;
  }
  /* Foto 4 (Buda - Vertical derecha, un pelín menos grande) */
  .gallery-item:nth-child(4) {
    grid-column: 9 / 13;
    grid-row: 2 / 4;
    aspect-ratio: 3 / 4;
  }
  /* Foto 5 (Muñeco / Recepción - Horizontal abajo centro) */
  .gallery-item:nth-child(5) {
    grid-column: 4 / 9;
    grid-row: 3;
    aspect-ratio: 16 / 9;
    position: relative;
    top: -50px;
  }
}

/* Distribución para tablets (2 columnas limpias) */
@media (min-width: 768px) and (max-width: 991px) {
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    padding-bottom: 20px;
  }
  .gallery-item:nth-child(1) { grid-column: span 3; aspect-ratio: 4 / 5; }
  .gallery-item:nth-child(2) { grid-column: span 3; aspect-ratio: 4 / 5; }
  .gallery-item:nth-child(3) { grid-column: span 3; aspect-ratio: 4 / 3; }
  .gallery-item:nth-child(4) { grid-column: span 3; aspect-ratio: 4 / 3; }
  .gallery-item:nth-child(5) { grid-column: span 6; aspect-ratio: 16 / 9; }
}

/* Distribución limpia para móviles */
@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .gallery-item {
    aspect-ratio: 4 / 3;
    transform: none !important;
  }
}

/* Sombras y formas geométricas sutiles de fondo */
.hero__blob {
  position: absolute;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle, rgba(191, 161, 95, 0.04) 0%, rgba(22, 48, 32, 0.01) 70%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}


.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: 40px;
  align-items: start;
}

.cards-grid .card {
  height: auto;
}

.card {
  background: var(--color-surface); /* Blanco puro para tarjetas */
  border: 1px solid var(--color-border); /* Borde de oro champagne satinado muy fino */
  border-radius: var(--radius-md);
  padding: clamp(20px, 3vw, 40px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 
    0 16px 36px rgba(181, 153, 87, 0.04),
    0 4px 20px rgba(0, 0, 0, 0.02);
  opacity: 0;
  animation: luxuryReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card:hover {
  transform: translateY(-6px);
  background: var(--color-surface-hover); /* Tono crema sutil en hover */
  border-color: var(--color-accent); /* Brillo dorado champán más vivo */
  box-shadow: 
    0 24px 48px rgba(181, 153, 87, 0.12), 
    0 0 32px rgba(181, 153, 87, 0.06);
}


.card::after, .precios-block::after, .blog-card::after, .comp-card::after, .unified-reviews-card::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 1px solid rgba(181, 153, 87, 0.12);
  border-radius: inherit;
  pointer-events: none;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.card:hover::after, .precios-block:hover::after, .blog-card:hover::after, .comp-card:hover::after, .unified-reviews-card:hover::after {
  border-color: rgba(181, 153, 87, 0.38);
}

.card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--color-accent); /* Línea dorada sutil */
  color: var(--color-brand);
  margin-bottom: 24px;
  padding-bottom: 8px;
}
.card__icon svg {
  width: 25px;
  height: 25px;
}

.card__title {
  margin-bottom: 20px;
  font-family: var(--font-heading);
  font-size: 1.85rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  color: var(--color-accent) !important; /* Dorado */
}

.card__desc {
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 36px;
  flex-grow: 1;
  min-width: 0;
  color: var(--color-text-muted); /* Verde sage grafito */
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 20px;
  border-top: 1px solid var(--color-border-light);
  padding-top: 24px;
}

/* Estilo para tarjetas horizontales (clases) */
.card--horizontal {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.card--horizontal .card__image {
  height: 100%;
  min-height: 300px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.card--horizontal .card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}

.card--horizontal .card__body {
  padding: clamp(20px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card__actions {
  display: flex;
  gap: 20px;
  margin-top: 32px;
}

/* Tarjetas de pacientes / organízate */
.card--paciente {
  text-align: center;
  align-items: center;
  padding: 56px 40px;
}
.card__icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  color: var(--color-accent);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.card__icon-wrap svg {
  width: 28px;
  height: 28px;
}

.btn--full {
  width: 100%;
}

/* ----- 8b. Características (Features Grid) ----- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 40px;
}

.feature {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 48px 40px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 16px 36px rgba(181, 153, 87, 0.04),
    0 4px 20px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}
.feature::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2.5px;
  background-color: var(--color-accent);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature:hover::after {
  width: 100%;
  left: 0;
}
.feature:hover {
  transform: translateY(-6px);
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
  box-shadow: 
    0 24px 48px rgba(181, 153, 87, 0.08), 
    0 0 24px rgba(181, 153, 87, 0.04);
}

/* Card and treatment image zoom animation */
.card__image {
  overflow: hidden;
}
.card__image img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .card__image img {
  transform: scale(1.04);
}


.feature__icon {
  margin-bottom: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
}
.feature__icon svg {
  width: 28px;
  height: 28px;
}

.feature__title {
  margin-bottom: 16px;
  font-size: 1.4rem;
  font-weight: 400;
  font-family: var(--font-heading);
}

.feature__desc {
  font-size: 0.95rem;
  line-height: 1.6;
}


.precios-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.precios-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: clamp(20px, 4vw, 56px);
  box-shadow: 
    0 16px 36px rgba(181, 153, 87, 0.04),
    0 4px 20px rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
  position: relative;
  opacity: 0;
  animation: luxuryReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.precios-block:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
  box-shadow: 
    0 24px 48px rgba(181, 153, 87, 0.08), 
    0 0 24px rgba(181, 153, 87, 0.04);
}

.precios-block__header {
  margin-bottom: 48px;
}
.precios-block__icon {
  color: var(--color-accent);
  margin-bottom: 20px;
}
.precios-block__icon svg {
  width: 40px;
  height: 40px;
}
.precios-block__header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}
.precios-block__header p {
  font-size: 0.98rem;
  line-height: 1.6;
}

.precios-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.precio-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.precio-item__info {
  flex-grow: 1;
  min-width: 0;
}
.precio-item__title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 4px;
}
.precio-item__desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.precio-item__price {
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}
.precio-item__num {
  display: block;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 2px;
}
.precio-item__unit {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}


.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 80px;
  align-items: start;
}

.contact-info h2 {
  font-size: 2.4rem;
  margin-bottom: 20px;
}
.contact-info__intro {
  margin-bottom: 48px;
  font-size: 1.1rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.contact-card {
  display: flex;
  gap: 24px;
}
.contact-card__icon {
  width: 44px;
  height: 44px;
  border-bottom: 1px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-brand);
}
.contact-card__icon svg {
  width: 24px;
  height: 24px;
}
.contact-card__body h3 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 8px;
  font-weight: 600;
}
.contact-card__body p {
  font-size: 1rem;
  color: var(--color-text);
}
.contact-card__link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-brand);
  border-bottom: 1px solid var(--color-border);
}
.contact-card__link:hover {
  border-color: var(--color-brand);
}

.contact-map {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 34px;
}
.map-box {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.map-iframe-wrapper {
  position: relative;
  width: 100%;
}
.map-iframe-wrapper iframe {
  display: block;
  width: 100%;
  height: 540px;
  filter: grayscale(0.2) contrast(1.05); /* Filtro estético para Google Maps */
}
.contact-map-cta {
  width: 100%;
  justify-content: center;
  padding-top: 18px;
  padding-bottom: 18px;
}

/* ----- 11. Blog Estilo Editorial de Revista ----- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 48px;
}

.blog-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 16px 36px rgba(181, 153, 87, 0.04),
    0 4px 20px rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
  position: relative;
  opacity: 0;
  animation: luxuryReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.blog-card:hover {
  transform: translateY(-6px);
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
  box-shadow: 
    0 24px 48px rgba(181, 153, 87, 0.08), 
    0 0 24px rgba(181, 153, 87, 0.04);
}

.blog-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--color-brand-light);
  position: relative;
  border-bottom: 1px solid var(--color-border-light);
}
.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
  filter: saturate(0.85);
}
.blog-card:hover .blog-card__image img {
  transform: scale(1.03);
}

.blog-card__body {
  padding: clamp(20px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: var(--color-brand-light);
  color: var(--color-brand);
  width: fit-content;
}
.badge--gold {
  background-color: rgba(191, 161, 95, 0.08);
  color: var(--color-accent);
}

.blog-card__title {
  font-size: 1.6rem;
  font-weight: 400;
  margin-top: 20px;
  margin-bottom: 16px;
  line-height: 1.25;
}

.blog-card__excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand);
  margin-top: auto;
}
.blog-card__link svg {
  transition: transform 0.3s ease;
}
.blog-card__link:hover svg {
  transform: translateX(6px);
}

/* Detalle del artículo */
.post-detail {
  padding: 140px 0 100px;
}
.post-detail__header {
  text-align: center;
  margin-bottom: 64px;
}
.post-detail__back-link {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}
.post-detail__back-link:hover {
  color: var(--color-brand);
}
.post-detail__title {
  margin-top: 20px;
  margin-bottom: 28px;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.post-detail__meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.post-detail__image-container {
  margin-bottom: 80px;
}
.post-detail__image {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--color-border);
}
.post-detail__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}

.post-detail__body {
  max-width: 700px;
  margin: 0 auto;
}
.content-rich p {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 32px;
  color: var(--color-text);
  font-weight: 400;
}
.content-rich h2, .content-rich h3 {
  margin-top: 48px;
  margin-bottom: 20px;
  font-weight: 400;
}
.content-rich ul, .content-rich ol {
  margin-bottom: 32px;
  padding-left: 24px;
}
.content-rich li {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--color-text-muted);
  list-style-type: square; /* Estilo clásico de lista */
}

/* ----- 12. Secciones Auxiliares & CTA ----- */
.page-header {
  padding: 180px 0 80px;
  background-color: transparent;
  background-image: radial-gradient(rgba(163, 133, 65, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.page-header h1 {
  margin-top: 20px;
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 6vw, 4rem);
}
.page-header p {
  font-size: 1.2rem;
  font-weight: 400;
  max-width: 720px;
}

.section--reviews {
  position: relative;
  overflow: hidden;
}


.cta-section {
  background: radial-gradient(circle at top right, #fcfbfa 0%, #f7f5f0 100%); /* Fondo champán satinado */
  color: var(--color-text);
  padding: 48px 0; /* Compact padding */
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: none;
  border-top: 1px solid var(--color-border);
}
.cta-section h2 {
  color: var(--color-text);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  margin-bottom: 12px;
}
.cta-section p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto 20px;
  font-weight: 400;
}


main {
  position: relative;
  z-index: 2;
}

.footer {
  position: relative;
  z-index: 2;
  background: radial-gradient(circle at bottom, #fcfbfa 0%, #f7f5f0 100%); /* Fondo champán satinado */
  color: var(--color-text-muted);
  border-top: 3px double var(--color-brand); /* Borde superior doble de oro satinado */
  padding-top: 40px;
}
.footer p, .footer a {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.footer a:hover {
  color: var(--color-accent);
}

/* Footer detallado pero compacto de la Home */
.footer--detailed {
  padding: 40px 0 24px;
}
.footer--detailed .footer__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1.15fr 0.85fr; /* 4 columnas: marca, navegación, contacto, redes */
  gap: 40px;
  margin-bottom: 32px;
}

.footer__brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.footer__brand-logo img {
  height: 28px;
  width: auto;
  padding: 3px 8px;
  background-color: #ffffff;
  border-radius: var(--radius-xs);
  transition: var(--transition-smooth);
}
.footer__brand-logo span {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.footer__heading {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--color-text);
  margin-bottom: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.footer__contact-item svg {
  width: 12px;
  height: 12px;
  fill: var(--color-accent);
  margin-top: 5px;
  flex-shrink: 0;
}

.footer__bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  text-align: center;
}
.footer__bottom p {
  font-size: 0.8rem;
}

/* Footer mínimo para páginas internas */
.footer--minimal {
  padding: 28px 0;
}
.footer__minimal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.footer__minimal-inner p {
  margin-bottom: 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ----- 14. Widget WhatsApp Clínico y Elegante ----- */
.wa-widget {
  position: fixed;
  width: 56px;
  height: 56px;
  bottom: max(16px, env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
  z-index: 99999999;
}

.wa-btn {
  width: 56px;
  height: 56px;
  background-color: #25D366; /* Verde oficial WhatsApp para máxima visibilidad */
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.3); /* Sombra verde sutil */
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  background-image: none;
}
.wa-btn svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}
.wa-btn:hover {
  transform: translateY(-4px);
  background-color: #1ebd5b; /* Verde WhatsApp más oscuro en hover */
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.45);
}

.wa-popup {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 112px);
  overflow-y: auto;
  background: linear-gradient(135deg, #fbf9f4 0%, #eaddbd 100%); /* Fondo oro satinado / champán de destaque */
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 
    0 24px 48px rgba(181, 153, 87, 0.25),
    0 4px 20px rgba(163, 133, 65, 0.08);
  border: 1px solid var(--color-brand);
  /* Scale + Translate smooth animation */
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}
.wa-popup.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.wa-popup__header {
  background-color: rgba(255, 255, 255, 0.45); /* Cabecera translúcida que deja ver el dorado de fondo */
  color: #12241b; /* Texto verde oscuro de alto contraste */
  padding: 20px 24px;
  position: relative;
  border-bottom: 1px solid rgba(181, 153, 87, 0.25);
}

.wa-popup__avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wa-popup__avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: visible;
  border: 1px solid var(--color-border);
  background-color: #ffffff;
}
.wa-popup__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.wa-popup__header h4 {
  color: #0c140f;
  font-size: 1.15rem;
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 2px;
}
.wa-popup__header p {
  color: #4b5c52; /* Gris verdoso oscuro muy legible */
  font-size: 0.75rem;
  font-family: var(--font-body);
  margin-bottom: 0;
}

.wa-popup__status-text {
  color: #4b5c52;
  font-weight: 600;
}

.wa-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #88998f; /* Más visible sobre blanco */
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.wa-popup__close:hover {
  color: #121c16; /* Negro al pasar ratón */
  transform: scale(1.1);
}

.wa-popup__body {
  padding: 20px 24px;
}

.wa-popup__msg {
  background-color: #ffffff; /* Burbuja blanca de alto contraste */
  color: var(--color-text); /* Verde oscuro para máxima legibilidad */
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 16px;
  line-height: 1.6;
  border: 1px solid rgba(181, 153, 87, 0.25);
  box-shadow: 0 4px 15px rgba(163, 133, 65, 0.05);
}

.wa-popup__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wa-input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.wa-popup__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(181, 153, 87, 0.3);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  background-color: #ffffff; /* Inputs blancos para fundirse con la burbuja */
  color: var(--color-text);
}
.wa-popup__input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}
.wa-popup__input:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(181, 153, 87, 0.1);
}

.wa-popup__input.has-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.wa-popup__error-text {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
  display: none;
  font-family: var(--font-body);
}

.wa-popup__error-text.show {
  display: block;
}

.wa-popup__submit {
  width: 100%;
  padding: 12px;
  background-color: var(--color-brand);
  color: #ffffff;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.wa-popup__submit:hover:not(:disabled) {
  background-color: transparent;
  color: var(--color-brand);
  border-color: var(--color-brand);
}
.wa-popup__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wa-popup__success {
  display: none;
  text-align: center;
  padding: 16px 0;
}
.wa-popup__success.show {
  display: block;
}
.wa-popup__success-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(181, 153, 87, 0.1);
  color: var(--color-accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.wa-popup__success-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.wa-popup__success h4 {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 4px;
}
.wa-popup__success p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.wa-popup__textarea {
  resize: vertical;
  min-height: 74px;
  font-family: var(--font-body);
  line-height: 1.5;
}
.wa-popup__textarea:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(181, 153, 87, 0.1);
}

/* ----- 15. Animaciones con Intersection Observer ----- */
.js .animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.js .animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll[data-delay="1"] { transition-delay: 0.1s; }
.animate-on-scroll[data-delay="2"] { transition-delay: 0.2s; }
.animate-on-scroll[data-delay="3"] { transition-delay: 0.3s; }
.animate-on-scroll[data-delay="4"] { transition-delay: 0.4s; }


.card, .feature, .precios-block, .blog-card, .unified-reviews-card, .comp-card, .premium-notice {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}


/* ----- 16. Media Queries para Soporte Responsivo ----- */
@media (max-width: 1024px) {
  .hero__inner {
    padding: 80px 24px 60px 24px;
  }
  .hero__title {
    white-space: normal;
  }
  .hero__logo-container {
    max-width: 90%;
    margin: 30px auto 45px auto;
  }
  .footer--detailed .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .precios-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 1199px) {
  :root {
    --navbar-height: 80px;
  }
  .navbar, .navbar.scrolled {
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    transform: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .navbar__links {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: 100%;
    height: calc(100dvh - var(--navbar-height));
    overflow-y: auto;
    visibility: hidden;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border-light);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(16px, 4vh, 36px);
    padding: clamp(20px, 3vw, 40px);
    transform: translateX(100%);
    transition: var(--transition-smooth);
    z-index: 999;
  }
  .navbar__links.open {
    transform: translateX(0);
    visibility: visible;
  }
  .navbar__links a:not(.btn) {
    font-size: 1.15rem;
  }
  .navbar__hamburger {
    display: flex;
  }
  .navbar__hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .navbar__hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  .navbar__hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .navbar__cta {
    display: none;
  }
  .nav-cta-mobile {
    display: inline-flex;
    margin-top: 20px;
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 768px) {
  .card--horizontal {
    grid-template-columns: 1fr;
  }
  .card--horizontal .card__image {
    aspect-ratio: 16 / 9;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  .card--horizontal .card__body {
    padding: 32px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .contact-map iframe {
    height: 350px;
  }
  .footer--detailed .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .wa-widget {
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
  }
  .wa-popup {
    width: min(440px, calc(100vw - 32px));
  }
}

.unified-reviews-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 36px);
  box-shadow: 
    0 24px 48px rgba(181, 153, 87, 0.05),
    0 4px 20px rgba(0, 0, 0, 0.02);
  gap: 24px;
  align-items: stretch;
  overflow: hidden; /* Evita cualquier barra de scroll */
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.unified-reviews-card__summary {
  width: 100%;
}

.google-badge-clean {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  width: 100%;
}

.unified-reviews-card__google-link {
  text-decoration: none;
  display: block;
  width: 100%;
}

.unified-reviews-card__google-link:hover .google-badge-clean__count {
  color: var(--color-accent);
  text-decoration: underline;
}

.google-badge-clean__title {
  font-family: var(--font-body);
  font-size: 0.76rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  line-height: 1;
}

.google-badge-clean__rating {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.google-badge-clean__stars {
  display: flex;
  gap: 4px;
}

.google-badge-clean__stars svg {
  width: 20px;
  height: 20px;
  fill: #ffb703;
}

.google-badge-clean__score {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--color-text);
  line-height: 1;
}

.google-badge-clean__count {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1;
  transition: color 0.3s ease;
}

.unified-reviews-card__divider {
  width: 100%;
  height: 1px;
  background: var(--color-border-light);
}

.unified-reviews-card__slider-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}

@keyframes reviewFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reviews-slider {
  position: relative;
  min-height: 140px; /* Prevent height jumping, adjusted for unified card */
  overflow: hidden;
}

.review-slide {
  display: none;
  width: 100%;
  flex-direction: column;
}

.review-slide.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  animation: reviewFadeIn 0.5s ease forwards;
}

.review-slide__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.review-slide__author {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
}

.review-slide__treatment {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-body);
  font-weight: 500;
  background-color: rgba(181, 153, 87, 0.15);
  color: var(--color-accent);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
}

.review-slide__text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text);
  font-style: italic;
  font-weight: 400;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 4px;
}

#prevBtn, #nextBtn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(163, 133, 65, 0.05);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}
#prevBtn:hover, #nextBtn:hover {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}
#prevBtn svg, #nextBtn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.slider-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-border);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.slider-dot.active {
  background-color: var(--color-accent);
  transform: scale(1.2);
}

/* =============================================================
   NUEVOS ESTILOS: COMPARATIVA Y DESPLEGABLES DE TRATAMIENTOS
   ============================================================= */

/* Comparativa Fisioterapia vs Osteopatía */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.comp-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: clamp(20px, 3vw, 40px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 16px 36px rgba(181, 153, 87, 0.04),
    0 4px 20px rgba(0, 0, 0, 0.02);
  position: relative;
  opacity: 0;
  animation: luxuryReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.comp-card:hover {
  transform: translateY(-4px);
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
}

.comp-card--accent {
  border-color: rgba(163, 133, 65, 0.35);
  background: rgba(163, 133, 65, 0.03);
  box-shadow: 0 15px 35px rgba(181, 153, 87, 0.04), inset 0 1px 0 0 rgba(163, 133, 65, 0.15);
}

.comp-card--accent:hover {
  background: rgba(163, 133, 65, 0.06);
  border-color: rgba(163, 133, 65, 0.65);
}

.comp-card__header {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 16px;
}

.comp-card__title {
  font-size: 1.8rem;
  margin: 0;
  color: var(--color-accent);
}

.comp-card__price {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--color-accent);
}

.comp-card__desc {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 28px;
  color: var(--color-text-muted);
}

.comp-card__list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.comp-card__list li {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 14px;
  position: relative;
  padding-left: 20px;
}

.comp-card__list li::before {
  content: "•";
  color: var(--color-accent);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.1rem;
}


.premium-notice {
  margin: 40px 0 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  box-shadow: 
    0 12px 28px rgba(181, 153, 87, 0.03),
    0 4px 20px rgba(0, 0, 0, 0.01);
}

.premium-notice__icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(181, 153, 87, 0.08);
  border: 1px solid rgba(181, 153, 87, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(181, 153, 87, 0.05);
}

.premium-notice__content {
  flex-grow: 1;
  min-width: 0;
}

.premium-notice__content h4 {
  font-family: var(--font-body) !important;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text) !important;
  margin-top: 0;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.premium-notice__content p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--color-text-muted) !important;
}

/* Variante azul para Madrid Mayor */
.premium-notice--blue {
  border-left-color: #0066cc;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.06) 0%, rgba(0, 102, 204, 0.02) 100%);
  border-color: rgba(0, 102, 204, 0.25);
}

.premium-notice--blue .premium-notice__icon-wrap {
  background: rgba(0, 102, 204, 0.1);
  border-color: rgba(0, 102, 204, 0.3);
  color: #3399ff;
}


/* Badges de Precios en Tarjetas */
.price-badge {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  background: rgba(181, 153, 87, 0.1);
  border: 1px solid rgba(181, 153, 87, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: inline-block;
}

/* Acordeón de más información en tarjetas */
.card__more-info {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card__more-info.open {
  max-height: 1200px;
  opacity: 1;
}

/* Estilos de listas y texto dentro del colapsable */
.card__more-info-text ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.card__more-info-text li {
  margin-bottom: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.card__more-info-text li strong {
  color: var(--color-text);
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
}

.card__more-info-highlight {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-text);
  background: rgba(181, 153, 87, 0.05);
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--color-accent);
  margin-bottom: 20px;
}

.toggle-icon {
  transform: rotate(0deg);
}

.js-toggle-info.active .toggle-icon {
  transform: rotate(180deg);
  color: var(--color-accent);
}


.botanical-watermark {
  display: none !important;
}


.editorial-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin: 12px 0 20px;
}

.editorial-divider::before,
.editorial-divider::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border) 40%, var(--color-border) 60%, transparent);
  flex-grow: 1;
  min-width: 0;
}

.editorial-divider__icon {
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.85;
}


@keyframes luxuryReveal {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.995);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Retardo secuencial para que las tarjetas aparezcan en cascada */
.card:nth-child(1), .precios-block:nth-child(1), .blog-card:nth-child(1), .comp-card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2), .precios-block:nth-child(2), .blog-card:nth-child(2), .comp-card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3), .precios-block:nth-child(3), .blog-card:nth-child(3), .comp-card:nth-child(3) { animation-delay: 0.25s; }
.card:nth-child(4) { animation-delay: 0.35s; }


.luxury-bg-watermarks {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.bg-watermark {
  position: absolute;
  opacity: 0.15;
  color: #a68a47;
  pointer-events: none;
  user-select: none;
}

.bg-watermark path {
  vector-effect: non-scaling-stroke;
}

.bg-watermark--lotus-1 {
  top: -24vw;
  right: -20vw;
  width: 60vw;
  height: auto;
  transform: rotate(155deg);
}

.bg-watermark--lotus-2 {
  top: 40%;
  right: -2vw;
  width: 60vw;
  height: auto;
  transform: rotate(-60deg);
}

.bg-watermark--lotus-3 {
  top: 3%;
  left: -30vw;
  width: 60vw;
  height: auto;
  transform: rotate(5deg);
}

.bg-watermark--lotus-4 {
  top: -28vw;
  left: 10vw;
  width: 54vw;
  height: auto;
  transform: rotate(165deg);
}

.container, .hero__inner, .page-header .container {
  position: relative;
  z-index: 2; /* Encima de las marcas de agua de fondo fixed */
}

@media (max-width: 768px) {
  .bg-watermark {
    opacity: 0.025; /* Prácticamente imperceptible pero presente en móvil */
  }
}

/* Scrollbar elegante para el modal */
.modal-card::-webkit-scrollbar {
  width: 6px;
}
.modal-card::-webkit-scrollbar-track {
  background: transparent;
}
.modal-card::-webkit-scrollbar-thumb {
  background: rgba(163, 133, 65, 0.3);
  border-radius: var(--radius-full);
}
.modal-card::-webkit-scrollbar-thumb:hover {
  background: rgba(163, 133, 65, 0.5);
}
.modal-card {
  scrollbar-width: thin;
  scrollbar-color: rgba(163, 133, 65, 0.3) transparent;
}

@media (min-width: 992px) {
  .nowrap-desktop {
    white-space: nowrap;
  }
}

/* Ocultar dinámicamente bloques de precios que no contengan elementos de tarifa */
.precios-block:not(:has(.precio-item)) {
  display: none !important;
}


/* ===== RGPD: consentimiento, honeypot, banner de cookies y enlaces legales ===== */

/* Campo trampa anti-spam: oculto para personas, accesible para bots. */
.wa-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Casilla de consentimiento del formulario de contacto. */
.wa-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}
.wa-consent input {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-brand);
}
.wa-consent a {
  color: var(--color-brand);
  font-weight: 600;
}

/* Enlaces legales del footer. */
.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  margin-top: 12px;
}
.footer__legal-links a {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}
.footer__legal-links a:hover {
  color: var(--color-accent);
}

/* Aviso de cookies (tarjeta ancha y baja, botón centrado debajo del texto). */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 12px 20px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(9, 13, 10, 0.22);
  z-index: 99999990;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cookie-banner.show {
  opacity: 1;
}
.cookie-banner__text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.cookie-banner__text a {
  color: var(--color-accent);
  font-weight: 600;
}
.cookie-banner .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .cookie-banner {
    bottom: 90px;
  }
}

/* ===== Sección "Síguenos en Redes Sociales" (home) ===== */
.social-section {
  padding-top: 88px;
  padding-bottom: 96px;
}

/* ===== Redes sociales (footer + sección "Síguenos") ===== */
.social-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-links__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: rgba(181, 153, 87, 0.08);
  border: 1px solid rgba(181, 153, 87, 0.25);
  color: var(--color-accent);
  transition: var(--transition-smooth);
}
.social-links__icon svg {
  width: 22px;
  height: 22px;
}
.social-links__icon:hover {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Variante más grande para la sección "Síguenos" bajo la galería de la home */
.social-links--lg {
  gap: 20px;
}
.social-links--lg .social-links__icon {
  width: 76px;
  height: 76px;
}
.social-links--lg .social-links__icon svg {
  width: 34px;
  height: 34px;
}

.map-consent {
  min-height: 320px;
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
}
.bono-modal-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}
.bono-modal-heading > :last-child {
  display: none;
}
html:not(.js) .navbar {
  position: static;
  transform: none;
  height: auto;
}
html:not(.js) .navbar__inner,
html:not(.js) .navbar__links {
  position: static;
  flex-wrap: wrap;
  height: auto;
  visibility: visible;
  transform: none;
  padding: 16px;
  gap: 16px;
}
html:not(.js) :is(.wa-widget, .navbar__hamburger, .js-open-wa, .js-toggle-info,
  .js-toggle-class-rates, .js-toggle-class-info, .js-load-map) {
  display: none;
}
html:not(.js) :is(.card__more-info, .class-rates-collapse, .class-info-collapse) {
  max-height: none !important;
  opacity: 1 !important;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
