/*
Theme Name:        Twenty Twenty-Four Expreso
Theme URI:         https://github.com/tu-usuario/twentytwentyfour-Expreso
Description:       Tema hijo editorial para Twenty Twenty-Four con maquetación de periódico moderno inspirada en Excélsior. Titulares en serifa, grilla de portada dinámica con bloques de categorías de 2 columnas, cintillo de última hora y experiencia de lectura optimizada.
Author:            Equipo Editorial / WordPress Expert
Author URI:        https://tudominio.com
Template:          twentytwentyfour
Version:           1.0.0
Requires at least: 6.4
Tested up to:      6.7
Requires PHP:      8.0
License:           GNU General Public License v2 or later
License URI:       http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       twentytwentyfour-Expreso
Tags:              news, editorial, newspaper, grid-layout, custom-menu, featured-images, child-theme, translation-ready
*/

/* ==========================================================================
   1. VARIABLES DE DISEÑO EDITORIAL (ESTILO PERIÓDICO EXCÉLSIOR)
   ========================================================================== */
:root {
  /* Paleta cromática periodística */
  --Expreso-primary: #b91c1c;       /* Rojo institucional de última hora / cintillos */
  --Expreso-primary-dark: #991b1b;
  --Expreso-navy: #0f172a;          /* Azul marino profundo editorial */
  --Expreso-black: #111827;         /* Tinta negra para titulares */
  --Expreso-charcoal: #374151;      /* Gris lectura para texto corrido */
  --Expreso-muted: #6b7280;         /* Metadatos y fechas */
  --Expreso-border: #e5e7eb;        /* Líneas divisorias de columna de periódico */
  --Expreso-border-dark: #1f2937;   /* Reglas gruesas de pliego editorial */
  --Expreso-bg-paper: #ffffff;      /* Fondo papel blanco puro */
  --Expreso-bg-warm: #fbfbf9;       /* Fondo marfil suave para lectura */
  --Expreso-accent-gold: #b45309;   /* Dorado para opinión / columnas */

  /* Tipografía Editorial */
  --font-editorial-serif: 'Playfair Display', 'Merriweather', 'Georgia', serif;
  --font-editorial-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-editorial-mono: 'JetBrains Mono', monospace;

  /* Geometría y espaciado */
  --newspaper-max-width: 1280px;
  --newspaper-rule: 1px solid var(--Expreso-border);
  --newspaper-rule-heavy: 2px solid var(--Expreso-navy);
  --newspaper-rule-double: 3px double var(--Expreso-black);
}

/* ==========================================================================
   2. REINICIO Y BASE EDITORIAL
   ========================================================================== */
body.editorial-theme {
  background-color: var(--Expreso-bg-warm);
  color: var(--Expreso-charcoal);
  font-family: var(--font-editorial-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.newspaper-container {
  max-width: var(--newspaper-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ==========================================================================
   3. CINTILLO SUPERIOR Y ÚLTIMA HORA (BREAKING NEWS)
   ========================================================================== */
.editorial-topbar {
  background-color: var(--Expreso-navy);
  color: #f8fafc;
  font-size: 0.8125rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.editorial-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.breaking-ticker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  white-space: nowrap;
}

.breaking-ticker__badge {
  background-color: var(--Expreso-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breaking-ticker__content {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
}
.breaking-ticker__content:hover {
  text-decoration: underline;
  color: #ffffff;
}

/* ==========================================================================
   4. CABEZAL EDITORIAL / MASTHEAD ESTILO PERIÓDICO
   ========================================================================== */
.newspaper-masthead {
  padding: 1.5rem 0 1rem 0;
  background-color: var(--Expreso-bg-paper);
  border-bottom: var(--newspaper-rule-double);
}

.newspaper-masthead__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--Expreso-muted);
  border-bottom: var(--newspaper-rule);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.newspaper-masthead__branding {
  text-align: center;
  padding: 0.5rem 0;
}

.newspaper-masthead__title {
  font-family: var(--font-editorial-serif);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--Expreso-black);
  margin: 0;
  line-height: 1;
  text-transform: uppercase;
}

.newspaper-masthead__title a {
  color: inherit;
  text-decoration: none;
}

.newspaper-masthead__slogan {
  font-family: var(--font-editorial-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--Expreso-primary);
  margin-top: 0.5rem;
}

/* Navegación editorial de secciones */
.newspaper-nav {
  border-top: var(--newspaper-rule-heavy);
  border-bottom: var(--newspaper-rule);
  background: var(--Expreso-bg-paper);
}

.newspaper-nav__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0.65rem 0;
  flex-wrap: wrap;
}

.newspaper-nav__menu a {
  color: var(--Expreso-navy);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s ease;
  position: relative;
}

.newspaper-nav__menu a:hover {
  color: var(--Expreso-primary);
}

/* ==========================================================================
   5. PORTADA: BLOQUE HERO DE PORTADA (GRAN HISTORIA PRINCIPAL)
   ========================================================================== */
.editorial-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.75rem;
  padding: 2rem 0;
  border-bottom: var(--newspaper-rule-double);
}

.hero-main-story {
  border-right: var(--newspaper-rule);
  padding-right: 1.75rem;
}

.hero-main-story__media {
  position: relative;
  overflow: hidden;
  background-color: #000;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
}

.hero-main-story__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-main-story:hover .hero-main-story__img {
  transform: scale(1.02);
}

.editorial-kicker {
  display: inline-block;
  background-color: var(--Expreso-primary);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 2px;
}

.hero-main-story__title {
  font-family: var(--font-editorial-serif);
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--Expreso-black);
  margin: 0.5rem 0 0.75rem 0;
  letter-spacing: -0.01em;
}

.hero-main-story__title a {
  color: inherit;
  text-decoration: none;
}
.hero-main-story__title a:hover {
  color: var(--Expreso-primary);
}

.hero-main-story__excerpt {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--Expreso-charcoal);
  margin-bottom: 0.75rem;
}

.editorial-byline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--Expreso-muted);
  font-weight: 500;
}

.editorial-byline strong {
  color: var(--Expreso-black);
}

/* Columna lateral de historias destacadas en Hero */
.hero-secondary-stories {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lead-side-card {
  padding-bottom: 1.25rem;
  border-bottom: var(--newspaper-rule);
}
.lead-side-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lead-side-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-bottom: 0.75rem;
  border-radius: 2px;
}

.lead-side-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-side-card__title {
  font-family: var(--font-editorial-serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--Expreso-black);
  margin: 0.35rem 0;
}
.lead-side-card__title a {
  color: inherit;
  text-decoration: none;
}
.lead-side-card__title a:hover {
  color: var(--Expreso-primary);
}

/* ==========================================================================
   6. MÓDULOS DE SECCIONES (2 ENTRADAS POR CATEGORÍA CON IMAGEN DESTACADA)
   ========================================================================== */
.editorial-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 2.5rem 0;
}

.category-module {
  background: var(--Expreso-bg-paper);
  border: var(--newspaper-rule);
  padding: 1.25rem;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.category-module__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--Expreso-black);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.category-module__title {
  font-family: var(--font-editorial-sans);
  font-size: 1.125rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--Expreso-black);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-module__title::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: var(--Expreso-primary);
}

.category-module__link {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--Expreso-primary);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.category-module__link:hover {
  text-decoration: underline;
}

/* Grilla interna de 2 publicaciones */
.category-module__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.editorial-card {
  display: flex;
  flex-direction: column;
}

.editorial-card__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #f1f5f9;
  border-radius: 2px;
  margin-bottom: 0.75rem;
}

.editorial-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.editorial-card:hover .editorial-card__img {
  transform: scale(1.04);
}

.editorial-card__title {
  font-family: var(--font-editorial-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--Expreso-black);
  margin: 0 0 0.5rem 0;
}

.editorial-card__title a {
  color: inherit;
  text-decoration: none;
}
.editorial-card__title a:hover {
  color: var(--Expreso-primary);
}

.editorial-card__excerpt {
  font-size: 0.8125rem;
  color: var(--Expreso-muted);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.editorial-card__time {
  font-size: 0.725rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ==========================================================================
   7. SINGLE.PHP: PLANTILLA LIMPIA DE ARTÍCULO Y LECTURA EDITORIAL
   ========================================================================== */
.single-editorial-layout {
  display: grid;
  grid-template-columns: 2.75fr 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem 0;
}

.editorial-article {
  background: var(--Expreso-bg-paper);
  padding: 2rem 2.5rem;
  border: var(--newspaper-rule);
  border-radius: 2px;
}

/* Cinta de progreso de lectura */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--Expreso-primary);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Miga de pan / Breadcrumb */
.editorial-breadcrumbs {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--Expreso-muted);
  margin-bottom: 1rem;
}

.editorial-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}
.editorial-breadcrumbs a:hover {
  color: var(--Expreso-primary);
}

.editorial-article__headline {
  font-family: var(--font-editorial-serif);
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--Expreso-black);
  margin: 0.5rem 0 1rem 0;
  letter-spacing: -0.01em;
}

.editorial-article__lead {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--Expreso-charcoal);
  font-weight: 400;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--Expreso-primary);
  padding-left: 1rem;
  font-style: italic;
}

.editorial-meta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: var(--newspaper-rule);
  border-bottom: var(--newspaper-rule);
  padding: 0.75rem 0;
  margin-bottom: 2rem;
  font-size: 0.8125rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.editorial-share-tools {
  display: flex;
  gap: 0.5rem;
}

.share-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  color: var(--Expreso-navy);
  transition: all 0.15s ease;
}
.share-btn:hover {
  background: var(--Expreso-primary);
  color: #fff;
  border-color: var(--Expreso-primary);
}

/* Imagen destacada de artículo */
.single-featured-media {
  margin-bottom: 2rem;
}

.single-featured-media__img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 2px;
}

.single-featured-media__caption {
  font-size: 0.78125rem;
  color: var(--Expreso-muted);
  padding-top: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.5rem;
  font-style: italic;
}

/* Cuerpo de la noticia con estilo de periódico */
.editorial-content {
  font-family: 'Merriweather', 'Georgia', serif;
  font-size: 1.125rem;
  line-height: 1.85;
  color: #1f2937;
}

.editorial-content p {
  margin-bottom: 1.5rem;
}

/* Letra capital clásica (Drop Cap) estilo periódico */
.editorial-content > p:first-of-type::first-letter {
  font-family: var(--font-editorial-serif);
  float: left;
  font-size: 4.25rem;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 12px;
  padding-bottom: 4px;
  color: var(--Expreso-navy);
  font-weight: 900;
}

.editorial-content blockquote {
  font-family: var(--font-editorial-serif);
  font-size: 1.45rem;
  line-height: 1.4;
  font-weight: 700;
  font-style: italic;
  color: var(--Expreso-navy);
  border-top: 2px solid var(--Expreso-primary);
  border-bottom: 2px solid var(--Expreso-primary);
  padding: 1.25rem 1rem;
  margin: 2.25rem 0;
  text-align: center;
}

/* ==========================================================================
   8. BARRA LATERAL EDITORIAL (SIDEBAR CON ÚLTIMAS NOTICIAS)
   ========================================================================== */
.editorial-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--Expreso-bg-paper);
  border: var(--newspaper-rule);
  padding: 1.25rem;
  border-radius: 2px;
}

.sidebar-widget__title {
  font-family: var(--font-editorial-sans);
  font-size: 0.875rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--Expreso-black);
  border-bottom: 2px solid var(--Expreso-primary);
  padding-bottom: 0.5rem;
  margin: 0 0 1rem 0;
}

.trending-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trending-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: var(--newspaper-rule);
}
.trending-item:last-child {
  border-bottom: none;
}

.trending-item__rank {
  font-family: var(--font-editorial-serif);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--Expreso-primary);
  line-height: 1;
}

.trending-item__title {
  font-family: var(--font-editorial-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.trending-item__title a {
  color: var(--Expreso-navy);
  text-decoration: none;
}
.trending-item__title a:hover {
  color: var(--Expreso-primary);
}

/* ==========================================================================
   9. RESPONSIVE Y MEDIA QUERIES (MÓVILES Y TABLETAS)
   ========================================================================== */
@media (max-width: 1024px) {
  .editorial-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero-main-story {
    border-right: none;
    padding-right: 0;
    border-bottom: var(--newspaper-rule);
    padding-bottom: 1.5rem;
  }
  .single-editorial-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .editorial-sections-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .newspaper-masthead__meta {
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
  }
  .newspaper-nav__menu {
    gap: 0.75rem;
    font-size: 0.75rem;
  }
  .editorial-article {
    padding: 1.25rem 1rem;
  }
}

@media (max-width: 480px) {
  .category-module__cards {
    grid-template-columns: 1fr;
  }
}
