﻿/*
Theme Name: Territorio Veracruz Master Pro
Theme URI: https://territorioveracruz.com
Author: Redacción Territorio Veracruz
Description: Tema periodístico con soporte oficial de logotipo, reloj en vivo y franjas de categorías estrictamente lineales.
Version: 13.2
License: GNU General Public License v2 or later
Text Domain: territorio-veracruz
*/

:root {
    --bg-color: #f4f5f7;
    --card-bg: #ffffff;
    --border-color: #d1d5db;
    --text-main: #111111;
    --text-muted: #555555;
    --primary-blue: #0b2545;
    --accent-blue: #134074;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.35; }
a { text-decoration: none; color: var(--text-main); transition: 0.2s; }
a:hover { color: var(--accent-blue); }

.top-utility-bar { background: #fff; padding: 6px 4%; display: flex; justify-content: space-between; border-bottom: 1px solid var(--border-color); font-size: 0.8rem; color: var(--text-muted); }

.ticker-container { background-color: #0d1b2a; color: #ffffff; padding: 6px 0; overflow: hidden; white-space: nowrap; border-bottom: 1px solid var(--border-color); font-size: 0.8rem; }
.ticker-wrapper { display: inline-block; white-space: nowrap; animation: ticker 30s linear infinite; }
.ticker-item { display: inline-block; padding: 0 25px; font-weight: 500; }
.ticker-item span { font-weight: bold; }
.ticker-up { color: #4ade80; }
.ticker-down { color: #f87171; }
@keyframes ticker { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-50%, 0, 0); } }

.top-banner-container { background: #ffffff; padding: 12px 0; text-align: center; border-bottom: 1px solid var(--border-color); }
.ad-leaderboard { display: inline-block; width: 728px; max-width: 90%; height: 90px; background: #e5e7eb; color: #6b7280; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: bold; border: 1px dashed #9ca3af; margin: 0 auto; }
.main-header { background: #ffffff; padding: 15px 4%; text-align: center; border-bottom: 2px solid var(--primary-blue); }
.logo-text { font-size: 2.3rem; font-weight: 900; color: var(--primary-blue); text-transform: uppercase; letter-spacing: -1px; }
.custom-logo-link img { max-height: 70px; width: auto; display: inline-block; }

.main-nav { background: #ffffff; border-bottom: 1px solid var(--border-color); display: flex; justify-content: center; font-weight: 600; font-size: 0.82rem; text-transform: uppercase; }
.main-nav ul { list-style: none; display: flex; margin: 0; padding: 0; }
.main-nav a { padding: 10px 14px; display: block; color: var(--text-main); }
.main-nav a:hover { color: var(--accent-blue); background: #f8fafc; }

.titulares-bar { background-color: var(--accent-blue); color: #ffffff; display: flex; align-items: center; font-size: 0.85rem; font-weight: 700; border-bottom: 1px solid #0b2545; overflow: hidden; }
.titulares-tag { background-color: var(--primary-blue); color: #ffffff; padding: 8px 15px; font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; z-index: 5; white-space: nowrap; border-right: 2px solid #ffffff; }
.titulares-ticker-container { overflow: hidden; white-space: nowrap; width: 100%; padding-left: 15px; }
.titulares-ticker-text { display: inline-block; animation: ticker-titulares 35s linear infinite; }
.titulares-ticker-text a { color: #ffffff; text-decoration: none; margin-right: 40px; }
@keyframes ticker-titulares { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-50%, 0, 0); } }

.container { max-width: 1380px; margin: 0 auto; padding: 15px 3%; }

.master-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1100px) { .master-layout { grid-template-columns: 1fr; } }

.sidebar-left, .sidebar-right { display: flex; flex-direction: column; gap: 12px; }
.content-center { display: flex; flex-direction: column; gap: 20px; width: 100%; min-width: 0; }

.magazine-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 12px;
    background: #000;
    padding: 8px;
    border-radius: 3px;
    width: 100%;
}
@media (max-width: 768px) { .magazine-layout { grid-template-columns: 1fr; } }

.mag-main-img { position: relative; width: 100%; height: 340px; background: #111; overflow: hidden; border-radius: 2px; }
.mag-main-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; transition: transform 0.4s ease; }
.mag-main-img:hover img { transform: scale(1.02); }
.mag-cat-tag { position: absolute; top: 12px; left: 12px; background: var(--accent-blue); color: white; padding: 3px 7px; font-size: 0.7rem; font-weight: bold; text-transform: uppercase; z-index: 2; border-radius: 2px; }
.mag-main-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 25px 15px 15px; background: linear-gradient(transparent, rgba(0,0,0,0.92)); }
.mag-main-overlay h2 { font-size: 1.5rem; font-weight: 900; line-height: 1.15; margin-bottom: 6px; }
.mag-main-overlay h2 a { color: #ffffff; }
.mag-meta { font-size: 0.72rem; color: #cbd5e1; display: flex; align-items: center; gap: 6px; }

.mag-list { display: flex; flex-direction: column; gap: 8px; justify-content: space-between; }
.mag-list-item { display: flex; gap: 8px; background: #1a1a1a; padding: 6px; border-radius: 2px; transition: background 0.2s; }
.mag-list-item:hover { background: #222; }
.mag-list-img { width: 85px; height: 68px; flex-shrink: 0; background: #333; border-radius: 2px; overflow: hidden; }
.mag-list-img img { width: 100%; height: 100%; object-fit: cover; }
.mag-list-content { display: flex; flex-direction: column; justify-content: center; }
.mag-list-content h4 { font-size: 0.8rem; font-weight: 700; line-height: 1.15; margin-bottom: 3px; }
.mag-list-content h4 a { color: #ffffff; }

/* FRANJAS DE ZONAS (BLOQUES INDEPENDIENTES Y ESTRICTAMENTE LINEALES) */
.categories-flow { display: flex; flex-direction: column; gap: 20px; width: 100%; clear: both; }

.category-stripe-box {
    width: 100%;
    clear: both;
    display: block;
    margin-bottom: 5px;
}

.section-title-gaceta {
    font-size: 1.05rem;
    font-weight: 900;
    text-transform: uppercase;
    border-bottom: 3px solid var(--primary-blue);
    padding-bottom: 3px;
    color: var(--primary-blue);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
    width: 100%;
}
.section-title-gaceta a { font-size: 0.7rem; color: var(--accent-blue); font-weight: bold; }

.gaceta-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 10px;
    width: 100%;
}
@media (max-width: 768px) { .gaceta-grid { grid-template-columns: 1fr; } }

.card-box { background: #ffffff; border: 1px solid var(--border-color); padding: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.section-title-clean { font-size: 0.95rem; font-weight: 900; text-transform: uppercase; border-bottom: 2px solid var(--primary-blue); padding-bottom: 5px; color: var(--primary-blue); margin-bottom: 10px; }
footer { background: var(--primary-blue); color: #fff; text-align: center; padding: 20px; margin-top: 30px; font-size: 0.85rem; }
