/* =========================================================
   IX COINNOVA · UNAH — Hoja de estilos única
   Reemplaza: styles.css + responsive.css + mejoras-ui.css
   Paleta institucional: vino · burdeos · noche · dorado
   Tipografía: Playfair Display (títulos) + Montserrat (texto)
   ========================================================= */

:root {
    --wine: #8b1e24;
    --burgundy: #4a0e13;
    --night: #230a0d;
    --gold: #d6ad55;
    --gold-soft: #ecd69b;
    --paper: #f7f4f4;
    --white: #ffffff;
    --ink: #1e1a1b;
    --muted: #645b5d;
    --line: rgba(74, 14, 19, .14);

    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --ease: cubic-bezier(.2, .7, .2, 1);
    --nav-h: 4.75rem;
    --radius: 0.375rem;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 0.5rem);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--wine); color: #fff; }

:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; border-radius: 3px; }
.hero :focus-visible,
.section-dark :focus-visible,
.footer :focus-visible,
.main-navbar:not(.scrolled):not(.menu-open) :focus-visible { outline-color: var(--gold); }

.container { width: min(92%, 75rem); margin-inline: auto; }

.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Secciones y encabezados ---------- */
.section { position: relative; padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-light { background: var(--paper); }
.section-dark {
    color: #fff;
    background:
        radial-gradient(56.25rem 30rem at 100% 0%, rgba(139, 30, 36, .55), transparent 65%),
        linear-gradient(165deg, var(--burgundy), var(--night));
}

.section-heading { max-width: 40rem; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.section-heading h2 {
    font-family: var(--serif);
    font-size: clamp(1.875rem, 4vw, 2.875rem);
    line-height: 1.15;
    font-weight: 700;
    color: var(--burgundy);
    letter-spacing: -.01em;
}
.section-heading h2::after {
    content: "";
    display: block;
    width: 3.5rem; height: 3px;
    margin: 1.125rem 0 1.25rem;
    background: var(--gold);
}
.section-heading p { color: var(--muted); max-width: 54ch; }
.section-dark .section-heading h2 { color: #fff; }
.section-dark .section-heading p { color: rgba(255, 255, 255, .72); }

.eyebrow {
    display: inline-flex; align-items: center; gap: 0.75rem; margin-bottom: 0.875rem;
    font-size: 0.75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: var(--wine);
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: var(--gold); }
.section-dark .eyebrow { color: var(--gold); }
.section-heading.is-center { margin-inline: auto; text-align: center; }
.section-heading.is-center h2::after { margin-inline: auto; }
.section-heading.is-center p { margin-inline: auto; }
.section-heading.is-center .eyebrow::after { content: ""; width: 2rem; height: 1px; background: var(--gold); }

.section-heading.is-split {
    max-width: none;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
}

/* ---------- Botones ---------- */
.btn,
.btn-gold-solid,
.btn-outline-glass,
.btn-register-payment,
.btn-solid-ponencia,
.btn-notice {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
    padding: 0.9375rem 1.875rem;
    border-radius: 62.4375rem;
    font-size: 0.875rem; font-weight: 700; letter-spacing: .03em;
    transition: transform .3s var(--ease), box-shadow .3s, background .3s, color .3s, border-color .3s;
}
.btn:hover, .btn-gold-solid:hover, .btn-outline-glass:hover,
.btn-register-payment:hover, .btn-solid-ponencia:hover, .btn-notice:hover { transform: translateY(-2px); }
.btn:active, .btn-gold-solid:active, .btn-register-payment:active,
.btn-solid-ponencia:active, .btn-notice:active { transform: translateY(0) scale(.98); }

.btn-gold-solid, .btn-solid-ponencia {
    background: var(--gold); color: var(--night);
    box-shadow: 0 0.625rem 1.625rem rgba(214, 173, 85, .28);
}
.btn-gold-solid:hover, .btn-solid-ponencia:hover { background: var(--gold-soft); box-shadow: 0 0.875rem 2rem rgba(214, 173, 85, .4); }

.btn-outline-glass {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(0.375rem);
}
.btn-outline-glass:hover { border-color: var(--gold); background: rgba(255, 255, 255, .14); }

.btn-primary, .btn-register-payment, .btn-notice { background: var(--wine); color: #fff; }
.btn-primary:hover, .btn-register-payment:hover, .btn-notice:hover { background: var(--burgundy); box-shadow: 0 0.75rem 1.75rem rgba(139, 30, 36, .3); }
.section-dark .btn-primary { background: var(--gold); color: var(--night); }
.section-dark .btn-primary:hover { background: var(--gold-soft); box-shadow: 0 0.75rem 1.75rem rgba(214, 173, 85, .3); }

.btn-register-payment { width: 100%; justify-content: flex-start; padding: 1.0625rem 1.5rem; border-radius: var(--radius); }
.btn-register-payment .chev { margin-left: auto; font-size: 1.375rem; line-height: 1; transition: transform .3s var(--ease); }
.btn-register-payment:hover .chev { transform: translateX(0.25rem); }

.icon {
    width: 1.25em; height: 1.25em; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Barra de progreso ---------- */
.scroll-progress {
    position: fixed; top: 0; left: 0; z-index: 1100;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--wine), var(--gold));
    transform: scaleX(0); transform-origin: left;
}

/* ---------- Navegación ---------- */
.main-navbar {
    position: fixed; inset: 0 0 auto 0; z-index: 1000;
    color: #fff;
    transition: background .35s, box-shadow .35s, color .35s, backdrop-filter .35s;
}
.main-navbar.scrolled,
.main-navbar.menu-open {
    color: var(--burgundy);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(1rem) saturate(1.4);
    box-shadow: 0 1px 0 var(--line), 0 0.625rem 1.875rem rgba(35, 10, 13, .08);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--nav-h); }

.nav-brand { display: flex; align-items: center; gap: 0.75rem; flex: none; }
.unah-logo { width: 2.875rem; height: 2.875rem; object-fit: contain; transition: transform .5s var(--ease); }
.nav-brand:hover .unah-logo { transform: rotate(-6deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; letter-spacing: .03em; }
.brand-subtitle { font-size: 0.6562rem; font-weight: 500; letter-spacing: .06em; opacity: .78; }

.nav-links { display: flex; align-items: center; gap: 1.625rem; }
.nav-links a {
    position: relative; padding: 0.375rem 0;
    font-size: 0.8438rem; font-weight: 500; letter-spacing: .01em;
    opacity: .92; transition: opacity .2s, color .2s;
}
.nav-links a::after {
    content: ""; position: absolute; left: 0; bottom: -2px;
    width: 100%; height: 2px; background: var(--gold);
    transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.main-navbar.scrolled .nav-links a.active { color: var(--wine); }

.menu-toggle { display: none; width: 2.75rem; height: 2.75rem; position: relative; border-radius: 50%; }
.menu-toggle span {
    position: absolute; left: 0.6875rem; right: 0.6875rem; height: 2px; border-radius: 2px;
    background: currentColor; transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 0.9375rem; }
.menu-toggle span:nth-child(2) { top: 1.3125rem; }
.menu-toggle span:nth-child(3) { top: 1.6875rem; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 1.3125rem; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 1.3125rem; transform: rotate(-45deg); }

/* ---------- Portada ---------- */
.hero {
    position: relative; isolation: isolate;
    min-height: 100vh; min-height: 100svh;
    display: flex; align-items: center;
    padding: calc(var(--nav-h) + 3rem) 0 4.5rem;
    color: #fff;
    background-color: var(--night);
    background-size: cover; background-position: center;
}
.hero-overlay {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(35, 10, 13, .94) 0%, rgba(35, 10, 13, .78) 45%, rgba(74, 14, 19, .5) 100%),
        linear-gradient(180deg, rgba(35, 10, 13, .55), transparent 30%, rgba(35, 10, 13, .85));
}
.hero-grid {
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(18.75rem, 1fr);
    gap: clamp(2rem, 6vw, 5rem); align-items: center;
}

.hero-meta { display: flex; flex-wrap: wrap; gap: 0.625rem 1.375rem; margin-bottom: 1.75rem; font-size: 0.875rem; font-weight: 500; color: var(--gold-soft); }
.hero-meta span { display: inline-flex; align-items: center; gap: 0.5625rem; }

.hero-title {
    font-family: var(--serif);
    font-size: clamp(3.375rem, 10vw, 8rem);
    font-weight: 800; line-height: .95; letter-spacing: -.02em;
    margin-bottom: 1.625rem;
}
.hero-ix {
    display: block;
    color: transparent;
    -webkit-text-stroke: 2px var(--gold);
    font-weight: 800;
    margin-bottom: 0.25rem;
}
.hero-subtitle { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.875rem); font-weight: 500; line-height: 1.35; max-width: 22em; margin-bottom: 1.375rem; }
.text-gold { color: var(--gold); }
.hero-tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1rem, 1.7vw, 1.1875rem); color: rgba(255, 255, 255, .82); max-width: 40em; margin-bottom: 0.875rem; }
.hero-desc { font-size: 0.9688rem; color: rgba(255, 255, 255, .7); max-width: 46em; margin-bottom: 2.25rem; }
.hero-action-buttons { display: flex; flex-wrap: wrap; gap: 0.875rem; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; text-align: center; }
.cd-unit { padding: 0.875rem 0.25rem 0.625rem; border-radius: 0.25rem; background: rgba(255, 255, 255, .06); }
.cd-unit strong {
    display: block;
    font-family: var(--serif); font-size: clamp(1.875rem, 4vw, 2.75rem); font-weight: 700; line-height: 1;
    color: #fff; font-variant-numeric: tabular-nums;
}
.cd-unit span { display: block; margin-top: 0.5rem; font-size: 0.75rem; font-weight: 500; color: rgba(255, 255, 255, .7); }
.cd-unit strong.tick { animation: tick .45s var(--ease); }
.countdown-ended { grid-column: 1 / -1; font-family: var(--serif); font-size: 1.125rem; padding: 0.5rem 0; }

/* Entrada de la portada: el único momento de animación al cargar */
.hero-copy > *, .hero-escudo { animation: hero-in 1s var(--ease) backwards; }
.hero-copy > :nth-child(1) { animation-delay: .1s; }
.hero-copy > :nth-child(2) { animation-delay: .22s; }
.hero-copy > :nth-child(3) { animation-delay: .34s; }
.hero-copy > :nth-child(4) { animation-delay: .46s; }
.hero-copy > :nth-child(5) { animation-delay: .58s; }
.hero-copy > :nth-child(6) { animation-delay: .7s; }
.hero-escudo { animation-delay: .5s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(1.75rem); } to { opacity: 1; transform: none; } }
@keyframes tick { from { transform: translateY(-30%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Ejes temáticos (carrusel) ---------- */

/* ---------- Ponentes ---------- */
/* 3 columnas. Cada tarjeta tiene dos caras: datos (oscura) y foto (aparece al pasar el mouse o tocar). */
.speaker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.speaker-card {
    position: relative; height: 28rem; border-radius: 1.125rem; overflow: hidden; isolation: isolate;
    background: linear-gradient(160deg, rgba(139, 30, 36, .28), rgba(255, 255, 255, .03) 55%), #1a0a0e;
    border: 1px solid rgba(236, 214, 155, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
    transition: transform .5s var(--ease), border-color .4s, box-shadow .5s var(--ease);
}
.speaker-card:hover, .speaker-card.is-open { transform: translateY(-0.375rem); border-color: rgba(214, 173, 85, .6); box-shadow: 0 2rem 3.5rem -1.75rem rgba(0, 0, 0, .8), 0 0 2.5rem -1rem rgba(214, 173, 85, .35); }
.speaker-card.is-tbd { border-style: dashed; }

/* Cara 1: datos */
.speaker-front { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 1.75rem; color: #fff; transition: opacity .45s var(--ease), transform .6s var(--ease); }
.speaker-front::after {   /* IX grande de marca de agua */
    content: "IX"; position: absolute; right: 1.25rem; bottom: .5rem; z-index: -1;
    font-family: var(--serif); font-size: 7.5rem; font-weight: 800; line-height: 1;
    color: transparent; -webkit-text-stroke: 1px rgba(214, 173, 85, .14);
}
.speaker-avatar {
    display: grid; place-items: center; width: 4.25rem; height: 4.25rem; margin-bottom: 1.5rem; border-radius: 50%;
    font-size: 1.15rem; font-weight: 700; letter-spacing: .04em; color: var(--gold-soft);
    background: radial-gradient(circle at 35% 30%, rgba(214, 173, 85, .38), rgba(139, 30, 36, .3));
    border: 1px solid rgba(214, 173, 85, .5);
    box-shadow: 0 0 0 7px rgba(214, 173, 85, .05), 0 0 28px -4px rgba(214, 173, 85, .5);
}
.speaker-card.is-tbd .speaker-avatar { background: none; border-style: dashed; box-shadow: none; }
.speaker-meta { font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.speaker-front h3 { margin: .45rem 0 .5rem; font-family: var(--sans); font-size: 1.3rem; font-weight: 700; line-height: 1.25; color: #fff; }
.speaker-front .speaker-role { font-size: .92rem; color: rgba(255, 255, 255, .72); }
.speaker-front .speaker-topic { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid rgba(255, 255, 255, .1); font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--gold-soft); }
.speaker-hint { margin-top: auto; display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.speaker-hint .icon { transition: transform .4s var(--ease); }
.speaker-card:hover .speaker-hint .icon { transform: translateX(4px); }

/* Cara 2: foto con silueta + datos (se abre en círculo desde el cursor) */
.speaker-reveal {
    position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--night);
    clip-path: circle(0% at var(--rx, 50%) var(--ry, 100%));
    transition: clip-path .75s var(--ease);
}
.speaker-card.is-open .speaker-reveal { clip-path: circle(150% at var(--rx, 50%) var(--ry, 100%)); }
.speaker-card.is-open .speaker-front { opacity: 0; transform: scale(.96); }
@media (hover: hover) and (pointer: fine) {
    .speaker-card:hover .speaker-reveal { clip-path: circle(150% at var(--rx, 50%) var(--ry, 100%)); }
    .speaker-card:hover .speaker-front { opacity: 0; transform: scale(.96); }
}
.speaker-card:has(.speaker-toggle:focus-visible) .speaker-reveal { clip-path: circle(150% at 50% 100%); }
.speaker-card:has(.speaker-toggle:focus-visible) .speaker-front { opacity: 0; }
.speaker-card:has(.speaker-toggle:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }

.speaker-photo {
    position: relative; flex: 1; min-height: 0; overflow: hidden;
    background: linear-gradient(165deg, var(--wine), var(--burgundy) 60%, var(--night));
}
.speaker-photo > img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.08); transition: transform 1.1s var(--ease); }
.speaker-card:hover .speaker-photo > img, .speaker-card.is-open .speaker-photo > img { transform: none; }
/* Marco dorado interior */
.speaker-photo::after {
    content: ""; position: absolute; inset: 0.75rem; pointer-events: none;
    border: 1px solid rgba(236, 214, 155, .45); border-radius: 2px;
}
/* Ponente por confirmar: silueta tenue sobre vino */
.speaker-card.is-pending .speaker-photo > img {
    object-fit: contain; object-position: bottom; padding-top: 14%;
    filter: brightness(0) invert(1); opacity: .14;
}
.speaker-card.is-pending .speaker-photo::before {
    content: "IX"; position: absolute; top: 1.5rem; right: 1.5rem;
    font-family: var(--serif); font-size: 1.75rem; font-weight: 700; line-height: 1;
    color: transparent; -webkit-text-stroke: 1px rgba(236, 214, 155, .55);
}
/* Botón invisible que cubre la tarjeta: tocar en celular, Tab + Enter con teclado */
.speaker-toggle { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; cursor: pointer; background: none; border: 0; }
.speaker-toggle:focus-visible { outline: none; }

/* ---------- Programa ---------- */
.program-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.program-side { position: sticky; top: calc(var(--nav-h) + 2rem); }
.program-side .section-heading { margin-bottom: 2rem; }
.program-tabs { display: flex; flex-direction: column; gap: 0.5rem; }
.program-tabs .tab-btn { width: 100%; border-radius: var(--radius); }
.tab-btn {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0;
    padding: 0.75rem 1.5rem; border-radius: 62.4375rem; text-align: left; line-height: 1.3;
    border: 1px solid rgba(236, 214, 155, .35); color: rgba(255, 255, 255, .85);
    transition: background .3s, color .3s, border-color .3s;
}
.tab-btn b { font-size: 0.875rem; font-weight: 700; }
.tab-btn small { font-size: 0.7812rem; opacity: .8; }
.tab-btn:hover { border-color: var(--gold); }
.tab-btn.active { background: var(--gold); border-color: var(--gold); color: var(--night); }

.tab-content { display: none; }
.tab-content.active { display: block; }
.program-grid { position: relative; display: grid; gap: 0.75rem; }

.program-item {
    display: grid; grid-template-columns: 9.25rem 1fr; gap: 1.5rem;
    padding: 1.375rem 1.625rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    border-left: 3px solid var(--gold);
    transition: background .3s, transform .3s var(--ease);
}
.program-item:hover { background: rgba(255, 255, 255, .09); transform: translateX(0.25rem); }
.program-time { font-family: var(--serif); font-size: 1.1875rem; font-weight: 600; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.program-info h4 { font-size: 1.0312rem; font-weight: 600; line-height: 1.45; color: #fff; }
.program-info p { margin-top: 2px; font-size: 0.875rem; color: rgba(255, 255, 255, .65); }
.speaker-tag {
    display: inline-block; margin-top: 0.625rem; padding: 0.3125rem 0.875rem; border-radius: 62.4375rem;
    background: rgba(214, 173, 85, .16); color: var(--gold-soft);
    font-size: 0.8125rem; font-weight: 600; transition: background .3s, color .3s;
}
.speaker-tag--link { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.speaker-tag--link:hover { background: var(--gold); color: var(--night); }

.program-item.is-break { padding-block: 0.8125rem; background: transparent; border-style: dashed; border-left-style: dashed; opacity: .85; }
.program-item.is-break .program-time { font-size: 1.0625rem; }
.program-item.is-break h4 { font-weight: 500; font-style: italic; font-family: var(--serif); }
.program-item.is-highlight { background: linear-gradient(90deg, rgba(214, 173, 85, .16), rgba(255, 255, 255, .04)); }

/* Al cambiar de día (acción del usuario) las actividades entran en cascada */
.tab-content.active .program-item { animation: slide-in .55s var(--ease) backwards; }
.tab-content.active .program-item:nth-child(1) { animation-delay: .02s; }
.tab-content.active .program-item:nth-child(2) { animation-delay: .08s; }
.tab-content.active .program-item:nth-child(3) { animation-delay: .14s; }
.tab-content.active .program-item:nth-child(4) { animation-delay: .2s; }
.tab-content.active .program-item:nth-child(5) { animation-delay: .26s; }
.tab-content.active .program-item:nth-child(6) { animation-delay: .32s; }
.tab-content.active .program-item:nth-child(7) { animation-delay: .38s; }
.tab-content.active .program-item:nth-child(8) { animation-delay: .44s; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-1.5rem); } to { opacity: 1; transform: none; } }

.program-download { margin-top: 2rem; }

/* ---------- Galería (edición anterior) ---------- */
#galeria { background: var(--paper); }
.galeria-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 14rem; gap: 1rem; }
.galeria-grid figure { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--burgundy); }
.galeria-grid figure:first-child { grid-column: span 2; grid-row: span 2; }
.galeria-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.galeria-grid figure:hover img { transform: scale(1.04); }
.galeria-grid figcaption {
    position: absolute; inset: auto 0 0 0; padding: 2.5rem 1.125rem 0.875rem;
    background: linear-gradient(180deg, transparent, rgba(35, 10, 13, .88));
    color: #fff; font-size: 0.8438rem; font-weight: 500;
}
.galeria-grid figure:first-child figcaption { font-family: var(--serif); font-size: 1.125rem; }

/* ---------- Pagos e inscripciones ---------- */
.payment-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(17.5rem, 1fr); gap: 2rem; align-items: start; }

.payment-table-wrapper {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 1.5rem 3.125rem -1.875rem rgba(74, 14, 19, .35);
}
.payment-table-header, .payment-row { display: grid; grid-template-columns: 8.125rem 1fr 9.375rem; gap: 1rem; align-items: center; padding: 0 1.625rem; }
.payment-table-header {
    padding-block: 1rem; background: var(--burgundy); color: var(--gold-soft);
    font-size: 0.8438rem; font-weight: 600;
}
.payment-table-header > div { display: flex; align-items: center; gap: 0.5rem; }
.payment-table-header .col-price, .payment-row .col-price { justify-content: flex-end; text-align: right; }
.payment-row { padding-block: 1.125rem; border-bottom: 1px solid var(--line); transition: background .25s; }
.payment-row:last-child { border-bottom: 0; }
.payment-row:hover { background: rgba(214, 173, 85, .12); }
.code-badge {
    display: inline-block; padding: 0.25rem 0.625rem; border-radius: 0.25rem;
    background: rgba(139, 30, 36, .08); color: var(--wine);
    font-size: 0.7812rem; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums;
}
.payment-row .col-concept { font-size: 0.9375rem; font-weight: 500; }
.payment-row .col-price { display: flex; align-items: center; gap: 0.625rem; }
.payment-row .col-price strong { font-family: var(--serif); font-size: 1.3125rem; color: var(--wine); font-variant-numeric: tabular-nums; }
.payment-row .arrow-right { color: var(--gold); font-size: 1.375rem; line-height: 1; transition: transform .3s var(--ease); }
.payment-row:hover .arrow-right { transform: translateX(0.3125rem); }

.payment-aside { display: grid; gap: 1.25rem; }
.bank-logos-box {
    display: flex; align-items: center; justify-content: center; gap: 1.375rem;
    padding: 1.25rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.bank-logo-img { height: 2.875rem; width: auto; object-fit: contain; }
.logo-divider { width: 1px; height: 2.375rem; background: var(--line); }
.payment-illustration img { width: 100%; max-width: 17.5rem; margin-inline: auto; }

.schedule-box {
    display: flex; align-items: center; gap: 1rem; padding: 1.125rem 1.25rem;
    border-left: 3px solid var(--gold); border-radius: var(--radius);
    background: var(--white); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.schedule-icon { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: rgba(139, 30, 36, .08); color: var(--wine); }
.schedule-text { display: flex; flex-direction: column; font-size: 0.875rem; line-height: 1.45; }
.schedule-text strong { font-weight: 700; color: var(--burgundy); }
.schedule-text span { color: var(--muted); }

.payment-features { display: grid; gap: 1rem; padding: 0.25rem 0.25rem 0; }
.feature-item { display: flex; gap: 0.875rem; align-items: flex-start; }
.feature-icon { display: grid; place-items: center; flex: none; width: 2.375rem; height: 2.375rem; border-radius: 50%; background: rgba(214, 173, 85, .2); color: var(--wine); }
.feature-icon .icon { width: 1.1875rem; height: 1.1875rem; }
.feature-text h4 { font-size: 0.9062rem; font-weight: 700; color: var(--burgundy); line-height: 1.35; }
.feature-text p { font-size: 0.8438rem; color: var(--muted); line-height: 1.5; }

/* ---------- Envío de ponencias (3 pasos reales) ---------- */
.ponencias-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: paso; }
.ponencia-card {
    position: relative; display: flex; flex-direction: column; align-items: flex-start;
    padding: 2.125rem 1.875rem 1.875rem;
    background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.ponencia-card:hover { transform: translateY(-0.25rem); box-shadow: 0 1.5rem 2.75rem -1.5rem rgba(74, 14, 19, .4); }
.ponencia-card::before {
    counter-increment: paso; content: counter(paso);
    position: absolute; top: 1.125rem; right: 1.5rem;
    font-family: var(--serif); font-size: 3.375rem; font-weight: 700; line-height: 1;
    color: rgba(139, 30, 36, .09);
}
.ponencia-icon-box {
    display: grid; place-items: center; width: 3.25rem; height: 3.25rem; margin-bottom: 1.375rem;
    border-radius: 50%; background: var(--wine); color: var(--gold-soft);
}
.ponencia-icon-box .icon { width: 1.5rem; height: 1.5rem; }
.ponencia-icon-box--gold { background: var(--gold); color: var(--night); }
.ponencia-card h3 { font-family: var(--serif); font-size: 1.375rem; color: var(--burgundy); margin-bottom: 0.625rem; }
.ponencia-card p { color: var(--muted); font-size: 0.9375rem; margin-bottom: 1.625rem; }
.ponencia-card .btn-text-ponencia,
.ponencia-card .btn-solid-ponencia { margin-top: auto; }
.btn-text-ponencia {
    font-size: 0.875rem; font-weight: 700; color: var(--wine);
    padding-bottom: 3px; border-bottom: 2px solid var(--gold);
    transition: color .25s, border-color .25s;
}
.btn-text-ponencia:hover { color: var(--burgundy); border-color: var(--wine); }
.ponencia-card--featured { background: linear-gradient(160deg, var(--burgundy), var(--night)); border-color: var(--burgundy); border-top-color: var(--gold); }
.ponencia-card--featured h3 { color: #fff; }
.ponencia-card--featured p { color: rgba(255, 255, 255, .72); }
.ponencia-card--featured::before { color: rgba(255, 255, 255, .08); }

/* ---------- Banner de convocatoria ---------- */
.banner-convocatoria {
    position: relative; padding: clamp(4rem, 8vw, 6.25rem) 0; text-align: center; color: #fff;
    background:
        radial-gradient(37.5rem 18.75rem at 50% 0%, rgba(214, 173, 85, .18), transparent 70%),
        linear-gradient(180deg, var(--night), #170608);
}
.banner-convocatoria .container { max-width: 50rem; }
.banner-chip {
    display: inline-block; padding: 0.4375rem 1.25rem; margin-bottom: 1.5rem; border-radius: 62.4375rem;
    border: 1px solid rgba(214, 173, 85, .4); background: rgba(214, 173, 85, .12);
    color: var(--gold); font-size: 0.8125rem; font-weight: 600;
}
.banner-convocatoria h2 { font-family: var(--serif); font-size: clamp(2.125rem, 5vw, 3.5rem); line-height: 1.1; margin-bottom: 0.875rem; }
.banner-convocatoria h2 + p { color: rgba(255, 255, 255, .78); font-size: 1.125rem; margin-bottom: 2.125rem; }
.banner-convocatoria .btn-gold-solid { padding: 1.0625rem 2.25rem; font-size: 0.9375rem; margin-bottom: 2rem; }
.banner-note { max-width: 42.5rem; margin: 0 auto; font-size: 0.8125rem; line-height: 1.7; color: rgba(255, 255, 255, .5); }

/* ---------- Ubicación ---------- */
.location-wrapper { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--white); box-shadow: 0 1.875rem 3.75rem -2.25rem rgba(74, 14, 19, .4); }
.location-card {
    display: flex; flex-direction: column; justify-content: space-between; gap: 1.75rem;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    color: #fff; background: linear-gradient(165deg, var(--wine), var(--burgundy));
}
.location-icon-box { display: grid; place-items: center; width: 3.375rem; height: 3.375rem; margin-bottom: 1.375rem; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--gold-soft); }
.location-icon-box .icon { width: 1.625rem; height: 1.625rem; }
.location-card h3 { font-family: var(--serif); font-size: 1.625rem; line-height: 1.2; margin-bottom: 0.75rem; }
.location-card p { color: rgba(255, 255, 255, .8); font-size: 0.9375rem; }
.location-card .btn-primary { background: var(--gold); color: var(--night); align-self: flex-start; }
.location-card .btn-primary:hover { background: var(--gold-soft); }
.location-map-container { position: relative; min-height: 23.75rem; }
.location-map-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-external-link {
    position: absolute; top: 0.875rem; right: 0.875rem; z-index: 2; padding: 0.5rem 1rem; border-radius: 62.4375rem;
    background: var(--white); color: var(--wine); font-size: 0.8125rem; font-weight: 700;
    box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, .2); transition: background .25s, color .25s;
}
.map-external-link:hover { background: var(--wine); color: #fff; }

/* ---------- Contacto ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2.25rem, 6vw, 5.5rem); align-items: start; }
.contact-layout .section-heading { margin-bottom: 1.75rem; }
.contact-org { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.contact-org .contact-icon { width: 3.375rem; height: 3.375rem; }
.contact-org h4 { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.3; }
.contact-org p { font-size: 0.875rem; color: rgba(255, 255, 255, .65); }

.contact-list { border-top: 1px solid rgba(255, 255, 255, .16); }
.contact-box { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem 0.25rem; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.contact-icon { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: rgba(214, 173, 85, .14); color: var(--gold); }
.contact-icon .icon { width: 1.375rem; height: 1.375rem; }
.contact-subtitle { display: block; font-size: 0.8125rem; font-weight: 500; color: rgba(255, 255, 255, .6); }
.contact-link, .contact-text { font-family: var(--serif); font-size: clamp(1.125rem, 2.2vw, 1.5rem); color: #fff; word-break: break-word; }
.contact-link { border-bottom: 1px solid rgba(214, 173, 85, .5); transition: color .25s, border-color .25s; }
.contact-link:hover { color: var(--gold-soft); border-color: var(--gold); }

/* ---------- Pie de página ---------- */
.footer { color: rgba(255, 255, 255, .72); background: #170608; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 1.25rem 0; text-align: center; font-size: 0.8125rem; color: rgba(255, 255, 255, .5); }

/* ---------- Aviso flotante y volver arriba ---------- */
.floating-notice {
    position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 1200;
    display: flex; align-items: flex-start; gap: 0.875rem;
    width: min(22.5rem, calc(100vw - 3rem)); padding: 1.25rem 1.375rem;
    background: var(--white); border-radius: var(--radius); border-left: 0.25rem solid var(--gold);
    box-shadow: 0 1.5rem 3.75rem rgba(35, 10, 13, .35);
    opacity: 0; visibility: hidden; transform: translateY(1.5rem);
    transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s;
}
.floating-notice.show { opacity: 1; visibility: visible; transform: none; }
.close-notice { position: absolute; top: 0.125rem; right: 0.125rem; width: 2.75rem; height: 2.75rem; font-size: 1.375rem; line-height: 1; color: var(--muted); border-radius: 50%; transition: background .2s, color .2s; }
.close-notice:hover { background: var(--paper); color: var(--wine); }
.notice-icon { display: grid; place-items: center; flex: none; width: 2.625rem; height: 2.625rem; border-radius: 50%; background: rgba(139, 30, 36, .09); color: var(--wine); }
.notice-content h4 { font-family: var(--serif); font-size: 1.125rem; color: var(--burgundy); line-height: 1.25; margin-bottom: 0.25rem; }
.notice-content p { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.875rem; line-height: 1.5; }
.notice-content p strong { color: var(--wine); }
.btn-notice { padding: 0.625rem 1.25rem; font-size: 0.8125rem; }

#back-to-top {
    position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 1150;
    display: grid; place-items: center; width: 2.875rem; height: 2.875rem; border-radius: 50%;
    background: var(--wine); color: #fff; font-size: 1.25rem;
    box-shadow: 0 0.625rem 1.5rem rgba(139, 30, 36, .4);
    opacity: 0; visibility: hidden; transform: translateY(0.75rem);
    transition: opacity .3s, transform .3s var(--ease), visibility .3s, background .3s;
}
#back-to-top.show { opacity: 1; visibility: visible; transform: none; }
#back-to-top:hover { background: var(--burgundy); transform: translateY(-3px); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1280px) {
    .brand-subtitle { display: none; }
}

@media (max-width: 1180px) {
    .menu-toggle { display: block; }
    .nav-links {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 0.375rem 5% 1.25rem; color: var(--burgundy);
        background: rgba(255, 255, 255, .98); box-shadow: 0 1.25rem 1.875rem rgba(35, 10, 13, .12);
        opacity: 0; visibility: hidden; transform: translateY(-0.5rem);
        transition: opacity .3s, transform .3s var(--ease), visibility .3s;
    }
    .nav-links.active { opacity: 1; visibility: visible; transform: none; }
    .nav-links a { padding: 0.9375rem 0; font-size: 0.9375rem; border-bottom: 1px solid var(--line); }
    .nav-links a::after { display: none; }
    .nav-links a.active { color: var(--wine); font-weight: 700; }
}

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .payment-layout { grid-template-columns: 1fr; }
    .payment-aside { grid-template-columns: 1fr 1fr; }
    .payment-aside .payment-features, .payment-aside .btn-register-payment { grid-column: 1 / -1; }
    .location-wrapper { grid-template-columns: 1fr; }
    .location-map-container { min-height: 21.25rem; }
    .contact-layout { grid-template-columns: 1fr; }
    .program-layout { grid-template-columns: 1fr; }
    .galeria-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 11rem; }
    .program-layout { gap: 0; }
    .program-side { display: contents; }
    .program-tabs { flex-direction: row; flex-wrap: wrap; margin-bottom: 2rem; }
    .program-tabs .tab-btn { width: auto; flex: 1 1 0; }
    .program-main { order: 1; }
    .program-download { order: 2; }
}

@media (max-width: 900px) {
    .speaker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ponencias-grid { grid-template-columns: repeat(2, 1fr); }
    .ponencias-grid .ponencia-card--featured { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .eyebrow {
    display: inline-flex; align-items: center; gap: 0.75rem; margin-bottom: 0.875rem;
    font-size: 0.75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: var(--wine);
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: var(--gold); }
.section-dark .eyebrow { color: var(--gold); }
.section-heading.is-center { margin-inline: auto; text-align: center; }
.section-heading.is-center h2::after { margin-inline: auto; }
.section-heading.is-center p { margin-inline: auto; }
.section-heading.is-center .eyebrow::after { content: ""; width: 2rem; height: 1px; background: var(--gold); }

.section-heading.is-split { flex-direction: column; align-items: flex-start; }
    .program-item { grid-template-columns: 1fr; gap: 0.375rem; padding: 1.125rem 1.25rem; }
    .program-item:hover { transform: none; }
    .payment-table-header { display: none; }
    .payment-row { grid-template-columns: 1fr auto; row-gap: 0.5rem; padding: 1.125rem 1.25rem; }
    .payment-row .col-code { grid-column: 1 / -1; }
    .payment-aside { grid-template-columns: 1fr; }
    .hero-actions-full .btn { width: 100%; }
}

@media (max-width: 640px) {
    .speaker-grid { grid-template-columns: 1fr; }
    .speaker-card { height: 27rem; }
    :root { --nav-h: 4.25rem; }
    .unah-logo { width: 2.5rem; height: 2.5rem; }
    .brand-title { font-size: 1.125rem; }
    .hero { padding-top: calc(var(--nav-h) + 1.75rem); align-items: flex-start; }
    .hero-action-buttons .btn-gold-solid, .hero-action-buttons .btn-outline-glass { flex: 1 1 100%; }
    .ponencias-grid { grid-template-columns: 1fr; }
    .galeria-grid { grid-auto-rows: 8.5rem; gap: 0.625rem; }
    .galeria-grid figure:not(:first-child) figcaption { display: none; }
    .tab-btn { flex: 1 1 100%; border-radius: 0.875rem; }
    .floating-notice { left: 4.875rem; right: 0.875rem; bottom: 0.875rem; width: auto; padding: 1rem; }
    #back-to-top { left: 0.875rem; bottom: 0.875rem; }
    .contact-box { gap: 0.875rem; }
}

@media (max-width: 400px) {
    .brand-title { font-size: 1rem; }
    .cd-unit span { font-size: 0.6875rem; }
}

/* ---------- Accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* Banderas de los ponentes: dentro del círculo y en la esquina de la foto */
.speaker-avatar.has-flag { overflow: hidden; padding: 0; background: #fff; border: 2px solid var(--gold); }
.speaker-avatar.has-flag img { width: 100%; height: 100%; object-fit: cover; }
.speaker-card .speaker-photo > img.speaker-photo-flag,
.speaker-card.is-pending .speaker-photo > img.speaker-photo-flag {
    position: absolute; top: 1.5rem; left: 1.5rem; z-index: 1; width: 2.25rem; height: 1.5rem; padding: 0;
    object-fit: cover; object-position: center; border-radius: 3px; filter: none; opacity: 1; transform: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 .375rem 1rem rgba(0, 0, 0, .35);
}
