/* =========================================================
   BABBID v2 · Replicación fiel del mockup
   Reglas estrictas: Inter, border-radius:0, paleta limitada
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
    --c-white:  #ffffff;
    --c-gray:   #f5f5f5;
    --c-gray-2: #fafafa;
    --c-line:   #e5e5e5;
    --c-text:   #555555;
    --c-text-2: #444444;
    --c-black:  #111111;     /* texto y titulares (negro real) */
    --c-navy:   #0B2545;     /* navy corporativo · CTAs primarios */
    --c-navy-deep: #061A33;
    --c-gold:   #3FB8E5;     /* cian del logo · acento de marca */
    --c-gold-2: #2AA4D2;

    --container: 1440px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-white);
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4, h5, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, h3, h4, h5 {
    color: var(--c-black);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* BORDES · imágenes, botones, cards e inputs con radio sutil */
img { border-radius: 6px; }
.btn, button { border-radius: 6px; }
.sol-card, .center { border-radius: 8px; }
input, select, textarea { border-radius: 6px; }
.footer, .header { border-radius: 0; }

/* ---------- Utilidades ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.section { padding: 100px 0; }
.section-tight { padding: 64px 0; }
.section-gray { background: var(--c-gray); }
/* .section-dark eliminado · diseño 100% blanco */

.eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-gold);
    margin-bottom: 16px;
}
.section-dark .eyebrow { color: var(--c-gold); }

.h-xl { font-size: clamp(40px, 4.6vw, 60px); font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; color: var(--c-black); }
.h-lg { font-size: clamp(28px, 3vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--c-black); }
.h-md { font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--c-black); }

.lead {
    font-size: 15px;
    font-weight: 400;
    color: var(--c-text);
    line-height: 1.65;
    max-width: 60ch;
}

/* ---------- Botones · sin bordes redondeados ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px;
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    border: 1px solid transparent;
    transition: background .2s, color .2s, border-color .2s;
    white-space: nowrap;
    cursor: pointer;
}
/* CTA primario: navy corporativo · hover en cian Babbid */
.btn-gold { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }
.btn-gold:hover { background: var(--c-gold); border-color: var(--c-gold); }
.btn-dark { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }
.btn-dark:hover { background: var(--c-gold); border-color: var(--c-gold); }
/* Variante cian sólido */
.btn-cyan { background: var(--c-gold); color: #fff; border-color: var(--c-gold); }
.btn-cyan:hover { background: var(--c-gold-2); border-color: var(--c-gold-2); }
.btn-outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: var(--c-gold); color: #fff; border-color: var(--c-gold); }
.btn-outline-dark { background: transparent; color: var(--c-black); border-color: var(--c-black); }
.btn-outline-dark:hover { background: var(--c-gold); color: #fff; border-color: var(--c-gold); }

/* =========================================================
   HEADER
   ========================================================= */
.header {
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    position: relative;
}
.header__inner {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 18px; padding-bottom: 18px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; line-height: 1; color: var(--c-black); }
.logo__img {
    height: 32px; width: auto; display: block;
    border-radius: 0 !important;
}
.logo__tag {
    font-size: 9px; font-weight: 500;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--c-text);
    padding-left: 12px;
    border-left: 1px solid var(--c-line);
    line-height: 1.35;
    white-space: pre-line;
}

.nav { display: flex; gap: 32px; align-items: center; }
.nav__link {
    font-size: 14px; font-weight: 500;
    color: var(--c-text-2);
    letter-spacing: 0;
    display: inline-flex; align-items: center; gap: 4px;
    cursor: pointer;
    background: none; border: 0; padding: 0;
    font-family: inherit;
}
.nav__link {
    position: relative;
    padding-bottom: 4px;
}
.nav__link::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--c-black);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .2s ease;
    border-radius: 0;
}
.nav__link:hover::after,
.nav__link.is-open::after { transform: scaleX(1); }
.nav__link:hover,
.nav__link.is-open { color: var(--c-black); }
.nav__link--has-mega { position: relative; }

/* Mega-menú */
.mega {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border-top: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    z-index: 60;
    opacity: 0; visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}
.mega.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mega__inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr 2fr;
    gap: 48px;
    padding: 48px 0;
}
.mega__intro h3 {
    font-size: 28px; font-weight: 700;
    line-height: 1.15; letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.mega__intro p {
    font-size: 14px; color: var(--c-text);
    line-height: 1.55;
    max-width: 32ch;
    margin-bottom: 20px;
}
.mega__intro .btn { padding: 12px 22px; font-size: 11px; }

.mega__col-title {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--c-text);
    margin-bottom: 20px;
}
.mega__list { display: flex; flex-direction: column; }
.mega__item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0;
    font-size: 16px; font-weight: 500;
    color: var(--c-black);
    border-bottom: 1px solid transparent;
    cursor: pointer;
    background: none; border-left: 0; border-right: 0; border-top: 0;
    text-align: left;
    font-family: inherit;
}
.mega__item:hover,
.mega__item.is-active { color: var(--c-gold); }
.mega__item::after {
    content: '›';
    font-size: 18px; line-height: 1;
    color: var(--c-text);
    margin-left: 12px;
}
.mega__item:hover::after,
.mega__item.is-active::after { color: var(--c-gold); }

.mega__sublist .mega__item { font-size: 15px; font-weight: 500; }
.mega__sublist .mega__item::after { content: ''; }
.mega__sublist .mega__item:hover { color: var(--c-gold); }

.mega__featured {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.mega-card {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    display: block;
}
.mega-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 0 !important;
}
.mega-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.7) 100%);
}
.mega-card__caption {
    position: absolute; left: 16px; right: 16px; bottom: 16px;
    z-index: 2;
    font-size: 16px; font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}
.mega-card__caption small {
    display: block;
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    margin-bottom: 4px;
}

@media (max-width: 1080px) { .mega { display: none !important; } }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__login {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px;
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--c-black);
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 6px;
    transition: border-color .2s, color .2s;
}
.header__login:hover { border-color: var(--c-gold); color: var(--c-gold); }
.header__login svg {
    width: 16px; height: 16px;
    stroke: currentColor; fill: none; stroke-width: 1.7;
    display: block;
}
@media (max-width: 1080px) { .header__actions { display: none; } }
.nav__link--caret::after {
    content: ''; display: inline-block;
    width: 6px; height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    margin-left: 4px;
    opacity: .6;
}

.burger { display: none; padding: 8px; }
.burger svg { width: 22px; height: 22px; stroke: var(--c-black); }
.mobile-nav { display: none; background: #fff; border-top: 1px solid var(--c-line); }
.mobile-nav.is-open { display: block; }
.mobile-nav__inner { padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a {
    padding: 14px 4px; font-size: 15px; font-weight: 500;
    color: var(--c-black); border-bottom: 1px solid var(--c-line);
    letter-spacing: 0;
}
.mobile-nav .btn { margin-top: 16px; justify-content: center; }

.mobile-nav__group { border-bottom: 1px solid var(--c-line); }
.mobile-nav__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--c-black);
    cursor: pointer;
    text-align: left;
}
.mobile-nav__chevron {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.mobile-nav__toggle[aria-expanded="true"] .mobile-nav__chevron {
    transform: rotate(180deg);
}
.mobile-nav__sub {
    display: flex;
    flex-direction: column;
    padding: 0 0 8px 16px;
}
.mobile-nav__sub[hidden] {
    display: none;
}
.mobile-nav__sub a {
    padding: 12px 4px;
    font-size: 14px;
    font-weight: 400;
    border-bottom: 0;
    color: var(--c-text);
}
.mobile-nav__group a {
    border-bottom: 0;
}

.mobile-nav__group--nested { border-bottom: 1px solid var(--c-line); }
.mobile-nav__group--nested:last-child { border-bottom: 0; }
.mobile-nav__group--nested .mobile-nav__toggle {
    padding: 12px 4px;
    font-size: 14px;
    font-weight: 500;
}
.mobile-nav__sub--nested {
    padding: 0 0 8px 16px;
}
.mobile-nav__sub--nested a {
    padding: 10px 4px;
    font-size: 13px;
    color: var(--c-text);
}
@media (max-width: 1080px) {
    .nav { display: none; }
    .burger { display: inline-flex; }
}


/* ==== FOOTER (común) ==== */
   FOOTER · gris claro, texto oscuro (estilo WeWork)
   ========================================================= */
.footer { background: var(--c-gray); color: var(--c-text); padding: 72px 0 32px; }
.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 2.4fr 1fr 1.2fr;
    gap: 56px;
    padding-bottom: 48px;
    border-bottom: 1px solid #e0e0e0;
}
@media (max-width: 1180px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand .logo { color: var(--c-black); }
.footer__brand .logo__tag { color: var(--c-text); }
.footer__brand p { margin-top: 14px; max-width: 36ch; font-size: 13px; color: var(--c-text); }
.footer h5 {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--c-black); margin-bottom: 16px;
}
.footer ul { display: flex; flex-direction: column; gap: 10px; }
.footer a { font-size: 13px; color: var(--c-text); }
.footer a:hover { color: var(--c-gold); }
.footer__contact-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--c-text); }
.footer__contact-line svg { width: 14px; height: 14px; stroke: var(--c-gold); fill: none; stroke-width: 1.6; flex-shrink: 0; }
.footer__bottom {
    padding-top: 24px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    font-size: 12px; color: #888; align-items: center;
}
.footer__bottom a { color: #888; }
.footer__bottom a:hover { color: var(--c-black); }

/* ---------- Selección y focus ---------- */
::selection { background: var(--c-gold); color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--c-gold); outline-offset: 2px;
}

/* =========================================================
   CONTACTO · split foto + formulario
   ========================================================= */
.contact { background: #fff; padding: 100px 0; }
.contact__grid {
    display: grid; grid-template-columns: 1fr 1.1fr;
    gap: 48px; align-items: stretch;
}
.contact__visual {
    position: relative; overflow: hidden;
    min-height: 540px;
    border-radius: 8px;
}
.contact__visual img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 0 !important;
}
.contact__form-wrap {
    padding: 0;
    background: #fff;
}
.contact__form-wrap h2 { margin-bottom: 8px; }
.contact__form-wrap p.lead { margin-bottom: 32px; }

.field { margin-bottom: 14px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--c-line);
    font-family: inherit;
    font-size: 14px; color: var(--c-black);
    transition: border-color .2s;
}
.field input::placeholder, .field textarea::placeholder { color: #999; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--c-gold);
}
.field textarea { resize: vertical; min-height: 96px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }
.form-legal { font-size: 12px; color: #999; margin: 6px 0 18px; }
.form-status { font-size: 14px; line-height: 1.5; margin-top: 14px; padding: 10px 14px; border-radius: 6px; }
.form-status--ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.form-status--error { background: #fef2f2; color: #7f1d1d; border: 1px solid #fecaca; }

@media (max-width: 1080px) {
    .contact__grid { grid-template-columns: 1fr; gap: 32px; }
    .contact__visual { min-height: 320px; }
}

/* Footer · centros con dirección */
.footer__centers { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer__centers li { display: flex; flex-direction: column; gap: 2px; }
.footer__centers li a { font-weight: 500; color: var(--c-text); text-decoration: none; font-size: 13.5px; }
.footer__centers li a:hover { color: var(--c-gold); }
.footer__centers li span { font-size: 12px; color: var(--c-muted, #888); line-height: 1.4; }

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 18px 20px;
    max-width: 720px;
    margin: 0 auto;
}
.cookie-banner__inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cookie-banner__text { flex: 1; min-width: 240px; font-size: 13px; line-height: 1.5; color: #333; margin: 0; }
.cookie-banner__actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-banner__actions .btn { padding: 8px 14px; font-size: 13px; }
@media (max-width: 540px) {
    .cookie-banner__actions { width: 100%; }
    .cookie-banner__actions .btn { flex: 1; }
}

/* ==== Página de contacto · listado de centros ==== */
.contact-page > .container { padding-top: 96px; padding-bottom: 48px; }
@media (max-width: 720px) { .contact-page > .container { padding-top: 64px; } }
.contact-page h1 {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.contact-page__intro {
    font-size: 16px;
    color: var(--c-text);
    max-width: 720px;
    line-height: 1.6;
}

.contact-centers { padding: 80px 0 120px; background: #fafafa; border-top: 1px solid var(--c-line); }
.contact-centers__head { margin-bottom: 40px; max-width: 720px; }
.contact-centers__head h2 {
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.contact-centers__head p {
    color: var(--c-text);
    font-size: 15px;
    line-height: 1.6;
}
.contact-centers__contact {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--c-black);
}
.contact-centers__contact a { color: var(--c-black); text-decoration: none; }
.contact-centers__contact a:hover { text-decoration: underline; }
.contact-centers__contact span { margin: 0 8px; color: var(--c-line); }

.contact-centers__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) { .contact-centers__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .contact-centers__grid { grid-template-columns: 1fr; } }

.contact-center {
    display: block;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
    color: inherit;
    text-decoration: none;
}
.contact-center:hover {
    border-color: var(--c-black);
    transform: translateY(-2px);
}
.contact-center__img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--c-gray);
}
.contact-center__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.contact-center:hover .contact-center__img img {
    transform: scale(1.04);
}
.contact-center__body { padding: 18px; }
.contact-center h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-black);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.contact-center__addr {
    font-size: 13px;
    color: var(--c-text);
    line-height: 1.5;
    margin-bottom: 8px;
}
.contact-center__meta {
    font-size: 12px;
    color: var(--c-text-muted, #71717a);
    margin-bottom: 12px;
    line-height: 1.4;
}
.contact-center__more {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-black);
    border-top: 1px solid var(--c-line);
    padding-top: 12px;
    width: 100%;
}
