/* =============================================================
   CLÍNICA DENTAL SERRERÍA — DRS. TORMO
   Hoja de estilos única · organizada por secciones
   1 Tokens · 2 Reset · 3 Utilidades · 4 Tipografía · 5 Componentes
   6 Secciones · 7 Efectos · 8 Responsive · 9 Reduced-motion
   ============================================================= */

/* =============================================================
   1. TOKENS
   ============================================================= */
:root {
  /* Color */
  --white:      #ffffff;
  --bg:         #0b2a43;
  --bg-2:       #103b59;
  --mint:       #164866;
  --deep:       #08263d;
  --brand:      #1c92c7;
  --brand-dark: #11739e;
  --brand-2:    #72d0ef;
  --ink:        #f4fbff;
  --muted:      #c3d9e5;
  --line:       rgba(191, 230, 245, 0.24);
  --line-soft:  rgba(191, 230, 245, 0.14);

  /* Sombras muy suaves */
  --shadow-xs: 0 1px 2px rgba(18, 59, 74, 0.04);
  --shadow-sm: 0 2px 10px rgba(18, 59, 74, 0.05);
  --shadow-md: 0 12px 30px -12px rgba(18, 59, 74, 0.16);
  --shadow-lg: 0 30px 60px -30px rgba(18, 59, 74, 0.28);

  /* Radios */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Tipografía */
  --display: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Ritmo */
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --maxw: 1200px;

  /* Easings */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Alturas */
  --header-h: 72px;
  --mobilebar-h: 62px;
}

/* =============================================================
   2. RESET & BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;              /* clip, no hidden: no rompe sticky */
}

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--deep);
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
  font-weight: 700;
}

::selection { background: var(--brand-2); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

@view-transition { navigation: auto; }

/* =============================================================
   3. UTILIDADES
   ============================================================= */
.container {
  width: min(var(--maxw), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}
.container--narrow { width: min(880px, 100% - (var(--gutter) * 2)); }

.section { padding-block: var(--section-y); }
.section--tint { background: var(--bg-2); }
.section--mint { background: var(--mint); }

.local-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 1.6rem);
  margin-top: 2.2rem;
}
.local-gallery-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: #12415f;
  box-shadow: var(--shadow-md);
}
.local-gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.local-gallery-card figcaption {
  padding: 0.9rem 1.1rem 1.05rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: 0.7rem 1.1rem; border-radius: var(--r-sm);
  background: var(--deep); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.stack-sm > * + * { margin-top: 0.6rem; }

/* =============================================================
   4. TIPOGRAFÍA
   ============================================================= */
.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.9rem;
  display: block;
}

h1, .h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2, .h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3, .h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); }

.lead {
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
  color: var(--muted);
  line-height: 1.7;
  max-width: 62ch;
}

.section-head { max-width: 720px; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 1rem; }

.prose p { color: var(--muted); }
.prose p + p { margin-top: 1rem; }
.prose h3 { margin-top: 2.2rem; margin-bottom: 0.7rem; }
.prose ul { margin-top: 1rem; display: grid; gap: 0.55rem; }
.prose ul li {
  position: relative; padding-left: 1.6rem; color: var(--muted);
}
.prose ul li::before {
  content: ""; position: absolute; left: 0.15rem; top: 0.72em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2);
}

/* =============================================================
   5. COMPONENTES
   ============================================================= */

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.55rem;
  padding: 0.92rem 1.5rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: -0.005em;
  line-height: 1.2;
  min-height: 48px;
  transition: transform 0.35s var(--ease-out), background-color 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
              color 0.35s var(--ease-out);
  text-align: center;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 10px 24px -12px rgba(25, 124, 146, 0.75);
}
.btn--primary:hover { background: var(--brand-dark); transform: translateY(-2px); }

.btn--ghost {
  border: 1px solid var(--line); color: var(--deep); background: #fff;
}
.btn--ghost:hover { border-color: var(--brand-2); background: var(--mint); transform: translateY(-2px); }

.btn--soft { background: var(--mint); color: var(--deep); }
.btn--soft:hover { background: #dcf1f1; transform: translateY(-2px); }

.btn--light { background: #fff; color: var(--deep); box-shadow: var(--shadow-sm); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn--wa { background: #1ea45c; color: #fff; }
.btn--wa:hover { background: #17874c; transform: translateY(-2px); }

.btn--sm { padding: 0.62rem 1.05rem; min-height: 42px; font-size: 0.9rem; }
.btn--block { width: 100%; }

.link-quiet {
  display: inline-flex; align-items: center; gap: 0.45rem;
  color: var(--brand); font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), gap 0.3s var(--ease-out);
}
.link-quiet:hover { border-color: currentColor; gap: 0.7rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 8, 8, 0.94);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .site-header { background: #0b2a43; }
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-xs); }

.header-inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.65rem; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-mark circle { fill: transparent; }
.brand-mark path { stroke: #fff; }
.brand-text { display: grid; line-height: 1.1; }
.brand-name {
  font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  color: #fff; letter-spacing: -0.02em;
}
.brand-sub { font-size: 0.7rem; color: rgba(255, 255, 255, 0.64); letter-spacing: 0.06em; text-transform: uppercase; }

.nav { display: none; }
.nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav a {
  font-size: 0.95rem; font-weight: 500; color: rgba(255, 255, 255, 0.82);
  padding-block: 0.4rem; position: relative;
  transition: color 0.3s var(--ease-out);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--brand-2); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.nav a:hover { color: #fff; }
.nav a:hover::after { transform: scaleX(1); }

body[data-page="inicio"] .nav a[href="index.html"],
body[data-page="servicios"] .nav a[href="servicios.html"],
body[data-page="reservar"] .nav a[href="reservar-cita.html"],
body[data-page="testimonios"] .nav a[href="testimonios.html"],
body[data-page="contacto"] .nav a[href="contacto.html"] { color: #fff; }
body[data-page="inicio"] .nav a[href="index.html"]::after,
body[data-page="servicios"] .nav a[href="servicios.html"]::after,
body[data-page="reservar"] .nav a[href="reservar-cita.html"]::after,
body[data-page="testimonios"] .nav a[href="testimonios.html"]::after,
body[data-page="contacto"] .nav a[href="contacto.html"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 0.7rem; }
.header-actions .btn { display: none; }
.header-actions .btn--primary { color: #111; background: #fff; }
.header-actions .btn--primary:hover { color: #111; background: #f3eee5; }

.nav-toggle {
  width: 46px; height: 46px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28); background: transparent;
}
.nav-toggle span {
  display: block; width: 19px; height: 1.6px; background: #fff;
  position: relative; border-radius: 2px;
  transition: transform 0.4s var(--ease-out), opacity 0.25s linear;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 19px; height: 1.6px;
  background: #fff; border-radius: 2px;
  transition: transform 0.4s var(--ease-out);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Menú móvil */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: #0a0a0a;
  padding: 1.5rem var(--gutter) 2.5rem;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), visibility 0.35s;
  overflow-y: auto;
}
.mobile-menu.is-open { opacity: 1; transform: none; visibility: visible; }
.mobile-menu ul { display: grid; gap: 0.25rem; }
.mobile-menu ul a {
  display: block; padding: 0.95rem 0.25rem;
  font-family: var(--display); font-size: 1.22rem; font-weight: 600; color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.mobile-menu .btn-row { margin-top: 1.6rem; display: grid; gap: 0.7rem; }
.mobile-menu .btn--primary { color: #111; background: #fff; }
.mobile-menu .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.mobile-menu .btn--ghost:hover { color: #111; background: #fff; }
.mobile-menu-foot {
  margin-top: 2rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.65);
  display: grid; gap: 0.35rem;
}

/* --- Tarjetas --- */
.card {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out),
              border-color 0.5s var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(52, 181, 184, 0.35); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--mint); }
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 1.5rem 1.5rem 1.7rem; display: flex; flex-direction: column; gap: 0.65rem; flex: 1; }
.card-body p { color: var(--muted); font-size: 0.96rem; }
.card-body .link-quiet { margin-top: auto; padding-top: 0.6rem; }

/* --- Iconos en círculo --- */
.icon-circle {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--mint); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.icon-circle svg { width: 22px; height: 22px; }

/* --- Formularios --- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--deep); }
.field .hint { font-size: 0.82rem; color: var(--muted); }

.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.85rem 1rem; min-height: 50px;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667780' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 18px;
  padding-right: 2.8rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(52, 181, 184, 0.16);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #c0392b; }
.field .error-msg { font-size: 0.82rem; color: #c0392b; display: none; }
.field.has-error .error-msg { display: block; }

.field-row { display: grid; gap: 1.1rem; }

.checkbox {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 0.9rem; color: var(--muted); line-height: 1.5;
}
.checkbox input { width: 20px; height: 20px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--brand); }
.checkbox a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.checkbox.has-error { color: #c0392b; }

.form-note {
  font-size: 0.87rem; color: var(--muted);
  background: var(--bg-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 0.9rem 1.05rem;
}
.form-status {
  border-radius: var(--r-md); padding: 0.9rem 1.05rem; font-size: 0.93rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-ok { background: var(--mint); color: var(--deep); border: 1px solid rgba(52, 181, 184, 0.4); }
.form-status.is-error { background: #fdeceb; color: #8f2b20; border: 1px solid #f0c2bd; }

/* --- FAQ --- */
.faq { display: grid; gap: 0.75rem; max-width: 820px; margin-inline: auto; }
.faq details {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.faq details[open] { border-color: rgba(52, 181, 184, 0.4); box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 1.15rem 3.2rem 1.15rem 1.35rem;
  font-family: var(--display); font-weight: 600; font-size: 1.02rem; color: var(--deep);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.35rem; top: 1.45rem;
  width: 12px; height: 12px;
  border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(45deg);
  transition: transform 0.35s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .faq-answer { padding: 0 1.35rem 1.35rem; color: var(--muted); font-size: 0.97rem; }

/* --- Migas de pan --- */
.breadcrumb { font-size: 0.85rem; color: var(--muted); padding-top: 1.4rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.45rem; color: var(--line); }
.breadcrumb a:hover { color: var(--brand); }

/* --- Barra móvil fija --- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-bar a {
  min-height: var(--mobilebar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 0.72rem; font-weight: 600; color: var(--deep);
}
.mobile-bar a svg { width: 20px; height: 20px; color: var(--brand); }
.mobile-bar a.is-primary { color: var(--brand); }

/* --- Botón flotante WhatsApp (escritorio) --- */
.wa-float {
  display: none;
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%;
  background: #1ea45c; color: #fff;
  align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -12px rgba(30, 164, 92, 0.8);
  transition: transform 0.4s var(--ease-out);
}
.wa-float:hover { transform: translateY(-3px) scale(1.04); }
.wa-float svg { width: 27px; height: 27px; }

/* --- Cookies --- */
.cookie-banner {
  position: fixed; z-index: 120;
  left: var(--gutter); right: var(--gutter);
  bottom: calc(var(--mobilebar-h) + 12px);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 1.2rem 1.3rem;
  display: none;
  max-width: 640px;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner p { font-size: 0.9rem; color: var(--muted); }
.cookie-title { font-family: var(--display); font-size: 1.02rem; color: var(--deep); margin-bottom: 0.4rem; }
.cookie-banner .btn-row { margin-top: 1rem; }
.cookie-banner a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.cookie-prefs { margin-top: 1rem; display: none; border-top: 1px solid var(--line-soft); padding-top: 1rem; }
.cookie-prefs.is-open { display: grid; gap: 0.8rem; }
.cookie-opt { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.88rem; color: var(--muted); }
.cookie-opt input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin-top: 2px; }
.cookie-opt strong { color: var(--deep); display: block; font-size: 0.92rem; }

/* =============================================================
   6. SECCIONES
   ============================================================= */

/* --- Hero --- */
.brand-intro {
  min-height: calc(100svh - var(--header-h));
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 38%, rgba(200, 165, 106, 0.10), transparent 34%),
    #050505;
}
.brand-intro__inner {
  min-height: calc(100svh - var(--header-h));
  padding-block: clamp(3rem, 8vw, 6rem) 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.brand-signature { display: grid; justify-items: center; }
.brand-signature__tooth {
  width: clamp(86px, 12vw, 142px);
  margin-bottom: clamp(1rem, 3vw, 1.7rem);
  fill: none;
  stroke: #fff;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-signature__name {
  max-width: 100%;
  color: #fff;
  font-family: "Parisienne", cursive;
  font-size: clamp(2.55rem, 7.5vw, 6.3rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
}
.brand-signature__doctors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1.6rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.68rem, 1.4vw, 0.82rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.appointment-bubble {
  margin-top: clamp(2.2rem, 5vw, 3.6rem);
  padding: 1rem clamp(1.35rem, 4vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--r-pill);
  color: #111;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35);
  font-family: var(--display);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  animation: appointment-pulse 1.65s ease-in-out infinite;
}
.appointment-bubble:hover { transform: translateY(-3px) scale(1.02); }
.brand-intro__scroll {
  margin-top: auto;
  padding-top: 2rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@keyframes appointment-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.34), 0 12px 32px rgba(0, 0, 0, 0.28); opacity: 1; }
  50% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0), 0 12px 32px rgba(0, 0, 0, 0.28); opacity: 0.78; }
}

.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 70%;
  background: radial-gradient(90% 120% at 85% 0%, rgba(52, 181, 184, 0.12) 0%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none; z-index: -1;
}
.hero-grid { display: grid; gap: clamp(2.2rem, 5vw, 4rem); align-items: center; }
.hero-title { margin-bottom: 1.3rem; font-size: clamp(2.25rem, 5.5vw, 4.9rem); }
.hero h1 { margin-bottom: 1.3rem; }
.hero .lead { margin-bottom: 2rem; }
.hero .btn-row { margin-bottom: 1.4rem; }
.hero-phone {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.95rem; color: var(--muted);
}
.hero-phone strong { color: var(--deep); font-weight: 600; }
.hero-phone svg { width: 17px; height: 17px; color: var(--brand); }

.hero-figure { position: relative; }
.hero-figure img {
  width: 100%; border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3; object-fit: cover;
}
.hero-badge {
  position: absolute; left: 12px; bottom: 18px;
  background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 0.95rem 1.2rem;
  display: flex; align-items: center; gap: 0.8rem;
  max-width: 260px;
}
.hero-badge .num {
  font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--brand);
  line-height: 1;
}
.hero-badge span { font-size: 0.85rem; color: var(--muted); line-height: 1.35; }

/* --- Franja de confianza --- */
.trust { border-block: 1px solid var(--line-soft); background: var(--bg-2); }
.trust-grid {
  display: grid; gap: 1.4rem 1.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-block: clamp(1.8rem, 3.5vw, 2.6rem);
}
.trust-item { display: flex; gap: 0.85rem; align-items: center; }
.trust-item svg { width: 24px; height: 24px; color: var(--brand); flex: none; }
.trust-item strong {
  font-family: var(--display); font-size: 0.98rem; font-weight: 600; color: var(--deep);
  line-height: 1.3;
}

/* --- Rejilla de tratamientos --- */
.grid-cards {
  display: grid; gap: clamp(1.1rem, 2vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

/* --- Sección "sobre la clínica" --- */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split-figure img {
  width: 100%; border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3; object-fit: cover;
}
.split-body h2 { margin-bottom: 1.2rem; }
.split-body p { color: var(--muted); }
.split-body p + p { margin-top: 1rem; }
.split-body .btn-row { margin-top: 1.8rem; }
.team-names { display: flex; flex-wrap: wrap; gap: 0.55rem 1.4rem; }
.team-names strong { color: var(--deep); }

/* --- Por qué elegirnos --- */
.reasons { display: grid; gap: clamp(1.2rem, 2.4vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.reason {
  background: #fff; border-radius: var(--r-lg); padding: 1.7rem 1.5rem;
  border: 1px solid var(--line-soft); box-shadow: var(--shadow-xs);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.reason:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.reason h3 { margin: 1rem 0 0.5rem; }
.reason p { color: var(--muted); font-size: 0.95rem; }

/* --- CTA intermedio --- */
.cta-band { position: relative; overflow: hidden; background: var(--deep); color: #fff; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("assets/img/revision-dental-valencia.webp");
  background-size: cover; background-position: center;
  opacity: 0.20;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(5, 5, 5, 0.96) 25%, rgba(5, 5, 5, 0.78) 100%);
}
.cta-band .container { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.82); margin-top: 1rem; max-width: 56ch; }
.cta-band .btn-row { margin-top: 2rem; }
.cta-band .btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.cta-band .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* --- Testimonios --- */
.reviews { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.review {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  padding: 1.6rem 1.5rem; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 0.9rem;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.review:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.review-stars { display: flex; gap: 3px; color: #f0a500; }
.review-stars svg { width: 17px; height: 17px; }
.review p { color: var(--ink); font-size: 0.97rem; }
.review footer { margin-top: auto; font-size: 0.87rem; color: var(--muted); }
.review-placeholder {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand); background: var(--mint); border-radius: var(--r-pill);
  padding: 0.25rem 0.7rem; font-weight: 600; align-self: flex-start;
}
.review-source-link {
  color: var(--brand); font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.review-source-link:hover { color: var(--deep); }
.review-person { display: flex; align-items: center; gap: 0.75rem; }
.review-person > span:last-child { display: grid; line-height: 1.25; }
.review-person strong { color: var(--deep); }
.review-person small { margin-top: 0.18rem; color: var(--muted); font-size: 0.78rem; }
.review-avatar {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border-radius: 50%; color: #fff; background: var(--brand);
  font-family: var(--display); font-size: 0.78rem; font-weight: 700;
}
.closing-cta { background: #fff; }
.closing-cta__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 2rem; padding: clamp(2rem, 5vw, 3.5rem); border: 1px solid var(--line);
  border-radius: var(--r-xl); background: var(--bg-2);
}
.closing-cta__inner > div:first-child { max-width: 700px; }
.closing-cta h2 { margin-top: 0.55rem; }
.closing-cta p { margin-top: 0.8rem; color: var(--muted); }
.reviews-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 1.3rem 1.5rem; margin-bottom: 2rem;
}
.reviews-summary .score {
  font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--deep); line-height: 1;
}
.reviews-summary .meta { font-size: 0.92rem; color: var(--muted); }

/* --- Contacto / mapa --- */
.contact-grid { display: grid; gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.contact-list { display: grid; gap: 1.3rem; margin-block: 1.8rem; }
.contact-item { display: flex; gap: 0.9rem; align-items: flex-start; }
.contact-item .icon-circle { width: 42px; height: 42px; }
.contact-item strong { display: block; font-family: var(--display); color: var(--deep); font-size: 0.95rem; }
.contact-item a, .contact-item span { color: var(--muted); font-size: 0.96rem; }
.contact-item a:hover { color: var(--brand); }

.map-frame {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--line-soft); box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3; background: var(--mint);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.map-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.9rem; text-align: center; padding: 1.5rem;
  background:
    radial-gradient(80% 80% at 50% 0%, rgba(52, 181, 184, 0.18), rgba(255, 255, 255, 0) 70%),
    var(--mint);
}
.map-placeholder p { font-size: 0.9rem; color: var(--muted); max-width: 34ch; }

.hours { display: grid; gap: 0.5rem; margin-top: 0.4rem; }
.hours li {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: 0.93rem; color: var(--muted);
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--line-soft);
}
.hours li strong { color: var(--deep); font-weight: 600; }

.panel {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-xl);
  box-shadow: var(--shadow-md); padding: clamp(1.5rem, 3vw, 2.4rem);
}
.panel--tint { background: var(--bg-2); box-shadow: none; }

/* --- Cabecera de página interior --- */
.page-hero { background: var(--bg-2); border-bottom: 1px solid var(--line-soft); position: relative; }
.page-hero-inner { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 4rem); max-width: 760px; }
.page-hero h1 { margin-bottom: 1.2rem; }

/* --- Bloques de servicio --- */
.service-block { scroll-margin-top: calc(var(--header-h) + 24px); }
.service-block + .service-block { margin-top: clamp(3.2rem, 7vw, 5.5rem); }
.service-block .split-figure img { aspect-ratio: 4 / 3; }

/* --- Footer --- */
.site-footer { background: var(--deep); color: rgba(255, 255, 255, 0.78); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-grid { display: grid; gap: 2.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-footer h3 {
  color: #fff; font-size: 0.95rem; letter-spacing: 0.02em; margin-bottom: 1rem;
  font-weight: 600;
}
.site-footer p, .site-footer li, .site-footer address { font-size: 0.92rem; font-style: normal; line-height: 1.75; }
.site-footer ul { display: grid; gap: 0.45rem; }
.site-footer a { transition: color 0.3s var(--ease-out); }
.site-footer a:hover { color: var(--brand-2); }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: rgba(255, 255, 255, 0.6); }
.footer-brand p { margin-top: 1rem; max-width: 34ch; }
.footer-bottom {
  margin-top: 2.8rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; justify-content: space-between;
  font-size: 0.85rem;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.8rem 1.3rem; }

/* Espacio para la barra móvil */
body { padding-bottom: var(--mobilebar-h); }

/* --- Agenda online --- */
.booking-channels { padding-bottom: 0; }
.booking-channel-grid { display: grid; gap: 1rem; }
.booking-channel {
  display: flex; flex-direction: column; gap: 0.7rem;
  min-height: 100%; padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
}
.booking-channel p { color: var(--muted); }
.booking-channel .btn { margin-top: auto; }
.booking-channel__number {
  color: var(--brand-2); font-family: var(--display); font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.14em;
}
.booking-channel--featured { color: #fff; background: #0a0a0a; }
.booking-channel--featured h2, .booking-channel--featured p { color: #fff; }
.booking-channel--featured .btn--primary { color: #111; background: #fff; }
.booking-section { scroll-margin-top: calc(var(--header-h) + 18px); }
.booking-shell {
  display: grid; overflow: hidden;
  margin-top: clamp(2rem, 4vw, 3rem);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.booking-steps {
  display: grid; gap: 1rem; align-content: start;
  padding: clamp(1.4rem, 3vw, 2rem);
  color: var(--muted); background: var(--deep);
}
.booking-steps li {
  display: grid; grid-template-columns: 34px 1fr; column-gap: 0.8rem;
  padding: 0.95rem; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08);
}
.booking-steps li > span {
  grid-row: 1 / 3; display: grid; place-items: center; align-self: start;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--deep); background: var(--brand-2); font-family: var(--display); font-weight: 700;
}
.booking-steps strong { color: #fff; font-size: 0.96rem; }
.booking-steps small { color: rgba(255, 255, 255, 0.66); font-size: 0.82rem; line-height: 1.45; }
.booking-stage { min-width: 0; min-height: 430px; display: grid; }
.booking-pending, .booking-consent {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: clamp(2rem, 5vw, 4rem); min-height: 430px;
}
.booking-pending h3, .booking-consent h3 { margin-top: 1rem; font-size: clamp(1.25rem, 3vw, 1.6rem); }
.booking-pending p, .booking-consent p { color: var(--muted); max-width: 56ch; margin-top: 0.75rem; }
.booking-event-label { width: min(100%, 340px); margin-top: 1.25rem; text-align: left; color: var(--deep); font-size: 0.82rem; font-weight: 700; }
.booking-event-select { width: min(100%, 340px); margin-top: 0.35rem; padding: 0.78rem 2.2rem 0.78rem 0.9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--deep); font: inherit; }
.booking-pending .btn-row, .booking-consent .btn { margin-top: 1.5rem; }
.booking-status-dot {
  width: 16px; height: 16px; border-radius: 50%; background: #f2b84b;
  box-shadow: 0 0 0 7px rgba(242, 184, 75, 0.16);
}
.booking-ready { min-width: 0; }
.booking-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.5rem;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.booking-toolbar p { color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }
.booking-live { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--deep); font-size: 0.84rem; font-weight: 700; }
.booking-live i { width: 8px; height: 8px; border-radius: 50%; background: #1ea45c; box-shadow: 0 0 0 4px rgba(30, 164, 92, 0.12); }
.booking-external { color: var(--brand); font-size: 0.84rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.booking-calendar-icon {
  width: 62px; height: 58px; position: relative;
  border: 2px solid var(--brand); border-radius: 12px; background: var(--mint);
}
.booking-calendar-icon::before {
  content: ""; position: absolute; left: -2px; right: -2px; top: 13px;
  height: 2px; background: var(--brand);
}
.booking-calendar-icon::after {
  content: ""; position: absolute; left: 15px; top: 27px; width: 9px; height: 16px;
  border-right: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(42deg);
}
.booking-calendar-icon span::before, .booking-calendar-icon span::after {
  content: ""; position: absolute; top: -7px; width: 4px; height: 14px;
  border-radius: 3px; background: var(--brand);
}
.booking-calendar-icon span::before { left: 13px; }
.booking-calendar-icon span::after { right: 13px; }
.booking-consent small { color: var(--muted); max-width: 56ch; margin-top: 1rem; font-size: 0.76rem; }
.booking-consent small a, .booking-help a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.booking-frame { min-height: 720px; background: #fff; }
.booking-frame iframe { width: 100%; min-height: 720px; border: 0; background: #fff; }
.booking-loading, .booking-load-error {
  min-height: 720px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.8rem; padding: clamp(2rem, 5vw, 4rem); text-align: center;
}
.booking-loading strong, .booking-load-error h3 { color: var(--deep); font-family: var(--display); font-size: 1.25rem; }
.booking-loading small, .booking-load-error p { max-width: 54ch; color: var(--muted); }
.booking-load-error .btn-row { justify-content: center; margin-top: 0.5rem; }
.booking-spinner {
  width: 42px; height: 42px; border: 4px solid var(--mint); border-top-color: var(--brand);
  border-radius: 50%; animation: booking-spin 0.8s linear infinite;
}
@keyframes booking-spin { to { transform: rotate(360deg); } }
.booking-help { max-width: 760px; margin: 1.4rem auto 0; text-align: center; color: var(--muted); font-size: 0.9rem; }
.booking-shell--single { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin-inline: auto; }

/* --- Asistente virtual propio --- */
.chatbot { position: relative; z-index: 115; }
.chat-launch {
  position: fixed; right: 14px; bottom: calc(var(--mobilebar-h) + 14px); z-index: 115;
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 48px; padding: 0.45rem 0.85rem 0.45rem 0.45rem;
  color: #fff; background: var(--brand); border: 1px solid rgba(255, 255, 255, 0.72); border-radius: var(--r-pill);
  box-shadow: 0 15px 34px -13px rgba(0, 0, 0, 0.72);
  font-size: 0.84rem; font-weight: 700;
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.chat-launch:hover { transform: translateY(-2px); background: var(--brand-dark); }
.chat-launch-icon {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  color: var(--deep); background: #fff; font-family: var(--display); font-size: 1.05rem; font-weight: 700;
}
.chatbot.is-open .chat-launch { opacity: 0; pointer-events: none; }
.chat-panel {
  position: fixed; right: 14px; bottom: calc(var(--mobilebar-h) + 14px); z-index: 116;
  width: min(400px, calc(100vw - 28px));
  max-height: min(650px, calc(100dvh - var(--mobilebar-h) - 28px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 28px 70px -26px rgba(18, 59, 74, 0.55);
  transform-origin: bottom right;
}
.chat-panel[hidden] { display: none; }
.chat-head {
  display: flex; align-items: center; gap: 0.75rem; padding: 1rem;
  color: #fff; background: var(--deep);
}
.chat-avatar {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%;
  color: var(--deep); background: var(--brand-2); font-family: var(--display); font-weight: 700;
}
.chat-head-copy { min-width: 0; flex: 1; }
.chat-head strong { display: block; color: #fff; font-size: 0.94rem; }
.chat-head small { display: flex; align-items: center; gap: 0.4rem; color: rgba(255, 255, 255, 0.7); font-size: 0.76rem; }
.chat-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #67d28a; }
.chat-close { width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 1.55rem; line-height: 1; }
.chat-close:hover { background: rgba(255, 255, 255, 0.1); }
.chat-log {
  min-height: 180px; flex: 1 1 270px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1rem; background: linear-gradient(180deg, var(--bg-2), #fff);
  overscroll-behavior: contain;
}
.chat-message { max-width: 88%; font-size: 0.88rem; line-height: 1.5; }
.chat-message p { padding: 0.72rem 0.85rem; border-radius: 16px; }
.chat-message--bot { align-self: flex-start; }
.chat-message--bot p { color: var(--ink); background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; box-shadow: var(--shadow-xs); }
.chat-message--user { align-self: flex-end; }
.chat-message--user p { color: #fff; background: var(--brand); border-bottom-right-radius: 5px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.55rem; }
.chat-action {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0.35rem 0.65rem;
  color: var(--brand); background: #fff; border: 1px solid rgba(25, 124, 146, 0.25);
  border-radius: var(--r-pill); font-size: 0.76rem; font-weight: 700;
}
.chat-action:hover { border-color: var(--brand); background: var(--mint); }
.chat-action--primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.chat-action--primary:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.chat-consent { max-width: 100%; }
.chat-consent p { border-color: rgba(25, 124, 146, 0.28); background: var(--mint); }
.chat-message--typing p { display: flex; align-items: center; gap: 4px; min-width: 52px; }
.chat-message--typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  animation: chatTyping 1.05s ease-in-out infinite;
}
.chat-message--typing span:nth-child(2) { animation-delay: 0.14s; }
.chat-message--typing span:nth-child(3) { animation-delay: 0.28s; }
@keyframes chatTyping {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.chat-quick {
  display: flex; gap: 0.45rem; overflow-x: auto; padding: 0.8rem 1rem 0.4rem;
  border-top: 1px solid var(--line-soft); scrollbar-width: thin;
}
.chat-quick button {
  flex: none; min-height: 34px; padding: 0.35rem 0.7rem;
  color: var(--deep); background: var(--mint); border-radius: var(--r-pill);
  font-size: 0.76rem; font-weight: 600;
}
.chat-quick button:hover { color: #fff; background: var(--brand); }
.chat-quick button:disabled, .chat-send:disabled { opacity: 0.55; cursor: wait; }
.chat-form { display: flex; gap: 0.55rem; padding: 0.65rem 1rem; }
.chat-form input {
  min-width: 0; flex: 1; min-height: 44px; padding: 0.65rem 0.8rem;
  color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-pill); font: inherit; font-size: 0.84rem;
}
.chat-form input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(52, 181, 184, 0.14); }
.chat-send {
  flex: none; min-width: 68px; min-height: 44px; padding-inline: 0.75rem;
  color: #fff; background: var(--brand); border-radius: var(--r-pill); font-size: 0.8rem; font-weight: 700;
}
.chat-send:hover { background: var(--brand-dark); }
.chat-privacy { padding: 0 1rem 0.85rem; color: var(--muted); font-size: 0.68rem; line-height: 1.4; }
.chat-quick[hidden], .chat-form[hidden], .chat-privacy[hidden] { display: none; }

/* =============================================================
   7. EFECTOS (reveal on scroll)
   ============================================================= */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
/* Si JS no arranca, nada se queda invisible */
.no-js .reveal { opacity: 1; transform: none; }

/* Transiciones de página */
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: 0.4s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================
   8. RESPONSIVE
   ============================================================= */
@media (max-width: 959px) {
  /* El desenfoque del header convertía el menú fijo en un elemento
     limitado por la altura de la cabecera en algunos navegadores móviles. */
  .site-header {
    z-index: 130;
    background: #0b2a43;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .header-inner {
    position: relative;
    z-index: 100;
    background: #0b2a43;
  }
  .mobile-menu {
    z-index: 125;
    inset: var(--header-h) 0 var(--mobilebar-h) 0;
    max-height: calc(100vh - var(--header-h) - var(--mobilebar-h));
    max-height: calc(100dvh - var(--header-h) - var(--mobilebar-h));
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
}

@media (min-width: 540px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cookie-banner { left: auto; right: 20px; width: min(460px, calc(100% - 40px)); }
}

@media (min-width: 720px) {
  .trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-badge { left: -26px; }
  .booking-channel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  :root { --header-h: 80px; }
  body { padding-bottom: 0; }
  .nav { display: block; }
  .header-actions .btn { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none; }
  .mobile-bar { display: none; }
  .wa-float { display: flex; }
  .cookie-banner { bottom: 20px; }
  .chat-launch { right: 88px; bottom: 22px; }
  .chat-panel { right: 22px; bottom: 88px; max-height: min(650px, calc(100dvh - 110px)); }

  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split-figure { order: 2; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid--wide { grid-template-columns: 0.9fr 1.1fr; }
  .booking-shell { grid-template-columns: 300px minmax(0, 1fr); }
  .booking-shell--single { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1280px) {
  .hero-grid { gap: 4.5rem; }
}

/* =============================================================
   9. REDUCED MOTION (solo lo intrusivo)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition-duration: 0.35s; }
  .chat-launch { transition: none; }
  .chat-message--typing span { animation: none; opacity: 0.7; }
  .appointment-bubble { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* =============================================================
   10. AJUSTES FINALES
   ============================================================= */
.section-head--center .lead { margin-inline: auto; }
.trust-item a { transition: color 0.3s var(--ease-out); }
.trust-item a:hover { color: var(--brand); }
main:focus { outline: none; }
.hours li:last-child { border-bottom: 0; padding-bottom: 0; }
.review-stars svg { flex: none; }
.breadcrumb ol { margin: 0; }

/* =============================================================
   11. IDENTIDAD AZUL MARINO · REVISIÓN DE CLIENTE
   ============================================================= */
body { color: var(--ink); background: var(--bg); }
h1, h2, h3, h4 { color: #f7fcff; }
.lead, .section-head p, .split-body p, .card-body p, .reason p { color: var(--muted); }
.kicker { color: var(--brand-2); }
.link-quiet, .breadcrumb a:hover, .review-source-link, .booking-external { color: var(--brand-2); }

.site-header { background: rgba(6, 21, 34, 0.94); border-bottom-color: rgba(167, 214, 237, 0.12); }
@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .site-header { background: #0b2a43; }
}
.mobile-menu, .header-inner { background: #0b2a43; }
.nav a::after { background: var(--brand-2); }

.brand-intro {
  background:
    radial-gradient(circle at 50% 34%, rgba(103, 200, 236, 0.16), transparent 36%),
    linear-gradient(155deg, #04111d 0%, #092a44 100%);
}
.brand-signature__tooth { stroke: #dff6ff; }
.appointment-bubble { color: #052038; border-color: #cdefff; background: #eaf9ff; }

.hero { background: linear-gradient(135deg, rgba(18, 78, 112, 0.90), rgba(8, 38, 61, 0.96)); }
.hero::before { background: radial-gradient(80% 100% at 88% 0%, rgba(74, 182, 224, 0.18), transparent 62%); }
.hero-phone, .hero-phone strong { color: #dcecf4; }
.seo-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.25rem 0 1.7rem;
}
.seo-specialties a {
  padding: 0.48rem 0.78rem;
  border: 1px solid rgba(103, 200, 236, 0.34);
  border-radius: var(--r-pill);
  color: #dff5ff;
  background: rgba(16, 61, 92, 0.7);
  font-size: 0.78rem;
  font-weight: 600;
  transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
.seo-specialties a:hover { border-color: var(--brand-2); background: rgba(22, 137, 189, 0.28); }
.hero-badge { color: var(--ink); background: #0d2b44; border: 1px solid var(--line); }
.hero-badge span { color: var(--muted); }
.hero-badge .num { color: var(--brand-2); }

.trust, .section--tint, .page-hero { background-color: var(--bg-2); }
.trust-item strong { color: #f5fbff; }
.trust-item svg { color: var(--brand-2); }
.section--mint { background: #0b2439; }

.section--tint, .page-hero { position: relative; isolation: isolate; overflow: hidden; }
.section--tint::before, .page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("assets/favicon.svg");
  background-size: 190px 190px;
  background-repeat: repeat;
  opacity: 0.035;
  transform: rotate(-5deg) scale(1.08);
  pointer-events: none;
}
.page-hero::after { background-size: 260px 260px; background-position: 90% 50%; background-repeat: no-repeat; opacity: 0.08; transform: none; }
body[data-page="servicios"] .page-hero {
  background-image:
    linear-gradient(90deg, rgba(7, 35, 56, 0.94) 20%, rgba(12, 60, 88, 0.78)),
    url("assets/img/clinica-local-gabinete-2.jpg");
  background-size: cover;
  background-position: center;
}

.card, .reason, .review, .panel, .faq details, .booking-channel, .booking-shell,
.map-placeholder, .cookie-banner, .closing-cta__inner {
  color: var(--ink);
  background: #0d2941;
  border-color: var(--line);
  box-shadow: 0 18px 42px -28px rgba(0, 0, 0, 0.72);
}
.card:hover, .reason:hover, .review:hover { border-color: rgba(103, 200, 236, 0.52); }
.review-person strong, .faq summary, .field label, .contact-item strong, .booking-live,
.team-names strong, .hours li strong, .reviews-summary .score, .cookie-title, .cookie-opt strong,
.booking-loading strong, .booking-load-error h3 { color: #f7fcff; }
.review-avatar, .icon-circle { color: #eaf9ff; background: #123d5c; }
.review-source-link:hover { color: #fff; }
.closing-cta { background: #08243b; }
.closing-cta__inner { background: linear-gradient(135deg, #12415f, #184966); }

.btn--primary { color: #fff; background: var(--brand); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost {
  color: #f4fbff;
  background: #184966;
  border-color: rgba(174, 221, 242, 0.52);
}
.btn--ghost:hover {
  color: #fff;
  border-color: var(--brand-2);
  background: #205b7d;
}
.btn--soft { color: #e8f7ff; background: #174967; }
.header-actions .btn--primary, .mobile-menu .btn--primary { color: #052038; background: #eaf9ff; }

.field input, .field select, .field textarea {
  color: #f2fbff;
  background-color: #0d3450;
  border-color: var(--line);
}
.field input::placeholder, .field textarea::placeholder { color: #829eae; }
.field select option { color: #f2fbff; background: #0d3450; }
.form-note, .booking-toolbar { color: var(--muted); background: #0a2237; }
.form-status.is-ok { color: #eaf9ff; }
.checkbox a, .booking-consent small a, .booking-help a { color: var(--brand-2); }

.booking-channel--featured { background: linear-gradient(145deg, #0f5275, #0b334f); border-color: rgba(103, 200, 236, 0.5); }
.booking-channel--featured .btn--primary { color: #062039; background: #eaf9ff; }
.booking-consent { background: #0d2941; }
.booking-calendar-icon { background: #102f49; border-color: var(--brand-2); }
.booking-calendar-icon::before, .booking-calendar-icon span::before, .booking-calendar-icon span::after { background: var(--brand-2); }
.booking-calendar-icon::after { border-color: var(--brand-2); }
.booking-frame, .booking-frame iframe { background: #fff; }

.mobile-bar { background: rgba(6, 21, 34, 0.96); border-color: var(--line); }
.mobile-bar a { color: #d9eef7; }
.mobile-bar a svg, .mobile-bar a.is-primary { color: var(--brand-2); }
.wa-float { border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 14px 34px -10px rgba(30, 164, 92, 0.95); }

.chat-panel, .chat-message--bot p, .chat-action, .chat-consent p { color: var(--ink); background: #0d2941; border-color: var(--line); }
.chat-head { background: #0d3450; }
.chat-avatar { color: #062039; background: var(--brand-2); }
.chat-form input { color: #f4fbff; background: #0d3450; border-color: var(--line); }
.chat-quick, .chat-form { border-color: var(--line); background: #0f3956; }
.chat-quick button { color: #cfeaf6; background: #174867; }
.chat-action--primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.chat-privacy { color: #a8c4d2; background: #0f3956; }

.site-footer { background: #03101b; }
.footer-brand .brand-sub { color: rgba(255, 255, 255, 0.62); }

@media (max-width: 959px) {
  .site-header, .header-inner { background: #0b2a43; }
}

@media (max-width: 719px) {
  .local-gallery-grid { grid-template-columns: 1fr; }
  .brand-signature__doctors { display: grid; }
  .brand-intro__scroll { display: none; }
  .reviews--carousel {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 0.7rem;
    scrollbar-width: thin;
  }
  .reviews--carousel .review { min-width: min(86vw, 350px); scroll-snap-align: center; }
}

