/* =========================================================
   Centro Médico Veterinario Fajardo
   ========================================================= */

:root {
    --brand: #0e9fdc;          /* azul del logo */
    --brand-600: #0a86bb;
    --brand-50: #e8f6fc;
    --navy: #0b2545;
    --navy-700: #13315c;
    --accent: #f28c28;
    --accent-600: #d97516;
    --ink: #1c2b3a;
    --muted: #5b6b7c;
    --line: #e2e9f0;
    --bg: #ffffff;
    --bg-alt: #f4f9fc;
    --ok: #1f8a4c;
    --ok-bg: #e8f6ee;
    --error: #c62828;
    --error-bg: #fdecec;
    --whatsapp: #25d366;
    --whatsapp-600: #1a9e50;  /* más oscuro para que el texto blanco sea legible */
    --whatsapp-700: #168a45;
    --whatsapp-50: #e7f9ee;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(11, 37, 69, .06), 0 2px 8px rgba(11, 37, 69, .05);
    --shadow: 0 8px 30px rgba(11, 37, 69, .10);
    --container: 1160px;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    font-family: "Nunito", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }

h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

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

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }
.center { text-align: center; margin-top: 2rem; }
.muted { color: var(--muted); }

.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -.15em; }

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 100;
    background: var(--navy); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow {
    display: inline-block;
    font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: var(--brand-600);
    margin-bottom: .6rem;
}

.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* ---------- Botones ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .8em 1.4em;
    border: 2px solid transparent; border-radius: 999px;
    font: inherit; font-weight: 700; line-height: 1.1;
    cursor: pointer; text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .6em 1.1em; font-size: .95rem; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(14, 159, 220, .3); }
.btn-primary:hover { background: var(--brand-600); color: #fff; }

.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(242, 140, 40, .3); }
.btn-accent:hover { background: var(--accent-600); color: #fff; }

.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-600); }

.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--brand-50); color: var(--navy); }

.btn-whatsapp { background: var(--whatsapp-600); color: #fff; box-shadow: 0 6px 18px rgba(37, 211, 102, .3); }
.btn-whatsapp:hover { background: var(--whatsapp-700); color: #fff; }

/* ---------- Botón flotante de WhatsApp ---------- */

.whatsapp-float {
    position: fixed; right: 20px; bottom: 20px; z-index: 60;
    display: inline-flex; align-items: center; gap: .6rem;
    height: 58px; padding: 0 1.2rem 0 1rem;
    border-radius: 999px;
    background: var(--whatsapp); color: #fff;
    box-shadow: 0 10px 28px rgba(11, 37, 69, .25);
    font-weight: 800;
    transition: transform .2s, box-shadow .2s, background-color .2s;
}
.whatsapp-float:hover { color: #fff; text-decoration: none; background: var(--whatsapp-600); transform: translateY(-3px); box-shadow: 0 14px 32px rgba(11, 37, 69, .3); }
.whatsapp-float .icon { width: 28px; height: 28px; }
.whatsapp-float-label { color: #0b3d1f; }
.whatsapp-float:hover .whatsapp-float-label { color: #fff; }

@media (max-width: 600px) {
    .whatsapp-float { width: 58px; padding: 0; justify-content: center; right: 16px; bottom: 16px; }
    .whatsapp-float-label { display: none; }
}

/* ---------- Barra superior y encabezado ---------- */

.topbar { background: var(--navy); color: #cfe3f2; font-size: .88rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 7px; padding-bottom: 7px; }
.topbar span, .topbar a { display: inline-flex; align-items: center; gap: .45em; }
.topbar a { color: #fff; font-weight: 700; }

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }

.brand { display: flex; align-items: center; gap: .75rem; color: var(--navy); }
.brand:hover { text-decoration: none; color: var(--navy); }
.brand img { width: 72px; height: 52px; object-fit: cover; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-sub { font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.brand-name { font-size: 1.35rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 1.25rem; }
.main-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.main-nav ul a {
    display: inline-flex; align-items: center; gap: .4em;
    padding: .55em .9em; border-radius: 999px;
    color: var(--ink); font-weight: 700;
}
.main-nav ul a:hover { background: var(--brand-50); color: var(--brand-600); text-decoration: none; }
.main-nav ul a[aria-current="page"] { background: var(--brand-50); color: var(--brand-600); }
.main-nav ul a.nav-muted { color: var(--muted); font-weight: 600; }

.nav-toggle {
    display: none;
    background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 8px; color: var(--navy); cursor: pointer;
}
.nav-toggle .icon { width: 24px; height: 24px; display: block; }

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        display: none;
        position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: .75rem;
        background: #fff; border-bottom: 1px solid var(--line);
        padding: 12px 20px 20px; box-shadow: var(--shadow);
    }
    .main-nav.is-open { display: flex; }
    .main-nav ul { flex-direction: column; }
    .main-nav ul a { display: flex; border-radius: var(--radius-sm); padding: .75em 1em; }
}

@media (max-width: 520px) {
    .topbar-inner { justify-content: center; }
    .topbar-inner > span { display: none; }
    .brand-sub { font-size: .7rem; }
    .brand-name { font-size: 1.15rem; }
}

/* ---------- Secciones ---------- */

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.section-head-sm { margin: 3.5rem auto 1.5rem; }

/* ---------- Hero ---------- */

.hero {
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(14, 159, 220, .18), transparent 60%),
        linear-gradient(180deg, var(--bg-alt), #fff);
    padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 .hl { color: var(--brand); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0; }
.hero-badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.hero-badges li {
    display: inline-flex; align-items: center; gap: .45em;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: .4em .9em; font-size: .9rem; font-weight: 700; color: var(--navy);
    box-shadow: var(--shadow-sm);
}
.hero-badges .icon { color: var(--brand); }

@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero .carousel { max-width: 520px; margin: 0 auto; width: 100%; }
}

/* ---------- Carrusel ---------- */

.carousel { position: relative; }
.carousel-track {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 28px; overflow: hidden;
    background: var(--brand-50);
    box-shadow: var(--shadow);
}
.carousel-track::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(11, 37, 69, .06);
}
.carousel-slide {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0; transform: scale(1.03);
    transition: opacity .9s ease, transform 4.5s ease;
}
.carousel-slide.is-active { opacity: 1; transform: scale(1); }
.carousel-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1rem; }
.carousel-dot {
    width: 10px; height: 10px; padding: 0; border-radius: 999px;
    border: 0; background: #c7d6e3; cursor: pointer;
    transition: width .25s, background-color .25s;
}
.carousel-dot[aria-pressed="true"] { width: 28px; background: var(--brand); }

/* ---------- Franja de información ---------- */

.info-strip { margin-top: -1.5rem; position: relative; z-index: 2; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.info-card {
    display: flex; align-items: center; gap: 1rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm); color: var(--ink);
}
a.info-card:hover { text-decoration: none; border-color: var(--brand); color: var(--ink); }
.info-card strong { display: block; color: var(--navy); }
.info-icon {
    display: grid; place-items: center; flex-shrink: 0;
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--brand-50); color: var(--brand-600);
}
.info-icon .icon { width: 22px; height: 22px; }
.info-label { display: block; font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

.info-icon-whatsapp { background: var(--whatsapp-50); color: var(--whatsapp-600); }

@media (max-width: 760px) { .info-strip { margin-top: 0; padding-top: 1rem; } }

/* ---------- Tarjetas de servicios (inicio) ---------- */

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature-card {
    display: block; background: #fff; color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.6rem; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature-card:hover { text-decoration: none; color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.feature-card p { color: var(--muted); margin: 0; font-size: .95rem; }
.feature-icon {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-600));
    color: #fff; margin-bottom: 1rem;
    box-shadow: 0 6px 16px rgba(14, 159, 220, .28);
}
.feature-icon .icon { width: 24px; height: 24px; }
.feature-icon-lg { width: 64px; height: 64px; border-radius: 18px; }
.feature-icon-lg .icon { width: 30px; height: 30px; }

@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Equipo ---------- */

.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.team-grid:has(> .team-card:only-child) { grid-template-columns: minmax(0, 560px); justify-content: center; }
.team-card {
    display: flex; gap: 1.25rem; align-items: flex-start;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.75rem; box-shadow: var(--shadow-sm);
}
.team-card h3 { margin-bottom: .15rem; }
.role { color: var(--brand-600); font-weight: 700; margin-bottom: 1rem; }
.avatar {
    display: grid; place-items: center; flex-shrink: 0;
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--navy); color: #fff; font-weight: 800; font-size: 1.2rem; letter-spacing: .04em;
}

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.contact-list li { display: flex; align-items: center; gap: .6rem; color: var(--muted); overflow-wrap: anywhere; }
.contact-list .icon { color: var(--brand); }
.contact-list-lg { gap: 1.1rem; }
.contact-list-lg li { align-items: flex-start; color: var(--ink); }
.contact-list-lg .icon { width: 22px; height: 22px; margin-top: .15rem; }

@media (max-width: 860px) { .team-grid { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .team-card { flex-direction: column; } }

/* ---------- Facebook ---------- */

.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.social-img { margin-top: 1.5rem; border-radius: var(--radius); }
.fb-wrap {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px; box-shadow: var(--shadow-sm);
    display: flex; justify-content: center; min-height: 200px; overflow: hidden;
}
@media (max-width: 860px) { .social-grid { grid-template-columns: 1fr; } }

/* ---------- Llamada a la acción ---------- */

.cta { background: linear-gradient(120deg, var(--navy), var(--navy-700) 55%, var(--brand-600)); color: #dbeaf6; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-top: 3rem; padding-bottom: 3rem; }
.cta h2 { color: #fff; margin-bottom: .25rem; }
.cta p { margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Encabezado de página interna ---------- */

.page-hero {
    background:
        radial-gradient(900px 400px at 90% 0%, rgba(14, 159, 220, .35), transparent 60%),
        linear-gradient(135deg, var(--navy), var(--navy-700));
    color: #cfe3f2;
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.page-hero h1 { color: #fff; max-width: 22ch; }
.page-hero .eyebrow { color: #7fd0f3; }
.page-hero .lead { color: #cfe3f2; margin: 0; }

/* ---------- Página de servicios ---------- */

.service-nav { margin-top: 1.75rem; }
.service-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.service-nav a {
    display: inline-flex; align-items: center; gap: .45em;
    padding: .45em .95em; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
    color: #fff; font-size: .9rem; font-weight: 700;
    transition: background .2s, border-color .2s;
}
.service-nav a .icon { color: #7fd0f3; }
.service-nav a:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); color: #fff; text-decoration: none; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service-card {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.service-card:target { outline: 3px solid var(--brand); outline-offset: 2px; }

.service-media { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: var(--brand-50); }
.service-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.service-media-contain { background: var(--bg-alt); }
.service-media-contain img { object-fit: contain; padding: 1rem; }
.service-media-icon {
    display: grid; place-items: center;
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .22), transparent 45%),
        radial-gradient(circle at 10% 110%, rgba(14, 159, 220, .55), transparent 55%),
        linear-gradient(135deg, var(--navy), var(--navy-700));
}
.service-media-glyph { width: 72px; height: 72px; color: rgba(255, 255, 255, .9); stroke-width: 1.4; }

.service-body { flex: 1; padding: 1.4rem 1.5rem 1.6rem; }
.service-title { display: flex; gap: .9rem; align-items: center; margin-bottom: 1.1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.service-title .feature-icon { margin-bottom: 0; width: 44px; height: 44px; border-radius: 12px; }
.service-title .feature-icon .icon { width: 22px; height: 22px; }
.service-title h2 { font-size: 1.2rem; margin: 0; }

.check-list-2 { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
.service-sub { color: var(--muted); font-size: .92rem; margin: .2rem 0 0; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; }
.check-list .icon { color: var(--ok); margin-top: .25rem; }

.tags { list-style: none; margin: .6rem 0 0 1.7rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li {
    background: var(--brand-50); color: var(--brand-600);
    border-radius: 999px; padding: .25em .8em; font-size: .88rem; font-weight: 700;
}

.notes { margin-top: 1.1rem; padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--bg-alt); border-left: 4px solid var(--brand); }
.notes p { margin: 0; font-size: .92rem; color: var(--muted); }
.notes p + p { margin-top: .35rem; }

.badge-urgent {
    display: inline-block; vertical-align: middle;
    background: var(--error); color: #fff;
    font-size: .7rem; font-weight: 800; letter-spacing: .08em; line-height: 1;
    padding: .3em .6em; border-radius: 999px; white-space: nowrap;
}
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.privacy-note { margin: 2rem 0 0; text-align: center; color: var(--muted); font-size: .92rem; }
.extra-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 1.25rem; }
.extra-card {
    display: flex; gap: 1rem; align-items: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem 1.4rem; box-shadow: var(--shadow-sm);
}
.extra-card .feature-icon { margin-bottom: 0; }
.extra-card h3 { margin: 0; }
.extra-card p { margin: .15rem 0 0; color: var(--muted); font-size: .92rem; }

@media (max-width: 1024px) {
    .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    .service-grid { grid-template-columns: 1fr; }
    .extra-grid { grid-template-columns: 1fr; }
    .service-nav ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
    .service-nav a { white-space: nowrap; }
}
@media (max-width: 380px) {
    .check-list-2 { grid-template-columns: 1fr; }
}

/* ---------- Tarjetas y formulario ---------- */

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: clamp(1.5rem, 3vw, 2rem); box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 1.35rem; }

.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }
.contact-side { display: grid; gap: 1.5rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; }
.field label { font-weight: 700; color: var(--navy); }
.field input, .field textarea {
    width: 100%;
    font: inherit; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    padding: .75em .9em;
    transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(14, 159, 220, .15);
}
.field input.input-validation-error, .field textarea.input-validation-error { border-color: var(--error); }
.field-error { color: var(--error); font-size: .88rem; font-weight: 600; }
.form-note { font-size: .88rem; color: var(--muted); margin: 0 0 1rem; }

/* Campo trampa para bots: fuera de la vista sin usar display:none (algunos bots lo detectan). */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; justify-content: flex-end; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }

.alert { display: flex; gap: .6rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-weight: 600; }
.alert .icon { margin-top: .2rem; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--error-bg); color: var(--error); }

.doctor-mini { display: grid; gap: .15rem; padding: .9rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.doctor-mini:first-of-type { border-top: 0; padding-top: 0; }
.doctor-mini strong { color: var(--navy); }

.empty-state { text-align: center; padding: 3rem 2rem; }

/* ---------- Textos legales ---------- */

.legal { max-width: 780px; }
.legal h2 { font-size: 1.3rem; margin-top: 2.25rem; }
.legal h2:first-child { margin-top: 0; }
.legal ul { padding-left: 1.25rem; margin: 0 0 1em; }
.legal li { margin-bottom: .35rem; }

.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 3rem; align-items: start; }
.legal-aside { position: sticky; top: 110px; }
.legal-toc {
    background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem 1rem;
}
.legal-toc h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 .5rem .6rem; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.legal-toc a {
    display: flex; align-items: center; gap: .6rem;
    padding: .45rem .5rem; border-radius: var(--radius-sm);
    color: var(--ink); font-weight: 600; font-size: .95rem;
}
.legal-toc a .icon { color: var(--brand); }
.legal-toc a:hover { background: #fff; color: var(--navy); text-decoration: none; }

.legal-doc { max-width: 760px; }
.legal-summary {
    display: flex; gap: 1rem; align-items: center;
    background: var(--brand-50); border-radius: var(--radius);
    padding: 1.1rem 1.25rem; margin-bottom: 2rem;
}
.legal-summary .feature-icon { margin-bottom: 0; background: #fff; }
.legal-summary strong { color: var(--navy); font-size: 1.05rem; }
.legal-summary p { margin: 0; color: var(--muted); font-size: .95rem; }

.legal-section { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.legal-section:first-of-type { border-top: 0; padding-top: 0; }
.legal-section h2 { display: flex; align-items: center; gap: .75rem; font-size: 1.25rem; margin: 0 0 .75rem; }
.legal-section p { margin: 0; color: var(--ink); line-height: 1.75; }
.legal-num {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--navy); color: #fff; font-size: .9rem; font-weight: 800;
}
.legal-section:target h2 { color: var(--brand-600); }
.legal-highlight {
    background: var(--bg-alt); border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm); padding: 1rem 1.25rem; font-weight: 600;
}

.legal-contact {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem;
    margin-top: 2rem; padding: 1.5rem 1.75rem; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--navy), var(--navy-700)); color: #cfe3f2;
}
.legal-contact h2 { color: #fff; font-size: 1.2rem; margin: 0 0 .2rem; }
.legal-contact p { margin: 0; }
.legal-contact-links { display: grid; gap: .4rem; }
.legal-contact-links a { display: inline-flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700; overflow-wrap: anywhere; }

@media (max-width: 860px) {
    .legal-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .legal-aside { position: static; }
    .legal-toc ol { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .legal-toc ol { grid-template-columns: 1fr; }
    .legal-summary { align-items: flex-start; }
}
.empty-state .feature-icon { margin: 0 auto 1.25rem; }

/* ---------- Pie de página ---------- */

.site-footer { background: var(--navy); color: #a9c1d6; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-top: 3.5rem; padding-bottom: 2.5rem; }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.site-footer a { color: #e3eef7; }
.site-footer a:hover { color: #fff; }
.footer-logo { width: 140px; height: auto; border-radius: 12px; margin-bottom: 1rem; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-list li { display: flex; align-items: center; gap: .55rem; overflow-wrap: anywhere; }
.footer-list li.indent { padding-left: calc(1.1em + .55rem); }
.footer-list .icon { color: var(--brand); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 1.1rem 0; font-size: .88rem; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
body:has(.whatsapp-float) .footer-bottom { padding-bottom: 96px; }

@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
