/* ==========================================================
   Jornada — Página de donaciones
   Paleta: azul marino, blanco y naranja/dorado (según referencia)
   ========================================================== */

:root {
    --navy: #1d2a66;
    --navy-deep: #141d4a;
    --navy-ink: #24305e;
    --orange: #d9600f;
    --orange-deep: #b54c06;
    --gold: #e8b33c;
    --gold-soft: #f3d27e;
    /* --tab-highlight: #bf530a;       /* botón Depósito Bancario */
    --tab-highlight: #d61010;       /* botón Depósito Bancario */
    --tab-highlight-hover: #b30d0d;
    --tab-pulse: rgba(214, 16, 16, .5);   /* color del pulso (mismo tono que --tab-highlight) */

    /* Fondo de la página bajo el hero (azul marino de la marca) */
    --bg-1: #1f2d6e;                       /* parte superior */
    --bg-2: #18225a;
    --bg-3: #0e1642;                       /* parte inferior */
    --bg-glow: rgba(74, 118, 214, .38);    /* brillo azul suave */
    --bg-glow-gold: rgba(232, 179, 60, .14);
    --texture-line: rgba(255, 255, 255, 0.055);
    --texture-dot: rgba(178, 205, 255, 0.151);
    --texture-dot-gold: rgba(232, 179, 60, .35);
    --hero-photo-h: clamp(560px, 62vw, 980px); /* alto de la foto del hero */

    --ink: #1f2330;
    --muted: #6a6f7d;
    --line: #dcdfe6;
    --panel: #f5f6f9;
    --white: #ffffff;

    --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --font-figures: "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;

    --radius-panel: 28px;
    --radius-card: 14px;
    --shadow-panel: 0 18px 40px -18px rgba(20, 29, 74, .35), 0 2px 6px rgba(20, 29, 74, .08);
    --focus: 0 0 0 3px var(--white), 0 0 0 6px var(--orange);

    /* Anchos: valores por defecto; config.php → 'layout' los reemplaza */
    --container-max: 1280px;
    --container-pad: 16px;
    --col-brand: 40fr;
    --col-content: 60fr;
    --col-gap: 48px;
    --lema-max: 460px;
    --lema-max-tablet: 380px;
    --lema-max-mobile: 280px;

    --hero-fallback: linear-gradient(180deg, #a9c6e6 0%, #dbe7f3 38%, #b9d39a 52%, #79a659 72%, #5d8c43 100%);

    --tab-overlap: 14px;
    --t-view: 260ms;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink);
    background: var(--white);
    overflow-x: hidden;
}

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

a { color: var(--navy); }

.container {
    width: min(100% - var(--container-pad) * 2, var(--container-max));
    margin-inline: auto;
}

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

/* Foco visible y consistente */
:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: 1rem; top: -100px;
    z-index: 100;
    padding: .7rem 1rem;
    background: var(--navy);
    color: var(--white);
    font-weight: 700;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
}
.skip-link:focus { top: 0; }

/* Marcador de imagen faltante */
.placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: .75rem;
    border: 2px dashed #a9b0c2;
    border-radius: 10px;
    background: repeating-linear-gradient(-45deg, rgba(255,255,255,.85) 0 10px, rgba(233,236,243,.85) 10px 20px);
    color: #4c5367;
    font-size: .8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* ==========================================================
   Encabezado
   ========================================================== */

.site-header {
    position: relative;
    z-index: 5;
    background: var(--white);
    border-top: 3px solid var(--navy-ink);
    box-shadow: 0 3px 4px -1px rgba(0, 0, 0, .18);
}

.site-header__bar { border-bottom: 1px solid var(--gold); }

.site-header__brand {
    padding: 1.4rem 0 .75rem;
    border-top: 1px solid var(--gold);
    margin-top: 1.6rem;
    max-width: 900px;
}

.site-header__logo-link { display: inline-block; border-radius: 4px; }

.site-header__logo { width: auto; height: 46px; }
.site-header__logo.placeholder { width: 140px; height: 46px; min-height: 0; }

.site-nav__list {
    list-style: none;
    margin: 0;
    padding: .55rem 1rem .65rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .25rem 1.25rem;
}

.site-nav__link {
    display: inline-block;
    padding: .35rem .25rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: #1a5fd0;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.site-nav__link:hover { color: var(--navy); border-bottom-color: var(--gold); }

/* ==========================================================
   Hero
   ========================================================== */

.hero {
    position: relative;
    isolation: isolate;
    padding: clamp(2rem, 6vw, 5.5rem) 0 clamp(3rem, 7vw, 6rem);
    /* Fondo azul marino a todo lo ancho, con brillos suaves */
    background:
        radial-gradient(ellipse 55% 35% at 8% 62%, var(--bg-glow), transparent 70%),
        radial-gradient(ellipse 45% 30% at 95% 92%, var(--bg-glow-gold), transparent 70%),
        linear-gradient(172deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
}

/* Foto del hero arriba; se disuelve en el fondo azul */
.hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: var(--hero-photo-h);
    z-index: -1;
    background-image: var(--hero-image, var(--hero-fallback));
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
}

/* Textura: líneas diagonales + puntos (debajo de la foto) */
.hero__texture {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
.hero__texture > span { position: absolute; inset: 0; }

.hero__texture-lines {
    background: repeating-linear-gradient(135deg, var(--texture-line) 0 1px, transparent 1px 9px);
    -webkit-mask-image: linear-gradient(135deg, transparent 30%, #000 44%, #000 54%, transparent 68%);
            mask-image: linear-gradient(135deg, transparent 30%, #000 44%, #000 54%, transparent 68%);
}

.hero__texture-dots {
    background:
        radial-gradient(circle, var(--texture-dot) 0 1.4px, transparent 1.9px) 0 0 / 18px 18px,
        radial-gradient(circle, var(--texture-dot-gold) 0 1.1px, transparent 1.6px) 9px 9px / 36px 36px;
    -webkit-mask-image:
        radial-gradient(ellipse 50% 40% at 0% 88%, #000 0%, transparent 72%),
        radial-gradient(ellipse 40% 35% at 100% 45%, #000 0%, transparent 72%);
            mask-image:
        radial-gradient(ellipse 50% 40% at 0% 88%, #000 0%, transparent 72%),
        radial-gradient(ellipse 40% 35% at 100% 45%, #000 0%, transparent 72%);
}

.hero--plain .hero__texture { display: none; }

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, var(--col-brand)) minmax(0, var(--col-content));
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "brand content"
        "aside content";
    column-gap: clamp(1.25rem, 3vw, var(--col-gap));
    align-items: start;
}

.hero__brand {
    grid-area: brand;
    padding-top: clamp(3rem, 6vw, 5rem);
    display: flex;
    justify-content: center;
}

.hero__content { grid-area: content; }

.hero__picture { display: contents; }
.hero__logo { width: 100%; max-width: var(--lema-max); filter: drop-shadow(0 2px 10px rgba(255,255,255,.6)); }
.hero__logo.placeholder { aspect-ratio: 4 / 1.2; font-size: .9rem; }

/* ==========================================================
   Columna lateral (texto, correo postal, PayPal)
   ========================================================== */

.hero__aside {
    grid-area: aside;
    align-self: start;
    /* Empieza debajo de la foto para no tapar el jardín */
    /* Ajuste fino: aumente .85 para bajar el bloque, redúzcalo para subirlo */
    margin-top: clamp(1.5rem, calc(var(--hero-photo-h) * .85 - 20rem), 36rem);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    width: 100%;
    max-width: 560px;
    justify-self: center;
}

.about {
    color: rgba(255, 255, 255, .9);
    font-size: 1.02rem;
    line-height: 1.7;
    text-shadow: 0 1px 3px rgba(8, 14, 45, .55); /* legible aunque toque la foto */
}
.about__title {
    margin: 0 0 1.1rem;
    color: var(--white);
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .01em;
}
.about__title::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin-top: .7rem;
    border-radius: 3px;
    background: var(--gold);
}
.about p { margin: 0 0 1rem; }
.about p:last-child { margin-bottom: 0; }
.about__quote {
    margin: 1.2rem 0 1.4rem !important;
    padding: .2rem 0 .2rem 1.1rem;
    border-left: 3px solid var(--gold);
    color: var(--gold-soft);
    font-size: clamp(1.15rem, 1.6vw, 1.35rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.45;
}

.side-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .12);
    padding: clamp(1.4rem, 2.5vw, 2rem) clamp(1.1rem, 2vw, 1.75rem);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.side-card__kicker {
    margin: 0 0 .3rem;
    color: var(--orange);
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.side-card__title {
    margin: 0 0 .8rem;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--orange);
    font-size: clamp(1.45rem, 2.2vw, 1.9rem);
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1.15;
}
.side-card__title .icon { width: 1.25em; height: 1.25em; stroke-width: 2; }

.mail__intro { margin: 0 0 .9rem; color: var(--ink); font-size: .98rem; }
.mail__address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    line-height: 1.45;
    font-size: 1.08rem;
    color: var(--ink);
    margin-bottom: 1rem;
}
.mail__address strong { color: #000; font-weight: 700; }

.paypal__logo { width: auto; max-width: 190px; max-height: 64px; margin: .1rem auto 1rem; }
.paypal__form { margin: 0; }
.btn--paypal {
    background: #ffc439;          /* amarillo de PayPal */
    color: #111;
    padding: .8rem 1.8rem;
    font-size: 1rem;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .12);
}
.btn--paypal:hover { background: #f2b52a; }
.btn--paypal:focus-visible { outline-color: var(--navy); }
.paypal__note { margin: .75rem 0 0; font-size: .8rem; color: var(--muted); }

/* ==========================================================
   Tarjetas de acción
   ========================================================== */

.action-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.5rem, 1.6vw, 1.25rem);
    padding-inline: clamp(1.25rem, 5vw, 4.5rem) clamp(.75rem, 2vw, 1.5rem);
    margin-bottom: calc(var(--tab-overlap) * -1);
    position: relative;
    z-index: 0;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    min-height: 74px;
    padding: .7rem .5rem calc(.7rem + var(--tab-overlap));
    border: 0;
    border-radius: 16px 16px 0 0;
    background: var(--navy);
    color: var(--white);
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-shadow: inset 0 3px 0 var(--gold);
    transition: background-color .18s, transform .18s;
}

.action-card:hover { background: var(--navy-deep); transform: translateY(-3px); }

.action-card:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: -6px;
    border-radius: 16px 16px 0 0;
}

.action-card__icon { color: var(--gold); display: inline-flex; }
.action-card__icon[hidden] { display: none; }
.action-card .icon { width: 22px; height: 22px; }

/* Botón Depósito Bancario: naranja para destacar.
   Tono algo más oscuro que los títulos (#d9600f) para que el texto blanco
   cumpla el contraste mínimo recomendado (4.7:1). */
.action-card--toggle {
    background: var(--tab-highlight);
    box-shadow: inset 0 3px 0 var(--gold-soft);
}
.action-card--toggle:hover { background: var(--tab-highlight-hover); }
.action-card--toggle .action-card__icon { color: var(--white); }
.action-card--toggle:focus-visible { outline-color: var(--white); }

/* Mientras se ve el depósito, el botón dice "Formulario" y vuelve a azul */
.action-card--toggle.is-active {
    background: var(--navy);
    box-shadow: inset 0 3px 0 var(--tab-highlight);
}
.action-card--toggle.is-active:hover { background: var(--navy-deep); }
.action-card--toggle.is-active .action-card__icon { color: var(--gold); }
.action-card--toggle.is-active:focus-visible { outline-color: var(--gold); }

/* Pulso suave una sola vez al cargar (se omite con movimiento reducido) */
@media (prefers-reduced-motion: no-preference) {
    .action-card--toggle:not(.is-active) {
        animation: tab-pulse 1.8s ease-out .9s 1 both;
    }
}
@keyframes tab-pulse {
    0%   { box-shadow: inset 0 3px 0 var(--gold-soft), 0 0 0 0 var(--tab-pulse); }
    45%  { box-shadow: inset 0 3px 0 var(--gold-soft), 0 0 0 12px transparent; }
    50%  { box-shadow: inset 0 3px 0 var(--gold-soft), 0 0 0 0 var(--tab-pulse); }
    100% { box-shadow: inset 0 3px 0 var(--gold-soft), 0 0 0 12px transparent; }
}

.label-short { display: none; }

/* Sin JavaScript no hay interruptor: ambas vistas se muestran apiladas. */
.no-js .action-card--toggle { display: none; }
.no-js .action-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ==========================================================
   Panel
   ========================================================== */

.panel {
    position: relative;
    z-index: 1;
    background: var(--panel);
    border-radius: var(--radius-panel);
    box-shadow: var(--shadow-panel);
    padding: 1.1rem clamp(.6rem, 2vw, 1.4rem) clamp(1rem, 2vw, 1.5rem);
    scroll-margin-top: 110px;
}
.panel:focus { outline: none; }

.panel__title-main { display: block; }
.panel__title-sub {
    display: block;
    margin-top: .3rem;
    font-size: clamp(.8rem, 1vw, .95rem);
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--muted);
}

.panel__title {
    margin: .2rem 0 1rem;
    text-align: center;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    font-weight: 900;
    letter-spacing: .03em;
    color: #000;
}

.panel__title--nojs { display: none; }
.no-js .panel__title--nojs { display: block; margin-top: 2.5rem; }

.panel__body { position: relative; }

/* Vistas y transición */
.view {
    transition: opacity var(--t-view) ease, transform var(--t-view) ease;
}
.js .view.is-inactive {
    position: absolute;
    inset: 0 0 auto 0;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
.view.is-leaving { opacity: 0; transform: translateY(-8px); }
.view.is-entering { opacity: 0; transform: translateY(10px); }

/* ---------- Formulario embebido ---------- */

.form-card {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: 0 0 0 1px var(--line), 0 4px 12px -6px rgba(20, 29, 74, .18);
    padding: clamp(.4rem, 1.6vw, 1.25rem);
    overflow: hidden;
}

.form-card iframe {
    display: block;
    width: 100%;
    height: var(--form-h, 2459px);
    max-width: 100%;
}

.form-fallback {
    margin: .9rem 0 0;
    text-align: center;
    font-size: .88rem;
    color: var(--muted);
}
.form-fallback a {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-weight: 500;
}
.form-fallback .icon { width: 15px; height: 15px; }

/* ---------- Depósito bancario ---------- */

.view--bank { padding: .25rem clamp(0rem, 1vw, .5rem) .5rem; }

.bank-group + .bank-group { margin-top: 2.25rem; }

.bank-group__title {
    margin: 0;
    text-align: center;
    color: var(--orange);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.bank-group__holder {
    margin: .35rem 0 0;
    text-align: center;
    font-size: .95rem;
    color: var(--ink);
}
.bank-group__holder strong { display: block; font-weight: 500; letter-spacing: .02em; }

.bank-grid {
    list-style: none;
    margin: 1.1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 196px), 1fr));
    gap: 1rem;
}

.bank-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem .9rem 1rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    text-align: center;
    container-type: inline-size;
}

.bank-card p { margin: 0; }

.bank-card__holder {
    font-size: .82rem;
    color: var(--ink);
    padding-bottom: .8rem;
    margin-bottom: .9rem !important;
    border-bottom: 1px solid #eceef3;
    width: 100%;
}
.bank-card__holder span { display: block; font-weight: 700; }

.bank-card__brand {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .7rem;
}
.bank-card__logo { max-height: 46px; max-width: 170px; width: auto; }

.bank-card__wordmark {
    font-family: var(--font-figures);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #111;
    line-height: 1.25;
}

.bank-card__label {
    font-family: var(--font-figures);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--muted);
}
.bank-card__label--clabe { margin-top: .55rem !important; font-size: .95rem; }

.bank-card__number {
    font-family: var(--font-figures);
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--orange);
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
    white-space: nowrap;
}
@container (max-width: 230px) {
    .bank-card__number { font-size: 1.4rem; }
}

.bank-card__clabe {
    font-family: var(--font-figures);
    font-size: 1.02rem;
    color: #565b68;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.bank-card__swift {
    margin-top: .7rem !important;
    font-family: var(--font-figures);
    font-size: 1rem;
    color: var(--muted);
    letter-spacing: .04em;
}
.bank-card__swift span { color: #565b68; font-weight: 600; }

.bank-grid--single { max-width: 340px; margin-inline: auto; }

.bank-card__actions {
    margin-top: auto;
    padding-top: .9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--navy);
    font: inherit;
    font-size: .76rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.copy-btn .icon { width: 14px; height: 14px; }
.copy-btn:hover { border-color: var(--navy); background: #f0f2f8; }
.copy-btn.is-done { border-color: #2f8a4c; color: #236b3a; background: #eef8f1; }

/* ---------- OXXO ---------- */

.oxxo {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px dashed #c9cdd8;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.oxxo__title {
    margin: 0 0 1rem;
    color: var(--orange);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    max-width: 34ch;
}

.oxxo__logo { width: 112px; }
.oxxo__logo.placeholder { width: 112px; height: 56px; }

.oxxo__barcode {
    margin: 1.25rem 0 0;
    padding: 1rem 1.25rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    width: min(100%, 360px);
}
.oxxo__barcode-img { width: 100%; height: auto; margin-inline: auto; }
.oxxo__barcode-img.placeholder { display: flex; min-height: 110px; }
.oxxo__ref { margin-top: .4rem; font-family: var(--font-figures); letter-spacing: .1em; }

.oxxo__prompt { margin: 1rem 0 .6rem; font-size: .9rem; color: var(--ink); }
.oxxo__note { margin: .5rem 0 0; font-size: .8rem; color: var(--muted); }
.oxxo__instructions {
    margin-top: 1.5rem;
    max-width: 62ch;
    font-size: .92rem;
    line-height: 1.55;
    color: var(--ink);
}
.oxxo__instructions p { margin: 0 0 .35rem; }
.oxxo__phone { color: var(--navy); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--gold); }
.oxxo__phone:hover { color: var(--orange-deep); }
.nowrap { white-space: nowrap; }

.oxxo__note.is-highlighted { color: var(--orange-deep); font-weight: 700; font-size: .9rem; }
a.btn { text-decoration: none; }

/* iframe oculto para imprimir el PDF (no usar display:none: algunos navegadores no lo imprimirían) */
.pdf-print-frame {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.3rem;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: .92rem;
    cursor: pointer;
    transition: background-color .15s;
}
.btn .icon { width: 19px; height: 19px; }
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-deep); }
.btn:disabled { background: #b8bccb; cursor: not-allowed; }

/* ==========================================================
   Pie de página
   ========================================================== */

.site-footer {
    background: var(--navy);
    color: #dfe3f2;
    border-top: 4px solid var(--gold);
}

.site-footer__inner {
    padding: 2rem 0 2.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.75rem;
}

.site-footer a {
    color: var(--white);
    text-decoration: none;
    font-size: .92rem;
    border-bottom: 1px solid transparent;
}
.site-footer a:hover { border-bottom-color: var(--gold); }
.site-footer a:focus-visible { outline-color: var(--gold); }

.site-footer__copy { margin: 0; font-size: .88rem; }

/* ==========================================================
   Responsivo
   ========================================================== */

@media (max-width: 960px) {
    .hero__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas: "brand" "content" "aside";
        row-gap: clamp(1.25rem, 3vw, 2rem);
    }
    .hero__brand { padding-top: 0; }
    /* Tablet y móvil: la columna lateral va debajo del formulario */
    .hero__aside { margin-top: 1rem; max-width: 640px; }
    .hero__logo { max-width: var(--lema-max-tablet); }
    /* Fondo para tablet/móvil (si no hay, se usa el de escritorio) */
    .hero::before {
        background-image: var(--hero-image-mobile, var(--hero-image, var(--hero-fallback)));
    }
    .action-cards { padding-inline: clamp(.75rem, 4vw, 2rem); }
    .form-card iframe { height: var(--form-h-tablet, var(--form-h)); }
}

@media (max-width: 600px) {
    .container { width: min(100% - min(var(--container-pad), 10px) * 2, var(--container-max)); }
    .site-header__brand { margin-top: 1rem; padding-top: 1rem; display: flex; justify-content: center; }
    .site-header__logo { height: 40px; }
    .hero__logo { max-width: var(--lema-max-mobile); }
    :root { --radius-panel: 20px; --tab-overlap: 12px; }
    .action-cards { padding-inline: .5rem; gap: .4rem; }
    .action-card { min-height: 64px; font-size: .7rem; letter-spacing: .02em; border-radius: 12px 12px 0 0; }
    .action-card .icon { width: 19px; height: 19px; }
    .label-full { display: none; }
    .label-short { display: inline; }
    .panel { padding-inline: .45rem; }
    .form-card { padding: .25rem; border-radius: 10px; }
    .form-card iframe { height: var(--form-h-mobile, var(--form-h)); }
    .site-footer__inner { flex-direction: column; text-align: center; }
    .site-footer__links { justify-content: center; }
}

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    .action-card:hover { transform: none; }
}

/* ==========================================================
   Impresión
   ========================================================== */

#print-root { display: none; }

@media print {
    /* Impresión solo del código de barras (botón "Imprimir código de barras") */
    html.is-printing-barcode body > *:not(#print-root) { display: none !important; }
    html.is-printing-barcode #print-root {
        display: block !important;
        text-align: center;
        padding-top: 2cm;
        font-family: var(--font-body);
    }
    #print-root .print-title { font-size: 14pt; font-weight: 700; margin: 0 0 .6cm; }
    #print-root figure { margin: 0 auto; border: 0; padding: 0; width: 12cm; max-width: 100%; }
    #print-root img { width: 100%; height: auto; }
    #print-root .print-org { margin-top: .6cm; font-size: 10pt; color: #333; }

    /* Impresión general de la página: ocultar elementos interactivos */
    .action-cards, .site-nav, .copy-btn, .btn, .form-fallback, .skip-link { display: none !important; }
    .panel { box-shadow: none; }
    @page { margin: 1.5cm; }
}
