:root {
  --brand-accent: #bf0404;
  --bg-light: #f4f4f4;
  --text-main: #222222;
  --text-muted: #666666;
}

body {color: var(--text-main); }
a { color: var(--text-main); transition: color 0.2s; text-decoration: none; }
a:hover { color: var(--brand-accent); }

/* =========================================================
   FIX DEFINITIVO: MOVIMIENTO +NOTICIAS
========================================================= */
.editorial-top-bar {     background: #f4f4f4; color: #000000; font-size: 13px; padding: 10px 0; }
.ad-container.ad-header { background: transparent; border: 0; padding: 0; margin: 0; }
.debug-ticker-container {
    background: #f4f4f4 !important;
    border-bottom: 2px solid #ddd !important;
    height: 45px !important;
    overflow: hidden !important; /* Esencial */
}

.ticker-flex {
    display: flex !important;
    align-items: center;
    height: 100%;
    padding: 0px;
}

.ticker-label {
    background: var(--brand-accent,#000);
    color: #fff !important;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 900;
    font-size: 11px;
    z-index: 10;
}

/* LA VENTANA */
.ticker-content {
    flex: 1;
    overflow: hidden !important;
    display: flex;
    align-items: center;
}

/* LA LISTA QUE SE MUEVE */
.ticker-items {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important; /* Evita que el texto baje */
    
    /* Llamamos a la animación */
    animation: scroll-prensa 80s linear infinite !important;
}

.ticker-items:hover {
    animation-play-state: paused !important;
}

.ticker-items li {
    padding: 0 5px !important;
    display: inline-block !important;
}

.ticker-items a {
    color: #000 !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

/* El separador entre noticias repetidas */
.ticker-items li::after {
    content: "|";
    margin-left: 10px;
    color: #ccc;
}

/* ANIMACIÓN */
@keyframes scroll-prensa {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Se mueve el 50% porque duplicamos la lista */
}

.ticker-date {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    padding: 0 15px;
    background: #f4f4f4;
    z-index: 10;
}
/* =========================================================
 2. PORTADA: NUEVA ARQUITECTURA PREMIUM
========================================================= */
.hero-content { margin-top: 10px; }
.cat-label { color: var(--brand-accent); font-weight: bold; font-size: 12px; text-transform: uppercase; display: block; margin-bottom: 5px; }
.section-title { font-size: 1.2rem; margin-bottom: 20px; text-transform: uppercase; }
.editorial-home-divider { border: 0; height: 1px; background: #111; margin: 20px 0; width: 100%; }

/* Tipografía de Portada */
.home-hero-lead h1 { font-size: 2.2rem; line-height: 1.15; margin: 0 0 15px 0; font-weight: 800; }
.grid-sub-item h3 { font-size: 1.05rem; line-height: 1.3; margin-top: 12px; }

/* Diseño Desktop (PC) */
@media (min-width: 993px) {
    .ast-separate-container #primary, .ast-separate-container.ast-left-sidebar #primary, .ast-separate-container.ast-right-sidebar #primary {
        margin: 2em 0;
        padding: 0;
    }
}
@media(min-width: 992px) {
  .editorial-top-section { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
  .home-top-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .editorial-bottom-section { display: grid; grid-template-columns: 3fr 1fr; gap: 50px; align-items: start; }
}

/* Diseño Móvil / Tablet */
@media(max-width: 991px) {
  .editorial-top-section, .editorial-bottom-section { display: flex; flex-direction: column; gap: 30px; }
  .home-top-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .editorial-home-sidebar { order: -1; margin-bottom: 20px; }
}

/* Blindaje de imágenes Portada */
.grid-sub-item img, .section-item img, .actualidad-main img, .tendencias-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; border-radius: 4px; }
.home-hero-lead img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }

/* Botón Ver Más */
.section-footer { margin-top:20px; margin-bottom: 30px; text-align: right; }
.btn-read-more { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; color: #ffffff !important; background-color: var(--brand-accent); padding: 10px 24px; text-transform: uppercase; letter-spacing: 1px; border-radius: 3px; border: 2px solid var(--brand-accent); transition: all 0.3s ease; }
.btn-read-more:hover { background-color: transparent; color: var(--brand-accent) !important; transform: translateY(-2px); }

/* =========================================================
 3. PUBLICIDAD (ADS)
========================================================= */
.masthead-top-wrapper { background-color: #f4f4f4 !important; text-align: center; padding: 20px 0 !important;}
.home-inline-ad, .ad-container { width: 100%; text-align: center; margin: 30px 0; padding: 20px 0; background: #fdfdfd; border: 1px solid #eaeaea; display: flex ; flex-direction: column; align-items: center; }
.ad-label, .home-inline-ad::before { content: "- PUBLICIDAD -"; display: block; font-size: 0.65rem; color: #999; letter-spacing: 1.5px; margin-bottom: 5px; text-transform: uppercase; font-weight: 600; }

/* =========================================================
 4. NOTICIA INDIVIDUAL (SINGLE POST) - BLOQUEO DE AUTORES
========================================================= */
body.single-post .site-content > .ast-container { max-width: 1240px !important; margin: 0 auto !important; }
body.single-post #primary { width: 100% !important; max-width: 100% !important; padding: 0 !important; }

/* OCULTAR AUTOR EN TODO EL SITIO */
.entry-meta .author, 
.ast-single-post .entry-meta .author,
.ast-single-post .ast-author-details,
.author-box, 
.vcard, 
.byline { 
  display: none !important; 
}

.editorial-single-wrapper { display: grid !important; grid-template-columns: 1fr; gap: 40px; margin: 40px 0; }
@media(min-width: 992px) { .editorial-single-wrapper { grid-template-columns: 2.8fr 1fr !important; } }

.editorial-single-sidebar { border-left: 1px solid #eaeaea; padding-left: 30px; }
.entry-content { font-size: 1.15rem; line-height: 1.8; color: #333; }
.single-post .entry-header {
    margin-bottom: 25px;
    border-bottom: 4px solid var(--brand-accent);
    padding-bottom: 20px;
}

.single-post .entry-title {
    font-size: 2.8rem !important;
    font-weight: 800 !important;
    line-height: 1.1;
    margin-bottom: 15px;
}

/* ==========================================================================LAYOUT PRINCIPAL (Estructura de la Noticia)========================================================================== */
/* Contenedor principal que envuelve contenido y sidebar */
.mas-noticias-single-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    align-items: flex-start;
}
/* Columna de la noticia (Izquierda) */
.editorial-single-content {
    flex: 1;
    min-width: 0;
    /* Crucial para que el contenido no rompa el flex */
}
/* Columna del sidebar (Derecha) */
.editorial-single-sidebar {
    width: 330px;
    flex-shrink: 0;
}
/* ==========================================================================CABECERA Y TÍTULOS (Look Editorial)========================================================================== */
.mas-noticias-centered-header {
    margin-bottom: 25px;
}
/* Breadcrumbs (Inicio » Economía) */
.editorial-breadcrumbs {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: #777;
}
.editorial-breadcrumbs a {
    color: #d32f2f;
    /* Color rojo acento */
    text-decoration: none;
    font-weight: 600;
}
/* Título de la noticia */
.entry-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 15px;
}
/* Meta datos (Fecha, tiempo de lectura) */
.editorial-entry-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 15px;
    text-transform: capitalize;
}
.editorial-entry-meta .sep {
    color: #ccc;
}
/* ==========================================================================CONTENIDO Y MULTIMEDIA========================================================================== */
/* Imagen destacada (Hero) */
.editorial-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 25px;
    display: block;
}
/* Cuerpo de la noticia */
.entry-content p {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}
.entry-content strong {
    color: #000;
}
/* Separadores */
.section-divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 40px 0;
}
/* ==========================================================================SIDEBAR (Widgets de Noticias)========================================================================== */
/* Lista de posts en el sidebar */
.mas-noticias-sidebar-block ul {
    list-style: none;
    padding: 0;
}
.widget-post-link:hover {
    opacity: 0.8;
}
/* ==========================================================================RESPONSIVE (Ajustes para móviles)========================================================================== */
@media (max-width: 921px) {
    .mas-noticias-single-container {
        flex-direction: column;
    }
    .editorial-single-sidebar {
        width: 100%;
        position: static;
        /* Quita el sticky en móviles */
    }
    .entry-title {
        font-size: 28px;
    }
}
/* =========================================================
   NOTICIAS RELACIONADAS (Solo visibles en el Single)
   ========================================================= */
body.single-post .editorial-related-section {
    margin-top: 40px;
    padding-top: 20px;
}
body.single-post .related-title {
    font-size: 1.3rem;
    text-transform: uppercase;
    font-weight: 900;
    margin-bottom: 25px;
    color: #1a1a1a;
}
body.single-post .related-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
body.single-post .related-card a {
    text-decoration: none;
    color: #222;
    display: block;
    transition: transform 0.2s ease;
}
body.single-post .related-card a:hover {
    transform: translateY(-3px);
}
body.single-post .related-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
}
body.single-post .related-info h4 {
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 8px 0;
    transition: color 0.2s;
}
body.single-post .related-card a:hover h4 {
    color: var(--brand-accent);
}
body.single-post .related-date {
    font-size: 0.85rem;
    color: #777;
    text-transform: capitalize;
}
/* Modo móvil para las relacionadas */
@media (max-width: 768px) {
    body.single-post .related-grid-modern {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
 5. NOTICIAS RELACIONADAS
========================================================= */
.related-grid-modern { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 768px) { .related-grid-modern { grid-template-columns: 1fr; } }

/* =========================================================
 6. ARCHIVOS Y CATEGORÍAS
========================================================= */
.editorial-archive-header { display: flex; justify-content: space-between; align-items: center; margin: 20px auto; max-width: 1240px; }
.editorial-archive-loop.layout-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

/* =========================================================
   LIBERAR EL ANCHO DEL ARCHIVO (FIX ASTRA)
========================================================= */
body.archive #primary,
body.category #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Forzamos que el layout personalizado se apile verticalmente */
.editorial-archive-page .editorial-custom-layout {
    display: block !important; 
}

/* =========================================================
 7. WIDGETS DEL SIDEBAR
========================================================= */
.widget-editorial li { display: block !important; margin: 0 0 15px 0 !important; padding: 0 0 15px 0 !important; border-bottom: 1px solid #eee; }
.widget-editorial .widget-post-thumb img { width: 75px !important; height: 75px !important; object-fit: cover; border-radius: 6px; }

/* DISEÑO DE SIDEBAR +NOTICIAS */
.mas-noticias-sidebar-block ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.mas-noticias-sidebar-block li {
    margin-bottom: 15px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #f0f0f0;
}

.mas-noticias-sidebar-block li:last-child {
    border-bottom: none;
}

/* El Link actúa como el contenedor del Grid */
.widget-post-link {
    display: grid !important;
    grid-template-columns: 85px 1fr !important; /* Miniatura fija + Texto flexible */
    gap: 15px !important;
    text-decoration: none !important;
    align-items: start;
}

/* Estilo de la Miniatura */
.widget-post-thumb img {
    width: 85px !important;
    height: 60px !important; /* Proporción 16:10 para noticias */
    object-fit: cover !important;
    border-radius: 4px !important;
    display: block;
}

/* El Título (H5) con fallback de fuente */
.widget-post-title {
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    color: #1a1a1a !important;
    transition: color 0.2s ease;
}

.widget-post-link:hover .widget-post-title {
    color: var(--brand-accent) !important;
}
h3.widget-title {
    padding-top: 12px;
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -1px;
}
/* =========================================================
 8. RESETEO DE CONTENEDORES ASTRA
========================================================= */
body.home .site-content > .ast-container,
body.front-page .site-content > .ast-container,
body.archive .site-content > .ast-container,
body.category .site-content > .ast-container {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

.editorial-custom-layout {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

/* =========================================================
 11. +NOTICIAS: NUEVOS LAYOUTS DE PORTADA
========================================================= */

/* Hero Impacto (Imagen a sangre con texto encima) */
.mas-noticias-hero-section { margin-bottom: 40px; }
.hero-impact-card { position: relative; border-radius: 8px; overflow: hidden; }
.hero-impact-thumb { position: relative; }
.hero-impact-thumb img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 40px 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    color: #fff;
}
.hero-overlay h2 { font-size: 2.8rem; margin: 10px 0 0; color: #fff; line-height: 1.1; font-weight: 900; }
.hero-cat-tag { background: var(--brand-accent); padding: 4px 12px; font-size: 11px; text-transform: uppercase; font-weight: 800; border-radius: 2px; }

/* Títulos de sección estilo "+Noticias" */
.mas-noticias-section-title {
    padding-top: 12px;
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 900;
}
.mas-noticias-section-title a { color: #000; }
section.home-category-section { border-bottom: 1px solid #d4d4d4; padding-bottom: 20px; }

/* Layout Actualidad (1 Central + Lateral) */
@media(min-width: 992px) {
    .layout-actualidad-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
}
.actualidad-main h3 { font-size: 1.7rem; font-weight: 900; line-height: 1.2; margin-top: 15px; }
.actualidad-sidebar-posts { display: flex; flex-direction: column; gap: 20px; }
.actualidad-mini { border-bottom: 1px solid #eee; padding-bottom: 15px; }
.actualidad-mini h4 { font-size: 1.3rem; line-height: 1.4; font-weight: 700; margin: 0; }
.actualidad-mini:last-child { border: none; }

/* Layout Tendencias (3 Columnas) */
@media(min-width: 768px) {
    .layout-tendencias-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
}
.tendencias-card h4 { margin-top: 12px; font-weight: 700; line-height: 1.3; }

@media(max-width: 767px) {
    .hero-overlay h2 { font-size: 1.5rem; }
    .hero-impact-thumb img { aspect-ratio: 16/10; }
    .layout-actualidad-grid, .layout-tendencias-grid { display: flex; flex-direction: column; gap: 25px; }
}
.editorial-archive-page .hero-overlay h2 {
    font-size: 2.2rem; /* Un poco más pequeño que en la home para dar contexto */
}
/* =========================================================
   SECCIÓN 12. +NOTICIAS: MOSAICO PREMIUM (FULL RESPONSIVE)
========================================================= */

/* 1. ESTRUCTURA BASE (Móvil) */
.mas-noticias-hero-grid-premium {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
    height: auto !important; /* Altura automática en móvil */
}

/* 2. TABLETS (768px a 991px) - EL FIX DE 2 COLUMNAS */
@media(min-width: 768px) and (max-width: 991px) {
    .mas-noticias-hero-grid-premium {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .hero-col-main { grid-column: span 2; height: 400px; }
    .hero-col-side { height: auto; }
    .hero-card-medium { height: 250px; }
    .hero-mini-list { height: auto; margin-top: 10px; }
}
@media only screen and (max-width:767px){
    .hero-col-main {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 300px;
}
}

/* 3. ESCRITORIO (992px en adelante) - EL DISEÑO QUE TE GUSTA */
@media(min-width: 992px) {
    .mas-noticias-hero-grid-premium {
        display: grid;
        grid-template-columns: 2fr 1.2fr 1.2fr;
        height: 600px; /* Altura estética para PC */
        gap: 15px;
    }
}

/* 4. ESTILOS DE COMPONENTES (Comunes a todos) */
.hero-col-side { display: flex; flex-direction: column; gap: 15px; }

.hero-card-big, .hero-card-medium {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
}

/* Proporción de altura para las columnas laterales en PC */
@media(min-width: 992px) {
    .hero-card-medium { height: 45%; }
    .hero-mini-list { height: 55%; display: flex; flex-direction: column; gap: 10px; }
}

.hero-card-big img, .hero-card-medium img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-overlay-text {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 25px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: #fff;
}

/* Títulos con el Peso de Astra */
.hero-overlay-text h2, .hero-overlay-text.small h3, .mini-list-item h4 {
    font-weight: 800 !important;
    color: #fff;
    margin: 0;
}

.hero-overlay-text h2 { font-size: 2.2rem; line-height: 1.1; margin-top: 10px; }
.hero-overlay-text.small h3 { line-height: 1.2; }

.hero-label {
    background: var(--brand-accent);
    padding: 3px 10px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
}

/* MINI LISTA (Ajuste para Tablet/PC) */
.mini-list-item a {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 12px;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
}

.mini-list-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.mini-list-item h4 { 
    font-size: 0.95rem !important; 
    line-height: 1.2; 
    color: #222 !important; 
}
/* =========================================================
   ESTILOS DE PAGINACIÓN (+NOTICIAS)
   ========================================================= */
.editorial-pagination {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Ocultar el texto para lectores de pantalla que inyecta WP ("Navegación de entradas") */
.editorial-pagination .screen-reader-text {
    display: none;
}

.editorial-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* Estilo base de los números y botones */
.editorial-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background-color: #f4f4f4; /* Fondo gris claro */
    color: #222;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

/* Efecto al pasar el ratón (Hover) */
.editorial-pagination .page-numbers:hover {
    background-color: #fff;
    color: var(--brand-accent, #bf0404);
    border-color: var(--brand-accent, #bf0404);
    transform: translateY(-2px);
}

/* El número de la página actual */
.editorial-pagination .page-numbers.current {
    background-color: var(--brand-accent, #bf0404);
    color: #fff;
    border-color: var(--brand-accent, #bf0404);
    pointer-events: none; /* Evita que parezca clickeable */
}

/* Estilo para los puntos suspensivos (...) */
.editorial-pagination .page-numbers.dots {
    background-color: transparent;
    border: none;
    color: #888;
    padding: 0 5px;
    min-width: auto;
}

/* Ajuste móvil */
@media (max-width: 768px) {
    .editorial-pagination .page-numbers {
        min-width: 35px;
        height: 35px;
        padding: 0 10px;
        font-size: 13px;
    }
}