/*
Theme Name:  Nogoya Radios News
Theme URI:   https://nogoyaradios.com.ar
Description: Tema de noticias moderno estilo Infobae/TN. Ultraliviano, sin constructores. Grilla de noticias, breaking news, ad spots integrados.
Author:      Nogoya Radios
Version:     1.4.2
Text Domain: nogoya-news
Tags:        news, magazine, responsive, custom-menu, featured-images, post-formats, sticky-post, threaded-comments, translation-ready
License:     GPL-2.0-or-later
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */
:root {
  /* Colores */
  --color-primary:        #0057b7;   /* Azul institucional */
  --color-primary-dark:   #00469a;
  --color-accent:         #ff6b35;   /* Naranja breaking news */
  --color-dark:           #0d0d0d;
  --color-dark-2:         #1a1a1a;
  --color-dark-3:         #2c2c2c;
  --color-gray-1:         #4a4a4a;
  --color-gray-2:         #767676;
  --color-gray-3:         #b0b0b0;
  --color-gray-4:         #d4d4d4;
  --color-gray-5:         #f0f0f0;
  --color-white:          #ffffff;
  --color-bg:             #f7f7f7;
  --color-surface:        #ffffff;

  /* Tipografía */
  --font-sans:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-serif:   'Georgia', 'Times New Roman', serif;
  --font-size-xs:   0.75rem;   /*  12px */
  --font-size-sm:   0.875rem;  /*  14px */
  --font-size-base: 1rem;      /*  16px */
  --font-size-md:   1.125rem;  /*  18px */
  --font-size-lg:   1.25rem;   /*  20px */
  --font-size-xl:   1.5rem;    /*  24px */
  --font-size-2xl:  1.875rem;  /*  30px */
  --font-size-3xl:  2.25rem;   /*  36px */
  --font-size-4xl:  2.75rem;   /*  44px */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  --line-height-tight:  1.2;
  --line-height-snug:   1.35;
  --line-height-normal: 1.6;
  --line-height-loose:  1.8;

  /* Espaciado */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Layout */
  --container-max:   1280px;
  --container-pad:   1rem;
  --content-max:     760px;
  --sidebar-width:   300px;
  --gap-grid:        1.25rem;

  /* Bordes y sombras */
  --radius-sm:  3px;
  --radius-md:  6px;
  --radius-lg:  10px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.16);

  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-dark);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary); }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; background: none; border: none; }

/* ==========================================================================
   TIPOGRAFÍA BASE
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-dark);
}

h1 { font-size: clamp(1.75rem, 4vw, var(--font-size-4xl)); }
h2 { font-size: clamp(1.375rem, 3vw, var(--font-size-3xl)); }
h3 { font-size: clamp(1.125rem, 2.5vw, var(--font-size-2xl)); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-md); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

/* Scrollbar personalizada */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-gray-5); }
::-webkit-scrollbar-thumb { background: var(--color-gray-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* Skip link accesibilidad */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-2) var(--space-4);
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: var(--font-weight-semibold);
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.site-layout {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 100dvh;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-8);
  align-items: start;
  padding-block: var(--space-8);
}

@media (max-width: 1024px) {
  .content-area {
    grid-template-columns: 1fr;
  }
}

.main-content-wrap {
  min-width: 0;
  container-type: inline-size;
}

/* ==========================================================================
   AD SPOTS - CONTENEDORES BASE
   ========================================================================== */
.ad-spot {
  background: var(--color-gray-5);
  border: 1px dashed var(--color-gray-4);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.ad-spot::before {
  content: attr(data-label);
  position: absolute;
  top: var(--space-1);
  left: var(--space-2);
  font-size: 9px;
  color: var(--color-gray-3);
  text-transform: uppercase;
  letter-spacing: .05em;
  z-index: 1;
  pointer-events: none;
}

.ad-spot--billboard {
  width: 100%;
  height: 90px;
  max-height: 90px;
}

.ad-spot--sidebar {
  width: 100%;
  overflow: visible;
  background: transparent;
  border: none;
  display: block;
  /* Sin height, min-height, max-height: el ad ocupa lo que necesite */
}

.ad-spot--sidebar + .ad-spot--sidebar {
  margin-top: var(--space-4);
}

.ad-spot--infeed {
  width: 100%;
  height: 90px;
  margin-block: var(--space-6);
}

.ad-spot--between-sections {
  width: 100%;
  height: 90px;
}

.between-sections-ad {
  margin-block: var(--space-8);
}

.ad-spot--single-top {
  width: 100%;
  height: 90px;
  margin-bottom: var(--space-8);
}

.ad-spot--single-mid {
  width: 100%;
  height: 250px;
  margin-block: var(--space-8);
}

@media (max-width: 768px) {
  .ad-spot--billboard { height: 60px; }
  .ad-spot--sidebar { width: 100%; }
  .ad-spot--infeed { height: 60px; }
  .ad-spot--between-sections { height: 60px; }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  background: var(--color-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-billboard {
  background: var(--color-dark-2);
  border-bottom: 1px solid var(--color-dark-3);
  padding-block: var(--space-2);
}

.header-billboard .container {
  display: flex;
  justify-content: center;
}

.header-main {
  padding-block: var(--space-3);
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

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

.site-logo a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-logo img {
  height: 44px;
  width: auto;
}

.site-name {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
  color: var(--color-white);
  letter-spacing: -.02em;
  line-height: 1;
}

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

/* Live badge */
.header-live {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.8); }
}

/* Fecha en header */
.header-date {
  font-size: var(--font-size-xs);
  color: var(--color-gray-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

/* ==========================================================================
   NAVEGACIÓN PRINCIPAL
   ========================================================================== */
.site-nav {
  background: var(--color-dark-2);
  border-top: 2px solid var(--color-primary);
}

.site-nav .container {
  position: relative;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.primary-menu::-webkit-scrollbar { display: none; }

.primary-menu > li > a {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--color-gray-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast);
  position: relative;
}

.primary-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
  color: var(--color-white);
  background: rgba(255,255,255,.05);
}

.primary-menu > li > a:hover::after,
.primary-menu > li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* Dropdown */
.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-dark-2);
  border-top: 2px solid var(--color-primary);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: 50;
}

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

.primary-menu .sub-menu a {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--color-gray-3);
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--color-dark-3);
  transition: all var(--transition-fast);
}

.primary-menu .sub-menu a:hover {
  color: var(--color-white);
  background: rgba(200,16,46,.15);
  padding-left: var(--space-6);
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .primary-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: var(--space-4);
  }
  .primary-menu.is-open { display: flex; }
  .primary-menu > li > a { width: 100%; }
  .primary-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    border-left: 2px solid var(--color-primary);
    margin-left: var(--space-4);
  }
}

/* ── Sticky header compacto: la nav colapsa al scrollear (solo desktop) ── */
@media (min-width: 1025px) {
  .site-nav {
    max-height: 60px;
    overflow: hidden;
    transition: max-height 200ms ease;
  }

  .site-header.header-compact .site-nav {
    max-height: 0;
    border-top: none;
  }

  .site-header.header-compact {
    box-shadow: 0 2px 16px rgba(0, 0, 0, .4);
  }
}

/* ==========================================================================
   BREAKING NEWS TICKER
   ========================================================================== */
.breaking-news-bar {
  background: var(--color-primary);
  color: var(--color-white);
  padding-block: var(--space-2);
  overflow: hidden;
}

.breaking-news-bar .container {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.breaking-label {
  flex-shrink: 0;
  background: var(--color-white);
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-black);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 2px var(--space-3);
  border-radius: 2px;
  animation: blink 1.2s step-end infinite;
}

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

.ticker-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.ticker-list {
  display: flex;
  gap: 0;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding-right: var(--space-10);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.ticker-item a {
  color: var(--color-white);
  transition: opacity var(--transition-fast);
}

.ticker-item a:hover { opacity: .8; }

.ticker-sep { color: rgba(255,255,255,.5); font-size: 10px; }

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

/* ==========================================================================
   CARDS DE NOTICIAS
   ========================================================================== */

/* Card base */
.news-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
}

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

.news-card__image {
  overflow: hidden;
  background: var(--color-gray-5);
  position: relative;
}

.news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.news-card:hover .news-card__image img {
  transform: scale(1.04);
}

.news-card__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-2);
}

.news-card__category {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-primary);
  text-decoration: none;
}

.news-card__category:hover { color: var(--color-primary-dark); }

.news-card__volanta {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1.2;
}

.news-card__title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
  color: var(--color-dark);
  transition: color var(--transition-fast);
}

.news-card:hover .news-card__title { color: var(--color-primary); }

.news-card__title a {
  display: block;
  transition: color var(--transition-fast);
}

.news-card__excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-gray-1);
  line-height: var(--line-height-normal);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-gray-5);
  gap: var(--space-2);
}

.news-card__date {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-gray-2);
}

.news-card__date svg { flex-shrink: 0; }

.news-card__read-time {
  font-size: var(--font-size-xs);
  color: var(--color-gray-3);
}

/* Badge urgente */
.news-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  z-index: 2;
}

.news-card__badge--breaking { background: var(--color-accent); }
.news-card__badge--exclusive { background: var(--color-dark); }

/* ==========================================================================
   HERO SECTION (PORTADA)
   ========================================================================== */
.hero-section {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-8);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: auto;
  gap: 1px;
  background: var(--color-gray-4);
}

.hero-main {
  position: relative;
  overflow: hidden;
  background: var(--color-dark);
  aspect-ratio: 16/9;
  max-height: 520px;
}

.hero-main__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.hero-main:hover .hero-main__image {
  opacity: .75;
  transform: scale(1.02);
}

.hero-main__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.92) 0%,
    rgba(0,0,0,.6) 40%,
    rgba(0,0,0,.15) 70%,
    transparent 100%
  );
}

.hero-main__body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-6) var(--space-6) var(--space-6);
  color: var(--color-white);
}

.hero-main__category {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}

.hero-main__volanta {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: rgba(255,255,255,.8);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: var(--space-2);
}

.hero-main__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  color: var(--color-white);
  margin-bottom: var(--space-3);
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  transition: color var(--transition-fast);
}

.hero-main:hover .hero-main__title { color: rgba(255,255,255,.9); }

.hero-main__excerpt {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,.75);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-main__date {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,.65);
}

/* Secundarias del hero */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-gray-5);
}

.hero-secondary {
  background: var(--color-surface);
  flex: 1;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
  transition: background var(--transition-fast);
  overflow: hidden;
}

.hero-secondary:hover { background: var(--color-gray-5); }

.hero-secondary__image {
  width: 100px;
  height: 80px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--color-gray-5);
}

.hero-secondary__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.hero-secondary:hover .hero-secondary__image img { transform: scale(1.06); }

.hero-secondary__body { display: flex; flex-direction: column; gap: var(--space-1); overflow: hidden; }

.hero-secondary__category {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-primary);
}

.hero-secondary__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
  color: var(--color-dark);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.hero-secondary:hover .hero-secondary__title { color: var(--color-primary); }

.hero-secondary__date {
  font-size: 11px;
  color: var(--color-gray-2);
  margin-top: auto;
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hero-secondary { flex: 1 1 calc(50% - .5px); }
}

@media (max-width: 600px) {
  .hero-grid { gap: 0; background: none; }
  .hero-main { aspect-ratio: 4/3; max-height: 320px; }
  .hero-secondary { grid-template-columns: 80px 1fr; }
  .hero-secondary__image { width: 80px; height: 65px; }
}

/* ==========================================================================
   SECCIONES DE CATEGORÍA (PORTADA)
   ========================================================================== */
.category-section {
  margin-bottom: var(--space-10);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 3px solid var(--color-gray-5);
  position: relative;
}

.section-header::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--color-primary);
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
  color: var(--color-dark);
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.section-link {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.section-link:hover { color: var(--color-primary-dark); gap: var(--space-2); }

/* Grid de noticias (4 columnas) */
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-grid);
}

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

/* Grid especial: 1 grande + 2 pequeñas */
.news-grid--featured {
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--gap-grid);
}

.news-grid--featured .news-card:first-child {
  grid-row: 1 / 3;
}

.news-grid--featured .news-card:first-child .news-card__image {
  flex: 1;
  min-height: 180px;
}

.news-grid--featured .news-card:first-child .news-card__body {
  flex: 0 0 auto;
}

.news-grid--featured .news-card:first-child .news-card__title {
  font-size: var(--font-size-xl);
}

/* Grid tipo lista */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-list-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-gray-5);
  align-items: start;
  transition: background var(--transition-fast);
}

.news-list-item:last-child { border-bottom: none; }
.news-list-item:hover { background: var(--color-gray-5); margin-inline: calc(var(--space-3) * -1); padding-inline: var(--space-3); border-radius: var(--radius-sm); }

.news-list-item__image {
  width: 120px;
  height: 80px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-gray-5);
  flex-shrink: 0;
}

.news-list-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.news-list-item:hover .news-list-item__image img { transform: scale(1.06); }

.news-list-item__body { display: flex; flex-direction: column; gap: var(--space-1); }

.news-list-item__category {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-primary);
}

.news-list-item__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
  color: var(--color-dark);
  transition: color var(--transition-fast);
}

.news-list-item:hover .news-list-item__title { color: var(--color-primary); }

.news-list-item__date {
  font-size: 11px;
  color: var(--color-gray-2);
  margin-top: var(--space-1);
}

@media (max-width: 1200px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  {
  .news-grid, .news-grid--3col, .news-grid--featured { grid-template-columns: 1fr; }
  .news-grid--featured .news-card:first-child { grid-row: auto; }
  .news-grid--2col { grid-template-columns: repeat(2, 1fr); }
}

/* Cuando .main-content-wrap es el contenedor, las columnas responden al
   ancho real del área de contenido — no al viewport — evitando que la
   presencia del sidebar colapse el grid antes de tiempo. */
@container (min-width: 580px) {
  .news-grid { grid-template-columns: repeat(4, 1fr); }
}
@container (min-width: 400px) and (max-width: 579px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}
@container (max-width: 399px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tarjetas extras en el featured (4ª en adelante): ocupan todo el ancho */
.news-grid--featured .news-card:nth-child(n+4) {
  grid-column: 1 / -1;
}

/* ==========================================================================
   IMAGE RATIO HELPERS
   ========================================================================== */
.ratio-16-9  { aspect-ratio: 16/9; }
.ratio-4-3   { aspect-ratio: 4/3; }
.ratio-3-2   { aspect-ratio: 3/2; }
.ratio-1-1   { aspect-ratio: 1/1; }

.news-card__image.ratio-16-9,
.news-card__image.ratio-4-3,
.news-card__image.ratio-3-2 {
  width: 100%;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  align-self: start;
}

.sidebar-sticky {
  /* Sin position: sticky para evitar que los ads se corten cuando son más altos que el viewport */
}

.widget {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-black);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-white);
  background: var(--color-dark);
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--color-primary);
}

.widget-content { padding: var(--space-4); }

/* Widget: posts populares */
.popular-posts-list { display: flex; flex-direction: column; gap: 0; }

.popular-post-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-gray-5);
  align-items: start;
}

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

.popular-post-item__number {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  color: var(--color-gray-4);
  line-height: 1;
  text-align: center;
}

.popular-post-item__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  color: var(--color-dark);
  transition: color var(--transition-fast);
}

.popular-post-item:hover .popular-post-item__title { color: var(--color-primary); }

/* ==========================================================================
   ARTICLE SINGLE
   ========================================================================== */
.article-header {
  margin-bottom: var(--space-8);
}

.article-category-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.article-category {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px var(--space-3);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.article-category:hover { background: var(--color-primary-dark); }

.article-breadcrumb {
  font-size: var(--font-size-xs);
  color: var(--color-gray-2);
}

.article-breadcrumb a { color: var(--color-gray-1); transition: color var(--transition-fast); }
.article-breadcrumb a:hover { color: var(--color-primary); }
.article-breadcrumb span { margin-inline: var(--space-2); }

.article-volanta {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: var(--space-3);
  line-height: var(--line-height-snug);
}

.article-title {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  color: var(--color-dark);
  letter-spacing: -.02em;
  margin-bottom: var(--space-4);
}

.article-subtitle {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  color: var(--color-gray-1);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-5);
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-4);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding-block: var(--space-4);
  border-top: 1px solid var(--color-gray-5);
  border-bottom: 1px solid var(--color-gray-5);
  flex-wrap: wrap;
}

.article-meta__date {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-gray-1);
}

.article-meta__updated {
  font-size: var(--font-size-xs);
  color: var(--color-gray-2);
}

.article-meta__reading-time {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-gray-2);
}

/* Share bar */
.article-share {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.share-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-2);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.share-btn:hover { opacity: .85; transform: translateY(-1px); color: var(--color-white); }
.share-btn--twitter  { background: #1da1f2; }
.share-btn--facebook { background: #1877f2; }
.share-btn--whatsapp { background: #25d366; }
.share-btn--copy     { background: var(--color-gray-1); }

/* Featured image del artículo */
.article-featured-image {
  margin-bottom: var(--space-6);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-featured-image img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
}

.article-featured-image figcaption {
  background: var(--color-gray-5);
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-gray-2);
  font-style: italic;
}

/* Contenido del artículo */
.article-content {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-loose);
  color: var(--color-dark);
  max-width: var(--content-max);
}

.article-content p { margin-bottom: var(--space-5); }

.article-content h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-gray-5);
}

.article-content h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.article-content h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.article-content blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-5) var(--space-6);
  border-left: 4px solid var(--color-primary);
  background: var(--color-gray-5);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--font-size-lg);
  font-style: italic;
  color: var(--color-dark-3);
  line-height: var(--line-height-normal);
}

.article-content blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  font-style: normal;
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
}

.article-content ul, .article-content ol {
  margin-bottom: var(--space-5);
  padding-left: var(--space-6);
}

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

.article-content li {
  margin-bottom: var(--space-2);
  line-height: var(--line-height-normal);
}

.article-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover { color: var(--color-primary-dark); }

.article-content img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-block: var(--space-6);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-block: var(--space-6);
  font-size: var(--font-size-sm);
}

.article-content th {
  background: var(--color-dark);
  color: var(--color-white);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: var(--font-weight-semibold);
}

.article-content td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-gray-5);
}

.article-content tr:nth-child(even) td { background: var(--color-gray-5); }

.article-content code {
  background: var(--color-gray-5);
  border: 1px solid var(--color-gray-4);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: .875em;
  font-family: 'Consolas', 'Monaco', monospace;
}

.article-content pre {
  background: var(--color-dark);
  color: var(--color-gray-4);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-block: var(--space-6);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.article-content pre code { background: none; border: none; padding: 0; }

/* Article tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-gray-5);
}

.article-tags__label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-2);
  text-transform: uppercase;
  letter-spacing: .06em;
  align-self: center;
  margin-right: var(--space-2);
}

.article-tag {
  display: inline-block;
  background: var(--color-gray-5);
  color: var(--color-gray-1);
  font-size: var(--font-size-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-gray-4);
  transition: all var(--transition-fast);
}

.article-tag:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* Noticias relacionadas */
.related-posts {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 3px solid var(--color-gray-5);
  position: relative;
}

.related-posts::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--color-primary);
}

.related-posts__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-grid);
}

@media (max-width: 768px) {
  .related-posts__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ARCHIVE / CATEGORY PAGE
   ========================================================================== */
.archive-header {
  background: var(--color-dark);
  color: var(--color-white);
  padding-block: var(--space-8);
  margin-bottom: var(--space-8);
}

.archive-header .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.archive-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-primary);
}

.archive-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  color: var(--color-white);
}

.archive-description {
  font-size: var(--font-size-md);
  color: rgba(255,255,255,.7);
  max-width: 600px;
  line-height: var(--line-height-normal);
}

.archive-count {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,.5);
}

/* Paginación */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-block: var(--space-8);
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-1);
  background: var(--color-surface);
  border: 1px solid var(--color-gray-4);
  transition: all var(--transition-fast);
}

.page-numbers:hover, .page-numbers.current {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.page-numbers.dots {
  background: none;
  border: none;
  cursor: default;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-dark);
  color: var(--color-gray-3);
  margin-top: var(--space-16);
}

.footer-top {
  padding-block: var(--space-12);
  border-bottom: 1px solid var(--color-dark-3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
}

.footer-brand .site-name { margin-bottom: var(--space-4); }
.footer-brand img,
.site-footer .custom-logo {
  height: 55px !important;
  width: auto !important;
  margin-bottom: var(--space-4);
}

.footer-description {
  font-size: var(--font-size-sm);
  color: var(--color-gray-2);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-5);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-dark-3);
  border-radius: var(--radius-sm);
  color: var(--color-gray-3);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer-col-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-white);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-dark-3);
}

.footer-menu { display: flex; flex-direction: column; gap: var(--space-2); }

.footer-menu a {
  font-size: var(--font-size-sm);
  color: var(--color-gray-2);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.footer-menu a:hover { color: var(--color-primary); padding-left: var(--space-2); }

.footer-bottom {
  padding-block: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-copyright {
  font-size: var(--font-size-xs);
  color: var(--color-gray-2);
}

.footer-legal {
  display: flex;
  gap: var(--space-4);
}

.footer-legal a {
  font-size: var(--font-size-xs);
  color: var(--color-gray-2);
  transition: color var(--transition-fast);
}

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

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   UTILIDADES GENERALES
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-primary { color: var(--color-primary); }
.text-muted    { color: var(--color-gray-2); }
.text-small    { font-size: var(--font-size-sm); }
.text-xs       { font-size: var(--font-size-xs); }
.font-bold     { font-weight: var(--font-weight-bold); }
.uppercase     { text-transform: uppercase; letter-spacing: .06em; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--color-gray-5) 25%, var(--color-gray-4) 50%, var(--color-gray-5) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* Botón "Cargar más" */
.load-more-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: var(--space-8) auto 0;
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.load-more-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.load-more-btn.loading {
  opacity: .7;
  cursor: wait;
  pointer-events: none;
}

/* 404 */
.error-404-content {
  text-align: center;
  padding: var(--space-16) var(--space-4);
}

.error-404-content .error-code {
  font-size: 8rem;
  font-weight: var(--font-weight-black);
  color: var(--color-gray-4);
  line-height: 1;
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   DARK MODE
   ========================================================================== */
[data-theme="dark"] {
  --color-bg:      #0f0f0f;
  --color-surface: #1a1a1a;
  --color-dark:    #f0f0f0;
  --color-dark-2:  #e0e0e0;
  --color-dark-3:  #c8c8c8;
  --color-gray-1:  #9a9a9a;
  --color-gray-2:  #767676;
  --color-gray-3:  #4a4a4a;
  --color-gray-4:  #2c2c2c;
  --color-gray-5:  #1a1a1a;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.35);
  --shadow-md:     0 4px 12px rgba(0,0,0,.5);
  --shadow-lg:     0 8px 24px rgba(0,0,0,.6);
}

/* Cards y superficies en dark mode */
[data-theme="dark"] .news-card {
  border-color: var(--color-gray-4);
}
[data-theme="dark"] .news-card:hover {
  border-color: var(--color-gray-3);
}
[data-theme="dark"] .section-header {
  border-color: var(--color-gray-4);
}
[data-theme="dark"] .article-single {
  background: var(--color-surface);
}
[data-theme="dark"] .article-header,
[data-theme="dark"] .article-content,
[data-theme="dark"] .article-tags {
  color: var(--color-dark);
}
[data-theme="dark"] .article-content a {
  color: var(--color-primary);
}
[data-theme="dark"] .article-content blockquote {
  border-color: var(--color-primary);
  background: var(--color-gray-5);
}
[data-theme="dark"] .site-footer {
  background: #050505;
}
[data-theme="dark"] .footer-bottom {
  border-color: var(--color-gray-4);
}
[data-theme="dark"] .sidebar .widget {
  background: var(--color-surface);
  border-color: var(--color-gray-4);
}

/* Ícono luna/sol en el toggle */
.icon-sun { display: none; }
.icon-moon { display: block; }

[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ==========================================================================
   DARK MODE TOGGLE BUTTON
   ========================================================================== */
.header-darkmode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--color-gray-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
}
.header-darkmode-toggle:hover {
  color: var(--color-white);
  background: rgba(255,255,255,.1);
}

/* ==========================================================================
   BARRA DE COTIZACIONES DEL DÓLAR
   ========================================================================== */
.dollar-bar {
  background: var(--color-dark-2);
  border-bottom: 1px solid var(--color-dark-3);
  overflow: hidden;
}

.dollar-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 34px;
  overflow-x: auto;
  scrollbar-width: none;   /* Firefox */
  -ms-overflow-style: none;
  white-space: nowrap;
}
.dollar-bar__inner::-webkit-scrollbar { display: none; }

.dollar-bar__title {
  font-size: 0.65rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: .1em;
  color: var(--color-gray-2);
  text-transform: uppercase;
  flex-shrink: 0;
}

.dollar-bar__items {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.dollar-bar__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  border-right: 1px solid var(--color-dark-3);
  height: 34px;
}
.dollar-bar__item:last-child { border-right: none; }

.dollar-bar__label {
  font-size: 0.65rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: .06em;
  color: var(--color-gray-2);
  text-transform: uppercase;
}

.dollar-bar__venta {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
}

.dollar-bar__compra {
  font-size: 0.7rem;
  color: var(--color-gray-2);
}

.dollar-bar__updated {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--color-gray-2);
  flex-shrink: 0;
  padding-right: var(--space-2);
}

/* Dark mode: la barra ya tiene fondo oscuro, se adapta solo */
[data-theme="dark"] .dollar-bar {
  background: #0a0a0a;
  border-bottom-color: var(--color-gray-4);
}
[data-theme="dark"] .dollar-bar__item {
  border-right-color: var(--color-gray-4);
}

/* ==========================================================================
   HERRAMIENTAS DE LECTURA
   ========================================================================== */
.reading-tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-gray-5);
}

.reading-tools__label {
  font-size: var(--font-size-xs);
  color: var(--color-gray-2);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: var(--font-weight-medium);
  margin-right: var(--space-1);
}

.reading-tools__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-1);
  background: var(--color-gray-5);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-gray-4);
  transition: all var(--transition-fast);
  cursor: pointer;
  line-height: 1;
}
.reading-tools__btn sup {
  font-size: 0.55em;
  line-height: 1;
  vertical-align: super;
}
.reading-tools__btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-surface);
}
.reading-tools__btn--active {
  color: var(--color-white);
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.reading-tools__btn--active:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

[data-theme="dark"] .reading-tools {
  border-bottom-color: var(--color-gray-4);
}
[data-theme="dark"] .reading-tools__btn {
  background: var(--color-gray-5);
  border-color: var(--color-gray-4);
  color: var(--color-gray-3);
}
[data-theme="dark"] .reading-tools__btn:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Tamaños de fuente para artículos */
.font-small  .article-content { font-size: 0.9rem;   line-height: 1.65; }
.font-large  .article-content { font-size: 1.175rem; line-height: 1.85; }

/* ==========================================================================
   CRÉDITO DE DESARROLLO (footer)
   ========================================================================== */
.footer-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) 0 var(--space-6);
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: var(--font-size-xs);
  color: var(--color-gray-2);
}

.footer-credit__link {
  display: inline-flex;
  align-items: center;
  opacity: .85;
  transition: opacity var(--transition-fast);
}
.footer-credit__link:hover {
  opacity: 1;
}

.footer-credit__logo {
  height: 64px;
  display: block;
  filter: brightness(0) invert(1);
}

/* ==========================================================================
   WIDGET DEL MUNDIAL
   ========================================================================== */
.widget-worldcup {
  background: var(--color-surface);
  border: 1px solid var(--color-gray-5);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.widget-worldcup__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-dark);
  color: var(--color-white);
  padding: var(--space-3) var(--space-4);
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: .06em;
}

.widget-worldcup__icon {
  font-size: 1rem;
  line-height: 1;
}

.worldcup-live-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 0.6rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: .08em;
  padding: 2px var(--space-2);
  border-radius: 2px;
}

.widget-worldcup__body {
  padding: var(--space-2) 0;
}

/* Separadores de sección */
.worldcup-section-label {
  font-size: 0.6rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: .1em;
  color: var(--color-gray-2);
  text-transform: uppercase;
  padding: var(--space-3) var(--space-4) var(--space-1);
  border-top: 1px solid var(--color-gray-5);
  margin-top: var(--space-1);
}
.widget-worldcup__body > .worldcup-section-label:first-child {
  border-top: none;
  margin-top: 0;
}

/* Cada partido */
.worldcup-match {
  padding: var(--space-2) var(--space-4);
  transition: background var(--transition-fast);
}
.worldcup-match:hover {
  background: var(--color-gray-5);
}

.worldcup-match__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-2);
}

.worldcup-match__team {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.worldcup-match__team--home { text-align: right; }
.worldcup-match__team--away { text-align: left; }
.worldcup-match__team.is-winner {
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.worldcup-match__score {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-dark);
  text-align: center;
  white-space: nowrap;
  min-width: 40px;
}
.worldcup-match__score--live {
  color: var(--color-accent);
}
.worldcup-match__score--time {
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}

.worldcup-match__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: 2px;
}

.worldcup-match__minute {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  text-transform: uppercase;
}
.worldcup-match__minute--paused {
  color: var(--color-gray-2);
}

.worldcup-match__group {
  font-size: 0.65rem;
  color: var(--color-gray-2);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Partidos de ayer: más apagados */
.worldcup-match--yesterday .worldcup-match__team,
.worldcup-match--yesterday .worldcup-match__score {
  color: var(--color-gray-1);
}
.worldcup-match--yesterday .worldcup-match__team.is-winner {
  color: var(--color-dark);
  font-weight: var(--font-weight-semibold);
}

/* Live dot pequeño para el minuto */
.live-dot--sm {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
}

/* Dark mode */
[data-theme="dark"] .widget-worldcup {
  border-color: var(--color-gray-4);
}
[data-theme="dark"] .widget-worldcup__header {
  background: #050505;
}
[data-theme="dark"] .worldcup-match:hover {
  background: var(--color-gray-5);
}
[data-theme="dark"] .worldcup-section-label {
  border-top-color: var(--color-gray-4);
}

/* ==========================================================================
   RADIO PLAYER BAR
   ========================================================================== */

/* Barra fija en la parte inferior del viewport */
.radio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-5);
  height: 52px;
  background: #111827;
  color: var(--color-white);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, .45);
  border-top: 2px solid var(--color-primary);
}

.radio-bar__info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex: 1;
}

.radio-bar__icon-signal {
  flex-shrink: 0;
  opacity: .7;
  color: var(--color-primary);
}

.radio-bar__name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-bar__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Live dot dentro del badge */
.radio-bar__badge .live-dot {
  width: 6px;
  height: 6px;
  background: var(--color-white);
  border-radius: 50%;
  animation: livePulse 1.4s ease-in-out infinite;
}

.radio-bar__controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Botón play / pause */
.radio-bar__play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, transform .1s;
  flex-shrink: 0;
}

.radio-bar__play:hover {
  background: var(--color-primary-dark);
  transform: scale(1.05);
}

.radio-bar__play:active {
  transform: scale(.96);
}

/* Iconos play / pause / buffer */
.radio-bar__icon-pause  { display: none; }
.radio-bar__icon-buffer { display: none; }

.radio-bar.is-playing .radio-bar__icon-play   { display: none; }
.radio-bar.is-playing .radio-bar__icon-pause  { display: block; }

.radio-bar.is-buffering .radio-bar__icon-play   { display: none; }
.radio-bar.is-buffering .radio-bar__icon-pause  { display: none; }
.radio-bar.is-buffering .radio-bar__icon-buffer { display: block; animation: spinLoader .8s linear infinite; }

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

/* Control de volumen */
.radio-bar__volume-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.radio-bar__volume {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, .25);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.radio-bar__volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--color-white);
  border-radius: 50%;
  cursor: pointer;
}

.radio-bar__volume::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--color-white);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Padding para que el contenido no quede detrás de la barra */
body.has-radio-player {
  padding-bottom: 52px;
}

/* Indicador de carga de página en la barra de navegación AJAX */
html.ajax-loading::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  z-index: 99999;
  animation: ajaxProgress 1.2s ease-in-out infinite;
}

@keyframes ajaxProgress {
  0%   { left: 0; right: 100%; opacity: 1; }
  50%  { left: 0; right: 0;   opacity: 1; }
  100% { left: 100%; right: 0; opacity: 0; }
}

/* Ocultar volumen en pantallas muy pequeñas */
@media (max-width: 480px) {
  .radio-bar__volume-wrap {
    display: none;
  }
  .radio-bar__name {
    max-width: 140px;
  }
}

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9980;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, .6);
  color: #fff;
}

.whatsapp-fab:active {
  transform: scale(.95);
}

/* Pulso suave para llamar la atención */
@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, .45); }
  50%       { box-shadow: 0 4px 28px rgba(37, 211, 102, .75); }
}
.whatsapp-fab {
  animation: waPulse 2.4s ease-in-out infinite;
}
.whatsapp-fab:hover {
  animation: none;
}

/* Si el radio player está activo, sube el botón para que no se tape */
body.has-radio-player .whatsapp-fab {
  bottom: calc(52px + 20px);
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
  .site-header, .site-footer, .sidebar, .ad-spot,
  .breaking-news-bar, .related-posts, .article-share,
  .navigation, .pagination, .dollar-bar, .reading-tools,
  .widget-worldcup, .radio-bar, .whatsapp-fab { display: none !important; }

  .content-area { grid-template-columns: 1fr; }
  .article-content { font-size: 12pt; line-height: 1.6; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 10pt; color: #666; }
}
