/* ── Layout portada ──────────────────────────────────── */
.portada-wrap { max-width: 1200px; width: 100%; margin: 0 auto; padding: 16px 20px; box-sizing: border-box; overflow-x: hidden; }

/* ── Cabecera portada ────────────────────────────────── */
.portada-header { text-align: center; padding: 24px 0 16px; border-bottom: 3px solid #1a1a2e; margin-bottom: 0; }
.portada-header__nombre { font-family: Georgia, serif; font-size: 52px; font-weight: 900; color: #1a1a2e; letter-spacing: -1px; line-height: 1; margin-bottom: 6px; }
.portada-header__subtitulo { font-size: 13px; color: #888; text-transform: uppercase; letter-spacing: 2px; font-family: -apple-system, sans-serif; }
.portada-header__fecha { font-size: 11px; color: #aaa; font-family: -apple-system, sans-serif; margin-top: 6px; }

/* ── Banner portada (leaderboard entre nav y ticker) ─── */
.ad-box--portada-banner { text-align: center; padding: 12px 0; background: #f8f8f8; border-bottom: 1px solid #e8e8e8; }
.ad-box--portada-banner img { max-width: 100%; height: auto; display: inline-block; }

/* ── Barra de secciones ──────────────────────────────── */
.portada-secciones-bar { background: #e74c3c; margin-bottom: 0; overflow-x: auto; white-space: nowrap; }
.portada-secciones-bar a { display: inline-block; color: #fff; text-decoration: none; padding: 9px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; font-family: -apple-system, sans-serif; transition: background .2s; }
.portada-secciones-bar a:hover { background: rgba(0,0,0,.2); }

/* ── Ticker de noticias ──────────────────────────────── */
.ticker-wrap { display: flex; align-items: stretch; background: #1a1a2e; height: 36px; margin-bottom: 20px; overflow: hidden; }
.ticker-label { background: #e74c3c; color: #fff; font-family: -apple-system, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 0 16px; display: flex; align-items: center; white-space: nowrap; flex-shrink: 0; }
.ticker-track { flex: 1; overflow: hidden; position: relative; }
.ticker-inner { display: flex; align-items: center; height: 100%; white-space: nowrap; animation: ticker-scroll 55s linear infinite; }
.ticker-wrap:hover .ticker-inner { animation-play-state: paused; }
.ticker-item { color: rgba(255,255,255,.88); text-decoration: none; font-family: -apple-system, sans-serif; font-size: 13px; padding: 0 16px; transition: color .2s; flex-shrink: 0; }
.ticker-item:hover { color: #e74c3c; }
.ticker-sep { color: #e74c3c; font-size: 10px; opacity: .5; flex-shrink: 0; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── Hero principal (1 grande + 3 secundarias) ───────── */
.hero-grid { display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: 480px; gap: 4px; margin-bottom: 32px; overflow: hidden; }

.hero-main { position: relative; display: block; overflow: hidden; text-decoration: none; background: #222; border-radius: 2px 0 0 2px; }
.hero-main__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s; }
.hero-main:hover .hero-main__img { transform: scale(1.03); }
.hero-main__noimagen { width: 100%; height: 100%; background: #1a1a2e; }
.hero-main__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.35) 45%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; }
.hero-main__top { position: absolute; top: 20px; left: 28px; }
.hero-main__volanta { font-size: 12px; font-weight: 700; color: #f39c12; text-transform: uppercase; letter-spacing: 1px; font-family: -apple-system, sans-serif; margin-bottom: 10px; }
.hero-main__titulo { font-family: Georgia, serif; font-size: 30px; font-weight: 700; line-height: 1.25; color: #fff; margin: 0 0 14px; }
.hero-main__meta { font-family: -apple-system, sans-serif; font-size: 12px; color: rgba(255,255,255,.72); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hero-sep { opacity: .45; }

/* 3 secundarias apiladas verticalmente al lado derecho del hero */
.hero-secundarias { display: grid; grid-template-columns: 1fr; grid-template-rows: repeat(3, 1fr); gap: 4px; min-height: 0; }
.hero-sec { position: relative; display: block; overflow: hidden; text-decoration: none; background: #222; }
.hero-sec__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s; }
.hero-sec:hover .hero-sec__img { transform: scale(1.06); }
.hero-sec__noimagen { width: 100%; height: 100%; background: #2a2a3e; }
.hero-sec__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.86) 0%, rgba(0,0,0,.2) 55%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; gap: 5px; }
.hero-sec__titulo { font-family: Georgia, serif; font-size: 13px; font-weight: 700; line-height: 1.3; color: #fff; margin: 0; }
.hero-sec__fecha { font-size: 10px; color: rgba(255,255,255,.6); font-family: -apple-system, sans-serif; }

/* ── Badge de sección ────────────────────────────────── */
.hero-badge { display: inline-block; background: #e74c3c; color: #fff; font-family: -apple-system, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; }
.hero-badge--sm { font-size: 9px; padding: 2px 6px; }

/* ── Grid últimas noticias ───────────────────────────── */
.portada-grid-titulo { font-family: -apple-system, sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #888; border-bottom: 2px solid #1a1a2e; padding-bottom: 6px; margin-bottom: 16px; }
.portada-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }

.noticia-card { border-bottom: 1px solid #eee; padding-bottom: 16px; }
.noticia-card__imagen { border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.noticia-card__imagen img { width: 100%; height: 160px; object-fit: cover; display: block; transition: opacity .2s; }
.noticia-card__imagen img:hover { opacity: .88; }
.card-volanta { font-size: 11px; font-weight: 600; color: #e74c3c; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; font-family: -apple-system, sans-serif; }
.card-titulo { font-family: Georgia, serif; font-size: 17px; font-weight: 700; line-height: 1.35; color: #1a1a1a; margin-bottom: 8px; text-decoration: none; display: block; }
.card-titulo:hover { color: #e74c3c; }
.card-sumario { font-size: 13px; line-height: 1.5; color: #666; margin-bottom: 8px; font-family: Georgia, serif; }
.card-seccion { font-size: 10px; font-weight: 700; color: #e74c3c; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; font-family: -apple-system, sans-serif; text-decoration: none; display: block; }
.card-meta { font-size: 11px; color: #999; font-family: -apple-system, sans-serif; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Bloques por sección ─────────────────────────────── */
.portada-seccion-bloque { margin-bottom: 40px; }
.portada-seccion-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid #1a1a2e; padding-bottom: 8px; margin-bottom: 12px; }
.portada-seccion-header h2 { font-family: Georgia, serif; font-size: 20px; font-weight: 700; color: #1a1a2e; margin: 0; }
.portada-seccion-header a { font-size: 11px; color: #e74c3c; text-decoration: none; font-family: -apple-system, sans-serif; font-weight: 600; text-transform: uppercase; }

/* Section overlay cards: 1 grande (izq) + hasta 3 pequeñas (der) */
/* grid-row span del sec-card--main se inyecta inline desde PHP según posts disponibles */
.seccion-grid { display: grid; grid-template-columns: 3fr 2fr; grid-auto-rows: 110px; gap: 6px; }
.seccion-grid--solo { grid-template-columns: 1fr; }
.sec-card { position: relative; display: block; overflow: hidden; border-radius: 3px; background: #222; text-decoration: none; }
.sec-card--main { grid-column: 1; min-height: 220px; }
.seccion-grid--solo .sec-card--main { min-height: 280px; grid-row: auto; }
.sec-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.sec-card:hover .sec-card__img { transform: scale(1.04); }
.sec-card__noimagen { width: 100%; height: 100%; background: #2a2a3e; }
.sec-card__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.86) 0%, rgba(0,0,0,.2) 55%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; gap: 5px; }
.sec-card__titulo { font-family: Georgia, serif; font-weight: 700; line-height: 1.3; color: #fff; margin: 0; font-size: 13px; }
.sec-card--main .sec-card__titulo { font-size: 20px; }
.sec-card__fecha { font-size: 11px; color: rgba(255,255,255,.62); font-family: -apple-system, sans-serif; }

/* ── Meta general ────────────────────────────────────── */
.meta-actualiz { color: #e67e22; font-size: 11px; font-family: -apple-system, sans-serif; }

/* ── Perfil del autor ────────────────────────────────── */
.autor-perfil { display: grid; grid-template-columns: 160px 1fr; gap: 32px; padding: 32px 0; border-bottom: 2px solid #eee; margin-bottom: 32px; align-items: start; }
.autor-perfil__foto img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; display: block; border: 4px solid #e74c3c; }
.autor-perfil__avatar { width: 160px; height: 160px; border-radius: 50%; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 60px; border: 4px solid #eee; }
.autor-perfil__nombre { font-family: Georgia, serif; font-size: 28px; font-weight: 700; color: #1a1a2e; margin: 0 0 4px; }
.autor-perfil__cargo { font-size: 13px; color: #e74c3c; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-family: -apple-system, sans-serif; margin-bottom: 12px; }
.autor-perfil__bio { font-size: 15px; line-height: 1.6; color: #555; font-family: Georgia, serif; margin-bottom: 16px; }
.autor-perfil__redes { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.red-social { font-size: 13px; text-decoration: none; font-family: -apple-system, sans-serif; font-weight: 600; padding: 5px 12px; border-radius: 20px; transition: opacity .2s; }
.red-social:hover { opacity: .8; }
.red-correo   { background: #f0f0f0; color: #555; }
.red-twitter  { background: #000; color: #fff; }
.red-facebook { background: #1877f2; color: #fff; }
.red-instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }
.autor-perfil__stats { font-size: 12px; color: #aaa; font-family: -apple-system, sans-serif; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 3fr 2fr; grid-template-rows: 420px; }
    .hero-main__titulo { font-size: 24px; }
    .hero-sec__titulo { font-size: 12px; }
}
@media (max-width: 900px) {
    .portada-grid { grid-template-columns: repeat(2, 1fr); }
    .seccion-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
    .sec-card--main { grid-column: 1 / 3; grid-row: auto !important; min-height: 220px; }
    .sec-card:not(.sec-card--main) { min-height: 130px; }
}
@media (max-width: 768px) {
    /* Hero: columna única → secundarias deslizan BAJO el hero */
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
    }
    .hero-main { height: 300px; border-radius: 2px; }
    /* 3 secundarias en fila horizontal debajo del hero */
    .hero-secundarias {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 1fr;
        height: 160px;
    }
    .hero-main__titulo { font-size: 22px; }
    .portada-header__nombre { font-size: 36px; }
    .ticker-wrap { height: 32px; }
    .ticker-item { font-size: 12px; padding: 0 12px; }
}
@media (max-width: 600px) {
    .portada-grid { grid-template-columns: 1fr; }
    .seccion-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .sec-card--main { grid-column: auto; grid-row: auto !important; min-height: 200px; }
    .sec-card:not(.sec-card--main) { min-height: 110px; }
    .autor-perfil { grid-template-columns: 1fr; text-align: center; }
    .autor-perfil__foto img, .autor-perfil__avatar { margin: 0 auto; }
    .autor-perfil__redes { justify-content: center; }
}
@media (max-width: 480px) {
    .hero-main { height: 240px; }
    .hero-secundarias { height: 110px; }
    .hero-sec__titulo { font-size: 11px; }
}

/* ── Bloques de región libre ─────────────────────────────── */
.dr-region { margin-bottom: 40px; }
.dr-region-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid #1a1a2e; padding-bottom: 8px; margin-bottom: 12px; }
.dr-region-titulo { font-family: Georgia, serif; font-size: 20px; font-weight: 700; color: #1a1a2e; margin: 0; }
.dr-region-grid { display: grid; gap: 6px; }
.dr-col { display: flex; flex-direction: column; gap: 6px; }
.dr-col--pub { align-items: center; overflow: hidden; }
.dr-pub-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; max-width: 100%; }
.dr-pub-label { position: absolute; top: 0; left: 0; right: 0; font-size: 9px; font-family: -apple-system, sans-serif; font-weight: 500; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(220,220,220,0.9); text-align: center; padding: 3px 0; background: rgba(0,0,0,0.3); z-index: 2; pointer-events: none; }
.dr-col--pub img, .dr-col--pub iframe { max-width: 100%; height: auto; display: block; }
.dr-bloque { position: relative; display: block; overflow: hidden; border-radius: 3px; background: #222; text-decoration: none; }
.dr-bloque__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.dr-bloque:hover .dr-bloque__img { transform: scale(1.04); }
.dr-bloque__noimagen { width: 100%; height: 100%; background: #2a2a3e; }
.dr-bloque__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.86) 0%, rgba(0,0,0,.2) 55%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; gap: 5px; }
.dr-bloque__titulo { font-family: Georgia, serif; font-weight: 700; line-height: 1.3; color: #fff; margin: 0; }
.dr-bloque__fecha { font-size: 11px; color: rgba(255,255,255,.62); font-family: -apple-system, sans-serif; }
@media (max-width: 768px) {
    .dr-region-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
    .dr-bloque { height: auto !important; min-height: 100px; }
}
