/* ==========================================================================
   Diario - estilo de portada informativa (blanco, titulares fuertes, acento naranja)
   ========================================================================== */

@font-face {
    font-family: 'Anton';
    src: url('../../font/Anton-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Hero';
    src: url('../../font/Hero-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --accent: #f68e1e;
    --accent-dark: #c96a05;
    --ink: #121212;
    --ink-2: #3a3a3a;
    --muted: #6f6f6f;
    --line: #e3e3e3;
    --bg: #ffffff;
    --bg-soft: #f4f4f4;
    --font: 'Hero', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
    --max: 1260px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 200; }
.skip-link:focus { left: 8px; }

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

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    height: 76px;
    transition: height .2s ease;
}
.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar-right { display: flex; justify-content: flex-end; }
.topbar-date { font-size: 13px; color: var(--muted); white-space: nowrap; }

.menu-btn {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 38px; height: 38px; padding: 0 9px;
    background: none; border: 0; border-radius: 50%;
}
.menu-btn:hover { background: var(--bg-soft); }
.menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

.logo {
    font-family: var(--display);
    font-size: 42px;
    font-weight: 400;
    letter-spacing: .5px;
    line-height: 1;
    color: var(--ink);
    white-space: nowrap;
    transition: font-size .2s ease;
}
.logo span { color: var(--accent); margin-left: 5px; }
.logo--sm { font-size: 28px; }
.logo--light { color: #fff; }

.search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}
.search-form input {
    border: 0; outline: 0; background: transparent;
    font: inherit; font-size: 14px;
    padding: 8px 4px 8px 14px; width: 170px; color: var(--ink);
}
.search-form button {
    border: 0; background: transparent; color: var(--ink);
    width: 38px; height: 36px; display: grid; place-items: center;
}
.search-form:focus-within { border-color: var(--ink); }
.search-form--block { width: 100%; }
.search-form--block input { flex: 1; width: auto; }
.search-form--lg { max-width: 640px; margin-top: 14px; }
.search-form--lg input { font-size: 18px; padding: 12px 6px 12px 20px; }
.search-form--lg button { width: 52px; height: 50px; }

.main-nav { border-top: 1px solid var(--line); }
.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav a {
    display: block;
    padding: 12px 12px 11px;
    font-size: 15px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}
.main-nav a:hover { color: var(--accent); }
.main-nav a.is-active { border-bottom-color: var(--accent); }

.site-header.is-compact .topbar { height: 56px; }
.site-header.is-compact .logo { font-size: 30px; }
.site-header.is-compact .main-nav { display: none; }

/* ---------- Ticker ---------- */

.ticker { border-bottom: 1px solid var(--line); background: #fff; }
.ticker-inner { display: flex; align-items: center; height: 40px; gap: 14px; }
.ticker-label {
    flex-shrink: 0;
    background: var(--accent);
    color: #fff;
    font-family: var(--display);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 3px;
}
.ticker-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent);
}
.ticker-track {
    display: flex;
    gap: 36px;
    width: max-content;
    animation: ticker 70s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track a { font-size: 14px; white-space: nowrap; }
.ticker-track a:hover { color: var(--accent-dark); }
.ticker-track time { font-family: var(--display); letter-spacing: .5px; color: var(--accent); margin-right: 8px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Drawer (menú lateral) ---------- */

.drawer {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: 320px; max-width: 86vw;
    background: #fff;
    z-index: 101;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
    padding: 18px 20px 30px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, .12);
    visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer-close { border: 0; background: none; font-size: 32px; line-height: 1; padding: 0 4px; color: var(--ink); }
.drawer-nav { list-style: none; padding: 0; margin: 18px 0 0; }
.drawer-nav a {
    display: block;
    padding: 13px 0 13px 12px;
    border-bottom: 1px solid var(--line);
    border-left: 4px solid var(--c, var(--ink));
    font-family: var(--display);
    font-size: 20px;
    letter-spacing: .4px;
}
.drawer-nav a:hover { background: var(--bg-soft); }

/* ---------- Tarjetas de notas ---------- */

.card { min-width: 0; }
.card-media {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--bg-soft);
    margin-bottom: 10px;
}
.card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.card:hover .card-media img { transform: scale(1.035); }
.kicker {
    display: block;
    font-family: var(--display);
    font-size: 13px;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 5px;
}
.card-title {
    margin: 0;
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: .2px;
    font-size: 21px;
}
.card-title a:hover { color: #555; }
.card-summary { margin: 8px 0 0; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.card-meta { display: block; margin-top: 7px; font-size: 12px; color: var(--muted); }

.card--xl .card-media { aspect-ratio: 16 / 9; margin-bottom: 14px; }
.card--xl .card-title { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.06; letter-spacing: .2px; }
.card--xl .card-summary { font-size: 19px; margin-top: 12px; }
.card--lg .card-title { font-size: 30px; line-height: 1.1; }
.card--lg .card-summary { font-size: 16px; }
.card--sm .card-title { font-size: 18px; }
.card--sm .card-media { aspect-ratio: 16 / 10; margin-bottom: 8px; }
.card--text .card-title { font-size: 19px; }

.card--row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.card--row .card-media { margin: 0; }
.card--row .card-title { font-size: 34px; line-height: 1.08; }
.card--row .card-summary { font-size: 17px; }

.img-ph {
    display: grid;
    place-items: center;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000));
}
.img-ph span { color: rgba(255, 255, 255, .55); font-family: var(--display); font-size: 38px; letter-spacing: 1px; }

/* ---------- Portada ---------- */

.home-top {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, .9fr);
    padding: 24px 0 28px;
    border-bottom: 1px solid var(--line);
}
.home-top > .col { padding: 0 20px; border-left: 1px solid var(--line); min-width: 0; }
.home-top > .col:first-child { padding-left: 0; border-left: 0; }
.home-top > .col:last-child { padding-right: 0; }

.stack > .card + .card { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.lead-related {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.lead-related .card + .card { border-left: 1px solid var(--line); padding-left: 20px; }

.rail-title {
    margin: 0 0 6px;
    font-family: var(--display);
    font-size: 19px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--ink);
}
.most-read ol { list-style: none; counter-reset: mr; padding: 0; margin: 0; }
.most-read li {
    counter-increment: mr;
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.most-read li::before {
    content: counter(mr);
    font-family: var(--display);
    font-size: 34px;
    line-height: .95;
    color: var(--accent);
}
.most-read a { font-family: var(--display); font-size: 18px; letter-spacing: .2px; line-height: 1.18; }
.most-read a:hover { color: #555; }

.block { padding: 30px 0 32px; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    border-top: 3px solid var(--c, var(--ink));
    padding-top: 10px;
    margin-bottom: 20px;
}
.block-title {
    margin: 0;
    font-family: var(--display);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--c, var(--ink));
}
.block-more { font-size: 14px; color: var(--muted); white-space: nowrap; }
.block-more:hover { color: var(--c, var(--ink)); }

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 26px; }
.block-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; }
.block-grid > .card--lg .card-media { aspect-ratio: 16 / 9; }
.block-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; align-content: start; }

/* ---------- Sección y búsqueda ---------- */

.page-head {
    padding: 28px 0 16px;
    margin-bottom: 26px;
    border-bottom: 3px solid var(--c, var(--ink));
}
.page-head h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(38px, 4.8vw, 60px);
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--c, var(--ink));
}
.page-head > span { font-size: 14px; color: var(--muted); }
.section-lead { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.search-info { color: var(--muted); margin: 0 0 18px; }
.list > .card { padding: 22px 0; border-bottom: 1px solid var(--line); }
.list > .card:first-child { padding-top: 0; }
.list .card--row { grid-template-columns: 260px minmax(0, 1fr); }
.list .card--row .card-title { font-size: 26px; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 36px 0 8px; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; padding: 0 12px;
    display: inline-grid; place-items: center;
    border: 1px solid var(--line); border-radius: 4px;
    font-weight: 700; font-size: 14px;
}
.pagination a:hover { border-color: var(--ink); }
.pagination .is-current { background: var(--ink); border-color: var(--ink); color: #fff; }

.empty-state { text-align: center; padding: 80px 16px; color: var(--muted); }
.empty-state h1 { color: var(--ink); font-family: var(--display); font-weight: 400; font-size: 36px; margin: 0 0 10px; }
.btn-link {
    display: inline-block; margin-top: 12px;
    background: var(--ink); color: #fff;
    padding: 11px 22px; border-radius: 4px; font-weight: 700;
}
.btn-link:hover { background: var(--accent); }

/* ---------- Nota ---------- */

.preview-bar {
    margin-top: 16px;
    background: #fff4e6;
    border: 1px solid #fbd3a5;
    color: #7a4100;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
}
.preview-bar a { font-weight: 700; text-decoration: underline; margin-left: 6px; }

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
    padding: 30px 0 10px;
}
.article-header { max-width: 820px; }
.article-section {
    display: inline-block;
    font-family: var(--display);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--c, var(--accent));
    margin-bottom: 8px;
}
.article-section + .kicker { margin-top: 2px; }
.article-title {
    margin: 4px 0 16px;
    font-family: var(--display);
    font-size: clamp(36px, 4.8vw, 60px);
    line-height: 1.06;
    letter-spacing: .3px;
    font-weight: 400;
}
.article-summary {
    margin: 0 0 22px;
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.38;
    color: var(--ink-2);
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}
.byline { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.byline time { color: var(--muted); font-size: 13px; }
.share { display: flex; gap: 8px; }
.share a, .share button {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 50%;
    background: #fff; color: var(--ink);
    transition: background .15s, color .15s, border-color .15s;
}
.share a:hover, .share button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.share button.is-done { background: var(--accent); border-color: var(--accent); color: #fff; }

.article-figure { margin: 0 0 8px; }
.article-figure img { width: 100%; }
.article-figure figcaption {
    font-size: 14px;
    color: var(--muted);
    padding: 8px 0 10px;
    border-bottom: 1px solid var(--line);
    line-height: 1.4;
}
.credit { font-style: italic; }

.article-body {
    font-family: var(--font);
    font-size: 19px;
    line-height: 1.7;
    color: #222;
    max-width: 720px;
    margin-top: 26px;
}
.article-body p { margin: 0 0 1.15em; }
.article-body h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: .3px;
    margin: 1.6em 0 .6em;
}
.article-body blockquote {
    margin: 1.6em 0;
    padding: 4px 0 4px 22px;
    border-left: 4px solid var(--accent);
    font-family: var(--display);
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: .3px;
    color: var(--ink);
}
.article-body blockquote p { margin: 0; }
.article-body ul { padding-left: 1.2em; margin: 0 0 1.15em; }
.article-body li { margin-bottom: .4em; }
.article-body a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

.gallery-block { max-width: 720px; margin: 36px 0 10px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.gallery a { aspect-ratio: 1; overflow: hidden; background: var(--bg-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .2s; }
.gallery a:hover img { transform: scale(1.05); opacity: .9; }

.article-rail .sticky { position: sticky; top: 140px; }

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .92);
    z-index: 300;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 60px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.lightbox p { color: #ddd; font-size: 15px; margin: 14px 0 0; text-align: center; max-width: 800px; }
.lightbox button {
    position: absolute;
    border: 0; background: rgba(255, 255, 255, .12); color: #fff;
    width: 46px; height: 46px; border-radius: 50%;
    font-size: 26px; line-height: 1;
}
.lightbox button:hover { background: var(--accent); }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Footer ---------- */

.site-footer { background: #121212; color: #bdbdbd; margin-top: 48px; padding-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; padding-bottom: 30px; }
.footer-brand p { margin: 10px 0 0; font-size: 14px; }
.footer-nav h4 { margin: 0 0 12px; color: #fff; font-family: var(--display); font-weight: 400; font-size: 17px; text-transform: uppercase; letter-spacing: 1px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 40px; }
.footer-nav li { margin-bottom: 8px; font-size: 14px; }
.footer-nav a:hover, .footer-bottom a:hover { color: var(--accent); }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
    border-top: 1px solid #2c2c2c;
    padding-top: 18px; padding-bottom: 22px;
    font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .home-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 26px; }
    .home-top > .col-lead { grid-column: 1 / -1; padding-right: 0; }
    .home-top > .col:nth-child(2) { padding-left: 0; border-left: 0; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-layout { grid-template-columns: minmax(0, 1fr); }
    .article-rail { display: none; }
}

@media (max-width: 860px) {
    .topbar { grid-template-columns: auto 1fr auto; height: 60px; }
    .topbar-date, .topbar-right .search-form { display: none; }
    .logo { font-size: 30px; text-align: center; }
    .main-nav ul { justify-content: flex-start; }
    .main-nav a { padding: 10px 10px 9px; font-size: 13px; }
    .block-grid { grid-template-columns: minmax(0, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card--row, .list .card--row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .list .card--row { grid-template-columns: 120px minmax(0, 1fr); }
    .list .card--row .card-media { aspect-ratio: 1; }
    .list .card--row .card-title { font-size: 19px; }
    .list .card--row .card-summary { display: none; }
}

@media (max-width: 640px) {
    .home-top { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
    .home-top > .col { padding: 0; border-left: 0; }
    .home-top > .col + .col { border-top: 1px solid var(--line); padding-top: 18px; }
    .card--xl .card-media { margin: 0 -16px 14px; }
    .lead-related { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .lead-related .card + .card { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
    .grid-4, .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .grid-4 > .card, .grid-3 > .card { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 14px; align-items: start; }
    .grid-4 > .card .card-media, .grid-3 > .card .card-media { order: 2; margin: 0; aspect-ratio: 1; }
    .grid-4 > .card .card-summary, .grid-3 > .card .card-summary { display: none; }
    .grid-4 > .card .card-title, .grid-3 > .card .card-title { font-size: 19px; }
    .grid-4, .grid-3 { gap: 0; }
    .grid-4 > .card + .card, .grid-3 > .card + .card { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
    .block-side { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .block-side > .card { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 14px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
    .block-side > .card .card-media { order: 2; margin: 0; aspect-ratio: 1; }
    .article-layout { padding-top: 20px; }
    .article-figure { margin-left: -16px; margin-right: -16px; }
    .article-figure figcaption { padding-left: 16px; padding-right: 16px; }
    .article-body { font-size: 18px; }
    .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lightbox { padding: 60px 10px; }
    .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 14px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
    .card-media img, .gallery img { transition: none; }
}
