/* ============================================================
   styles.css — Clínica Dental Gingiva.
   Paleta de la clínica física: roble (madera), negro (sillones), blanco (puertas).
   Tipografías locales (RGPD): Manrope (texto) + Instrument Serif itálica (acentos).
   ============================================================ */

@font-face {
    font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("../fonts/manrope-latin-wght.woff2") format("woff2");
}
@font-face {
    font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
    src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
}
@font-face {
    font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
}

/* --- Reset mínimo --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }

:root {
    --oak: #9c6b3c;                /* roble: color de marca (AA sobre blanco) */
    --oak-dark: #855b33;
    --oak-light: #c9a27a;          /* solo sobre negro */
    --oak-50: #f7f1ea;             /* blanco cálido de fondo */
    --oak-100: #eee2d3;
    --ink: #111111;                /* negro de los sillones */
    --ink-2: #1c1a18;
    --white: #ffffff;
    --text: #1d1b19;
    --muted: #5f5850;
    --muted-light: #b9b1a7;
    --border: #e4dcd2;

    /* Compatibilidad con las variables del esqueleto Hermes */
    --color-primary: var(--oak);
    --color-primary-dark: var(--oak-dark);
    --color-text: var(--text);
    --color-muted: var(--muted);
    --color-bg: var(--white);
    --color-bg-alt: var(--oak-50);
    --color-border: var(--border);

    --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-accent: "Instrument Serif", Georgia, serif;
    --measure: 92rem;
    --radius: 18px;
    --radius-sm: 10px;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --section: clamp(4rem, 9vw, 8rem);
    --ease: cubic-bezier(.2, .7, .2, 1);
    --header-h: 76px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    font-size: 1.0625rem;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; margin-block: 0 0.5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); }
h4 { font-size: 1.1rem; }
h1 em, h2 em, .display em {
    font-family: var(--font-accent); font-style: italic; font-weight: 400;
    color: var(--oak); letter-spacing: -0.01em;
}
p, ul, ol, blockquote, table, figure { margin-block: 0 1.1em; }
a { color: var(--oak); text-underline-offset: 0.18em; }
a:hover { color: var(--oak-dark); }
strong { font-weight: 700; }
blockquote { border-left: 3px solid var(--oak); padding-left: 1.2rem; color: var(--muted); font-style: italic; }

/* Foco visible (accesibilidad AA) */
:focus-visible { outline: 3px solid var(--oak); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 1000;
    background: var(--ink); color: var(--white); padding: 0.6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.container { max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }
main { display: block; }

/* --- Botones --- */
.btn {
    display: inline-flex; align-items: center; gap: 0.6em; justify-content: center;
    padding: 0.95em 1.7em; border-radius: 999px; border: 1px solid var(--ink);
    background: var(--ink); color: var(--white); font-weight: 600; font-size: 0.98rem;
    text-decoration: none; cursor: pointer; line-height: 1.2;
    transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), border-color .3s;
}
.btn:hover { background: var(--oak); border-color: var(--oak); color: var(--white); transform: translateY(-2px); }
.btn--oak { background: var(--oak); border-color: var(--oak); }
.btn--oak:hover { background: var(--oak-dark); border-color: var(--oak-dark); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); }
.btn--light { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--oak-light); border-color: var(--oak-light); color: var(--ink); }
.btn--ghost-light { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .5); color: var(--white); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn--ghost-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--sm { padding: 0.7em 1.3em; font-size: 0.9rem; }
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }

.linklike {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: inherit; text-decoration: underline; text-underline-offset: 0.18em;
}
.link-arrow { font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow:hover { color: var(--oak); }

/* --- Tipografía de sección --- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--oak); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 1.8rem; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--oak-light); }
.display { font-size: clamp(2rem, 4.4vw, 3.6rem); letter-spacing: -0.035em; }
.display--light { color: var(--white); }
.display--light em { color: var(--oak-light); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--muted); line-height: 1.55; }

/* --- Glass --- */
.glass {
    background: linear-gradient(135deg, rgb(255 255 255 / .55), rgb(255 255 255 / .22));
    border: 1px solid rgb(255 255 255 / .75);
    box-shadow: 0 30px 70px -25px rgb(17 17 17 / .35), inset 0 1px 0 rgb(255 255 255 / .9), inset 0 -1px 0 rgb(255 255 255 / .25);
    backdrop-filter: blur(26px) saturate(1.8); -webkit-backdrop-filter: blur(26px) saturate(1.8);
    border-radius: var(--radius);
}
.glass--dark {
    background: linear-gradient(135deg, rgb(255 255 255 / .14), rgb(255 255 255 / .03));
    border-color: rgb(255 255 255 / .22);
    box-shadow: 0 30px 80px -30px rgb(0 0 0 / .6);
    color: var(--white);
}

/* --- Aparición al hacer scroll (main.js añade .is-visible) --- */
.js [data-reveal] {
    opacity: 0; transform: translateY(28px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: var(--d, 0s);
}
.js [data-reveal="left"] { transform: translateX(-36px); }
.js [data-reveal="right"] { transform: translateX(36px); }
.js [data-reveal="zoom"] { transform: scale(.94); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js .split-words .w { display: inline-block; opacity: 0; transform: translateY(0.5em); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i) * 60ms + .1s); }
.js .split-words.is-visible .w { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-reveal], .js .split-words .w { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* --- Top bar --- */
.topbar { background: var(--ink); color: var(--muted-light); font-size: 0.82rem; }
.topbar__inner { display: flex; gap: 1.6rem; align-items: center; min-height: 38px; }
.topbar__item { margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.topbar__item:first-child { color: var(--white); font-weight: 600; }
.topbar__tel { margin-left: auto; color: var(--white); font-weight: 700; text-decoration: none; letter-spacing: .02em; }
.topbar__tel:hover { color: var(--oak-light); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--oak-light); box-shadow: 0 0 0 0 rgb(201 162 122 / .7); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgb(201 162 122 / 0); } 100% { box-shadow: 0 0 0 0 rgb(201 162 122 / 0); } }

/* --- Header (glass fijo) --- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgb(255 255 255 / .55);
    backdrop-filter: blur(26px) saturate(1.8); -webkit-backdrop-filter: blur(26px) saturate(1.8);
    border-bottom: 1px solid rgb(17 17 17 / .06);
    transition: box-shadow .3s, background .3s;
}
.site-header.is-scrolled { box-shadow: 0 10px 40px -20px rgb(17 17 17 / .3); background: rgb(255 255 255 / .68); }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.site-header__logo img { width: 168px; height: auto; }
.site-header__toggle { display: none; }
.site-nav { display: flex; align-items: center; gap: 1.2rem; margin-left: auto; }
.site-nav__list { display: flex; gap: 0.15rem; list-style: none; padding: 0; margin: 0; align-items: center; }
.site-nav__list > li { position: relative; display: flex; align-items: center; }
.site-nav__link {
    display: block; padding: 0.6rem 0.7rem; font-size: 0.92rem; font-weight: 600; white-space: nowrap;
    color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer;
    border-radius: 999px; transition: color .2s, background .2s;
}
.site-nav__link:hover, .site-nav__link[aria-current="page"], .has-sub.is-active > .site-nav__link { color: var(--oak); }
.site-nav__toggle:not(.site-nav__toggle--label) { width: 1.6rem; height: 2rem; margin-left: -0.5rem; background: none; border: 0; cursor: pointer; color: var(--ink); }
.site-nav__toggle::after, .site-nav__toggle--label::after {
    content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin-left: 0.4em;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-0.2em) rotate(45deg); transition: transform .25s;
}
.site-nav__toggle:not(.site-nav__toggle--label)::after { margin-left: 0; }
.site-nav__toggle[aria-expanded="true"]::after { transform: translateY(0.05em) rotate(-135deg); }
.site-nav__cta { display: none; }
@media (max-width: 1480px) { .site-nav__link { padding-inline: 0.5rem; font-size: 0.88rem; } }

.submenu {
    position: absolute; top: calc(100% + 0.6rem); left: -0.5rem; min-width: 17rem;
    list-style: none; margin: 0; padding: 0.6rem;
    background: rgb(255 255 255 / .95);
    backdrop-filter: blur(26px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgb(17 17 17 / .07); border-radius: var(--radius);
    box-shadow: 0 30px 60px -25px rgb(17 17 17 / .35);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.submenu::before { content: ""; position: absolute; inset: -0.8rem 0 auto; height: 0.8rem; } /* puente para el hover */
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu, .has-sub.is-open > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a {
    display: block; padding: 0.6rem 0.9rem; border-radius: var(--radius-sm);
    color: var(--ink); text-decoration: none; font-size: 0.93rem; font-weight: 500;
}
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--oak-50); color: var(--oak-dark); }
.submenu__all a { font-weight: 700; color: var(--oak); }

@media (max-width: 1320px) {
    .site-header__cta { margin-left: auto; }
    .site-header__toggle {
        display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
        background: var(--ink); border: 0; cursor: pointer;
    }
    .burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
    .burger { position: relative; }
    .burger::before, .burger::after { content: ""; position: absolute; left: 0; }
    .burger::before { top: -6px; } .burger::after { top: 6px; }
    .site-header__toggle[aria-expanded="true"] .burger { background: transparent; }
    .site-header__toggle[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
    .site-header__toggle[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }

    .site-nav {
        position: fixed; inset: calc(var(--header-h) + 38px + 2 * var(--frame)) 0 0 0; margin: 0;
        flex-direction: column; align-items: stretch; gap: 1.5rem;
        padding: 1.5rem var(--gutter) 6rem; overflow-y: auto;
        background: rgb(255 255 255 / .96);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        opacity: 0; visibility: hidden; transform: translateY(-10px);
        transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
    }
    .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
    .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav__list > li { flex-wrap: wrap; border-bottom: 1px solid var(--border); }
    .site-nav__link { flex: 1; padding: 1rem 0; font-size: 1.15rem; text-align: left; border-radius: 0; }
    .site-nav__toggle:not(.site-nav__toggle--label) { width: 3rem; height: 3rem; margin: 0; }
    .site-nav__toggle--label { display: flex; justify-content: space-between; align-items: center; }
    .submenu {
        position: static; flex-basis: 100%; min-width: 0; padding: 0 0 0.8rem;
        background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
        opacity: 1; visibility: visible; transform: none; display: none;
    }
    .submenu::before { display: none; }
    .has-sub:hover > .submenu, .has-sub:focus-within > .submenu { display: none; }
    .has-sub.is-open > .submenu { display: block; }
    .site-nav__cta { display: inline-flex; }
}
@media (max-width: 720px) {
    :root { --header-h: 64px; }
    .site-header__logo img { width: 140px; }
    .site-header__cta, .topbar__hide-sm { display: none; }
    .site-header__toggle { margin-left: auto; }
    .topbar__inner { gap: 1rem; }
}

/* Barra fija inferior en móvil */
.mobile-bar { display: none; }
@media (max-width: 720px) {
    .mobile-bar {
        position: fixed; inset: auto 0.6rem 0.6rem; z-index: 90;
        display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.4rem; padding: 0.4rem;
        background: rgb(17 17 17 / .78); border: 1px solid rgb(255 255 255 / .12);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        border-radius: 999px; box-shadow: 0 20px 40px -15px rgb(0 0 0 / .5);
    }
    .mobile-bar a { text-align: center; padding: 0.75rem; border-radius: 999px; color: var(--white); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
    .mobile-bar a:last-child { background: var(--oak); }
    body { padding-bottom: 4.6rem; }
}

/* --- Secciones --- */
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .6); }
.section--warm { background: radial-gradient(40rem 28rem at 8% 10%, rgb(201 162 122 / .45), transparent 70%), radial-gradient(36rem 26rem at 95% 90%, rgb(156 107 60 / .25), transparent 70%), var(--oak-50); }
.section--dark { background: radial-gradient(40rem 30rem at 90% 0%, rgb(156 107 60 / .35), transparent 70%), radial-gradient(34rem 26rem at 0% 100%, rgb(156 107 60 / .2), transparent 70%), var(--ink); color: rgb(255 255 255 / .82); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark h2 em { color: var(--oak-light); }
.section--dark a:not(.btn) { color: var(--oak-light); }
.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .eyebrow { justify-content: center; }
.section__head--row { max-width: none; display: flex; gap: 2rem; justify-content: space-between; align-items: end; flex-wrap: wrap; }
.section__head--row > div { max-width: 44rem; }

/* --- Hero de la home (vídeo) --- */
.hero {
    position: relative; isolation: isolate; color: var(--white);
    min-height: min(92vh, 900px); display: flex; align-items: flex-end;
    padding-block: clamp(7rem, 14vh, 10rem) clamp(2rem, 5vw, 3.5rem);
    overflow: hidden; background: var(--ink);
}
.hero__media, .hero__media video, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgb(17 17 17 / .35) 0%, rgb(17 17 17 / .2) 35%, rgb(17 17 17 / .82) 100%),
                linear-gradient(90deg, rgb(17 17 17 / .55), transparent 70%);
}
.hero__inner { width: 100%; }
.hero h1 { color: var(--white); max-width: 15ch; margin-bottom: 1.2rem; font-size: clamp(2.7rem, 7.4vw, 6rem); line-height: .98; }
.hero h1 em { color: var(--oak-light); }
.hero__sub { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 36rem; color: rgb(255 255 255 / .86); margin-bottom: 2rem; }
.hero__rating { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: rgb(255 255 255 / .85); text-decoration: none; }
.hero__rating:hover { color: var(--white); }
.stars { color: var(--oak-light); letter-spacing: 0.1em; }
.hero__inner { display: grid; gap: clamp(2.5rem, 9vh, 6rem); }
.hero__badge {
    display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.4rem; padding: 0.5rem 1rem 0.5rem 0.8rem;
    border-radius: 999px; font-size: 0.85rem; color: var(--white); text-decoration: none;
}
.hero__badge:hover { color: var(--white); background: rgb(255 255 255 / .2); }
.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.hero__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; max-width: 42rem; }
.hero__chips a {
    display: inline-block; padding: 0.55rem 1.05rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
    color: var(--white); text-decoration: none; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .28);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background .25s, color .25s;
}
.hero__chips a:hover { background: var(--white); color: var(--ink); }
.hero__status { padding: 1.1rem 1.3rem; display: grid; gap: 0.25rem; min-width: min(100%, 20rem); }
.hero__status p { margin: 0; font-size: 0.88rem; color: rgb(255 255 255 / .78); }
.hero__status .hero__status-estado { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 0.2rem; }
@media (max-width: 860px) {
    .hero { min-height: 0; }
    .hero__chips { display: none; }
}

/* Abierto / cerrado (main.js pone .is-open / .is-closed según la hora de Madrid) */
.estado { display: inline-flex; align-items: center; gap: 0.5rem; }
.estado__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-light); flex: none; }
.estado.is-open .estado__dot { background: #3ccf7a; box-shadow: 0 0 0 0 rgb(60 207 122 / .6); animation: pulse-verde 2.4s infinite; }
.estado.is-closed .estado__dot { background: #e0584f; }
@keyframes pulse-verde { 70% { box-shadow: 0 0 0 8px rgb(60 207 122 / 0); } 100% { box-shadow: 0 0 0 0 rgb(60 207 122 / 0); } }

/* --- Cabecera de página interior --- */
.page-hero { position: relative; background: var(--oak-50); padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 4.5rem); overflow: hidden; }
.page-hero::before { /* veta de madera sutil */
    content: ""; position: absolute; inset: 0 0 0 auto; width: 45%; opacity: .5; pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent 0 46px, rgb(156 107 60 / .07) 46px 48px);
    mask-image: linear-gradient(90deg, transparent, #000 60%);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.page-hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.page-hero h1 { font-size: clamp(2.3rem, 5.2vw, 4.2rem); }
.page-hero__intro p { color: var(--muted); font-size: 1.1rem; }
.page-hero__media { position: relative; }
.page-hero__media img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: calc(var(--radius) * 1.5); }
.page-hero__badge { position: absolute; left: -1.5rem; bottom: 1.5rem; padding: 1rem 1.2rem; max-width: 16rem; font-size: 0.9rem; }
.page-hero__badge strong { display: block; font-size: 1.05rem; }
.page-hero--simple .page-hero__inner { grid-template-columns: 1fr; }
@media (max-width: 860px) {
    .page-hero__inner { grid-template-columns: 1fr; }
    .page-hero__badge { left: 1rem; }
}

.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: .5; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--oak); }

/* --- Bloque texto + imagen --- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split--reverse > :first-child { order: 2; }
.split__media { position: relative; }
.split__media img { width: 100%; border-radius: calc(var(--radius) * 1.4); object-fit: cover; aspect-ratio: 4 / 3.6; }
.split__media--tall img { aspect-ratio: 3 / 4; }
.split__float { position: absolute; right: -1.2rem; bottom: -1.2rem; padding: 1.1rem 1.3rem; max-width: 15rem; }
.split__float strong { display: block; font-size: 2rem; line-height: 1; font-family: var(--font-accent); font-style: italic; font-weight: 400; color: var(--oak); }
.split__float span { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; }
    .split--reverse > :first-child { order: 0; }
    .split__float { right: 1rem; }
}

/* --- Contenido largo --- */
.prose { max-width: 48rem; }
.prose--center { margin-inline: auto; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--oak); }
.prose img { border-radius: var(--radius); margin-block: 1.5rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: 0.7rem 0.8rem; text-align: left; vertical-align: top; }
.prose th { background: var(--oak-50); }
.columns-2 { columns: 2 22rem; column-gap: 3rem; }

/* --- Listas de ventajas / chips --- */
.checklist { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before {
    content: ""; position: absolute; left: 0; top: 0.35em; width: 1.2rem; height: 1.2rem; border-radius: 50%;
    background: var(--oak) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.9rem no-repeat;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; }
.chips li { padding: 0.45em 1em; border-radius: 999px; background: var(--white); border: 1px solid var(--border); font-size: 0.9rem; font-weight: 600; }
.section--dark .chips li { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .14); color: var(--white); }

/* --- Rejilla de tarjetas genéricas --- */
.grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.tile {
    padding: clamp(1.4rem, 3vw, 2rem); border-radius: var(--radius); background: var(--white);
    border: 1px solid var(--border); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -35px rgb(17 17 17 / .4); border-color: var(--oak-100); }
.tile h3 { margin-bottom: 0.5rem; }
.tile p:last-child { margin-bottom: 0; }
.tile__num {
    display: grid; place-items: center; width: 2.8rem; height: 2.8rem; margin-bottom: 1.1rem; border-radius: 50%;
    font-family: var(--font-accent); font-style: italic; font-size: 1.45rem; line-height: 1; color: var(--white);
    background: var(--oak); box-shadow: 0 10px 22px -12px rgb(156 107 60 / .8);
}
.section--dark .tile__num { background: var(--oak); color: var(--white); box-shadow: none; }
.section--dark .tile { background: linear-gradient(135deg, rgb(255 255 255 / .1), rgb(255 255 255 / .02)); border-color: rgb(255 255 255 / .16); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.section--warm .tile { background: linear-gradient(135deg, rgb(255 255 255 / .7), rgb(255 255 255 / .35)); border-color: rgb(255 255 255 / .8); box-shadow: inset 0 1px 0 rgb(255 255 255 / .9); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); }

/* Pasos numerados (lista de AllDent-like) */
/* Pasos: tarjetas de cristal colgadas de un hilo roble, con "Paso N" y numeral serif de marca de agua */
.steps { border-top: 1px solid var(--border); }   /* variante <div class="steps"> (filas simples) */
.section--dark .steps { border-color: rgb(255 255 255 / .12); }
ol.steps { list-style: none; padding: 0 0 0 1.4rem; margin: 0; border: 0; counter-reset: paso; display: grid; gap: 1rem; position: relative; }
ol.steps::before {   /* hilo roble que recorre los pasos */
    content: ""; position: absolute; left: 0; top: 0.5rem; bottom: 0.5rem; width: 2px; border-radius: 2px;
    background: linear-gradient(var(--oak), rgb(156 107 60 / .15));
}
ol.steps > li { counter-increment: paso; position: relative; }
ol.steps > li::before {   /* marca del hilo a la altura de cada paso */
    content: ""; position: absolute; left: -1.4rem; top: 1.5rem; width: 1rem; height: 2px; background: var(--oak);
    transition: width .4s var(--ease);
}
ol.steps > li > div {
    position: relative; overflow: hidden; padding: 1.3rem 4.5rem 1.3rem 1.5rem; border-radius: var(--radius);
    background: linear-gradient(135deg, rgb(255 255 255 / .8), rgb(247 241 234 / .55));
    border: 1px solid rgb(201 162 122 / .3);
    box-shadow: 0 18px 40px -28px rgb(17 17 17 / .35), inset 0 1px 0 rgb(255 255 255 / .9);
    backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
ol.steps > li > div::before {   /* "Paso 1" encima del título */
    content: "Paso " counter(paso); display: block; margin-bottom: 0.35rem;
    font-size: 0.72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--oak);
}
ol.steps > li > div::after {   /* numeral serif de marca de agua */
    content: counter(paso); position: absolute; right: 1rem; bottom: -1.1rem;
    font-family: var(--font-accent); font-style: italic; font-size: 6rem; line-height: 1;
    color: transparent; -webkit-text-stroke: 1px rgb(156 107 60 / .35); pointer-events: none;
    transition: transform .5s var(--ease), color .5s;
}
ol.steps > li:hover > div { transform: translateX(6px); border-color: rgb(156 107 60 / .5); box-shadow: 0 26px 50px -28px rgb(17 17 17 / .45), inset 0 1px 0 rgb(255 255 255 / .9); }
ol.steps > li:hover > div::after { transform: translateY(-0.4rem); color: rgb(156 107 60 / .12); }
ol.steps > li:hover::before { width: 1.4rem; }
.section--dark ol.steps > li > div { background: linear-gradient(135deg, rgb(255 255 255 / .1), rgb(255 255 255 / .02)); border-color: rgb(255 255 255 / .16); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12); }
.section--dark ol.steps > li > div::before { color: var(--oak-light); }
.section--dark ol.steps > li > div::after { -webkit-text-stroke-color: rgb(201 162 122 / .35); }
@media (max-width: 600px) {
    ol.steps { padding-left: 1rem; }
    ol.steps > li::before { left: -1rem; width: 0.7rem; }
    ol.steps > li > div { padding: 1.1rem 3.5rem 1.1rem 1.1rem; }
    ol.steps > li > div::after { font-size: 4.5rem; }
}
.steps h3 { margin-bottom: 0.3rem; }
.steps p { margin: 0; color: var(--muted); }
.section--dark .steps p { color: rgb(255 255 255 / .7); }

/* --- Tratamientos --- */
.treatments { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.treatment__link {
    position: relative; display: flex; flex-direction: column; height: 100%;
    border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text);
    background: var(--white); border: 1px solid var(--border);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.treatment__link:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -40px rgb(17 17 17 / .45); color: var(--text); }
.treatment__media { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--oak-100); }
.treatment__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.treatment__link:hover .treatment__media img { transform: scale(1.06); }
.treatment__body { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.4rem 1.5rem 1.6rem; flex: 1; }
.treatment__title { margin: 0; font-size: 1.35rem; }
.treatment__text { color: var(--muted); font-size: 0.96rem; margin: 0 0 0.6rem; }
.treatment__more { margin-top: auto; font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.treatment__more span { display: inline-block; transition: transform .3s var(--ease); }
.treatment__link:hover .treatment__more span { transform: translateX(5px); }
/* Implantes: servicio principal, tarjeta grande con foto a sangre y glass */
.treatment--featured { grid-column: span 2; grid-row: span 2; }
.treatment--featured .treatment__link { min-height: 30rem; color: var(--white); border: 0; }
.treatment--featured .treatment__media { position: absolute; inset: 0; aspect-ratio: auto; }
.treatment--featured .treatment__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgb(17 17 17 / .75)); }
.treatment--featured .treatment__body {
    position: relative; margin: auto 1.2rem 1.2rem; flex: 0; padding: 1.6rem;
    background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .2); border-radius: var(--radius);
    backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.treatment--featured .treatment__title { font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--white); }
.treatment--featured .treatment__text { color: rgb(255 255 255 / .85); font-size: 1.05rem; }
.treatment--featured .treatment__more, .treatment--featured .treatment__link:hover { color: var(--white); }
@media (max-width: 1000px) { .treatments { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
    .treatments { grid-template-columns: 1fr; }
    .treatment--featured { grid-column: auto; grid-row: auto; }
    .treatment--featured .treatment__link { min-height: 26rem; }
}

/* --- Cifras --- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.stats strong { display: block; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; font-weight: 300; letter-spacing: -0.04em; color: var(--ink); }
.stats span { font-size: 0.9rem; color: var(--muted); }
.section--dark .stats strong { color: var(--white); }
.section--dark .stats span { color: rgb(255 255 255 / .65); }

/* --- Opiniones --- */
/* Reseñas a todo el ancho: la primera tarjeta alinea con el contenedor, el carrusel se corta en
   los bordes de la pantalla con un fundido y el padding vertical deja respirar la sombra. */
.reviews {
    --alinea: max(var(--gutter), calc((100% - var(--measure)) / 2 + var(--gutter)));
    display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
    list-style: none; margin: -2rem 0 0; padding: 2rem var(--alinea) 3.5rem; scroll-padding-inline: var(--alinea);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 clamp(1rem, 5vw, 5rem), #000 calc(100% - clamp(1rem, 5vw, 5rem)), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 clamp(1rem, 5vw, 5rem), #000 calc(100% - clamp(1rem, 5vw, 5rem)), transparent);
}
.review {
    flex: 0 0 min(82%, 24rem); scroll-snap-align: start; padding: 1.8rem; display: flex; flex-direction: column; gap: 0.8rem; margin: 0;
    background: linear-gradient(140deg, rgb(255 255 255 / .9), rgb(247 241 234 / .7));
    border-color: rgb(201 162 122 / .35);
    box-shadow: 0 24px 50px -30px rgb(17 17 17 / .4), inset 0 1px 0 rgb(255 255 255 / .9);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.reviews::-webkit-scrollbar { display: none; }
.reviews__foot { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.reviews__foot p { margin: 0; }
.reviews__nav { display: flex; gap: 0.6rem; justify-content: flex-end; margin-bottom: 1.5rem; }
.reviews__foot .reviews__nav { margin-bottom: 0; }
.reviews__nav[hidden] { display: none; }
.reviews__btn {
    width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
    font-size: 1.2rem; color: var(--ink); background: var(--white); border: 1px solid var(--border);
    box-shadow: 0 10px 24px -14px rgb(17 17 17 / .35); transition: background .25s, color .25s, border-color .25s, opacity .25s;
}
.reviews__btn:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--white); }
.reviews__btn:disabled { opacity: .35; cursor: default; }
.review:hover { transform: translateY(-6px); box-shadow: 0 34px 60px -30px rgb(156 107 60 / .5), inset 0 1px 0 rgb(255 255 255 / .9); }
.review p { margin: 0; font-size: 1rem; }
.review footer { margin-top: auto; font-weight: 700; font-size: 0.92rem; }
.review footer span { display: block; font-weight: 500; color: var(--muted); font-size: 0.82rem; }
.section--dark .review footer span { color: rgb(255 255 255 / .55); }

/* --- Galería --- */
/* Galería compacta: rejilla de 4 en proporción 3:2 con ritmo escalonado y lupa al pasar.
   Al clicar se abre en grande (lightbox en main.js). */
.gallery { display: grid; gap: 0.9rem; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0 0 1.2rem; margin: 0; }
.gallery li { position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 18px 40px -28px rgb(17 17 17 / .45); }
.gallery li:nth-child(even) { top: 1.2rem; }   /* escalonado (con top: el reveal usa transform) */
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery__zoom { all: unset; position: absolute; inset: 0; cursor: zoom-in; }
.gallery__zoom::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgb(17 17 17 / .55)),
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4M11 8v6M8 11h6'/%3E%3C/svg%3E") right 0.9rem bottom 0.9rem / 1.4rem no-repeat;
    opacity: 0; transition: opacity .4s var(--ease);
}
.gallery__zoom:hover::after, .gallery__zoom:focus-visible::after { opacity: 1; }
.gallery__zoom:focus-visible { outline: 3px solid var(--oak); outline-offset: -3px; border-radius: var(--radius); }
.gallery li:hover img { transform: scale(1.06); }
@media (max-width: 760px) {
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; padding-bottom: 0.8rem; }
    .gallery li:nth-child(even) { top: 0.8rem; }
}

/* Lightbox (dialog nativo) */
.lightbox { border: 0; padding: 0; background: none; max-width: none; max-height: none; width: 100vw; height: 100dvh; overflow: hidden; }
.lightbox::backdrop { background: rgb(17 17 17 / .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lightbox[open] { display: grid; place-items: center; animation: lb-in .35s var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } }
.lightbox figure { margin: 0; display: grid; gap: 0.8rem; justify-items: center; padding: clamp(3.5rem, 6vw, 4.5rem) clamp(1rem, 7vw, 6rem); }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 9rem); width: auto; height: auto; border-radius: var(--radius); box-shadow: 0 40px 90px -30px rgb(0 0 0 / .8); }
.lightbox figcaption { color: rgb(255 255 255 / .85); font-size: 0.92rem; text-align: center; }
.lightbox__btn {
    position: absolute; width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; font-size: 1.2rem; color: var(--white);
    background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .25);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .25s;
}
.lightbox__btn:hover { background: var(--oak); border-color: var(--oak); }
.lightbox__btn--close { top: 1rem; right: 1rem; }
.lightbox__btn--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox__btn--prev, .lightbox__btn--next { top: auto; bottom: 1rem; transform: none; } }

/* --- FAQ (details nativo) --- */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
    list-style: none; cursor: pointer; padding: 1.3rem 3rem 1.3rem 0; position: relative;
    font-weight: 700; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--oak-50); color: var(--oak); font-size: 1.3rem; font-weight: 400; transition: transform .3s var(--ease), background .3s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--oak); color: var(--white); }
.faq summary h3 { display: inline; font-size: inherit; margin: 0; }
.faq .faq__a { padding: 0 3rem 1.3rem 0; color: var(--muted); overflow: hidden; }
.faq .faq__a p:last-child { margin-bottom: 0; }
.section--dark .faq, .section--dark .faq details { border-color: rgb(255 255 255 / .12); }
.section--dark .faq summary { color: var(--white); }
.section--dark .faq .faq__a { color: rgb(255 255 255 / .7); }
.section--dark .faq summary::after { background: rgb(255 255 255 / .08); color: var(--oak-light); }

/* --- Doctor / equipo --- */
.person { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.person__photo img { width: 100%; border-radius: calc(var(--radius) * 1.4); aspect-ratio: 3 / 4; object-fit: cover; }
@media (max-width: 760px) { .person { grid-template-columns: 1fr; } .person__photo { max-width: 22rem; } }

/* --- Franja CTA + formulario (antes del pie, en todas las páginas) --- */
.cta-band {
    position: relative; isolation: isolate; color: rgb(255 255 255 / .82); padding-block: var(--section); overflow: hidden;
    background: var(--ink) url("../img/site/fotos-boda03-480.webp") center / cover;
}
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, rgb(17 17 17 / .96) 35%, rgb(17 17 17 / .72)); }
.cta-band::after { /* listones de roble */
    content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; z-index: -1; opacity: .35;
    background: repeating-linear-gradient(90deg, transparent 0 38px, rgb(201 162 122 / .18) 38px 40px);
    mask-image: linear-gradient(90deg, #000, transparent); -webkit-mask-image: linear-gradient(90deg, #000, transparent);
}
.cta-band__inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.cta-band__data { list-style: none; padding: 0; margin-top: 2rem; display: grid; gap: 1rem; }
.cta-band__data span { display: block; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--oak-light); font-weight: 700; }
.cta-band__data a { color: var(--white); font-size: 1.4rem; font-weight: 700; text-decoration: none; }
.cta-band__form { padding: clamp(1.4rem, 3vw, 2.2rem); }
@media (max-width: 900px) { .cta-band__inner { grid-template-columns: 1fr; } }

/* --- Formulario --- */
.contact-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field { margin-bottom: 1rem; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 560px) { .contact-form__grid { grid-template-columns: 1fr; } }
.contact-form label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.35em; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"], .contact-form textarea {
    width: 100%; padding: 0.85em 1em; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--white); color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--oak); box-shadow: 0 0 0 4px rgb(156 107 60 / .18); }
.contact-form__privacy { display: flex; gap: 0.6rem; align-items: baseline; font-size: 0.88rem; }
.contact-form__privacy label { font-weight: 400; }
.contact-form__privacy input { accent-color: var(--oak); }
.glass--dark .contact-form label, .glass--dark .contact-form__privacy { color: rgb(255 255 255 / .85); }
.glass--dark .contact-form a { color: var(--oak-light); }
.glass--dark .contact-form input[type="text"], .glass--dark .contact-form input[type="email"], .glass--dark .contact-form input[type="tel"], .glass--dark .contact-form textarea {
    background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .18); color: var(--white);
}
.glass--dark .btn { background: var(--oak); border-color: var(--oak); width: 100%; }
.glass--dark .btn:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.form-error { background: #fdecea; border: 1px solid #e5b1aa; color: #92322a; padding: 0.8em 1em; border-radius: var(--radius-sm); }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.contact { display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr; align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.contact-info { padding: 1.8rem; border-radius: var(--radius); background: var(--oak-50); }
.contact-info dl { margin: 0; display: grid; gap: 1.1rem; }
.contact-info dt { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--oak); font-weight: 700; }
.contact-info dd { margin: 0; font-weight: 600; }

/* --- Pie --- */
.site-footer { background: #0b0b0b; color: rgb(255 255 255 / .62); font-size: 0.93rem; }
.site-footer a { color: rgb(255 255 255 / .82); text-decoration: none; }
.site-footer a:hover { color: var(--oak-light); }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding-block: 4.5rem 3rem; }
.site-footer__brand img { width: 200px; margin-bottom: 1.2rem; }
.site-footer__title { color: var(--white); font-weight: 700; margin-bottom: 1rem; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; border-top: 1px solid rgb(255 255 255 / .1); font-size: 0.85rem; }
.site-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.site-footer__bottom .linklike { color: rgb(255 255 255 / .82); text-decoration: none; }
.site-footer__credit { margin: 0; }
@media (max-width: 900px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* --- Consejos (listado y detalle) --- */
.cards { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); margin-block: 0; }
.cards--llenar .cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }   /* home: 3 consejos ocupando toda la fila */
.card { border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--border); display: flex; flex-direction: column; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -35px rgb(17 17 17 / .4); }
.card__media { display: block; overflow: hidden; }
.card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 1.3rem 1.4rem 1.5rem; }
.card__title { font-size: 1.15rem; margin: 0 0 0.4em; letter-spacing: -0.01em; }
.card__title a { text-decoration: none; color: var(--text); }
.card__title a:hover { color: var(--oak); }
.card__date { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.5em; }
.card__excerpt { color: var(--muted); margin: 0; font-size: 0.95rem; }

.post { padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section); }
.post article { max-width: 50rem; margin-inline: auto; padding-inline: var(--gutter); }
.post__header h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.post__date { color: var(--muted); font-size: 0.9rem; }
.post__categories { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin-block: 0.8em 0; flex-wrap: wrap; }
.post__categories a { display: inline-block; padding: 0.2em 0.8em; border-radius: 999px; background: var(--oak-50); text-decoration: none; font-size: 0.82rem; font-weight: 600; }
.post__image { width: 100%; border-radius: var(--radius); margin-block: 2rem; }
.post__content h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 1.8em; }
.post__content h3 { margin-top: 1.5em; }
.post__content img { border-radius: var(--radius); margin-block: 1.5rem; }
.post__content ul, .post__content ol { padding-left: 1.2rem; }
.post__content li::marker { color: var(--oak); }
.post__content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: 0.95rem; }
.post__content th, .post__content td { border-bottom: 1px solid var(--border); padding: 0.6rem 0.7rem; text-align: left; }
.post__back { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* --- Buscador / paginación (motor) --- */
.search-form { display: flex; gap: 0.4rem; }
.search-form input[type="search"] { padding: 0.6em 0.9em; border: 1px solid var(--border); border-radius: 999px; }
.search-form button { padding: 0.6em 1.1em; border: 0; border-radius: 999px; background: var(--ink); color: #fff; cursor: pointer; }
.pagination ul { display: flex; gap: 0.4rem; list-style: none; padding: 0; justify-content: center; flex-wrap: wrap; margin-top: 2.5rem; }
.pagination a, .pagination span { display: inline-block; min-width: 2.6em; text-align: center; padding: 0.45em 0.7em; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; }
.pagination span[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination__gap { align-self: end; }

/* --- Legales y páginas simples --- */
.legal { max-width: 50rem; margin-inline: auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) var(--section); }
.legal h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.legal h2 { font-size: 1.5rem; margin-top: 2em; }
.simple { max-width: 50rem; margin-inline: auto; padding: clamp(3rem, 8vw, 6rem) var(--gutter); text-align: center; }

/* --- Aviso de cookies (markup del motor; clases de hermes/lib/consent-js.php) --- */
.hermes-cookies {
    position: fixed; inset-inline: 1rem; bottom: 1rem; z-index: 2147483000;
    max-width: 44rem; margin-inline: auto;
    background: rgb(17 17 17 / .88); color: #fff; border: 1px solid rgb(255 255 255 / .12);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .5);
    padding: 1.2rem 1.4rem; display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 0.92rem;
}
.hermes-cookies__text { margin: 0; flex: 1 1 20rem; }
.hermes-cookies__text a { color: var(--oak-light); }
.hermes-cookies__acciones { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.hermes-cookies__btn { padding: 0.55em 1.2em; border-radius: 999px; border: 1px solid rgb(255 255 255 / .5); cursor: pointer; background: none; color: #fff; font: inherit; font-weight: 600; }
.hermes-cookies__btn--accept { background: #fff; color: var(--ink); border-color: #fff; }
.hermes-cookies__btn:focus-visible { outline-color: #fff; }

.hermes-panel {
    border: 0; padding: 0; color: var(--text); background: var(--white);
    width: min(640px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem);
    border-radius: var(--radius); box-shadow: 0 10px 40px rgb(0 0 0 / 0.3);
}
.hermes-panel::backdrop { background: rgb(0 0 0 / 0.5); backdrop-filter: blur(4px); }
.hermes-panel__cab, .hermes-panel__pie { display: flex; gap: 0.5rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; flex-wrap: wrap; margin: 0; }
.hermes-panel__cab { border-bottom: 1px solid var(--border); }
.hermes-panel__pie { border-top: 1px solid var(--border); }
.hermes-panel__cab h2 { margin: 0; font-size: 1.15rem; }
.hermes-panel__cerrar { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 0.25rem; }
.hermes-panel__cuerpo { padding: 1rem 1.25rem; overflow-y: auto; font-size: 0.95rem; }
.hermes-panel__pie .hermes-cookies__btn { border-color: var(--ink); color: var(--ink); }
.hermes-panel__pie .hermes-cookies__btn--accept { background: var(--ink); color: #fff; }
.hermes-cat { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem; margin-block: 0.75rem; }
.hermes-cat__cab { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.hermes-cat h3 { margin: 0; font-size: 1rem; }
.hermes-cat p { margin: 0.4rem 0 0; color: var(--muted); }
.hermes-cat ul { margin: 0.5rem 0 0; padding-inline-start: 1.1rem; font-size: 0.9rem; }
.hermes-cat summary { cursor: pointer; margin-top: 0.5rem; color: var(--oak); }
.hermes-cat__siempre { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.hermes-embed { position: relative; min-height: 12rem; display: grid; place-items: center; background: var(--oak-50); padding: 1rem; text-align: center; border-radius: var(--radius); }
.hermes-embed__aviso { max-width: 32rem; }
.hermes-embed__aviso .hermes-cookies__btn { border-color: var(--oak); color: var(--oak); margin: 0.25rem; }
.tabla-cookies { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-block: 0.5rem 1.5rem; display: block; overflow-x: auto; }
.tabla-cookies th, .tabla-cookies td { border: 1px solid var(--border); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.tabla-cookies th { background: var(--oak-50); }
@media (max-width: 720px) { .hermes-cookies { bottom: 5.4rem; } }
@media (max-width: 480px) { .hermes-cookies__acciones { width: 100%; } .hermes-cookies__btn { flex: 1 1 auto; } }

/* --- Ajustes tras maquetar las interiores --- */
.section--dark .tile p, .section--dark .lead, .section--dark .steps p { color: rgb(255 255 255 / .72); }
a.tile { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
a.tile:hover { color: inherit; }
a.tile .link-arrow, a.tile .treatment__more { margin-top: auto; }
.section--dark a.tile h3 { color: var(--white); }
.tile__title { display: block; font-weight: 700; font-size: 1.2rem; margin-bottom: 0.4rem; }
.columns-2 > * { break-inside: avoid; }
.card[hidden] { display: none; }
.split__media--narrow { max-width: 22rem; margin-inline: auto; }
.checklist--cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.gallery--2 { grid-template-columns: repeat(2, 1fr); }
.gallery--2 li:nth-child(n) { grid-column: auto; grid-row: auto; }

/* =====================================================================
   Marco redondeado + cabecera transparente (glass al hacer scroll)
   ===================================================================== */
:root { --frame: clamp(0.5rem, 1.1vw, 1rem); --frame-r: clamp(18px, 2.4vw, 34px); --wide: 112rem; }
.container--wide { max-width: var(--wide); }
.site-header {
    background: transparent; border-bottom-color: transparent; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    /* Dentro del marco del hero, con el mismo aire arriba que a los lados; el hero sube por debajo */
    margin-top: calc(2 * var(--frame));
    margin-bottom: calc(-1 * (var(--header-h) + 2 * var(--frame)));
    transition: background .35s, box-shadow .35s, backdrop-filter .35s;
}
.site-header__inner, .topbar__inner { padding-inline: calc(var(--gutter) + var(--frame)); }
.site-header.is-scrolled {
    background: rgb(255 255 255 / .62); border-bottom-color: rgb(255 255 255 / .6);
    backdrop-filter: blur(26px) saturate(1.8); -webkit-backdrop-filter: blur(26px) saturate(1.8);
    box-shadow: 0 10px 40px -20px rgb(17 17 17 / .3);
}
.hero, .page-hero { margin-inline: var(--frame); border-radius: var(--frame-r); }
.hero { min-height: min(calc(100svh - 38px - var(--frame)), 980px); padding-block: calc(var(--header-h) + clamp(3rem, 10vh, 7rem)) clamp(1.2rem, 3vw, 2.2rem); }
.hero .container--wide { max-width: calc(var(--wide) - 2 * var(--frame)); }
.page-hero { padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)); }

/* Logo: en la home, blanco sobre el vídeo hasta hacer scroll */
.site-header__logo { position: relative; display: block; }
.site-header__logo .logo-blanco { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.site-header__logo .logo-negro { transition: opacity .35s; }
.site-header--light:not(.is-scrolled) .logo-blanco { opacity: 1; }
.site-header--light:not(.is-scrolled) .logo-negro { opacity: 0; }
.site-header--light:not(.is-scrolled) .site-header__cta { background: var(--white); border-color: var(--white); color: var(--ink); }
@media (min-width: 1321px) {
    .site-header--light:not(.is-scrolled) .site-nav__list > li > .site-nav__link,
    .site-header--light:not(.is-scrolled) .site-nav__toggle { color: var(--white); }
    .site-header--light:not(.is-scrolled) .site-nav__list > li > .site-nav__link:hover { color: var(--oak-light); }
}

/* Consejos: foto redondeada con etiqueta de cristal, fecha y lectura, título (sin caja ni autor) */
.card { background: none; border: 0; border-radius: 0; overflow: visible; }
.card:hover { transform: none; box-shadow: none; }
.card__media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 45px -30px rgb(17 17 17 / .5); }
.card__media img { aspect-ratio: 4 / 3; }
.card__tag {
    position: absolute; top: 0.9rem; left: 0.9rem; padding: 0.3rem 0.75rem; border-radius: 999px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: .04em; color: var(--ink);
    background: rgb(255 255 255 / .7); border: 1px solid rgb(255 255 255 / .8);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.card__body { padding: 1rem 0.2rem 0; }
.card__meta { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 0.5rem; font-size: 0.8rem; color: var(--muted); }
.card__title { font-size: 1.12rem; line-height: 1.3; }

/* Pie: marca gigante */
.site-footer { overflow: hidden; }
/* Diente del logo de marca de agua, por detrás del contenido del pie (PNG con degradado roble) */
.site-footer { position: relative; isolation: isolate; }
.site-footer::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    right: clamp(-4rem, -3vw, -1rem); bottom: clamp(-6rem, -6vw, -2rem);
    width: clamp(14rem, 30vw, 28rem); aspect-ratio: 585 / 675;
    background: url("../img/diente-footer.png") center / contain no-repeat; opacity: .3;
}
/* Páginas sin hero (post, legales, gracias, buscador, 404): la cabecera transparente no debe pisar el contenido */
#contenido + main:not(:has(> .hero, > .page-hero)) { padding-top: calc(var(--header-h) + 2 * var(--frame)); }

/* =====================================================================
   Elementos de la referencia aplicados a toda la web (mismos textos, colores y animaciones)
   ===================================================================== */

/* Hero: mismo aire bajo la franja superior que a los lados, y franja + hero caben en una pantalla */
.hero {
    margin-top: var(--frame);
    min-height: max(34rem, calc(100svh - 38px - 2 * var(--frame)));
    padding-top: calc(var(--header-h) + clamp(1.5rem, 6vh, 5rem));
}
.page-hero { margin-top: var(--frame); }
@media (max-width: 860px) { .hero { min-height: max(30rem, calc(100svh - 38px - 2 * var(--frame))); } }



/* Cifras: número grande y ligero con línea fina encima */
.stats li { border-top: 1px solid var(--border); padding-top: 1rem; }
.stats span { display: block; margin-top: 0.5rem; }
.section--dark .stats li { border-color: rgb(255 255 255 / .16); }

/* Tratamientos: foto con margen interior y esquinas propias, flecha en círculo de cristal sobre la foto */
.treatment__link { padding: 0.55rem; }
.treatment__media { position: relative; border-radius: calc(var(--radius) - 6px); aspect-ratio: 4 / 3; }
.treatment__body { padding: 1.1rem 0.9rem 1rem; }
.treatment--featured .treatment__link { padding: 0; }
.treatment--featured .treatment__media { border-radius: 0; }

/* Fotos de los bloques texto + imagen: tarjeta flotante de cristal más marcada */
.split__float { backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); }

/* --- Ventajas en secciones claras: sin caja, con línea fina arriba (franja tipo "pasos") --- */
.section:not(.section--dark):not(.section--warm) .grid > .tile {
    background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none;
    padding: 1.4rem 0.4rem 0 0; transition: border-color .4s var(--ease);
}
.section:not(.section--dark):not(.section--warm) .grid > .tile:hover { transform: none; box-shadow: none; border-top-color: var(--oak); }
.section:not(.section--dark):not(.section--warm) .tile__num {
    width: auto; height: auto; display: block; margin-bottom: 0.7rem; background: none; box-shadow: none;
    font-size: 1.15rem; color: var(--oak);
}

/* --- Cifras: separadas por líneas verticales finas --- */
.stats { gap: 0; border-top: 1px solid var(--border); }
.stats li { border-top: 0; padding: 1.2rem 1.4rem 0; border-left: 1px solid var(--border); }
.stats li:first-child { border-left: 0; padding-left: 0; }
.section--dark .stats, .section--dark .stats li { border-color: rgb(255 255 255 / .16); }

/* --- Bloque destacado (home, "¿Suena bien verdad?"): el diente del logo flota suave al fondo --- */
.section--destacada { position: relative; isolation: isolate; overflow: hidden; }
.section--destacada::after {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    right: clamp(-3rem, 4vw, 8rem); top: 50%; width: clamp(11rem, 22vw, 20rem); aspect-ratio: 585 / 675;
    background: url("../img/diente-footer.png") center / contain no-repeat; opacity: .45;
    filter: drop-shadow(0 30px 40px rgb(0 0 0 / .5));
    transform: translateY(-50%) rotate(-6deg);
    animation: flotar 7s ease-in-out infinite;
}
@keyframes flotar {
    0%, 100% { transform: translateY(-50%) rotate(-6deg); }
    50%      { transform: translateY(calc(-50% - 14px)) rotate(-3deg); }
}
@media (max-width: 860px) { .section--destacada::after { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .section--destacada::after { animation: none; } }

/* Cabecera: en su sitio al cargar; fija arriba (entrando desde arriba) solo cuando ha salido de la vista */
.site-header { position: relative; }
.site-header.is-scrolled { position: fixed; top: 0; left: 0; right: 0; margin: 0; animation: header-entra .45s var(--ease); }
.site-header.is-scrolled .site-nav { top: var(--header-h); }
@keyframes header-entra { from { transform: translateY(-100%); } }
@media (prefers-reduced-motion: reduce) { .site-header.is-scrolled { animation: none; } }

/* =====================================================================
   Menos fondos oscuros: las secciones "dark" y la franja del formulario pasan a cristal claro
   (roble muy suave con brillos). Solo queda oscuro el bloque destacado de la home y el pie.
   ===================================================================== */
:is(.section--dark:not(.section--destacada), .cta-band) {
    color: var(--text);
    background: radial-gradient(38rem 26rem at 88% 8%, rgb(201 162 122 / .38), transparent 70%),
                radial-gradient(34rem 24rem at 6% 96%, rgb(156 107 60 / .2), transparent 70%),
                linear-gradient(180deg, #fbf8f4, #f4ece2);
}
.cta-band { background-image: radial-gradient(38rem 26rem at 88% 8%, rgb(201 162 122 / .38), transparent 70%), radial-gradient(34rem 24rem at 6% 96%, rgb(156 107 60 / .2), transparent 70%), linear-gradient(180deg, #fbf8f4, #f4ece2); }
.cta-band::before { background: none; }
.cta-band::after { opacity: .5; }
:is(.section--dark:not(.section--destacada), .cta-band) :is(h2, h3, .display--light) { color: var(--ink); }
:is(.section--dark:not(.section--destacada), .cta-band) :is(h2, .display--light) em { color: var(--oak); }
:is(.section--dark:not(.section--destacada), .cta-band) a:not(.btn) { color: var(--oak-dark); }
:is(.section--dark:not(.section--destacada), .cta-band) .eyebrow--light { color: var(--oak); }
:is(.section--dark:not(.section--destacada), .cta-band) :is(.lead, .tile p, .steps p, .faq .faq__a, .stats span, .review footer span) { color: var(--muted); }
:is(.section--dark:not(.section--destacada), .cta-band) .btn--light { background: var(--ink); border-color: var(--ink); color: var(--white); }
:is(.section--dark:not(.section--destacada), .cta-band) .btn--light:hover { background: var(--oak); border-color: var(--oak); color: var(--white); }
:is(.section--dark:not(.section--destacada), .cta-band) .btn--ghost-light { background: transparent; border-color: var(--ink); color: var(--ink); }
:is(.section--dark:not(.section--destacada), .cta-band) .btn--ghost-light:hover { background: var(--ink); color: var(--white); }
:is(.section--dark:not(.section--destacada), .cta-band) .glass--dark {
    color: var(--text);
    background: linear-gradient(135deg, rgb(255 255 255 / .75), rgb(255 255 255 / .4));
    border-color: rgb(255 255 255 / .85);
    box-shadow: 0 30px 70px -30px rgb(17 17 17 / .3), inset 0 1px 0 rgb(255 255 255 / .9);
}
:is(.section--dark:not(.section--destacada), .cta-band) .glass--dark .contact-form :is(label, .contact-form__privacy) { color: var(--text); }
:is(.section--dark:not(.section--destacada), .cta-band) .glass--dark .contact-form a { color: var(--oak-dark); }
:is(.section--dark:not(.section--destacada), .cta-band) .glass--dark .contact-form :is(input[type="text"], input[type="email"], input[type="tel"], textarea) {
    background: rgb(255 255 255 / .8); border-color: var(--border); color: var(--text);
}
:is(.section--dark:not(.section--destacada), .cta-band) .glass--dark .btn:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
:is(.section--dark:not(.section--destacada), .cta-band) .cta-band__data span { color: var(--oak); }
:is(.section--dark:not(.section--destacada), .cta-band) .cta-band__data a { color: var(--ink); }
:is(.section--dark:not(.section--destacada), .cta-band) .chips li { background: rgb(255 255 255 / .6); border-color: rgb(255 255 255 / .85); color: var(--ink); }
:is(.section--dark:not(.section--destacada), .cta-band) .tile {
    background: linear-gradient(135deg, rgb(255 255 255 / .75), rgb(255 255 255 / .38)); border-color: rgb(255 255 255 / .85);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .9); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
}
:is(.section--dark:not(.section--destacada), .cta-band) a.tile h3 { color: var(--ink); }
:is(.section--dark:not(.section--destacada), .cta-band) ol.steps > li > div {
    background: linear-gradient(135deg, rgb(255 255 255 / .8), rgb(247 241 234 / .55)); border-color: rgb(201 162 122 / .3);
    box-shadow: 0 18px 40px -28px rgb(17 17 17 / .35), inset 0 1px 0 rgb(255 255 255 / .9);
}
:is(.section--dark:not(.section--destacada), .cta-band) ol.steps > li > div::before { color: var(--oak); }
:is(.section--dark:not(.section--destacada), .cta-band) ol.steps > li > div::after { -webkit-text-stroke-color: rgb(156 107 60 / .35); }
:is(.section--dark:not(.section--destacada), .cta-band) :is(.steps, .faq, .faq details, .stats, .stats li) { border-color: var(--border); }
:is(.section--dark:not(.section--destacada), .cta-band) .stats strong { color: var(--ink); }
:is(.section--dark:not(.section--destacada), .cta-band) .faq summary { color: var(--ink); }
:is(.section--dark:not(.section--destacada), .cta-band) .faq summary::after { background: var(--oak-50); color: var(--oak); }

/* =====================================================================
   Tratamientos: Implantes destacado como banda horizontal (foto + panel de cristal), el resto en 4 columnas
   ===================================================================== */
.treatments { grid-template-columns: repeat(4, 1fr); }
.treatment--featured { grid-column: 1 / -1; grid-row: auto; }
.treatment--featured .treatment__link { min-height: clamp(18rem, 26vw, 23rem); justify-content: center; color: var(--text); }
.treatment--featured .treatment__media::after { background: linear-gradient(90deg, rgb(17 17 17 / .05), transparent 60%); }
.treatment--featured .treatment__body {
    margin: clamp(1rem, 2.5vw, 2rem); max-width: 30rem; padding: clamp(1.3rem, 2.5vw, 1.9rem);
    background: linear-gradient(135deg, rgb(255 255 255 / .78), rgb(255 255 255 / .45));
    border: 1px solid rgb(255 255 255 / .85);
    box-shadow: 0 30px 60px -30px rgb(17 17 17 / .45), inset 0 1px 0 rgb(255 255 255 / .9);
    backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7);
}
.treatment--featured .treatment__title { font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--ink); }
.treatment--featured .treatment__text { color: var(--muted); font-size: 1rem; }
.treatment--featured .treatment__more, .treatment--featured .treatment__link:hover { color: var(--ink); }
@media (max-width: 1000px) { .treatments { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
    .treatments { grid-template-columns: 1fr; }
    .treatment--featured .treatment__link { min-height: 24rem; justify-content: flex-end; }
}

/* =====================================================================
   Ritmo de fondos: blanco · beige liso (warm) · cristal (blanco con brillos roble, antes "dark").
   Los brillos cambian de sitio en secciones alternas para que no se repita el mismo fondo.
   ===================================================================== */
.section--warm { background: var(--oak-50); }
.section--dark:not(.section--destacada) {
    background: radial-gradient(36rem 26rem at 92% 6%, rgb(201 162 122 / .42), transparent 70%),
                radial-gradient(30rem 22rem at 4% 98%, rgb(156 107 60 / .2), transparent 70%),
                #fdfbf8;
}
.section--dark:not(.section--destacada):nth-of-type(even) {
    background: radial-gradient(34rem 26rem at 6% 10%, rgb(201 162 122 / .42), transparent 70%),
                radial-gradient(32rem 22rem at 96% 92%, rgb(156 107 60 / .2), transparent 70%),
                #fdfbf8;
}

/* Números en sans (sin serif) en tarjetas, pasos y datos flotantes */
.tile__num, ol.steps > li > div::after, .split__float strong { font-family: var(--font-body); font-style: normal; }
.tile__num { font-weight: 700; font-size: 1.1rem; }
.section:not(.section--dark):not(.section--warm) .tile__num { font-size: 0.95rem; font-weight: 800; letter-spacing: .04em; }
ol.steps > li > div::after { font-weight: 800; font-size: 5rem; bottom: -0.9rem; letter-spacing: -0.04em; }
.split__float strong { font-weight: 300; letter-spacing: -0.03em; }

/* Tratamientos: Implantes destacado ocupa 2×2 de la rejilla de 4 (foto visible, panel de cristal abajo) */
.treatment--featured { grid-column: span 2; grid-row: span 2; }
.treatment--featured .treatment__link { min-height: 0; justify-content: flex-end; }
.treatment--featured .treatment__media::after { background: linear-gradient(180deg, transparent 45%, rgb(17 17 17 / .35)); }
.treatment--featured .treatment__body { margin: auto 1rem 1rem; max-width: none; }
@media (max-width: 1000px) { .treatment--featured { grid-column: 1 / -1; grid-row: auto; } .treatment--featured .treatment__link { min-height: 26rem; } }

/* =====================================================================
   Rejillas sin huérfanos: las columnas se eligen según cuántos elementos hay
   (3 → 3, 4 → 4, 5 → 3+2, 6 → 3+3, 7/8 → 4+…), y en tablet el último impar ocupa la fila entera.
   ===================================================================== */
.grid {
    --cols: 3;
    grid-template-columns: repeat(auto-fit, minmax(max(min(100%, 15rem), calc((100% - (var(--cols) - 1) * 1.2rem) / var(--cols))), 1fr));
}
.grid:has(> :nth-child(2):last-child) { --cols: 2; }
.grid:has(> :nth-child(4):last-child), .grid:has(> :nth-child(7):last-child), .grid:has(> :nth-child(8):last-child) { --cols: 4; }
.grid--2 { --cols: 2; }
.grid--2 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 1000px) {
    .grid { --cols: 2; }
    .grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    .treatment--featured ~ .treatment:last-child:nth-child(even) { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .grid { --cols: 1; } }

/* Transiciones suaves en todo lo que reacciona al ratón (las reglas propias de cada componente mandan) */
a, button, summary, .chips li, .submenu a, .site-footer a, .link-arrow, .card__title a {
    transition: color .3s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease), opacity .3s var(--ease), transform .3s var(--ease);
}
.link-arrow:hover { transform: translateX(4px); }
.submenu a:hover { transform: translateX(3px); }
.chips li:hover { border-color: var(--oak); }

/* Tratamientos (definitivo): rejilla 3×3, Implantes del mismo tamaño que el resto pero destacado
   con la foto a sangre y el texto en un panel de cristal encima. */
.treatments { grid-template-columns: repeat(3, 1fr); }
.treatment--featured { grid-column: auto; grid-row: auto; }
.treatment--featured .treatment__link { min-height: 100%; padding: 0; }
.treatment--featured .treatment__body { margin: auto 0.7rem 0.7rem; padding: 1.2rem 1.3rem 1.3rem; max-width: none; }
.treatment--featured .treatment__title { font-size: 1.35rem; }
.treatment--featured .treatment__text { font-size: 0.96rem; }
@media (max-width: 1000px) {
    .treatments { grid-template-columns: repeat(2, 1fr); }
    .treatment--featured { grid-column: auto; }
    .treatment--featured .treatment__link { min-height: 26rem; }
    .treatment--featured ~ .treatment:last-child:nth-child(even) { grid-column: auto; }
    .treatments > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .treatments { grid-template-columns: 1fr; } }

/* Tratamientos (versión moderna): todas las tarjetas con la foto a sangre y un panel de cristal encima.
   El texto se ve recortado y se despliega al pasar el ratón (sigue entero en el HTML: SEO intacto).
   Implantes se distingue por el panel en cristal roble. */
.treatment__link { position: relative; min-height: 26rem; padding: 0; border: 0; justify-content: flex-end; isolation: isolate; }
.treatment__media { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; z-index: -1; }
.treatment__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(17 17 17 / .35)); }
.treatment__body, .treatment--featured .treatment__body {
    flex: 0; margin: auto 0.7rem 0.7rem; padding: 1.1rem 1.25rem 1.2rem; border-radius: calc(var(--radius) - 4px);
    background: linear-gradient(135deg, rgb(255 255 255 / .82), rgb(255 255 255 / .5));
    border: 1px solid rgb(255 255 255 / .85);
    box-shadow: 0 20px 40px -24px rgb(17 17 17 / .45), inset 0 1px 0 rgb(255 255 255 / .9);
    backdrop-filter: blur(20px) saturate(1.7); -webkit-backdrop-filter: blur(20px) saturate(1.7);
    transition: background .4s var(--ease);
}
.treatment__title, .treatment--featured .treatment__title { font-size: 1.3rem; color: var(--ink); }
.treatment__text, .treatment--featured .treatment__text {
    margin: 0; font-size: 0.94rem; color: var(--muted);
    max-height: 3em; overflow: hidden; transition: max-height .6s var(--ease);
    -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); mask-image: linear-gradient(180deg, #000 40%, transparent);
}
.treatment__more { margin-top: 0.6rem; }
.treatment__link:hover .treatment__text, .treatment__link:focus-visible .treatment__text {
    max-height: 18em; -webkit-mask-image: none; mask-image: none;
}
.treatment__link:hover { transform: translateY(-6px); }
.treatment__link:hover .treatment__media img { transform: scale(1.08); }
.treatment__link:hover .treatment__body { background: linear-gradient(135deg, rgb(255 255 255 / .92), rgb(255 255 255 / .7)); }

/* Implantes: panel en cristal roble */
.treatment--featured .treatment__body {
    background: linear-gradient(135deg, rgb(156 107 60 / .88), rgb(201 162 122 / .62));
    border-color: rgb(255 255 255 / .35); box-shadow: 0 20px 40px -24px rgb(17 17 17 / .5), inset 0 1px 0 rgb(255 255 255 / .35);
}
.treatment--featured .treatment__title, .treatment--featured .treatment__more, .treatment--featured .treatment__link:hover { color: var(--white); }
.treatment--featured .treatment__text { color: rgb(255 255 255 / .88); }
.treatment--featured .treatment__link:hover .treatment__body { background: linear-gradient(135deg, rgb(133 91 51 / .92), rgb(156 107 60 / .75)); }

/* Sin ratón (móvil/tablet): texto algo más visible de entrada */
@media (hover: none) { .treatment__text, .treatment--featured .treatment__text { max-height: 4.6em; } }
@media (max-width: 640px) { .treatment__link, .treatment--featured .treatment__link { min-height: 22rem; } }

/* Buscador de consejos: barra de cristal con lupa y contador */
.buscador {
    position: relative; display: flex; align-items: center; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3rem);
    padding: 0.45rem 0.45rem 0.45rem 1.4rem; border-radius: 999px;
    background: linear-gradient(135deg, rgb(255 255 255 / .85), rgb(247 241 234 / .6));
    border: 1px solid rgb(201 162 122 / .35);
    box-shadow: 0 24px 50px -32px rgb(17 17 17 / .45), inset 0 1px 0 rgb(255 255 255 / .9);
    backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.buscador:focus-within { border-color: var(--oak); box-shadow: 0 0 0 4px rgb(156 107 60 / .15), 0 24px 50px -32px rgb(17 17 17 / .45); }
.buscador__icono { width: 1.3rem; height: 1.3rem; flex: none; fill: none; stroke: var(--oak); stroke-width: 2; stroke-linecap: round; }
.buscador__input {
    flex: 1; min-width: 0; border: 0; background: none; padding: 0.8rem 0; font: inherit; font-size: 1.08rem; color: var(--text);
}
.buscador__input:focus { outline: none; }
.buscador__input::placeholder { color: var(--muted); opacity: .8; }
.buscador__contador {
    margin: 0; flex: none; padding: 0.7rem 1.2rem; border-radius: 999px; font-size: 0.88rem; font-weight: 700;
    background: var(--ink); color: var(--white);
}
@media (max-width: 560px) { .buscador__contador { display: none; } .buscador { padding-left: 1.1rem; } }
/* Consejos: los que se van cargando al bajar entran con un fundido */
.card--entra { animation: card-entra .6s var(--ease) both; }
@keyframes card-entra { from { opacity: 0; transform: translateY(18px); } }
.mas-consejos { height: 1px; }
@media (prefers-reduced-motion: reduce) { .card--entra { animation: none; } }
/* Hero y cabeceras interiores enmarcados: mismo espacio por abajo que arriba y a los lados */
.hero, .page-hero { margin-bottom: var(--frame); }

/* Tratamientos sin foto por tarjeta: cristal claro con una línea roble arriba; solo Implantes lleva foto */
.treatment:not(.treatment--featured) .treatment__link {
    min-height: 0; padding: 1.7rem 1.6rem 1.5rem; justify-content: flex-start;
    background: linear-gradient(135deg, rgb(255 255 255 / .88), rgb(247 241 234 / .6));
    border: 1px solid rgb(201 162 122 / .3); border-radius: var(--radius);
    box-shadow: 0 20px 45px -32px rgb(17 17 17 / .4), inset 0 1px 0 rgb(255 255 255 / .9);
    backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s, background .4s;
}
.treatment:not(.treatment--featured) .treatment__link::before {
    content: ""; display: block; width: 2.2rem; height: 2px; margin-bottom: 1.3rem; background: var(--oak);
    transition: width .45s var(--ease);
}
.treatment:not(.treatment--featured) .treatment__body {
    margin: 0; padding: 0; flex: 1; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.treatment:not(.treatment--featured) .treatment__text { max-height: none; -webkit-mask-image: none; mask-image: none; }
.treatment:not(.treatment--featured) .treatment__link:hover {
    transform: translateY(-6px); border-color: rgb(156 107 60 / .55);
    background: linear-gradient(135deg, rgb(255 255 255 / .95), rgb(240 228 214 / .75));
    box-shadow: 0 30px 55px -32px rgb(156 107 60 / .55), inset 0 1px 0 rgb(255 255 255 / .9);
}
.treatment:not(.treatment--featured) .treatment__link:hover::before { width: 4.5rem; }
.treatment:not(.treatment--featured) .treatment__link:hover .treatment__title { color: var(--oak-dark); }
.treatment--featured .treatment__link { min-height: 22rem; }

/* "Quién te atiende": credencial ligera (sin caja ni foto repetida) */
.credencial { margin-block: 1.5rem; padding: 0.2rem 0 0.2rem 1.2rem; border-left: 2px solid var(--oak); }
.credencial p:first-child strong { font-size: 0.75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--oak); }
.credencial p:last-child { color: var(--muted); }

/* Preguntas frecuentes: la columna del título se queda fija al bajar y la foto pasa a ser un acompañamiento pequeño */
[aria-labelledby="faq-titulo"] .split > :first-child { position: sticky; top: calc(var(--header-h) + 1.5rem); }
[aria-labelledby="faq-titulo"] .split__media { max-width: 22rem; margin-top: 1.8rem !important; }
[aria-labelledby="faq-titulo"] .split__media img { aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: 0 24px 50px -30px rgb(17 17 17 / .45); }
@media (max-width: 860px) {
    [aria-labelledby="faq-titulo"] .split > :first-child { position: static; }
    [aria-labelledby="faq-titulo"] .split__media { display: none; }
}

/* Credencial "Quién te atiende": junto a las flechas de las reseñas, en la misma fila */
.credencial .eyebrow--light { color: var(--oak); }
.credencial .eyebrow { margin-bottom: 0.4rem; }
.credencial { max-width: 46rem; }
.container:has(> .reviews__nav + .credencial) { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 2rem; }
.container:has(> .reviews__nav + .credencial) > * { margin-block: 0; }
@media (max-width: 760px) { .container:has(> .reviews__nav + .credencial) { flex-direction: column-reverse; align-items: stretch; } }

/* Cabecera en escritorio: logo a la izquierda, menú centrado, "Pedir cita" a la derecha */
@media (min-width: 1321px) {
    .site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
    .site-header__logo { justify-self: start; }
    .site-nav { margin-left: 0; justify-self: center; }
    .site-header__cta { justify-self: end; }
}
/* Franja superior: estado abierto/cerrado a la derecha, junto al teléfono */
.topbar__estado { margin-left: auto; }
.topbar__estado + .topbar__tel { margin-left: 0; }
/* Implantes: misma altura que las demás tarjetas de su fila (la foto se adapta al alto de la fila) */
.treatment--featured .treatment__link { min-height: 0; }
.treatment--featured .treatment__body { margin-top: 5rem; }
@media (max-width: 640px) { .treatment--featured .treatment__link { min-height: 20rem; } }
/* "Ver tratamiento →" siempre pegado abajo de la tarjeta, alineado entre tarjetas de la misma fila */
.treatment__body { display: flex; flex-direction: column; }
.treatment__more { margin-top: auto; padding-top: 1rem; }
/* Chips de tratamientos del hero en una sola línea (si no caben, se desplazan en horizontal) */
.hero__chips { flex-wrap: nowrap; max-width: none; min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.hero__chips::-webkit-scrollbar { display: none; }
.hero__chips a { white-space: nowrap; }
.hero__bottom { flex-wrap: nowrap; }
@media (max-width: 1100px) { .hero__bottom { flex-wrap: wrap; } }

/* Diente del logo en líneas (main.js): sustituye a las rayas de madera */
.has-logo-lineas.page-hero::before, .has-logo-lineas.cta-band::after { display: none; }
.logo-lineas {
    position: absolute; top: 50%; height: min(95%, 40rem); width: auto; aspect-ratio: 665 / 755; pointer-events: none;
    fill: none; stroke: var(--oak); opacity: .09; stroke-width: 9; stroke-linecap: round; /* opacidad del conjunto: los cruces no se oscurecen */
    translate: 0 -50%; animation: logo-flota 14s ease-in-out infinite alternate;
}
.logo-lineas--derecha { right: 2%; }
.logo-lineas--izquierda { left: -6%; z-index: -1; opacity: .12; }
@keyframes logo-flota { from { transform: translateY(-1.2%) rotate(-1.5deg); } to { transform: translateY(1.2%) rotate(1.5deg); } }
@media (max-width: 860px) { .logo-lineas { height: min(50%, 22rem); top: auto; bottom: -6%; translate: none; } }
@media (prefers-reduced-motion: reduce) { .logo-lineas { animation: none; } }
.page-hero__inner { z-index: 1; }

/* Chips que son enlaces (p. ej. "Tratamientos que realiza"): sin subrayado */
.chips a { color: inherit; text-decoration: none; }
.chips li:has(> a):hover { background: var(--oak-50); color: var(--oak-dark); }

/* Iconos de línea (SVG en línea, estilo Font Awesome "light") en listas con icono propio */
.icono { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: var(--oak); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.checklist--iconos li { display: flex; align-items: center; gap: 0.75rem; padding-left: 0; }
.checklist--iconos li::before { display: none; }

/* =====================================================================
   Iconos en línea (trazo fino roble) en todo el sitio
   ===================================================================== */
.icono--sm { width: 1em; height: 1em; vertical-align: -0.15em; }

/* Ventajas (checklist): check de línea en círculo de contorno, en vez de círculo relleno */
.checklist li::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c6b3c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10.2'/%3E%3Cpath d='M7.5 12.5l3 3 6-6.5'/%3E%3C/svg%3E") center / contain no-repeat;
    border-radius: 0;
}

/* Preguntas frecuentes: "+" de línea en círculo de contorno */
.faq summary::after {
    content: ""; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c6b3c' stroke-width='1.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='11'/%3E%3Cpath d='M12 7.5v9M7.5 12h9'/%3E%3C/svg%3E") center / contain no-repeat;
}
.faq details[open] summary::after,
:is(.section--dark:not(.section--destacada), .cta-band) .faq summary::after,
:is(.section--dark:not(.section--destacada), .cta-band) .faq details[open] summary::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c6b3c' stroke-width='1.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='11'/%3E%3Cpath d='M12 7.5v9M7.5 12h9'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Flechas de carrusel y lightbox: flecha de línea dibujada en vez del carácter ← → ✕ */
.reviews__btn, .lightbox__btn { font-size: 0; }
.reviews__btn::before, .lightbox__btn::before {
    content: ""; width: 1.15rem; height: 1.15rem; background: currentColor;
    -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.lightbox__btn { display: grid; place-items: center; }
.reviews__btn[data-dir="-1"], .lightbox__btn--prev { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.reviews__btn[data-dir="1"], .lightbox__btn--next { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.lightbox__btn--close { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
/* Flechas de carrusel/lightbox centradas en su círculo */
.reviews__btn, .lightbox__btn { display: grid; place-items: center; padding: 0; line-height: 0; }
.reviews__btn::before, .lightbox__btn::before { display: block; margin: 0; }
/* Retratos: encuadre desde arriba para no cortar la cabeza */
img.foto-arriba { object-position: center 12%; }
.page-hero__media img.foto-arriba { aspect-ratio: 4 / 4.6; }
/* El carácter ←/→ oculto del botón contaba como elemento de la rejilla y empujaba la flecha hacia arriba:
   la flecha dibujada va absoluta, centrada en el círculo */
.reviews__btn { position: relative; }   /* .lightbox__btn ya es absolute */
.reviews__btn::before, .lightbox__btn::before { position: absolute; inset: 0; margin: auto; }
/* Insignia "Cita verificada" (opiniones de Doctoralia): píldora rellena roble */
.review footer .badge-verificada {
    display: inline-flex; align-items: center; gap: 0.3rem; margin: 0.4rem 0 0; padding: 0.2rem 0.6rem 0.2rem 0.45rem;
    border-radius: 999px; background: var(--oak); color: var(--white); font-size: 0.72rem; font-weight: 700; letter-spacing: .02em;
}
.badge-verificada svg { width: 0.85rem; height: 0.85rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Pie de la opinión: autor y fecha a la izquierda, insignia a la derecha en la misma fila */
.review__pie { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.review__autor span { display: block; }
.review footer.review__pie .badge-verificada { margin: 0; flex: none; }
/* FAQ abierta: icono relleno (círculo roble con aspa blanca) para distinguir la pregunta desplegada */
.faq details[open] summary::after,
:is(.section--dark:not(.section--destacada), .cta-band) .faq details[open] summary::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%239c6b3c'/%3E%3Cpath d='M12 7.5v9M7.5 12h9' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* =====================================================================
   Página del consejo (post): cabecera enmarcada, texto + columna fija con índice y cita, relacionados
   ===================================================================== */
.post { padding-block: 0; }
.post-hero h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.post-hero .breadcrumbs li[aria-current] { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 1rem 0 0; font-size: 0.9rem; color: var(--muted); }
.post__meta span::before { content: "·"; margin-right: 1rem; }
.post-hero .post__image { margin: 0; aspect-ratio: 16 / 11; object-fit: cover; border-radius: calc(var(--radius) * 1.5); box-shadow: 0 30px 60px -35px rgb(17 17 17 / .5); }

.post__layout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section); }
.post__content { max-width: 46rem; font-size: 1.06rem; line-height: 1.75; }
.post__content > p:first-child { font-size: 1.22rem; line-height: 1.6; color: var(--ink); }
.post__content h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-top: 2em; scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.post__content h2::before { content: ""; display: block; width: 2.2rem; height: 2px; margin-bottom: 0.9rem; background: var(--oak); }
.post__content h3 { margin-top: 1.6em; }
.post__content ul { list-style: none; padding-left: 0; display: grid; gap: 0.45rem; }
.post__content ul li { position: relative; padding-left: 1.6rem; }
.post__content ul li::before { content: ""; position: absolute; left: 0.2rem; top: 0.72em; width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 1.5px solid var(--oak); }
.post__content blockquote { margin: 2rem 0; padding: 1.2rem 1.5rem; border-left: 2px solid var(--oak); background: var(--oak-50); border-radius: 0 var(--radius) var(--radius) 0; }
.post__content a { color: var(--oak-dark); }

.post__aside { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: 1.2rem; }
.post__aside-titulo { margin: 0 0 0.7rem; font-size: 0.72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--oak); }
.post__indice { padding-left: 1.1rem; border-left: 1px solid var(--border); }
.post__indice ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.post__indice a { font-size: 0.9rem; line-height: 1.35; color: var(--muted); text-decoration: none; display: block; }
.post__indice a:hover, .post__indice a.is-activo { color: var(--ink); }
.post__indice a.is-activo { font-weight: 700; }
.post__cita { padding: 1.3rem 1.4rem; display: grid; gap: 0.6rem; justify-items: start; }
.post__cita p { margin: 0; font-size: 0.95rem; }
.post__tel { font-weight: 700; color: var(--ink); text-decoration: none; }
@media (max-width: 1000px) {
    .post__layout { grid-template-columns: 1fr; }
    .post__aside { position: static; order: -1; }
    .post__indice { display: none; }
    .post__cita { grid-auto-flow: column; align-items: center; justify-content: space-between; justify-items: initial; }
}
@media (max-width: 560px) { .post__cita { grid-auto-flow: row; } }

/* Barra de progreso de lectura (main.js) */
.progreso-lectura { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; }
.progreso-lectura span { display: block; height: 100%; width: 100%; background: var(--oak); transform-origin: 0 50%; transform: scaleX(var(--progreso, 0)); }
.post article.post__content { padding-inline: 0; margin-inline: 0; }
@media (min-width: 1001px) { .post__layout { grid-template-columns: minmax(0, 1fr) 22rem; } }   /* aside algo más ancho */
.post__indice + .post__cita { margin-top: 1.6rem; }   /* separación índice → cita */
.treatment--featured .treatment__text { max-height: none; -webkit-mask-image: none; mask-image: none; }   /* Implantes: texto completo */
.post article.card { max-width: none; margin-inline: 0; padding-inline: 0; }   /* "Sigue leyendo": la regla antigua de .post article metía relleno a las tarjetas */

/* =====================================================================
   Móvil / tablet: franja superior en una línea, hamburguesa sin círculo y menú lateral a pantalla completa
   ===================================================================== */
/* El cristal de la cabecera fija va en un pseudo-elemento: un backdrop-filter en la propia cabecera
   encerraba el menú fijo dentro de ella (por eso salía diminuto al abrirlo con la página bajada). */
.site-header.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header.is-scrolled::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    backdrop-filter: blur(26px) saturate(1.8); -webkit-backdrop-filter: blur(26px) saturate(1.8);
}

@media (max-width: 720px) {
    .topbar__estado { display: none; }
    .topbar__inner { flex-wrap: nowrap; white-space: nowrap; justify-content: space-between; }
    .topbar__tel { margin-left: auto; }
}

@media (max-width: 1320px) {
    /* Hamburguesa: tres líneas finas, sin círculo */
    .site-header__toggle { background: none; width: 44px; height: 44px; border-radius: 0; position: relative; z-index: 2; }
    .burger, .burger::before, .burger::after { width: 24px; height: 1.6px; background: var(--ink); }
    .burger::before { top: -7px; } .burger::after { top: 7px; }
    .site-header__toggle[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
    .site-header__toggle[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }
    .site-header--light:not(.is-scrolled) .burger,
    .site-header--light:not(.is-scrolled) .burger::before,
    .site-header--light:not(.is-scrolled) .burger::after { background: var(--white); }
    .menu-abierto .site-header .burger::before, .menu-abierto .site-header .burger::after { background: var(--ink); }

    /* Menú: panel que entra desde la izquierda, todo el alto, con velo detrás */
    .site-nav, .site-header.is-scrolled .site-nav {
        position: fixed; inset: 0 auto 0 0; top: 0; width: min(88vw, 26rem); height: 100dvh; margin: 0;
        padding: calc(var(--header-h) + 2.5rem) 1.8rem 2rem; gap: 2rem;
        background: linear-gradient(160deg, rgb(255 255 255 / .96), rgb(247 241 234 / .94));
        backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
        box-shadow: 0 0 0 100vmax rgb(17 17 17 / 0);
        opacity: 1; visibility: hidden; transform: translateX(-100%);
        transition: transform .5s var(--ease), visibility .5s, box-shadow .5s var(--ease);
        overflow-y: auto; z-index: 1;
    }
    .site-nav.is-open { visibility: visible; transform: none; box-shadow: 0 0 0 100vmax rgb(17 17 17 / .45); }
    .site-nav__list > li { border-color: rgb(17 17 17 / .08); }
    .site-nav__link { font-size: 1.4rem; font-weight: 600; padding: 1.05rem 0; letter-spacing: -0.01em; }
    .submenu a { font-size: 1.05rem; padding: 0.55rem 0; }
    .site-nav__cta { align-self: stretch; justify-content: center; padding-block: 1rem; font-size: 1rem; }
    /* Con el menú abierto, el logo se ve sobre el panel */
    .menu-abierto .site-header__logo { position: relative; z-index: 2; }
    .menu-abierto .site-header__logo .logo-blanco { opacity: 0; }
    .menu-abierto .site-header__logo .logo-negro { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .site-nav { transition: none; } }

/* Arreglos del menú móvil */
.site-nav__logo { display: none; }
@media (max-width: 1320px) {
    /* Con la cabecera fija (página bajada), el panel también debe abrirse */
    .site-nav.is-open, .site-header.is-scrolled .site-nav.is-open { visibility: visible; transform: none; box-shadow: 0 0 0 100vmax rgb(17 17 17 / .45); }

    /* Logo propio arriba del panel; el de la cabecera se oculta mientras está abierto */
    .site-nav { padding-top: 1.4rem; }
    .site-nav__logo { display: block; margin-bottom: 0.5rem; }
    .site-nav__logo img { width: 140px; height: auto; }
    .menu-abierto .site-header__logo { opacity: 0; pointer-events: none; }

    /* Flechas de submenú iguales: misma caja (3rem a la derecha), mismo tamaño y trazo */
    .site-nav__toggle::after, .site-nav__toggle--label::after {
        width: 0.55rem; height: 0.55rem; margin: 0; border-width: 0 1.6px 1.6px 0;
    }
    .site-nav__toggle:not(.site-nav__toggle--label) { width: 3rem; height: 3rem; display: grid; place-items: center; }
    .site-nav__toggle--label { width: 100%; display: flex; justify-content: space-between; align-items: center; padding-right: 0; }
    .site-nav__toggle--label::after { margin-right: calc(1.5rem - 0.275rem); }
}
@media (max-width: 1320px) {
    /* Mismo relleno y alto con la cabecera fija o sin ella (la regla .is-scrolled tenía más prioridad) */
    .site-nav, .site-header.is-scrolled .site-nav { padding-top: 1.4rem; height: auto; top: 0; bottom: 0; }
    /* Cruz de cerrar: blanca sobre el velo oscuro, con las dos líneas cruzadas en el centro */
    .menu-abierto .site-header .burger::before, .menu-abierto .site-header .burger::after { background: var(--white); top: 0; }
    .menu-abierto .site-header .burger::before { transform: rotate(45deg); }
    .menu-abierto .site-header .burger::after { transform: rotate(-45deg); }
    .menu-abierto .site-header .burger { background: transparent; }
}
main, .site-footer { overflow-x: clip; }   /* los bloques que aparecen desde los lados no crean scroll horizontal (clip: sin romper el scroll ni sticky) */
@media (max-width: 1320px) {
    /* Panel algo más estrecho para que la cruz quede libre sobre el velo, y cruz más visible */
    .site-nav, .site-header.is-scrolled .site-nav { width: min(80vw, 24rem); overscroll-behavior: contain; }
    .menu-abierto .site-header .burger::before, .menu-abierto .site-header .burger::after { width: 26px; height: 2px; }
}
/* Menú abierto: la web de detrás no se desplaza */
html.menu-abierto, html.menu-abierto body { overflow: hidden; touch-action: none; }
html.menu-abierto .site-nav { touch-action: pan-y; }
/* Móvil: el hueco para la barra de botones lo pone el pie (fondo oscuro), no el body (que dejaba blanco) */
@media (max-width: 720px) {
    body { padding-bottom: 0; }
    .site-footer { padding-bottom: 4.8rem; }
}

/* Botón flotante de llamada (móvil): círculo roble con teléfono de línea; sustituye a la barra "Llamar / Pedir cita" */
@media (max-width: 720px) { body { padding-bottom: 0; } .site-footer { padding-bottom: 0; } .mobile-bar { display: none; } }
@media all {
    .boton-llamar {
        position: fixed; right: 1rem; bottom: 1rem; z-index: 90;
        display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%;
        background: var(--oak); color: var(--white); text-decoration: none;
        box-shadow: 0 16px 34px -12px rgb(17 17 17 / .55), inset 0 1px 0 rgb(255 255 255 / .25);
        transition: transform .3s var(--ease), background .3s;
    }
    .boton-llamar:active { transform: scale(.94); background: var(--oak-dark); }
    .boton-llamar svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
    .menu-abierto .boton-llamar { display: none; }
    .hermes-cookies { bottom: 1rem; }
    @media (min-width: 721px) { .boton-llamar { right: 1.5rem; bottom: 1.5rem; } }
}
.boton-llamar:hover { background: var(--oak-dark); transform: translateY(-2px); color: var(--white); }
@media (max-width: 720px) { .site-footer__bottom { padding-bottom: 5.5rem; } }   /* hueco para el botón de llamar */
@media (max-width: 1320px) {
    .site-nav__link { font-size: 1.25rem; white-space: normal; }
    .site-nav__list > li { flex-wrap: wrap; align-items: center; }
    .site-nav__list > li > a.site-nav__link { flex: 1 1 0; min-width: 0; }
    .site-nav__list > li > .site-nav__toggle:not(.site-nav__toggle--label) { flex: none; }
}
.legal { max-width: 58rem; padding-top: clamp(4rem, 9vw, 7rem); }   /* legales: más aire bajo la cabecera y algo más anchos */
#contenido + main.legal { padding-top: calc(var(--header-h) + 2 * var(--frame) + clamp(3rem, 7vw, 5.5rem)); }   /* la regla de páginas sin hero (con id) tenía prioridad */
.hermes-panel[open] { margin: auto; }   /* el reseteo de márgenes quitaba el centrado nativo del <dialog> */

/* Cifras siempre en una sola fila (también en móvil) */
.stats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
@media (max-width: 640px) {
    .stats li { padding: 1rem 0.8rem 0; }
    .stats strong { font-size: 2rem; }
    .stats span { font-size: 0.78rem; line-height: 1.3; }
}

/* El botón flotante pasa a WhatsApp: verde de WhatsApp, icono relleno */
.boton-llamar { background: #25d366; }
.boton-llamar:is(:hover, :active) { background: #1ebe5a; }
.boton-llamar svg { width: 1.7rem; height: 1.7rem; fill: currentColor; stroke: none; }

/* Tarjeta de equipo sin foto (Mari Paz, hasta que llegue la suya): inicial en un círculo de cristal roble */
.person__inicial {
    justify-self: center; display: grid; place-items: center;
    width: clamp(7rem, 16vw, 11rem); aspect-ratio: 1; border-radius: 50%;
    font-family: var(--font-accent); font-style: italic; font-size: clamp(2.6rem, 6vw, 4rem); color: var(--oak);
    background: linear-gradient(135deg, rgb(255 255 255 / .85), var(--oak-50));
    border: 1px solid rgb(201 162 122 / .35);
    box-shadow: 0 24px 50px -30px rgb(17 17 17 / .35), inset 0 1px 0 rgb(255 255 255 / .9);
}
.person__cargo { margin: 0 0 .4rem; color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .person__inicial { justify-self: start; width: 6rem; font-size: 2.2rem; } }

/* Nota de Google más grande (petición de Sara): cabecera de la home y pie */
.hero__badge--grande { font-size: clamp(1rem, 1.5vw, 1.15rem); padding: .65rem 1.3rem .65rem 1rem; gap: .7rem; }
.hero__badge--grande .stars { font-size: 1.15em; }
.hero__badge--grande strong { font-size: 1.35em; font-weight: 600; }
.site-footer__google { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
.site-footer__google strong { font-size: 1.4em; font-weight: 600; color: var(--white); }

/* Contacto rápido: en móvil barra fija «Llamar | WhatsApp»; en escritorio, solo el flotante de WhatsApp */
.barra-contacto { display: none; }
@media (max-width: 720px) {
    .boton-llamar { display: none; }
    .barra-contacto {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr;
        padding-bottom: env(safe-area-inset-bottom); background: var(--ink); box-shadow: 0 -10px 30px -12px rgb(0 0 0 / .4);
    }
    .barra-contacto a {
        display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3.4rem;
        color: var(--white); font-weight: 600; text-decoration: none;
    }
    .barra-contacto a:active { opacity: .85; }
    .barra-contacto svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
    .barra-contacto__wa { background: #25d366; }
    .barra-contacto__wa svg { fill: currentColor; stroke: none; }
    .menu-abierto .barra-contacto { display: none; }
    body { padding-bottom: calc(3.4rem + env(safe-area-inset-bottom)); }
    .hermes-cookies { bottom: calc(3.4rem + .6rem + env(safe-area-inset-bottom)); }
}

/* Post: firma bajo el H1 y caja de autor al final (autoría, E-E-A-T) */
.post__firma { margin: .4rem 0 0; font-size: .95rem; color: var(--muted); }
.post__firma a { color: var(--oak-dark); font-weight: 600; }
.autor-caja {
    display: grid; grid-template-columns: 7rem 1fr; gap: clamp(1rem, 3vw, 1.8rem); align-items: start;
    margin-top: clamp(2.5rem, 6vw, 4rem); padding: clamp(1.3rem, 3vw, 2rem); border-radius: var(--frame-r);
    background: linear-gradient(135deg, rgb(255 255 255 / .9), var(--oak-50)); border: 1px solid rgb(201 162 122 / .3);
}
.autor-caja__foto img { width: 7rem; height: 7rem; border-radius: 50%; object-fit: cover; object-position: center 12%; }
.autor-caja__titulo { margin: 0 0 .3rem; font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.autor-caja__cargo { margin: 0 0 1rem; font-size: .9rem; color: var(--oak-dark); font-weight: 600; }
.autor-caja p:not(.autor-caja__titulo, .autor-caja__cargo) { font-size: .95rem; color: var(--muted); }
@media (max-width: 600px) { .autor-caja { grid-template-columns: 1fr; } .autor-caja__foto img { width: 5.5rem; height: 5.5rem; } }

/* Móvil (90 % del tráfico): H1 y texto de la cabecera visibles desde el primer pintado, sin esperar
   a la animación de entrada (documento de Javi, apartado 6). En escritorio se mantiene la animación. */
@media (max-width: 760px) {
    .js :is(.hero, .page-hero) :is([data-reveal], .split-words .w) { opacity: 1; transform: none; transition: none; }
}

/* Tratamientos en 4 columnas: sin Caries quedan 8 (2 filas completas). En «Otros tratamientos» quedan 7
   (sin la tarjeta de la propia página): Implantes ocupa 2 columnas, o si es la que falta, la última. */
@media (min-width: 1101px) {
    .treatments { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .treatments:has(> li:nth-child(7):last-child) > .treatment--featured { grid-column: span 2; }
    .treatments:not(:has(> .treatment--featured)) > li:nth-child(7):last-child { grid-column: span 2; }
}
@media (min-width: 1001px) and (max-width: 1100px) { .treatments { grid-template-columns: repeat(2, minmax(0, 1fr)); } .treatments > :last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Puntos fuertes como marquesina: cinta continua con iconos de línea, bordes difuminados y pausa al
   pasar el ratón. */
.puntos-fuertes { padding-block: clamp(.8rem, 1.6vw, 1.2rem); border-block: 1px solid rgb(201 162 122 / .25);
    background: linear-gradient(90deg, var(--oak-50), #fff 50%, var(--oak-50)); }
.marquesina { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquesina__pista { display: flex; width: max-content; animation: marquesina 38s linear infinite; }
.marquesina:hover .marquesina__pista, .marquesina:focus-within .marquesina__pista { animation-play-state: paused; }
.marquesina__lista { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.marquesina__lista li {
    display: flex; align-items: center; gap: .7rem; padding-inline: clamp(1.4rem, 3vw, 2.4rem); white-space: nowrap;
    font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 600; color: var(--ink); letter-spacing: -.01em;
}
.marquesina__lista a { color: inherit; text-decoration: none; }
.marquesina__lista a:hover { color: var(--oak-dark); }
.marquesina__icono { flex: none; width: 2.4rem; height: 2.4rem; padding: .5rem; border-radius: 50%; fill: none; stroke: var(--oak); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; background: #fff; box-shadow: inset 0 0 0 1px rgb(201 162 122 / .4); }
@keyframes marquesina { to { transform: translateX(-50%); } }
@media (max-width: 640px) { .marquesina__pista { animation-duration: 28s; } .marquesina__icono { width: 2rem; height: 2rem; padding: .4rem; } }
@media (prefers-reduced-motion: reduce) {
    .marquesina { -webkit-mask-image: none; mask-image: none; }
    .marquesina__pista { animation: none; width: auto; justify-content: center; }
    .marquesina__lista { flex-wrap: wrap; justify-content: center; row-gap: 1rem; }
    .marquesina__lista[aria-hidden] { display: none; }
}

/* Botón de cierre de algunos posts (enlace a su página de servicio) */
.post__boton { margin-top: 2rem; }

/* Aire entre el texto y su botón: el bloque de dos columnas de los servicios y la tarjeta del doctor */
.columns-2 + .btn-row { margin-top: clamp(1.2rem, 2.5vw, 1.8rem); }
.credencial .link-arrow { display: inline-block; margin-top: .8rem; }

/* Sello de reCAPTCHA oculto (el aviso de texto obligatorio va bajo el botón del formulario) */
.grecaptcha-logo { display: none; }
.grecaptcha-badge { visibility: hidden; }
.contact-form__recaptcha { margin: .6rem 0 0; font-size: .75rem; line-height: 1.4; opacity: .75; }
