:root {
    --blue: #1f5aa6;
    --blue-deep: #173f7b;
    --blue-night: #0d2c5c;
    --yellow: #f9b522;
    --red: #ed1739;
    --white: #ffffff;
    --ink: #16233b;
    --muted: #6b7688;
    --surface: #f4f7fb;
    --line: #dfe6f0;
    --shadow: 0 22px 60px rgba(15, 44, 90, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--white);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body.reader-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.container { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.section { padding: 90px 0; }

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    background: rgba(255,255,255,.96);
    border-top: 5px solid var(--red);
    border-bottom: 1px solid rgba(18,55,105,.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 7px 22px rgba(12,44,92,.05);
}
.nav-wrap { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { width: 58px; height: 58px; object-fit: cover; border-radius: 5px; box-shadow: 0 4px 10px rgba(17,53,104,.12); }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { color: var(--blue-deep); font-size: 1.18rem; font-weight: 900; }
.brand-copy strong em { color: var(--yellow); font-style: normal; }
.brand-copy small { margin-top: 5px; color: var(--red); font-weight: 850; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.main-nav { display: flex; align-items: center; gap: 26px; font-weight: 780; color: var(--blue-deep); }
.main-nav a { position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 3px; border-radius: 4px; background: var(--yellow); transition: .2s ease; }
.main-nav a:hover::after { right: 0; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 25px; height: 2px; margin: 5px 0; background: var(--blue); }

.hero {
    position: relative;
    overflow: hidden;
    min-height: 735px;
    padding: 150px 0 70px;
    background:
        radial-gradient(circle at 82% 18%, rgba(249,181,34,.27), transparent 27%),
        radial-gradient(circle at 72% 80%, rgba(255,255,255,.07), transparent 25%),
        linear-gradient(120deg, #0e2e62 0%, #1d5198 58%, #2867ae 100%);
    color: var(--white);
}
.hero::before { content: ""; position: absolute; width: 560px; height: 26px; left: -130px; top: 130px; background: var(--red); transform: rotate(-7deg); opacity: .88; }
.hero::after { content: ""; position: absolute; width: 620px; height: 24px; right: -120px; bottom: 48px; background: var(--yellow); transform: rotate(-7deg); opacity: .97; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: 62px; }
.hero-copy { position: relative; z-index: 4; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-weight: 900; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { color: #ffd058; }
.hero h1 { margin: 14px 0 0; font-size: clamp(3.6rem, 7vw, 6.6rem); line-height: .86; letter-spacing: -.06em; }
.hero h1 span { color: var(--yellow); }
.hero-role { margin: 18px 0 0; font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 850; }
.hero-role strong { color: #ff5361; }
.hero-line { max-width: 600px; margin: 24px 0 0; font-size: 1.08rem; color: rgba(255,255,255,.87); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 22px; border-radius: 12px; border: 0; font-weight: 850; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #17335e; background: var(--yellow); box-shadow: 0 10px 25px rgba(247,185,40,.23); }
.btn-ghost { color: white; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.28); }
.hero-socials { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 26px; }
.hero-socials a { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.78); font-size: .78rem; font-weight: 750; }
.hero-socials a:hover { color: white; }
.hero-socials span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: var(--yellow); font-weight: 950; }

.candidate-visual { position: relative; min-height: 530px; display: flex; align-items: flex-end; justify-content: center; }
.candidate-shape { position: absolute; width: 430px; height: 430px; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 30px 90px rgba(0,0,0,.22); border: 12px solid rgba(249,181,34,.88); top: 20px; right: 42px; }
.candidate-shape::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; border: 7px solid rgba(237,23,57,.78); }
.candidate-photo { position: relative; z-index: 2; width: min(78%, 480px); max-height: 560px; object-fit: contain; object-position: center bottom; border-radius: 24px 24px 12px 12px; filter: drop-shadow(0 28px 35px rgba(0,0,0,.26)); }
.mini-magazine-card { position: absolute; z-index: 4; left: 4px; bottom: 18px; display: flex; align-items: center; gap: 12px; width: 235px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,.96); color: var(--blue-deep); box-shadow: 0 18px 45px rgba(0,0,0,.25); transform: rotate(-2deg); }
.mini-magazine-card img { width: 88px; height: 62px; object-fit: cover; border-radius: 9px; }
.mini-magazine-card div { display: grid; }
.mini-magazine-card small { color: var(--red); font-size: .58rem; font-weight: 900; letter-spacing: .07em; }
.mini-magazine-card strong { font-size: 1.25rem; line-height: 1.05; }
.mini-magazine-card span { color: var(--muted); font-size: .7rem; }

.section-heading { max-width: 720px; margin-bottom: 36px; }
.section-heading h2, .info-band h2, .contact h2 { margin: 8px 0 10px; font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -.04em; color: var(--blue-deep); }
.section-heading p { color: var(--muted); margin: 0; }
.magazines { background: var(--surface); }
.magazine-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.mag-card { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 10px 35px rgba(25,55,100,.06); }
.mag-cover-wrap { position: relative; aspect-ratio: 1.414 / 1; overflow: hidden; background: #dce7f6; }
.mag-cover-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.mag-card:hover .mag-cover-wrap img { transform: scale(1.025); }
.mag-pages { position: absolute; right: 12px; bottom: 12px; padding: 7px 10px; border-radius: 999px; background: rgba(12,37,79,.88); color: white; font-size: .75rem; font-weight: 800; }
.mag-body { padding: 24px; }
.mag-kicker { display: block; color: var(--red); font-size: .72rem; letter-spacing: .08em; font-weight: 900; }
.mag-body h3 { margin: 5px 0 8px; color: var(--blue-deep); font-size: 1.8rem; }
.mag-body p { margin: 0; color: var(--muted); min-height: 54px; }
.mag-actions { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.text-link { color: var(--blue); font-weight: 850; text-decoration: underline; text-underline-offset: 4px; }
.mag-card-placeholder { display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(145deg,#fff,#f7f9fc); }
.placeholder-mark { min-height: 250px; display: grid; place-items: center; color: rgba(36,75,143,.12); font-size: 8rem; font-weight: 950; letter-spacing: -.08em; background: radial-gradient(circle at center, rgba(247,185,40,.12), transparent 42%); }
.status-pill { display: inline-flex; margin-top: 18px; padding: 7px 10px; border-radius: 999px; background: #edf2f8; color: #64718a; font-size: .75rem; font-weight: 800; }

.info-band { padding: 78px 0; color: white; background: linear-gradient(110deg,var(--blue-night),var(--blue)); }
.info-band h2 { color: white; }
.eyebrow-light { color: #ffd158; }
.info-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.info-grid p { max-width: 560px; color: rgba(255,255,255,.76); }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.stats div { min-height: 145px; padding: 22px; border: 1px solid rgba(255,255,255,.15); border-radius: 18px; background: rgba(255,255,255,.07); }
.stats strong { display: block; color: var(--yellow); font-size: 2.8rem; line-height: 1; }
.stats span { display: block; margin-top: 11px; color: rgba(255,255,255,.8); font-size: .86rem; }

.contact { background: white; }
.contact-box { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 34px; padding: 42px; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.contact-copy p { color: var(--muted); max-width: 560px; }
.social-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.social-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); transition: transform .18s ease, box-shadow .18s ease; }
.social-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20,55,105,.10); }
.social-mark { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: white; font-size: 1.2rem; font-weight: 950; }
.social-card div { min-width: 0; display: grid; }
.social-card strong { color: var(--blue-deep); }
.social-card small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

.site-footer { padding: 30px 0; background: #0d2853; color: white; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand img { width: 48px; height: 48px; object-fit: cover; border-radius: 5px; }
.footer-brand div { display: grid; }
.footer-brand span { color: rgba(255,255,255,.6); font-size: .78rem; }
.footer-links { display: flex; gap: 15px; color: rgba(255,255,255,.72); font-size: .8rem; font-weight: 750; }
.footer-links a:hover { color: var(--yellow); }
.site-footer p { color: rgba(255,255,255,.68); }

/* =========================
   VISOR DE REVISTA
   ========================= */
.reader-modal { position: fixed; inset: 0; z-index: 200; display: none; background: rgba(4,13,30,.97); color: white; }
.reader-modal.is-open { display: block; }
.reader-shell { height: 100%; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto auto; }
.reader-topbar { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 10px 20px; background: #0d2853; border-bottom: 1px solid rgba(255,255,255,.12); }
.reader-topbar > div:first-child { display: grid; }
.reader-topbar small { color: #ffd158; font-weight: 900; letter-spacing: .1em; font-size: .67rem; }
.reader-topbar strong { font-size: 1.05rem; }
.reader-top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn, .close-reader, .reader-nav, .reader-tool { border: 1px solid rgba(255,255,255,.16); color: white; background: rgba(255,255,255,.07); border-radius: 10px; cursor: pointer; }
.icon-btn { padding: 8px 11px; font-size: .82rem; }
.close-reader { width: 40px; height: 40px; font-size: 1.8rem; line-height: 1; }
.reader-stage { position: relative; min-height: 0; overflow: hidden; display: grid; place-items: center; padding: 18px; background: radial-gradient(circle at center, #163d72 0, #071b39 62%); }
.flip-book { max-width: 100%; max-height: 100%; }

.reader-page { position: relative; overflow: hidden; background: white; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.reader-page-inner { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; background: #f7f8fa; }
.reader-page-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .16s ease; user-select: none; pointer-events: none; }
.reader-page.is-loaded .reader-page-image { opacity: 1; }
.page-skeleton { position: absolute; inset: 0; display: grid; place-content: center; place-items: center; gap: 9px; background: linear-gradient(110deg,#f4f6f9 18%,#fff 40%,#f4f6f9 62%); background-size: 200% 100%; animation: shimmer 1.25s linear infinite; color: #8793a5; }
.reader-page.is-loaded .page-skeleton { display: none; }
.page-skeleton span, .reader-loading span, .zoom-loading span, .page-load-indicator span { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(31,90,166,.16); border-top-color: var(--blue); animation: spin .8s linear infinite; }
.page-skeleton small { font-size: .72rem; font-weight: 750; }
.reader-page.has-error .page-skeleton::after { content: "No se pudo cargar esta página"; color: var(--red); font-size: .76rem; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.reader-loading { position: absolute; inset: 0; z-index: 12; display: grid; place-content: center; place-items: center; gap: 10px; background: #071b39; }
.reader-loading.is-hidden { display: none; }
.reader-loading span { border-color: rgba(255,255,255,.18); border-top-color: var(--yellow); }
.reader-loading p { margin: 0; color: rgba(255,255,255,.7); font-size: .85rem; }
.page-load-indicator { position: absolute; z-index: 15; left: 50%; bottom: 14px; display: none; align-items: center; gap: 8px; transform: translateX(-50%); padding: 8px 12px; border-radius: 999px; background: rgba(7,27,57,.88); color: white; font-size: .72rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.page-load-indicator.is-visible { display: flex; }
.page-load-indicator span { width: 18px; height: 18px; border-width: 2px; border-color: rgba(255,255,255,.22); border-top-color: var(--yellow); }

.reader-controls { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; background: #0d2853; border-top: 1px solid rgba(255,255,255,.08); }
.reader-nav { width: 46px; height: 42px; font-size: 1.7rem; }
.page-counter { min-width: 82px; text-align: center; font-weight: 850; }
.reader-tool { min-height: 40px; padding: 8px 13px; font-size: .78rem; font-weight: 760; }
.reader-tool-highlight { background: var(--yellow); border-color: var(--yellow); color: #17335e; font-weight: 900; }
.reader-tool-highlight:hover { background: #ffc43f; }
.reader-help { margin: 0; padding: 0 16px 10px; text-align: center; background: #0d2853; color: rgba(255,255,255,.55); font-size: .72rem; }
.reader-help strong { color: var(--yellow); }

/* =========================
   ZOOM / LUPA
   ========================= */
.zoom-overlay { position: fixed; inset: 0; z-index: 280; display: none; grid-template-rows: auto 1fr auto; background: #071426; color: white; }
.zoom-overlay.is-open { display: grid; }
.zoom-toolbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 16px; background: #0d2853; border-bottom: 1px solid rgba(255,255,255,.12); }
.zoom-toolbar > div:first-child { display: grid; }
.zoom-toolbar small { color: var(--yellow); font-size: .62rem; font-weight: 900; letter-spacing: .1em; }
.zoom-toolbar strong { font-size: .95rem; }
.zoom-actions { display: flex; align-items: center; gap: 7px; }
.zoom-actions button { min-width: 39px; height: 39px; padding: 0 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; background: rgba(255,255,255,.08); color: white; cursor: pointer; font-weight: 850; }
.zoom-actions #zoomIn, .zoom-actions #zoomOut { font-size: 1.35rem; }
.zoom-actions #zoomReset { min-width: auto; font-size: .72rem; }
.zoom-actions .zoom-close { background: var(--red); border-color: var(--red); font-size: 1.6rem; line-height: 1; }
#zoomPercent { min-width: 54px; text-align: center; color: #dfe8f6; font-size: .75rem; font-weight: 800; }
.zoom-stage { position: relative; min-height: 0; overflow: hidden; display: grid; place-items: center; padding: 18px; touch-action: none; cursor: grab; user-select: none; background: radial-gradient(circle at center,#173e70,#050d1b 70%); }
.zoom-stage:active { cursor: grabbing; }
.zoom-image-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transform-origin: center center; will-change: transform; }
#zoomImage { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; opacity: 0; transition: opacity .15s ease; box-shadow: 0 20px 60px rgba(0,0,0,.38); pointer-events: none; }
#zoomImage.is-loaded { opacity: 1; }
.zoom-loading { position: absolute; left: 50%; top: 50%; display: none; align-items: center; gap: 9px; transform: translate(-50%,-50%); padding: 10px 14px; border-radius: 999px; background: rgba(7,27,57,.9); color: white; font-size: .75rem; }
.zoom-loading.is-visible { display: flex; }
.zoom-loading span { width: 20px; height: 20px; border-width: 2px; border-color: rgba(255,255,255,.22); border-top-color: var(--yellow); }
.zoom-help { margin: 0; padding: 9px 15px 12px; text-align: center; background: #0d2853; color: rgba(255,255,255,.58); font-size: .7rem; }

@media (max-width: 900px) {
    .main-nav { display: none; position: absolute; top: 80px; left: 18px; right: 18px; padding: 15px; flex-direction: column; align-items: stretch; gap: 0; background: white; border-radius: 15px; box-shadow: var(--shadow); }
    .main-nav.is-open { display: flex; }
    .main-nav a { padding: 12px 10px; }
    .main-nav a::after { display: none; }
    .menu-toggle { display: block; }
    .hero { min-height: auto; padding-top: 130px; }
    .hero-grid { grid-template-columns: 1fr; gap: 38px; }
    .hero-copy { text-align: center; }
    .hero-line { margin-inline: auto; }
    .hero-actions, .hero-socials { justify-content: center; }
    .candidate-visual { max-width: 650px; width: 100%; margin-inline: auto; }
    .candidate-shape { right: 50%; transform: translateX(50%); }
    .mini-magazine-card { left: 7%; }
    .magazine-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .info-grid { grid-template-columns: 1fr; }
    .contact-box { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .reader-stage { padding: 6px; }
    .reader-controls { flex-wrap: wrap; gap: 7px; padding: 8px 8px; }
    .reader-nav { width: 42px; height: 39px; }
    .reader-tool { min-height: 38px; padding-inline: 10px; }
    .page-counter { min-width: 68px; }
    .reader-help { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
    .zoom-stage { padding: 6px; }
}

@media (max-width: 620px) {
    .container { width: min(100% - 26px, 1180px); }
    .section { padding: 65px 0; }
    .nav-wrap { min-height: 70px; }
    .main-nav { top: 70px; }
    .brand img { width: 44px; height: 44px; }
    .brand-copy strong { font-size: 1rem; }
    .hero { padding: 112px 0 48px; }
    .hero h1 { font-size: clamp(3rem, 18vw, 4.6rem); }
    .hero-role { font-size: 1.42rem; }
    .hero-line { font-size: .96rem; }
    .hero-actions .btn { flex: 1 1 145px; }
    .hero-socials { gap: 8px 11px; }
    .hero-socials a { font-size: .7rem; }
    .candidate-visual { min-height: 430px; }
    .candidate-shape { width: 330px; height: 330px; top: 24px; }
    .candidate-photo { width: min(84%, 390px); max-height: 455px; }
    .mini-magazine-card { left: 0; bottom: 2px; width: 205px; }
    .mini-magazine-card img { width: 74px; height: 54px; }
    .magazine-grid { grid-template-columns: 1fr; }
    .mag-body p { min-height: 0; }
    .placeholder-mark { min-height: 180px; font-size: 6rem; }
    .stats { grid-template-columns: 1fr; }
    .stats div { min-height: 110px; }
    .contact-box { padding: 28px 22px; }
    .social-grid { grid-template-columns: 1fr; }
    .footer-grid { flex-direction: column; align-items: flex-start; }
    .footer-links { flex-wrap: wrap; }
    .reader-topbar { padding: 8px 9px; min-height: 60px; }
    .reader-top-actions { gap: 4px; }
    .icon-btn { padding: 7px 7px; font-size: .68rem; }
    .close-reader { width: 36px; height: 36px; }
    .reader-tool span { display: inline; }
    .reader-help { font-size: .66rem; }
    .zoom-toolbar { padding: 8px; gap: 8px; }
    .zoom-toolbar > div:first-child { display: none; }
    .zoom-actions { width: 100%; justify-content: center; gap: 5px; }
    .zoom-actions button { min-width: 38px; height: 38px; padding-inline: 8px; }
    .zoom-actions #zoomReset { font-size: .68rem; }
    .zoom-help { font-size: .64rem; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
