/* ============================================================
   ElInformanteRD - Estilos publicos
   Paleta: azul marino principal, dorado de acento, rojo minimo.
   ============================================================ */

:root {
    --navy: #0a2540;
    --navy-2: #14366e;
    --blue: #1f4e9c;
    --blue-soft: #eef3fb;
    /* Acento de marca: rojo del logo (antes dorado) */
    --gold: #c1272d;
    --gold-dark: #9e1f24;
    --red: #c1272d;
    --ink: #18202c;
    --muted: #5b6675;
    --line: #e3e7ee;
    --bg: #ffffff;
    --bg-soft: #f6f8fb;
    --radius: 10px;
    --shadow: 0 6px 24px rgba(10, 37, 64, .08);
    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--blue); }
img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 18px;
}

.svg-icon { vertical-align: middle; }

/* ---------- Barra superior ---------- */
.topbar {
    background: var(--navy);
    color: #cdd6e4;
    font-size: 13px;
}
.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    gap: 12px;
}
.topbar-date { display: flex; align-items: center; gap: 7px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.last-update {
    display: flex; align-items: center; gap: 7px;
    color: #fff; font-weight: 600;
}
.last-update .lu-time { color: var(--gold); }
.topbar-date .d-short, .last-update .lu-short { display: none; }
.topbar-social { display: flex; gap: 10px; }
.topbar-social a { color: #aebacd; display: inline-flex; }
.topbar-social a:hover { color: var(--gold); }

/* ---------- Cabecera principal ---------- */
.masthead {
    border-bottom: 3px solid var(--navy);
    background: var(--bg);
}
.masthead .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 16px;
    padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 62px; width: auto; }
.brand-text { line-height: 1.05; }
.brand-text .name { font-family: var(--serif); font-weight: 800; font-size: 30px; color: var(--navy); letter-spacing: .01em; }
.brand-text .name .accent { color: var(--red); }
.brand-text .tagline { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.masthead-ad { display: flex; justify-content: flex-end; flex: 1; }
.masthead-tools { display: flex; align-items: center; gap: 10px; }

.icon-btn {
    background: none; border: 1px solid var(--line); border-radius: 8px;
    width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--navy); cursor: pointer; transition: .15s;
}
.icon-btn:hover { background: var(--blue-soft); border-color: var(--blue); }

/* ---------- Navegacion ---------- */
.mainnav {
    background: var(--navy-2);
    position: sticky; top: 0; z-index: 50;
}
.mainnav .container { display: flex; align-items: center; gap: 4px; }
.nav-toggle { display: none; }
.navlist {
    display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; flex: 1;
}
.navlist > li > a {
    display: block; color: #e7ecf5; padding: 13px 15px; font-weight: 600;
    font-size: 14.5px; letter-spacing: .02em; border-bottom: 3px solid transparent;
}
.navlist > li > a:hover, .navlist > li > a.active {
    color: #fff; border-bottom-color: var(--gold);
}
.nav-search { display: flex; align-items: center; }
.nav-search a { color: #e7ecf5; padding: 10px; display: inline-flex; }

/* ---------- Cinta de ultima hora ---------- */
.breaking-bar {
    background: var(--red); color: #fff;
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0; overflow: hidden;
}
.breaking-bar .container { display: flex; align-items: center; gap: 14px; }
.breaking-tag {
    display: inline-flex; align-items: center; gap: 7px;
    font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: .06em;
    white-space: nowrap;
}
.breaking-tag .live-dot { animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.breaking-track { overflow: hidden; flex: 1; }
.breaking-track a { color: #fff; font-weight: 600; }
.breaking-track a:hover { text-decoration: underline; }

/* ---------- Layout portada ---------- */
.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 34px;
    padding: 28px 0;
}
/* Evita el "blowout" de grid/flex: los items por defecto tienen min-width:auto
   y no se encogen bajo su contenido, lo que desbordaba el layout en movil. */
.main-col, .sidebar, .article-body, .hero-main, .hero-side, .hero-grid > *, .news-list > * { min-width: 0; }
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 2px solid var(--navy); margin: 0 0 18px; padding-bottom: 8px;
}
.section-head h2 {
    font-family: var(--serif); font-size: 22px; margin: 0; color: var(--navy);
    display: inline-flex; align-items: center; gap: 9px;
}
.section-head .more { font-size: 13px; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 4px; }

/* Cat chip */
.cat-chip {
    display: inline-block; font-size: 11.5px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .05em; color: #fff; background: var(--navy-2);
    padding: 3px 9px; border-radius: 4px;
}

/* Tarjeta destacada */
.hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.card { display: block; }
.card .thumb { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; aspect-ratio: 16/9; }
.card:hover .thumb img { transform: scale(1.04); }
.card .chip-over { position: absolute; top: 12px; left: 12px; }
.card h3 { font-family: var(--serif); color: var(--navy); margin: 12px 0 6px; line-height: 1.2; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card .meta { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.card .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

.hero-main h3 { font-size: 32px; }
.hero-side { display: flex; flex-direction: column; gap: 18px; }
.hero-side .card { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.hero-side .card .thumb img { aspect-ratio: 1/1; }
.hero-side .card h3 { font-size: 17px; margin: 0 0 4px; }

/* Lista de noticias */
.news-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 24px; }
.news-list .card h3 { font-size: 19px; }

/* Lista horizontal (texto) */
.headline-list { list-style: none; margin: 0; padding: 0; }
.headline-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.headline-list li:last-child { border-bottom: none; }
.headline-list .num { font-family: var(--serif); font-size: 22px; color: var(--gold-dark); font-weight: 800; min-width: 26px; }
.headline-list a { font-weight: 700; color: var(--ink); font-size: 15.5px; }
.headline-list a:hover { color: var(--blue); }
.headline-list .meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget { }
.widget-title {
    font-family: var(--serif); font-size: 18px; color: var(--navy); margin: 0 0 12px;
    border-left: 4px solid var(--gold); padding-left: 10px;
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
    display: inline-flex; align-items: center; gap: 4px; background: var(--blue-soft);
    color: var(--navy-2); padding: 6px 11px; border-radius: 20px; font-size: 13px; font-weight: 600;
}
.tag-cloud a:hover { background: var(--navy-2); color: #fff; }
.cat-links { list-style: none; margin: 0; padding: 0; }
.cat-links li a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--ink);
}
.cat-links li a:hover { color: var(--blue); }
.cat-links .count { background: var(--blue-soft); color: var(--navy-2); border-radius: 20px; padding: 1px 9px; font-size: 12px; }

/* ---------- Anuncios ---------- */
.ad-box { width: 100%; margin: 0 auto; }
.ad-label {
    display: block; text-align: right; font-size: 9px; text-transform: uppercase;
    letter-spacing: .12em; color: var(--muted); line-height: 1; margin: 0 0 5px;
}
.ad-slot {
    position: relative; width: 100%; border-radius: 10px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.ad-slot img { width: 100%; height: 100%; object-fit: cover; }
/* El enlace y el contenido del anuncio ocupan todo el espacio del slot */
.ad-slot > a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.ad-slot > a > * { width: 100%; height: 100%; }
.ad-billboard { margin: 8px auto 0; }
.ad-row { margin: 30px 0; }

/* ---------- Articulo ---------- */
.article-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 26px 0 40px; }
.article-body { max-width: 760px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.article-title { font-family: var(--serif); font-size: 40px; line-height: 1.12; color: var(--navy); margin: 10px 0 14px; }
.article-summary { font-size: 20px; color: #3a4452; line-height: 1.5; margin: 0 0 18px; font-weight: 400; }
.article-meta {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: 12px 0; margin: 18px 0; color: var(--muted); font-size: 14px;
}
.author-badge { display: flex; align-items: center; gap: 9px; }
.author-badge .avatar {
    width: 38px; height: 38px; border-radius: 50%; background: var(--navy-2); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.author-badge strong { color: var(--ink); }
.share-row { display: flex; gap: 8px; margin-left: auto; }
.share-row a {
    width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--blue-soft); color: var(--navy-2);
}
.share-row a:hover { background: var(--navy-2); color: #fff; }

.figure { margin: 0 0 18px; }
.figure img { width: 100%; border-radius: var(--radius); }
.figure figcaption { font-size: 13px; color: var(--muted); padding-top: 7px; border-left: 3px solid var(--gold); padding-left: 10px; margin-top: 8px; }

.content { font-size: 18px; line-height: 1.75; color: #232c38; }
.content p { margin: 0 0 18px; }
.content h2, .content h3 { font-family: var(--serif); color: var(--navy); }
.content img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 18px 0; }
.content img.img-small  { max-width: 35%; }
.content img.img-medium { max-width: 60%; }
.content img.img-full   { max-width: 100%; }
.content figure { margin: 18px 0; max-width: 100%; }
.content figure img { width: 100%; margin: 0; }
.content figure figcaption { font-size: 13px; color: var(--muted); padding-left: 10px; border-left: 3px solid var(--gold); margin-top: 8px; }
.content img[style*="float:left"]  { margin: 4px 18px 12px 0; }
.content img[style*="float:right"] { margin: 4px 0 12px 18px; }
.content blockquote {
    border-left: 4px solid var(--gold); margin: 22px 0; padding: 6px 0 6px 20px;
    font-family: var(--serif); font-size: 22px; color: var(--navy); font-style: italic;
}
.content a { color: var(--blue); text-decoration: underline; }
.content ul, .content ol { padding-left: 22px; margin: 0 0 18px; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.article-tags .label { font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Encabezado de seccion (categoria/tag) ---------- */
.page-head { padding: 26px 0 6px; }
.page-head h1 { font-family: var(--serif); font-size: 34px; color: var(--navy); margin: 0; display: flex; align-items: center; gap: 10px; }
.page-head .desc { color: var(--muted); margin: 6px 0 0; }
.page-head .bar { height: 4px; width: 70px; background: var(--gold); margin-top: 12px; border-radius: 4px; }

/* ---------- Buscador overlay ---------- */
.search-overlay {
    position: fixed; inset: 0; background: rgba(10,37,64,.96); z-index: 200;
    display: none; align-items: flex-start; justify-content: center; padding-top: 16vh;
}
.search-overlay.open { display: flex; }
.search-overlay form { width: min(680px, 90%); }
.search-overlay input {
    width: 100%; font-size: 26px; padding: 16px 4px; background: transparent; border: none;
    border-bottom: 2px solid var(--gold); color: #fff; outline: none; font-family: var(--serif);
}
.search-overlay input::placeholder { color: #8fa0bd; }
.search-overlay .hint { color: #8fa0bd; margin-top: 14px; font-size: 14px; }
.search-overlay .close-search {
    position: absolute; top: 24px; right: 28px; background: none; border: none; color: #fff; cursor: pointer;
}

/* ---------- Pie ---------- */
.site-footer { background: var(--navy); color: #c4cee0; margin-top: 40px; }
.footer-top { padding: 40px 0; display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 30px; }
.footer-top h4 { color: #fff; font-size: 15px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .05em; }
.footer-top a { color: #c4cee0; display: block; padding: 5px 0; font-size: 14px; }
.footer-top a:hover { color: var(--gold); }
.footer-brand img { height: 74px; width: auto; margin-bottom: 12px; background: #fff; padding: 8px; border-radius: 10px; }
.footer-brand p { font-size: 14px; line-height: 1.6; }
.footer-social { display: flex; gap: 12px; margin-top: 14px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--red); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: 13px; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Paginacion ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 26px 0; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--navy-2);
}
.pagination a:hover { background: var(--blue-soft); }
.pagination .current { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }

/* ---------- Estado vacio ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty svg { color: var(--line); margin-bottom: 12px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
    .layout, .article-wrap { grid-template-columns: 1fr; }
    .sidebar { flex-direction: row; flex-wrap: wrap; }
    .sidebar .widget { flex: 1; min-width: 260px; }
}
@media (max-width: 768px) {
    .masthead-ad { display: none; }
    .brand img { height: 44px; }
    .brand-text .name { font-size: 23px; }
    .hero-grid { grid-template-columns: 1fr; }
    .news-list { grid-template-columns: 1fr; }
    .article-title { font-size: 28px; }
    .article-summary { font-size: 17px; }
    .content { font-size: 17px; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .topbar-social { display: none; }

    .nav-toggle {
        display: inline-flex; align-items: center; gap: 8px; background: none; border: none;
        color: #fff; padding: 12px 6px; cursor: pointer; font-weight: 700;
    }
    .navlist {
        position: fixed; top: 0; left: 0; height: 100%; width: 78%; max-width: 320px;
        background: var(--navy); flex-direction: column; padding: 70px 0 20px; gap: 0;
        transform: translateX(-100%); transition: transform .25s; z-index: 120; overflow-y: auto;
    }
    .navlist.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.5); }
    .navlist > li { width: 100%; }
    .navlist > li > a { padding: 14px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 110; }
    .nav-backdrop.open { display: block; }

    /* Barra superior compacta: fecha corta y etiqueta corta */
    .topbar { font-size: 11.5px; }
    .topbar .container { gap: 8px; min-height: 34px; }
    .topbar-date, .last-update { white-space: nowrap; }
    .topbar-date .d-full, .last-update .lu-full { display: none; }
    .topbar-date .d-short, .last-update .lu-short { display: inline; }

    /* Publicidad: en pantallas estrechas el banner ancho no debe recortarse */
    .ad-slot { aspect-ratio: auto; height: auto; min-height: 64px; }
    .ad-slot > a { height: auto; }
    .ad-slot > a > *, .ad-slot > div { height: auto; min-height: 64px; }
    .ad-slot img { height: auto; }
}
@media (max-width: 480px) {
    .footer-top { grid-template-columns: 1fr; }
    .hero-side .card { grid-template-columns: 90px 1fr; }
    .article-title { font-size: 24px; }
    .topbar { font-size: 11px; }
    .topbar .container { gap: 6px; }
    .brand-text .tagline { display: none; }
    .brand-text .name { font-size: 21px; }
    .masthead-tools { gap: 6px; }
}
