/*
Theme Name: PeriodicoWP
Theme URI: https://msantana.net
Description: Tema WordPress profesional para periódicos y medios digitales. Incluye ticker de última hora, slider de destacados, secciones por categoría, presets de color, widgets de opinión y soporte completo para móviles.
Author: Marlon Santana
Author URI: https://msantana.net
Version: 3.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: periodicowp
Tags: news, newspaper, magazine, responsive, custom-colors, custom-menu, featured-images, widgets, translation-ready, right-sidebar, two-columns, three-columns, four-columns, grid-layout
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================================ */
:root {
  --primary-color: #c0392b;
  --secondary-color: #2c3e50;
  --accent-color: #e67e22;
  /* Versión oscurecida del accent para texto/fondo con blanco encima —
     el accent original es demasiado claro para pasar contraste WCAG AA
     como color de texto o como fondo de botón con texto blanco. */
  --accent-strong: #b35900;
  --text-color: #333333;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --text-muted: #888888;
  --bg-color: #f5f5f5;
  --bg-white: #ffffff;
  --bg-dark: #1a1a2e;
  --header-bg: #ffffff;
  --topbar-bg: #2c3e50;
  --footer-bg: #1a1a2e;
  --footer-text: rgba(255,255,255,0.7);
  --border-color: #e0e0e0;
  --border-dark: #cccccc;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --border-radius: 4px;
  --border-radius-lg: 8px;
  --radius-xs: 2px;
  /* 9999px se recorta automáticamente a la mitad del alto real del
     elemento — sirve como radio "píldora" universal sin calcular
     manualmente la mitad de cada altura fija (18px, 22px, etc). */
  --radius-pill: 9999px;
  /* Anillo de foco reutilizable (inputs, botones) */
  --focus-ring: 0 0 0 3px rgba(192, 57, 43, 0.15);
  --font-primary: 'Georgia', 'Times New Roman', serif;
  --font-secondary: 'Arial', 'Helvetica Neue', sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-xs: 12px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 30px;
  --font-size-4xl: 36px;
  --line-height-base: 1.6;
  --line-height-heading: 1.3;
  --container-width: 1200px;
  --container-padding: 15px;
  --header-height: 80px;
  --topbar-height: 36px;
}

/* ============================================================
   RESET & NORMALIZE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: var(--font-secondary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section, summary {
  display: block;
}

audio, canvas, progress, video {
  display: inline-block;
  vertical-align: baseline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

/* Foco visible global para navegación por teclado (WCAG 2.4.7).
   Se aplica a todo elemento interactivo que no defina su propio
   indicador de foco más específico (inputs de formulario ya tienen
   el suyo con box-shadow, ver .comment-form input:focus). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover, a:focus {
  color: var(--accent-strong);
  text-decoration: none;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: var(--line-height-heading);
  color: var(--secondary-color);
  margin-bottom: 0.5em;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: 1em;
  line-height: var(--line-height-base);
}

blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 15px 20px;
  margin: 20px 0;
  background: var(--bg-white);
  font-style: italic;
  font-size: var(--font-size-lg);
  color: var(--text-muted);
}

blockquote cite {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: 8px;
  font-style: normal;
}

code, pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875em;
}

pre {
  background: var(--bg-white);
  color: var(--text-dark);
  padding: 20px;
  overflow-x: auto;
  border-radius: var(--border-radius);
  margin-bottom: 1em;
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}

th, td {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  text-align: left;
}

th {
  background: var(--secondary-color);
  color: #fff;
  font-weight: 700;
}

tr:nth-child(even) td {
  background: var(--bg-white);
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 20px 0;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Skip-link: visible solo al recibir foco de teclado */
.skip-link.screen-reader-text:focus {
  clip: auto !important;
  position: fixed !important;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 20px;
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--border-radius);
  z-index: 100000;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

/* ============================================================
   LAYOUT & CONTAINER SYSTEM
   ============================================================ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.container-fluid {
  width: 100%;
  padding: 0 var(--container-padding);
}

/* 12-Column Grid */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col {
  flex: 1;
  padding: 0 15px;
}

.col-1  { flex: 0 0 8.333333%; max-width: 8.333333%; padding: 0 15px; }
.col-2  { flex: 0 0 16.666667%; max-width: 16.666667%; padding: 0 15px; }
.col-3  { flex: 0 0 25%; max-width: 25%; padding: 0 15px; }
.col-4  { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0 15px; }
.col-5  { flex: 0 0 41.666667%; max-width: 41.666667%; padding: 0 15px; }
.col-6  { flex: 0 0 50%; max-width: 50%; padding: 0 15px; }
.col-7  { flex: 0 0 58.333333%; max-width: 58.333333%; padding: 0 15px; }
.col-8  { flex: 0 0 66.666667%; max-width: 66.666667%; padding: 0 15px; }
.col-9  { flex: 0 0 75%; max-width: 75%; padding: 0 15px; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; padding: 0 15px; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; padding: 0 15px; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 15px; }

/* Content + Sidebar Layouts */
.main-content-area {
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
  padding: 0 15px;
}

.sidebar-area {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  padding: 0 15px;
}

.content-full {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 15px;
}

/* Page Wrapper */
#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#content {
  flex: 1;
  padding: 30px 0;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.text-uppercase { text-transform: uppercase; }
.font-bold   { font-weight: 700; }
.d-flex      { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap   { flex-wrap: wrap; }
.w-100       { width: 100%; }
.mt-0  { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-0  { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.hidden { display: none; }
.visible { display: block; }

/* ============================================================
   TOP BAR
   ============================================================ */
#topbar {
  background-color: var(--topbar-bg);
  color: #fff;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  font-size: var(--font-size-xs);
  position: relative;
  z-index: 90;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 15px;
  width: 100%;
  padding: 4px 0;
}

.topbar-date {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-xs);
}

.topbar-date span {
  text-transform: capitalize;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.topbar-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-social a {
  color: #fff;
  font-size: 13px;
  transition: var(--transition);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topbar-social a svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.topbar-social a:hover {
  opacity: 1;
  filter: brightness(1.15);
}

/* Botón de donación PayPal */
.topbar-donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: #FFC439;
  color: #003087;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  letter-spacing: 0.3px;
}
.topbar-donate-btn:hover {
  background: #f0b429;
  color: #003087;
  text-decoration: none;
}
.topbar-donate-btn svg {
  fill: #003087;
  flex-shrink: 0;
}

/* Brand colors por red social */
.topbar-social a.social-facebook  { background: #1877F2; color: #fff; }
.topbar-social a.social-twitter   { background: #14171a; color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.topbar-social a.social-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #fff; }
.topbar-social a.social-youtube   { background: #FF0000; color: #fff; }
.topbar-social a.social-telegram  { background: #2CA5E0; color: #fff; }
.topbar-social a.social-whatsapp  { background: #25D366; color: #fff; }
.topbar-social a.social-tiktok    { background: #010101; color: #fff; }
.topbar-social a.social-linkedin  { background: #0A66C2; color: #fff; }

.topbar-search-toggle {
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0 5px;
  font-size: 14px;
  background: none;
  border: none;
  transition: var(--transition);
}

.topbar-search-toggle:hover {
  color: #fff;
}

/* ============================================================
   HEADER
   ============================================================ */
#masthead {
  background-color: var(--header-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 99;
  transition: var(--transition);
}

#masthead.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 20px;
  padding: 10px 0;
}

/* Logo centrado */
.header-layout--logo-center {
  justify-content: center;
}
.header-layout--logo-center .site-branding {
  flex: 0 0 auto;
}

/* Logo derecha */
.header-layout--logo-right {
  flex-direction: row-reverse;
}

/* Logo */
.site-branding {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 80px;
  width: auto;
  max-width: 400px;
  object-fit: contain;
}

/* Favicon como logo — cuando no hay logo personalizado */
.site-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-icon-logo {
  display: flex;
  flex-shrink: 0;
}

.site-icon-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
}

/* Fallback inicial cuando no hay favicon configurado */
.site-icon-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--primary-color);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  font-family: var(--font-primary);
  line-height: 1;
  flex-shrink: 0;
}

.site-title {
  font-family: var(--font-primary);
  font-size: var(--font-size-2xl);
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 0;
}

.site-title a {
  color: inherit;
}

.site-title a:hover {
  color: var(--primary-color);
}

.site-title span {
  color: var(--primary-color);
}

.site-description {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Header Ad Banner */
.header-ad-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 728px;
}

.header-ad-area img,
.header-ad-area .ad-banner {
  max-width: 100%;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#site-navigation {
  background-color: var(--primary-color);
  position: relative;
  /* Debe quedar por encima de .mobile-menu-overlay (z-index:199) — si no,
     el z-index:200 de .primary-menu-wrapper queda "atrapado" dentro del
     contexto de apilamiento de #site-navigation (que competía con el
     overlay usando su propio z-index:98) y el overlay termina recibiendo
     los toques en vez de los enlaces del menú. */
  z-index: 201;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Primary Menu */
.primary-menu {
  display: flex;
  align-items: center;
}

.primary-menu > li {
  position: relative;
}

.primary-menu > li > a {
  display: block;
  padding: 14px 16px;
  color: #ffffff;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.primary-menu > li:first-child > a {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-ancestor > a {
  background-color: rgba(0, 0, 0, 0.2);
  color: #fff;
}

/* Category colored nav items */
.primary-menu > li.cat-politics > a { background-color: rgba(52, 73, 94, 0.5); }
.primary-menu > li.cat-economy > a  { background-color: rgba(39, 174, 96, 0.3); }
.primary-menu > li.cat-sports > a   { background-color: rgba(41, 128, 185, 0.3); }

/* Dropdown */
.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--secondary-color);
  min-width: 220px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.primary-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu li a {
  display: block;
  padding: 10px 16px;
  color: #ddd;
  font-size: var(--font-size-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.primary-menu .sub-menu li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding-left: 22px;
}

.primary-menu .sub-menu .sub-menu {
  top: 0;
  left: 100%;
}

/* Nav Arrow Indicator */
.primary-menu > li.menu-item-has-children > a::after {
  content: ' ▾';
  font-size: 10px;
  opacity: 0.7;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 10px;
  background: none;
  border: none;
  border-radius: var(--border-radius);
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: var(--transition);
  border-radius: var(--radius-xs);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Secondary/Top Nav */
.secondary-menu {
  display: flex;
  gap: 0;
}

.secondary-menu li a {
  display: block;
  padding: 14px 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-transform: uppercase;
  transition: var(--transition);
}

.secondary-menu li a:hover {
  color: #fff;
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
/* ============================================================
   SEARCH FORM (widget / sidebar / footer)
   ============================================================ */
.search-form-row {
  display: flex;
  gap: 0;
}

.search-field {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border: 2px solid var(--border-color);
  border-right: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-size: var(--font-size-sm);
  font-family: inherit;
  background: var(--bg-white);
  color: var(--text-color);
  transition: var(--transition);
}

.search-field:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: var(--focus-ring);
}

.search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 11px 18px;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  cursor: pointer;
  font-size: var(--font-size-base);
  transition: var(--transition);
}

.search-submit:hover {
  background: var(--secondary-color);
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-inner {
  width: 100%;
  max-width: 700px;
  padding: 0 30px;
}

.search-overlay-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  opacity: 0.7;
  transition: var(--transition);
}

.search-overlay-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

.search-overlay form {
  display: flex;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 15px;
}

.search-overlay input[type="search"] {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  font-family: var(--font-primary);
  placeholder-color: rgba(255, 255, 255, 0.4);
}

.search-overlay input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 28px;
}

.search-overlay button[type="submit"] {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0 10px;
  opacity: 0.7;
}

.search-overlay button[type="submit"]:hover {
  opacity: 1;
}

/* ============================================================
   BREAKING NEWS TICKER
   ============================================================ */
#breaking-news {
  background-color: var(--secondary-color);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0;
  overflow: hidden;
  position: relative;
  z-index: 97;
}

.breaking-news-inner {
  display: flex;
  align-items: stretch;
  height: 40px;
}

.breaking-news-label {
  background-color: var(--primary-color);
  color: #fff;
  padding: 0 18px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.breaking-news-label::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  border-left: 10px solid var(--primary-color);
}

.breaking-news-label .blink-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.breaking-news-ticker {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 20px;
}

.ticker-wrapper {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-wrapper:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  padding-right: 60px;
}

.ticker-item a {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: var(--transition);
}

.ticker-item a:hover {
  color: #fff;
}

.ticker-item::after {
  content: '•';
  color: var(--primary-color);
  margin-left: 30px;
  font-size: 20px;
  line-height: 1;
}

.ticker-item:last-child::after {
  display: none;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.breaking-news-controls {
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 5px;
}

.ticker-btn {
  background: none;
  border: 1px solid var(--border-color);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-light);
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.ticker-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* ============================================================
   FEATURED POSTS SLIDER  (BEM: .featured-slider__*)
   ============================================================ */
.featured-slider {
  position: relative;
  overflow: hidden;
  background: var(--secondary-color, #2c3e50);
  margin-bottom: 30px;
  border-radius: 4px;
}

.featured-slider__track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.featured-slider__slide {
  flex: 0 0 100%;
  position: relative;
  height: 500px;
  overflow: hidden;
}

/* Background image */
.featured-slider__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transition: transform 0.6s ease;
}

.featured-slider__slide.is-active .featured-slider__bg {
  transform: scale(1.02);
}

.featured-slider__bg--placeholder {
  background-color: var(--secondary-color, #2c3e50);
}

/* Gradient overlay */
.featured-slider__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.45) 55%,
    transparent 100%
  );
  z-index: 1;
}

/* Slide content */
.featured-slider__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 40px 32px;
  z-index: 2;
}

.featured-slider__category {
  margin-bottom: 12px;
}

.featured-slider__title {
  font-size: clamp(22px, 3vw, 32px);
  font-family: var(--font-primary, Georgia, serif);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 10px;
  color: #fff;
}

.featured-slider__title-link {
  color: #fff;
  text-decoration: none;
}

.featured-slider__title-link:hover {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

.featured-slider__excerpt {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
  margin: 0 0 12px;
  max-width: 680px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-slider__meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Navigation arrows */
.featured-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(4px);
}

.featured-slider__arrow:hover {
  background: var(--primary-color, #c0392b);
  border-color: var(--primary-color, #c0392b);
}

.featured-slider__arrow--prev { left: 16px; }
.featured-slider__arrow--next { right: 16px; }

/* Dot navigation */
.featured-slider__dots {
  position: absolute;
  bottom: 18px;
  right: 40px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.featured-slider__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.featured-slider__dot.is-active {
  background: #fff;
  transform: scale(1.35);
}

/* Control de pausa del autoplay — WCAG 2.2.2 */
.featured-slider__pause {
  position: absolute;
  bottom: 14px;
  left: 16px;
  z-index: 10;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.featured-slider__pause:hover {
  background: rgba(0, 0, 0, 0.65);
}

/* Región viva oculta que anuncia el cambio de slide a lectores de pantalla */
.featured-slider__live {
  position: absolute;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary-color);
  position: relative;
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: 900;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--primary-color);
  border-radius: var(--radius-xs);
}

.section-more {
  font-size: var(--font-size-xs);
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border: 1px solid var(--primary-color);
  padding: 4px 10px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.section-more:hover {
  background: var(--primary-color);
  color: #fff;
}

/* ============================================================
   POST CARDS
   ============================================================ */

/* --- Vertical Card (default) --- */
.post-card {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  margin-bottom: 25px;
}

.post-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.post-card-image {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

/* La etiqueta va como hermana de .post-card-image (nunca anidada dentro
   de su <a> — un <a> no puede contener otro <a>, es HTML inválido y
   algunos navegadores lo renderizan mal). Se posiciona igual, sobre
   la esquina superior izquierda de la imagen. */
.post-card > .category-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.post-card-body {
  padding: 16px;
}

.post-card-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--secondary-color);
}

.post-card-title a {
  color: inherit;
  transition: var(--transition);
}

.post-card-title a:hover {
  color: var(--primary-color);
}

.post-card-excerpt {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.post-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-card-meta a {
  color: inherit;
}

.post-card-meta a:hover {
  color: var(--primary-color);
}

/* --- Horizontal Card --- */
.post-card-horizontal {
  display: flex;
  background: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  margin-bottom: 20px;
}

.post-card-horizontal:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.post-card-horizontal .post-card-image {
  flex: 0 0 140px;
  width: 140px;
  height: 110px;
  aspect-ratio: unset;
}

.post-card-horizontal .post-card-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post-card-horizontal .post-card-title {
  font-size: var(--font-size-sm);
  margin-bottom: 5px;
}

/* --- Large Feature Card --- */
.post-card-large {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  margin-bottom: 25px;
}

.post-card-large:hover {
  box-shadow: var(--card-shadow-hover);
}

.post-card-large .post-card-image {
  aspect-ratio: 16 / 10;
}

.post-card-large .post-card-body {
  padding: 20px;
}

.post-card-large .post-card-title {
  font-size: var(--font-size-xl);
  line-height: 1.3;
  margin-bottom: 10px;
}

.post-card-large .post-card-excerpt {
  -webkit-line-clamp: 3;
  font-size: var(--font-size-base);
  line-height: 1.6;
}

/* --- Overlay Card (hero / destacado con imagen de fondo) ---
   Usado por el card destacado principal (front-page.php). El título
   SIEMPRE es blanco sobre el degradado, independientemente del preset
   de color activo — por eso lleva !important. */
.post-card-overlay {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  margin-bottom: 25px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  background: #111;
}

.post-card-overlay:hover {
  box-shadow: var(--card-shadow-hover);
}

.post-card-overlay .post-card-image {
  position: relative;
  flex: 1;
  aspect-ratio: unset;
}

.post-card-overlay .post-card-image img {
  min-height: 300px;
  transition: transform 0.35s;
}

.post-card-overlay:hover .post-card-image img {
  transform: scale(1.04);
}

.post-card-overlay .post-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(0, 0, 0, 0.85) 100%);
}

.post-card-overlay .category-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}

.post-card-overlay .post-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 2;
}

.post-card-overlay .post-card-title {
  color: #fff !important;
  font-size: var(--font-size-lg);
  line-height: 1.35;
  margin-bottom: 8px;
}

.post-card-overlay .post-card-title a {
  color: #fff !important;
  text-decoration: none !important;
}

.post-card-overlay .post-card-title a:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

.post-card-overlay .post-card-excerpt {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--font-size-sm);
  margin-bottom: 10px;
}

.post-card-overlay .post-card-meta {
  color: rgba(255, 255, 255, 0.75);
}

.post-card-overlay .post-card-meta a {
  color: rgba(255, 255, 255, 0.85);
}

/* ============================================================
   CATEGORY LABELS
   ============================================================ */
.category-label {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
  transition: var(--transition);
}

.category-label:hover {
  color: #fff;
  opacity: 0.85;
}

/* Colores oscurecidos respecto al original para pasar contraste WCAG AA
   (4.5:1) con el texto blanco de la etiqueta — el hue se conserva. */
.category-label.cat-política    { background: #8e44ad; }
.category-label.cat-economía    { background: #1e8449; }
.category-label.cat-deportes    { background: #1f6690; }
.category-label.cat-cultura     { background: #b35900; }
.category-label.cat-tecnología  { background: #0e6655; }
.category-label.cat-salud       { background: #a93226; }
.category-label.cat-mundo       { background: #2c3e50; }
.category-label.cat-opinión     { background: #546e7a; }
.category-label.cat-sociedad    { background: #a84300; }
.category-label.cat-entretenimiento { background: #8e44ad; }

/* ============================================================
   SINGLE POST / ARTICLE
   ============================================================ */
.single-post-wrapper {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.post-header {
  padding: 30px 30px 0;
}

.post-kicker {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.post-title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.post-subtitle {
  font-size: var(--font-size-xl);
  color: var(--text-light);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.post-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: 5px;
}

.post-meta-bar a {
  color: var(--text-muted);
}

.post-meta-bar a:hover {
  color: var(--primary-color);
}

.post-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.post-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author-info strong {
  color: var(--text-color);
  font-weight: 600;
}

.post-reading-time {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

.post-source {
  font-style: italic;
  font-size: var(--font-size-xs);
}

.post-featured-image {
  margin: 20px 0;
  padding: 0 30px;
}

.post-featured-image img {
  width: 100%;
  border-radius: var(--border-radius);
}

.post-image-caption {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
  font-style: italic;
}

.post-content {
  padding: 20px 30px 30px;
}

.post-content p {
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 1.5em;
}

.post-content h2 {
  font-size: var(--font-size-2xl);
  margin: 1.5em 0 0.7em;
  color: var(--secondary-color);
}

.post-content h3 {
  font-size: var(--font-size-xl);
  margin: 1.3em 0 0.6em;
}

.post-content h1 {
  font-size: var(--font-size-3xl);
  margin: 1.5em 0 0.7em;
  color: var(--secondary-color);
}

.post-content h4 {
  font-size: var(--font-size-lg);
  margin: 1.2em 0 0.5em;
}

.post-content h5,
.post-content h6 {
  font-size: var(--font-size-base);
  margin: 1.2em 0 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-content blockquote {
  margin: 1.5em 0;
  padding: 15px 25px;
  border-left: 4px solid var(--primary-color);
  background: var(--bg-color);
  font-style: italic;
  font-size: var(--font-size-lg);
  color: var(--text-light);
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content ul, .post-content ol {
  margin: 0 0 1.5em 25px;
}

.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }

.post-content li {
  margin-bottom: 0.5em;
  font-size: var(--font-size-lg);
  line-height: 1.7;
}

.post-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-color: rgba(192, 57, 43, 0.3);
}

.post-content a:hover {
  text-decoration-color: var(--primary-color);
}

/* Post Tags */
.post-tags {
  padding: 15px 30px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.post-tags-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 5px;
}

.tag-link {
  display: inline-block;
  background: var(--bg-white);
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.tag-link:hover {
  background: var(--primary-color);
  color: #fff;
}

/* ============================================================
   SOCIAL SHARE BUTTONS
   ============================================================ */
.social-share {
  padding: 22px 30px;
  margin: 0 0 4px;
  border-top: 3px solid var(--primary-color);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.social-share-label {
  font-size: var(--font-size-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dark);
  margin-right: 4px;
  white-space: nowrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.share-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0,0,0,0.28);
}

.share-btn.facebook  { background: #1877f2; border-color: #1877f2; }
.share-btn.twitter   { background: #14171a; border-color: #536471; }
.share-btn.whatsapp  { background: #25d366; border-color: #25d366; }
.share-btn.telegram  { background: #0088cc; border-color: #0088cc; }
.share-btn.linkedin  { background: #0a66c2; border-color: #0a66c2; }
.share-btn.copy-link { background: transparent; border-color: var(--border-color); color: var(--text-dark); box-shadow: none; }

.share-btn.copy-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.share-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Anular herencia de .post-content a */
.post-content .share-btn,
.social-share .share-btn {
  text-decoration: none !important;
  color: #fff;
}
.post-content .share-btn.copy-link,
.social-share .share-btn.copy-link {
  color: var(--text-dark);
}
.post-content .share-btn:hover,
.social-share .share-btn:hover {
  text-decoration: none !important;
  color: #fff;
}
.post-content .share-btn.copy-link:hover,
.social-share .share-btn.copy-link:hover {
  color: #fff;
}

/* ============================================================
   AUTHOR BOX
   ============================================================ */
.author-box {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 25px;
  margin: 25px 30px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.author-box-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.author-box-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-box-info h4 {
  font-size: var(--font-size-base);
  margin-bottom: 4px;
}

.author-box-specialty {
  font-size: var(--font-size-xs);
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.author-box-bio {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 10px;
}

.author-social-links {
  display: flex;
  gap: 8px;
}

.author-social-links a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-color);
  color: #fff;
  font-size: 12px;
  transition: var(--transition);
}

.author-social-links a:hover {
  background: var(--primary-color);
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts {
  padding: 25px 30px;
  border-top: 1px solid var(--border-color);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
  padding: 25px 30px;
  border-top: 1px solid var(--border-color);
}

.comments-title {
  font-size: var(--font-size-xl);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

.comment-list {
  margin-bottom: 30px;
}

.comment {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.comment-author-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.comment-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.comment-author-name {
  font-weight: 700;
  font-size: var(--font-size-sm);
  color: var(--secondary-color);
}

.comment-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.comment-content p {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 0;
}

.comment-reply-link {
  font-size: var(--font-size-xs);
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 8px;
  display: inline-block;
}

.comment-form-wrapper h3 {
  font-size: var(--font-size-xl);
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.comment-form .form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.comment-form .form-group {
  flex: 1;
  margin-bottom: 15px;
}

.comment-form label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  color: var(--text-color);
  transition: var(--transition);
  background: #fff;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: var(--focus-ring);
}

.comment-form textarea {
  height: 130px;
  resize: vertical;
}

.btn-submit {
  background: var(--primary-color);
  color: #fff;
  padding: 12px 30px;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background: var(--secondary-color);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget-area {
  position: relative;
}

.widget {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 25px;
  overflow: hidden;
}

.widget-title {
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--secondary-color);
  padding: 12px 18px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--primary-color);
  border-radius: var(--radius-xs);
}

.widget-body {
  padding: 16px;
}

/* Recent News Widget */
.widget-news-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  align-items: flex-start;
}

.widget-news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget-news-thumb {
  flex: 0 0 80px;
  width: 80px;
  height: 65px;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.widget-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-news-info {
  flex: 1;
  min-width: 0;
}

.widget-news-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 5px;
  color: var(--secondary-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.widget-news-title a {
  color: inherit;
}

.widget-news-title a:hover {
  color: var(--primary-color);
}

.widget-news-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

/* Popular Posts Widget */
.popular-post-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.popular-post-item:last-child {
  border-bottom: none;
}

.popular-post-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--border-color);
  line-height: 1;
  min-width: 30px;
  text-align: center;
}

/* ============================================================
   WIDGET OPINIONES (sidebar)
   ============================================================ */
.opiniones-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.opiniones-list__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.opiniones-list__item:last-child {
  border-bottom: none;
}

.opiniones-list__avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--primary-color);
}

.opiniones-list__body {
  flex: 1;
  min-width: 0;
}

.opiniones-list__author {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  margin-bottom: 3px;
  text-decoration: none;
}

.opiniones-list__author:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

.opiniones-list__title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.opiniones-list__title a {
  color: var(--text-dark);
}

.opiniones-list__title a:hover {
  color: var(--primary-color);
}

.widget-opiniones__more {
  display: block;
  margin-top: 14px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--primary-color);
  text-align: right;
}

.widget-opiniones__more:hover {
  color: var(--secondary-color);
}

.popular-post-item:nth-child(1) .popular-post-number { color: #c0392b; }
.popular-post-item:nth-child(2) .popular-post-number { color: #e67e22; }
.popular-post-item:nth-child(3) .popular-post-number { color: #f39c12; }

.popular-post-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.4;
  color: var(--secondary-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.popular-post-title a { color: inherit; }
.popular-post-title a:hover { color: var(--primary-color); }

.popular-post-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* Social Follow Widget */
.social-follow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.social-follow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 14px 10px;
  border-radius: var(--border-radius);
  color: #fff;
  text-align: center;
  transition: var(--transition);
}

.social-follow-btn:hover {
  color: #fff;
  opacity: 0.85;
  transform: translateY(-2px);
}

.social-follow-btn .social-count {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 2px;
}

.social-follow-btn .social-name {
  font-size: 11px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.social-follow-btn.fb        { background: #1877f2; }
.social-follow-btn.tw        { background: #000000; }
.social-follow-btn.ig        { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-follow-btn.yt        { background: #ff0000; }
.social-follow-btn.tiktok    { background: #000000; }
.social-follow-btn.wsp       { background: #25d366; }
.social-follow-btn.telegram  { background: #0088cc; }

/* Advertisement Widget */
.widget-ad-wrapper {
  text-align: center;
}

.widget-ad-wrapper img {
  max-width: 100%;
  border-radius: var(--border-radius);
}

.widget-ad-placeholder {
  background: var(--bg-white);
  border: 2px dashed var(--border-color);
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  border-radius: var(--border-radius);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

/* Category Widget */
.widget ul.category-list {
  list-style: none;
}

.widget ul.category-list li {
  border-bottom: 1px solid var(--border-color);
}

.widget ul.category-list li:last-child {
  border-bottom: none;
}

.widget ul.category-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: var(--text-color);
  font-size: var(--font-size-sm);
  transition: var(--transition);
}

.widget ul.category-list li a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.widget ul.category-list .count {
  background: var(--bg-color);
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

/* Tag Cloud Widget */
.widget .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 0;
}

.widget .tagcloud a {
  display: inline-block;
  background: var(--bg-white);
  color: var(--text-muted);
  font-size: 12px !important;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.widget .tagcloud a:hover {
  background: var(--primary-color);
  color: #fff;
}

/* ============================================================
   AD BANNER PLACEHOLDERS
   ============================================================ */
.ad-banner {
  display: block;
  width: 100%;
  text-align: center;
  margin: 20px 0;
}

.ad-banner-728 {
  max-width: 728px;
  min-height: 90px;
  margin: 0 auto 20px;
}

.ad-banner-300 {
  max-width: 300px;
  min-height: 250px;
  margin: 0 auto 20px;
}

.ad-banner-placeholder {
  background: var(--bg-white);
  border: 2px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  width: 100%;
  min-height: 90px;
  border-radius: var(--border-radius);
}

/* In-content ad */
.in-content-ad {
  margin: 30px -30px;
  padding: 25px 30px;
  background: var(--bg-white);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs-wrapper {
  padding: 10px 0;
  margin-bottom: 15px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
  transition: var(--transition);
}

.breadcrumbs a:hover {
  color: var(--primary-color);
}

.breadcrumbs .separator {
  color: var(--border-dark);
  margin: 0 2px;
}

.breadcrumbs .current {
  color: var(--text-color);
  font-weight: 600;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  color: var(--text-color);
  transition: var(--transition);
  font-weight: 500;
}

.pagination a:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.pagination .current {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  font-weight: 700;
}

.pagination .dots {
  border: none;
  width: auto;
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

/* ============================================================
   FOOTER
   ============================================================ */
#colophon {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  margin-top: auto;
}

.footer-widgets-area {
  padding: 50px 0 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-widgets-grid {
  --footer-cols: 4;
  display: grid !important;
  grid-template-columns: repeat(var(--footer-cols), 1fr) !important;
  gap: 35px;
  align-items: start;
}

/* Reset widget box styles inside footer */
.footer-widget-col .widget {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  margin-bottom: 0;
}

.footer-widget-col .widget-body {
  padding: 0;
}

.footer-widget-col .widget-title {
  background: transparent;
  color: #fff;
  padding: 0 0 12px;
  font-size: var(--font-size-base);
  border-bottom: 2px solid var(--primary-color);
  margin-bottom: 18px;
}

.footer-widget-col .widget-title::before {
  display: none;
}

.footer-widget-col p {
  color: var(--footer-text);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

.footer-widget-col ul li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.footer-widget-col ul li:last-child {
  border-bottom: none;
}

.footer-widget-col ul li a {
  color: var(--footer-text);
  font-size: var(--font-size-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.footer-widget-col ul li a::before {
  content: '›';
  color: var(--primary-color);
  font-size: 16px;
}

.footer-widget-col ul li a:hover {
  color: #fff;
  padding-left: 5px;
}

/* Category count badge — usado en footer y sidebar */
.cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--primary-color);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
}

.footer-widget-col .cat-count {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-area .cat-count,
#secondary .cat-count {
  background: var(--primary-color);
  color: #fff;
}

/* Ocultar fecha en widget de últimas noticias del footer */
.footer-widget-col .widget_recent_entries .post-date {
  display: none;
}

/* Footer Logo */
.footer-logo {
  margin-bottom: 15px;
}

.footer-logo img {
  max-height: 50px;
  filter: brightness(0) invert(1);
}

.footer-about-text {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-bottom: 15px;
}

/* Footer Social Icons */
.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0.85;
}

.footer-social a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer-social a:hover {
  opacity: 1;
  background: var(--accent-strong);
  color: #fff;
  transform: translateY(-2px);
}

/* Footer Bottom Bar */
.footer-bottom-bar {
  background-color: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-copyright {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.5);
}

.footer-copyright a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-copyright a:hover {
  color: #fff;
}

/* Crédito del tema — enlace a msantana.net, contraste AA sobre fondo oscuro */
.footer-powered {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  width: 100%;
  text-align: center;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-powered a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.footer-powered a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom-menu {
  display: flex;
  gap: 0;
}

.footer-bottom-menu li a {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.5);
  padding: 0 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.footer-bottom-menu li:last-child a {
  border-right: none;
  padding-right: 0;
}

.footer-bottom-menu li a:hover {
  color: #fff;
}

/* ============================================================
   LAZY LOADING IMAGES
   ============================================================ */
img.lazy {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img.lazy.loaded {
  opacity: 1;
}

img.lazy-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================================
   ICONS / SVG
   ============================================================ */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

/* Font Awesome fallback classes */
.fa-facebook::before    { content: 'f'; font-family: monospace; }
.fa-twitter::before     { content: 't'; font-family: monospace; }
.fa-instagram::before   { content: 'i'; font-family: monospace; }
.fa-youtube::before     { content: 'y'; font-family: monospace; }

/* ============================================================
   ARCHIVE / CATEGORY PAGES
   ============================================================ */
.archive-header {
  background: var(--secondary-color);
  color: #fff;
  padding: 25px 0;
  margin-bottom: 30px;
}

.archive-title {
  font-size: var(--font-size-2xl);
  color: #fff;
  margin: 0;
}

.archive-title span.cat-accent {
  color: var(--accent-color);
}

.archive-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-sm);
  margin-top: 5px;
}

/* Perfil de autor (author.php) */
.author-profile-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

@media (max-width: 576px) {
  .author-profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Posts Grid Layouts */
.posts-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.posts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.posts-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 {
  text-align: center;
  padding: 80px 0;
}

.error-404 .error-number {
  font-size: 160px;
  font-weight: 900;
  color: var(--border-color);
  line-height: 1;
  margin-bottom: 20px;
}

.error-404 h2 {
  font-size: var(--font-size-3xl);
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.error-404 p {
  color: var(--text-light);
  font-size: var(--font-size-lg);
  margin-bottom: 30px;
}

.btn-primary {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 12px 30px;
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: var(--font-size-base);
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--secondary-color);
  color: #fff;
}

/* ============================================================
   VIDEO EMBED
   ============================================================ */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ============================================================
   GALLERY
   ============================================================ */
.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.post-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.post-gallery img:hover {
  transform: scale(1.03);
  box-shadow: var(--card-shadow-hover);
}

/* ============================================================
   WEATHER WIDGET
   ============================================================ */
.weather-widget {
  text-align: center;
  padding: 15px;
}

.weather-temp {
  font-size: 48px;
  font-weight: 900;
  color: var(--secondary-color);
  line-height: 1;
}

.weather-desc {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: 5px;
}

/* ============================================================
   LOAD MORE BUTTON
   ============================================================ */
.load-more-wrapper {
  text-align: center;
  margin: 30px 0;
}

.btn-load-more {
  display: inline-block;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 12px 40px;
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: var(--transition);
}

.btn-load-more:hover {
  background: var(--primary-color);
  color: #fff;
}

.btn-load-more.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ============================================================
   NOTIFICATION BAR
   ============================================================ */
.notification-bar {
  background: var(--accent-strong);
  color: #fff;
  text-align: center;
  padding: 8px 15px;
  font-size: var(--font-size-sm);
  position: relative;
}

.notification-bar a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
}

.notification-bar .close-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

/* ============================================================
   MOBILE UX FIXES
   ============================================================ */

/* Evitar scroll horizontal global */
html, body {
  overflow-x: hidden;
}

/* Bloquear scroll del body cuando el menú móvil está abierto */
body.menu-open {
  overflow: hidden;
}

/* Menú overlay (tap fuera para cerrar) */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  cursor: pointer;
}

body.menu-open .mobile-menu-overlay {
  display: block;
}

/* Tablas: scroll horizontal en móvil en vez de overflow.
   Solo por debajo de 768px — en escritorio se deja el layout de tabla
   nativo (columnas alineadas, sin display:block forzado). */
@media (max-width: 768px) {
  .post-content table,
  .entry-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    white-space: nowrap;
  }
}

/* Imágenes en contenido: bloque para evitar gaps */
.post-content img,
.entry-content img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Sombra de texto en slider para garantizar contraste en cualquier imagen */
.featured-slider__title {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.featured-slider__meta {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Line-clamp en títulos de cards (evita desbordamiento) */
.post-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Formularios: touch targets mínimos */
input[type=text],
input[type=email],
input[type=search],
input[type=url],
input[type=password],
textarea,
select {
  min-height: 44px;
}

textarea {
  min-height: 120px;
}

/* Touch target topbar social — área expandida sin afectar layout */
.topbar-social a {
  position: relative;
}
.topbar-social a::after {
  content: '';
  position: absolute;
  inset: -7px;
  pointer-events: none;
}

/* Touch target en search overlay close */
.search-overlay-close {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ticker: overflow contenido */
.breaking-news-ticker {
  overflow: hidden;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  #topbar,
  #site-navigation,
  #breaking-news,
  .featured-slider,
  .sidebar-area,
  .social-share,
  .related-posts,
  #colophon,
  #back-to-top,
  .search-overlay {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  .main-content-area {
    max-width: 100%;
    flex: 0 0 100%;
  }

  .post-content p {
    font-size: 11pt;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ============================================================
   HOME PAGE – LAYOUT PRINCIPAL v2
   ============================================================ */

/* Contenedor general home */
.home-container {
  padding-top: 20px;
}

/* -------------------------------------------------------
   HOME MAIN ROW: Grid de 2 columnas (contenido + sidebar)
   ------------------------------------------------------- */
.home-main-row {
  display: grid !important;
  grid-template-columns: 1fr 300px !important;
  grid-template-areas: "main sidebar" !important;
  gap: 32px;
  align-items: start;
  margin-top: 32px;
}

.home-main-row--sidebar-left {
  grid-template-columns: 300px 1fr !important;
  grid-template-areas: "sidebar main" !important;
}

/* Main content toma su área */
.home-main-content {
  grid-area: main;
  min-width: 0;
}

/* Sidebar: override flex rules de responsive.css */
.home-main-row > .sidebar-area,
.home-main-row > #secondary {
  grid-area: sidebar;
  flex: none !important;
  max-width: none !important;
  width: 100% !important;
  min-width: 0;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* -------------------------------------------------------
   HOME SECTIONS
   ------------------------------------------------------- */
.home-section {
  margin-bottom: 40px;
}

.home-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--primary-color, #c0392b);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.home-section__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark, #1a1a1a);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-section__title-icon {
  font-size: 18px;
}

.home-section__more-link {
  font-size: 13px;
  color: var(--primary-color, #c0392b);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.home-section__more-link:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------
   SLIDER SECTION
   ------------------------------------------------------- */
.home-section--slider {
  margin-bottom: 0;
}

/* -------------------------------------------------------
   LO MÁS LEÍDO
   ------------------------------------------------------- */
.most-read-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.most-read-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.most-read-list__item:last-child {
  border-bottom: none;
}

.most-read-list__rank {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--primary-color, #c0392b);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.most-read-list__body {
  flex: 1;
  min-width: 0;
}

.most-read-list__title {
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0;
  line-height: 1.4;
}

.most-read-list__title a {
  color: var(--text-dark, #1a1a1a);
  text-decoration: none;
}

.most-read-list__title a:hover {
  color: var(--primary-color, #c0392b);
}

.most-read-list__meta {
  font-size: 12px;
  color: var(--text-muted, #888);
  display: flex;
  gap: 10px;
}

.most-read-list__thumb {
  flex-shrink: 0;
}

.most-read-list__thumb img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* -------------------------------------------------------
   POSTS GRID – 3 columnas
   ------------------------------------------------------- */
.posts-grid {
  display: grid;
  gap: 24px;
}

.posts-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

.posts-grid--4col {
  grid-template-columns: repeat(4, 1fr);
}

/* -------------------------------------------------------
   CATEGORY HIGHLIGHT SECTION
   Usa las tarjetas estándar del tema (.post-card-overlay para la
   destacada de la izquierda, .post-card-horizontal para las 3 de
   la derecha) — mismas clases que el resto del sitio.
   ------------------------------------------------------- */
.category-section__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 16px;
}

/* La tarjeta destacada ocupa la columna izquierda completa (3 filas) */
.category-section__grid .post-card-overlay {
  grid-row: 1 / 4;
  margin-bottom: 0;
}

.category-section__grid .post-card-horizontal {
  margin-bottom: 0;
}

/* -------------------------------------------------------
   VIDEO SECTION
   ------------------------------------------------------- */
.video-card {
  background: var(--bg-white, #fff);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.video-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.video-card__thumb-link {
  display: block;
  position: relative;
  overflow: hidden;
}

.video-card__thumb-link img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.video-card:hover .video-card__thumb-link img {
  transform: scale(1.04);
}

.video-card__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  opacity: .9;
  pointer-events: none;
}

.video-card__body {
  padding: 12px;
}

.video-card__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.4;
}

.video-card__title a {
  color: var(--text-dark, #1a1a1a);
  text-decoration: none;
}

.video-card__title a:hover {
  color: var(--primary-color, #c0392b);
}

.video-card__date {
  font-size: 12px;
  color: var(--text-muted, #888);
}

/* -------------------------------------------------------
   SIDEBAR widgets en home
   ------------------------------------------------------- */
.home-main-row .sidebar-area .widget {
  margin-bottom: 24px;
}

/* -------------------------------------------------------
   RESPONSIVE HOME – tablets (≤992px)
   ------------------------------------------------------- */
@media (max-width: 992px) {
  .home-main-row,
  .home-main-row--sidebar-left {
    grid-template-columns: 1fr !important;
    grid-template-areas: "main" "sidebar" !important;
    gap: 24px;
  }

  .posts-grid--3col {
    grid-template-columns: repeat(2, 1fr);
  }

  .posts-grid--4col {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-section__grid {
    grid-template-columns: 1fr;
  }

  .category-section__grid .post-card-overlay {
    grid-row: auto;
  }
}

/* -------------------------------------------------------
   RESPONSIVE HOME – móvil (≤600px)
   ------------------------------------------------------- */
@media (max-width: 600px) {
  .home-main-row {
    gap: 16px;
  }

  .posts-grid--3col,
  .posts-grid--4col {
    grid-template-columns: 1fr;
  }

  .most-read-list__thumb {
    display: none;
  }
}
