/* Limoa Dental — hoja de estilos única, sin frameworks ni build tools. */

:root {
    --ink: #2B2E1F;
    --brand: #607119;
    --brand-dark: #485513;
    --brand-light: #A0AA75;
    --cream: #F7F5EC;
    --card: #EFECDF;
    --line: rgba(43, 46, 31, 0.14);
    --gold: #B08D57;
    --pending-bg: #FBF0DC;
    --pending-ink: #7A4E00;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 14px;
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
a { color: var(--brand-dark); }
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 0.6em;
    color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
    padding: 0.8em 1.2em; z-index: 200;
}
.skip-link:focus { left: 1em; top: 1em; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.8em;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.85em 1.6em;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.98rem;
    font-family: var(--font-heading);
    transition: opacity .2s ease, background-color .2s ease, color .2s ease;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { opacity: 0.9; }
.btn--outline { border-color: currentColor; color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--outline-light { border-color: rgba(255,255,255,0.7); color: #fff; }
.btn--outline-light:hover { background: #fff; color: var(--ink); }
.btn--whatsapp { background: #25D366; color: #fff; }
.btn--whatsapp:hover { opacity: 0.9; }
.contact-block__actions { display: flex; flex-direction: column; gap: 1rem; }
.contact-block__actions .btn { width: 100%; justify-content: center; }

.pending {
    background: var(--pending-bg);
    color: var(--pending-ink);
    padding: 0.15em 0.5em;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.92em;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(247, 245, 236, 0.86);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    max-width: 1180px; margin: 0 auto; padding: 0 1.5rem;
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.site-logo { text-decoration: none; font-family: var(--font-heading); font-weight: 800; font-size: 1.25rem; color: var(--ink); white-space: nowrap; }
.site-logo__name { color: var(--brand); }
.site-logo__suffix { color: var(--ink); }
.site-nav ul { display: flex; gap: 1.8rem; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: var(--brand-dark); }
.site-header__actions { display: flex; align-items: center; gap: 1rem; }
.phone-pill {
    display: inline-flex; align-items: center; gap: 0.5em;
    background: var(--card); border-radius: 999px; padding: 0.5em 1em;
    text-decoration: none; color: var(--ink); font-weight: 700; font-size: 0.92rem;
}
.menu-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; border: none; background: transparent; cursor: pointer;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 0 auto; transition: transform .2s ease, opacity .2s ease; }
.mobile-nav {
    display: none;
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--cream);
    z-index: 99; padding: 2rem 1.5rem; overflow-y: auto;
}
.mobile-nav ul { display: flex; flex-direction: column; gap: 1.2rem; margin-bottom: 2rem; }
.mobile-nav a { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.3rem; font-family: var(--font-heading); }
body.nav-open .mobile-nav { display: block; }
body.nav-open { overflow: hidden; }
/* Con el menú abierto, el botón flotante no tapa sus últimas opciones. */
body.nav-open .whatsapp-float { display: none; }
body.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .site-nav, .phone-pill { display: none; }
    .menu-toggle { display: flex; }
}

/* Botón flotante de WhatsApp (enlace wa.me, sin scripts de terceros). */
.whatsapp-float {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 150;
    width: 58px; height: 58px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #25D366; color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
    transition: transform 0.15s ease;
}
.whatsapp-float:hover, .whatsapp-float:focus-visible { transform: scale(1.06); }
@media (max-width: 900px) {
    .whatsapp-float { right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); width: 54px; height: 54px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background-size: cover; background-position: center;
    padding: 6rem 1.5rem 5rem;
    color: #fff;
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(43,46,31,0.55), rgba(43,46,31,0.72));
}
.hero__content { position: relative; max-width: 640px; margin: 0 auto; text-align: left; }
.hero .eyebrow { color: var(--card); }
.hero h1 { color: #fff; }
.hero p { color: var(--card); font-size: 1.08rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.6rem; }

.page-hero {
    padding: 4.5rem 1.5rem 3rem;
    background: var(--card);
    text-align: left;
}
.page-hero .container { max-width: 760px; }
.page-hero p { font-size: 1.08rem; }

/* ---------- Sections ---------- */
section { padding: 4rem 0; }
.section--tight { padding: 2.5rem 0; }
.section-heading { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section-heading.align-left { margin-left: 0; text-align: left; }

/* ---------- Treatments grid ---------- */
.treatments-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
@media (max-width: 900px) { .treatments-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .treatments-grid { grid-template-columns: 1fr; } }
.treatment-card {
    background: var(--card); border-radius: var(--radius); padding: 1.8rem;
    display: flex; flex-direction: column; gap: 0.6rem;
}
.treatment-card__number { font-family: var(--font-heading); font-weight: 800; color: var(--brand-light); font-size: 1.4rem; }
.treatment-card a { text-decoration: none; font-weight: 700; }
.treatment-card a:hover { text-decoration: underline; }

/* ---------- Numbered values (La clínica) ---------- */
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.2rem 2.5rem; }
@media (max-width: 700px) { .values-grid { grid-template-columns: 1fr; } }
.value-item__number { font-family: var(--font-heading); font-weight: 800; color: var(--brand-light); font-size: 1.1rem; display: block; margin-bottom: 0.3em; }
.value-item h3 { margin-bottom: 0.4em; }

/* ---------- Gallery ---------- */
/* Galería justificada (portada): fotos enteras, sin recortar, a la misma
   altura. Cada enlace lleva --ar (ancho/alto) y ocupa ancho en proporción.
   Pensada para 4-5 fotos por pestaña: en escritorio/tablet van en una fila;
   con más fotos habría que pasar a varias filas. En móvil, mosaico a 2 columnas. */
.gallery-tabs__list { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.gallery-tabs__list button {
    font: inherit; font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem;
    padding: 0.55em 1.4em; border-radius: 999px; cursor: pointer;
    border: 2px solid var(--brand); background: transparent; color: var(--brand-dark);
}
.gallery-tabs__list button[aria-selected="true"] { background: var(--brand); color: #fff; }
.gallery-justified { display: flex; gap: 3px; }
.gallery-justified[data-inactive] { display: none; }
.gallery-justified a { flex: var(--ar) 1 0; aspect-ratio: var(--ar); overflow: hidden; display: block; }
.gallery-justified img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 0;
    transition: opacity .35s ease, transform .35s ease;
}
.gallery-justified a:hover img, .gallery-justified a:focus-visible img { opacity: 0.85; transform: scale(1.02); }
@media (max-width: 600px) {
    .gallery-justified { display: block; columns: 2; column-gap: 3px; }
    .gallery-justified a { margin-bottom: 3px; break-inside: avoid; }
}

.lightbox {
    border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
    width: 100vw; height: 100vh; overflow: hidden;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(20, 22, 14, 0.92); }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; border-radius: 6px; }
.lightbox button {
    position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: 0; cursor: pointer;
    width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255,255,255,0.25); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Team ---------- */
.team-columns { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
@media (max-width: 800px) { .team-columns { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-section { background: var(--ink); color: var(--cream); }
.contact-section h2 { color: #fff; }
.contact-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 800px) { .contact-columns { grid-template-columns: 1fr; } }
.contact-list li { margin-bottom: 0.7em; padding-left: 1.6em; position: relative; }
.contact-list li::before { content: "—"; position: absolute; left: 0; color: var(--brand-light); }
.contact-list a { color: #fff; }
/* Mapa estático enlazado a Google Maps (contacto.php). */
.map-static { margin: 1.8rem 0 0; }
.map-static img { width: 100%; height: auto; border: 1px solid rgba(255,255,255,0.15); }
.map-static figcaption {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem;
    margin-top: 0.6rem; font-size: 0.88rem;
}
.map-static figcaption a { color: #fff; }
.map-static figcaption span { opacity: 0.75; font-size: 0.8rem; }
.contact-section .pending { background: rgba(251,240,220,0.15); color: var(--card); }

.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-weight: 700; margin-bottom: 0.4em; font-size: 0.92rem; }
.form-field input, .form-field textarea {
    width: 100%; padding: 0.75em 0.9em; border-radius: 8px; border: 1px solid var(--line);
    font: inherit; background: #fff; color: var(--ink);
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-checkbox { display: flex; gap: 0.6em; align-items: flex-start; margin-bottom: 1rem; font-size: 0.9rem; }
.form-checkbox input { margin-top: 0.3em; }
.form-checkbox a { color: inherit; text-decoration: underline; }
.form-note { font-size: 0.82rem; opacity: 0.85; margin-top: 0.5rem; }
.form-alert { padding: 0.9em 1.1em; border-radius: 8px; margin-bottom: 1.2rem; font-weight: 600; }
.form-alert--ok { background: rgba(160,170,117,0.25); color: #fff; }
.form-alert--error { background: rgba(176,74,74,0.3); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--card); padding: 4rem 0 0; }
.site-footer__inner {
    max-width: 1180px; margin: 0 auto; padding: 0 1.5rem;
    display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 2.5rem;
}
@media (max-width: 800px) { .site-footer__inner { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1em; }
.site-footer__nav li, .site-footer__contact li { margin-bottom: 0.6em; }
.site-footer__nav a, .site-footer__contact a { text-decoration: none; color: var(--ink); }
.site-footer__nav a:hover { text-decoration: underline; }
.site-footer__brand p { margin-top: 0.6em; color: var(--brand-dark); }
.site-footer__social { display: flex; gap: 1rem; margin-top: 0.8em; }
.site-footer__social a { color: var(--ink); font-weight: 700; display: inline-flex; }
.site-footer__social a:hover { color: var(--brand); }
.site-footer__bottom {
    margin-top: 3rem; border-top: 1px solid var(--line);
    padding: 1.3rem 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem;
    justify-content: space-between; align-items: center; font-size: 0.85rem;
}
.site-footer__bottom nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.site-footer__bottom a, .site-footer__bottom button {
    color: var(--ink); text-decoration: none; background: none; border: none; padding: 0;
    font: inherit; cursor: pointer; font-size: 0.85rem;
}
.site-footer__bottom a:hover, .site-footer__bottom button:hover { text-decoration: underline; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 200;
    max-width: 620px; margin: 0 auto;
    background: var(--ink); color: var(--cream);
    border-radius: var(--radius); padding: 1.3rem 1.5rem;
    display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
/* Sin esto, el display:flex de arriba anula el atributo hidden y el banner no se cierra. */
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: 0.88rem; flex: 1 1 320px; }
.cookie-banner a { color: var(--card); }

/* ---------- Blog ---------- */
.post-list { display: grid; gap: 2rem; max-width: 760px; margin: 0 auto; }
.post-card { background: var(--card); border-radius: var(--radius); padding: 1.8rem; }
.post-card time { font-size: 0.82rem; color: var(--brand-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.post-card h2 { margin-top: 0.4em; }
.post-body { max-width: 700px; margin: 0 auto; }
.post-body h2 { margin-top: 1.6em; }
.post-body p { font-size: 1.05rem; }

/* ---------- Legal content ---------- */
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h2 { margin-top: 1.8em; }
.legal-content ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
.legal-content li { margin-bottom: 0.4em; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
