/* ============================================================
   EL BURGADO · DESIGN SYSTEM PRINCIPAL v1.1
   Navy #0D1B2A · Azul eléctrico #1A6BFF
   Tipografía: Big Shoulders Display + Instrument Sans + Source Serif 4
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@700;800;900&family=Instrument+Sans:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:ital,wght@0,400;0,600;1,400;1,600&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --navy:      #0D1B2A;
  --blue:      #1A6BFF;
  --blue-dark: #0049CC;
  --blue-soft: rgba(26,107,255,0.08);
  --red:       #C62828;
  --red-live:  #FF4757;
  --fg:        #1A1F2C;
  --fg2:       #3B4252;
  --fg3:       #6B7280;
  --border:    #D5D9DF;
  --border-light: #EAECF0;
  --bg:        #F4F5F7;
  --bg-alt:    #F8F9FA;
  --white:     #ffffff;

  /* Colores por sección */
  --col-politica:    #C62828;
  --col-economia:    #1B5E3B;
  --col-tribunales:  #1A3A5C;
  --col-calle:       #B45309;
  --col-opinion:     #5B21B6;
  --col-gastronomia: #7C3A1E;
  --col-local:       #B45309;
  --col-nacional:    #1A3A5C;

  /* Espaciado */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;

  /* Contenedor */
  --container: 1280px;
  --padding-x: 32px;

  /* Header altura */
  --header-h: 72px;
  --datebar-h: 36px;
  --sticky-offset: calc(var(--header-h) + var(--datebar-h));
}

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

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

body {
  margin: 0;
  background: var(--bg);
  font-family: 'Instrument Sans', sans-serif;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  border: 0;
  background: none;
  font-family: inherit;
}

/* ============================================================
   HEADER
   ============================================================ */
.eb-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 var(--border);
}

.eb-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--padding-x);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
.eb-logo { flex-shrink: 0; }
.eb-logo img { height: 36px; width: auto; }
.eb-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Navegación escritorio */
.eb-nav {
  display: flex;
  gap: 2px;
  flex: 1;
  margin-left: 8px;
  align-items: center;
}

.eb-nav a {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg2);
  padding: 9px 13px;
  border-radius: 4px;
  transition: background 180ms, color 180ms;
  position: relative;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.eb-nav a:hover {
  background: var(--bg);
  color: var(--fg);
}

.eb-nav a.current-menu-item,
.eb-nav a.active {
  color: var(--blue);
  font-weight: 700;
}

.eb-nav a.current-menu-item::after,
.eb-nav a.active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: -1px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
}

/* Herramientas derecha del header */
.eb-header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Buscador */
.eb-search {
  position: relative;
  display: flex;
  align-items: center;
}

.eb-search svg {
  position: absolute;
  left: 10px;
  color: var(--fg3);
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.eb-search input {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px 8px 33px;
  width: 200px;
  outline: none;
  color: var(--fg);
  background: var(--bg-alt);
  transition: border-color 200ms, width 280ms ease, background 200ms;
}

.eb-search input:focus {
  border-color: var(--blue);
  background: var(--white);
  width: 240px;
}

.eb-search input::placeholder { color: var(--fg3); }

/* Botón boletín */
.eb-btn-boletin {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  background: var(--blue);
  color: var(--white);
  border: 0;
  padding: 9px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 180ms, transform 100ms;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.eb-btn-boletin:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

/* Hamburger — solo visible en móvil */
.eb-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
  margin-left: auto;
}

.eb-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 280ms ease, opacity 280ms ease;
}

.eb-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.eb-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.eb-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Menú móvil overlay */
.eb-mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 199;
  overflow-y: auto;
  padding: 24px var(--padding-x) 48px;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
}

.eb-mobile-nav.open {
  display: flex;
}

.eb-mobile-nav a {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--fg);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  letter-spacing: -0.01em;
  transition: color 180ms, padding-left 180ms;
}

.eb-mobile-nav a:hover {
  color: var(--blue);
  padding-left: 8px;
}

.eb-mobile-nav a:last-child {
  border-bottom: none;
}

/* ============================================================
   DATE BAR
   ============================================================ */
.eb-datebar {
  background: var(--navy);
  color: var(--white);
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  height: var(--datebar-h);
  display: flex;
  align-items: center;
}

.eb-datebar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--padding-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: 100%;
  flex-wrap: nowrap;
  overflow: hidden;
}

.eb-datebar-left {
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eb-datebar-left b {
  color: var(--white);
  font-weight: 500;
}

.eb-datebar-live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--red-live);
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

.eb-datebar-live .live-text {
  color: rgba(255,255,255,0.85);
  font-weight: 400;
}

.eb-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-live);
  animation: ebPulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes ebPulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0   rgba(255,71,87,0.6); }
  70%  { transform: scale(1.1);  box-shadow: 0 0 0 8px rgba(255,71,87,0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(255,71,87,0); }
}

/* ============================================================
   PUBLICIDAD — ESPACIOS
   ============================================================ */
.ad-leaderboard {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px var(--padding-x);
  display: flex;
  justify-content: center;
}

.ad-box {
  background: #F0F2F5;
  border: 1px dashed var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 100%;
}

.ad-label {
  position: absolute;
  top: 5px;
  right: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg3);
}

.ad-728 { width: 728px; height: 90px; max-width: 100%; }
.ad-300 { width: 300px; height: 250px; max-width: 100%; }

/* ============================================================
   ARTICLE CARD — tarjeta de noticia
   ============================================================ */
.eb-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(.2,.6,.3,1), box-shadow 220ms cubic-bezier(.2,.6,.3,1);
}

.eb-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
}

.eb-card-img {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--navy) 0%, #2d3748 100%);
  overflow: hidden;
  position: relative;
}

.eb-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
  transition: transform 400ms ease;
}

.eb-card:hover .eb-card-img img {
  transform: scale(1.03);
}

/* Barra de color de sección */
.eb-card-bar {
  height: 4px;
  flex-shrink: 0;
}

.eb-card-bar.politica,
.eb-card-bar.col-politica    { background: var(--col-politica); }
.eb-card-bar.economia,
.eb-card-bar.col-economia    { background: var(--col-economia); }
.eb-card-bar.tribunales,
.eb-card-bar.col-tribunales  { background: var(--col-tribunales); }
.eb-card-bar.calle,
.eb-card-bar.col-calle       { background: var(--col-calle); }
.eb-card-bar.opinion,
.eb-card-bar.col-opinion     { background: var(--col-opinion); }
.eb-card-bar.gastronomia,
.eb-card-bar.col-gastronomia { background: var(--col-gastronomia); }
.eb-card-bar.local           { background: var(--col-local); }
.eb-card-bar.nacional        { background: var(--col-nacional); }

.eb-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

/* Kicker / etiqueta de sección */
.eb-card-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg3);
  line-height: 1;
}

.eb-card-kicker.politica    { color: var(--col-politica); }
.eb-card-kicker.economia    { color: var(--col-economia); }
.eb-card-kicker.tribunales  { color: var(--col-tribunales); }
.eb-card-kicker.calle       { color: var(--col-calle); }
.eb-card-kicker.opinion     { color: var(--col-opinion); }
.eb-card-kicker.gastronomia { color: var(--col-gastronomia); }

.eb-card h3 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  font-size: 21px;
  line-height: 1.05;
  color: var(--fg);
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: pretty;
  transition: color 180ms;
}

.eb-card:hover h3 { color: var(--blue); }

.eb-card p {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg2);
  margin: 0;
  flex: 1;
}

.eb-card-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--fg3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ============================================================
   GRIDS
   ============================================================ */
.eb-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

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

/* ============================================================
   SECTION HEADER (título de sección en portada)
   ============================================================ */
.eb-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--fg);
  gap: 16px;
}

.eb-section-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: 34px;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
  line-height: 1;
}

.eb-see-all {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
  white-space: nowrap;
  transition: color 180ms;
}

.eb-see-all:hover { color: var(--blue-dark); }

/* ============================================================
   LAYOUT CONTENEDOR
   ============================================================ */
.eb-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--padding-x);
}

.eb-section { padding: 48px 0; }

/* Layout con sidebar */
.eb-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 296px;
  gap: 48px;
  align-items: start;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.eb-sidebar-widget {
  margin-bottom: 36px;
}

.eb-widget-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue);
}

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

.eb-widget-list li {
  padding: 11px 0;
  border-bottom: 1px solid var(--border-light);
}

.eb-widget-list li:last-child { border-bottom: 0; }

.eb-widget-list a {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
  display: block;
  transition: color 180ms;
}

.eb-widget-list a:hover { color: var(--blue); }

.eb-widget-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--fg3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ============================================================
   SECTION PAGE HEADER (páginas de categoría)
   ============================================================ */
.eb-sec-head {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.eb-sec-head::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 5px;
  background: var(--sec, var(--blue));
}

.eb-sec-head-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px var(--padding-x) 44px;
}

.eb-sec-head h1 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: 96px;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin: 0 0 24px;
  text-transform: uppercase;
}

/* ============================================================
   ARTÍCULO INDIVIDUAL
   ============================================================ */
/* Barra de progreso */
.progress {
  position: sticky;
  top: var(--header-h);
  z-index: 49;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

#progress-bar {
  height: 100%;
  background: var(--blue);
  width: 0%;
  transition: width 80ms linear;
}

/* Cabecera del artículo */
.eb-article-header {
  max-width: 840px;
  margin: 0 auto;
  padding: 48px var(--padding-x) 36px;
}

.eb-article-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: 62px;
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 0 0 22px;
  text-wrap: pretty;
}

.eb-article-subtitle {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--fg2);
  margin: 0 0 32px;
}

/* Cuerpo del artículo */
.eb-article-body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  line-height: 1.72;
  color: var(--fg);
}

.eb-article-body > p {
  margin: 0 0 26px;
  text-wrap: pretty;
}

.eb-article-body h2 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  font-size: 34px;
  line-height: 1.05;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin: 48px 0 18px;
}

.eb-article-body h2::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  background: var(--blue);
  margin-bottom: 12px;
  border-radius: 2px;
}

.eb-article-body blockquote {
  border-left: 4px solid var(--blue);
  margin: 32px 0;
  padding: 12px 0 12px 24px;
  font-style: italic;
  color: var(--fg2);
  font-size: 20px;
}

.eb-article-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.eb-article-body a:hover { color: var(--blue-dark); }

.eb-article-body img {
  width: 100%;
  border-radius: 4px;
  margin: 24px 0;
}

/* ============================================================
   NEWSLETTER CTA
   ============================================================ */
.eb-newsletter {
  background: var(--navy);
  color: var(--white);
  padding: 72px var(--padding-x);
  position: relative;
  overflow: hidden;
}

/* Textura sutil de fondo */
.eb-newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(26,107,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.eb-newsletter-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.eb-newsletter-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #5B9BFF;
  font-weight: 700;
  margin: 0 0 18px;
}

.eb-newsletter h2 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: var(--white);
}

.eb-newsletter > .eb-newsletter-inner > p,
.eb-newsletter p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  margin: 0 auto 32px;
  max-width: 520px;
}

.eb-newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
}

.eb-newsletter-form input {
  flex: 1;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  padding: 14px 16px;
  border-radius: 4px;
  outline: none;
  transition: border-color 200ms, background 200ms;
  min-width: 0;
}

.eb-newsletter-form input::placeholder { color: rgba(255,255,255,0.38); }
.eb-newsletter-form input:focus {
  border-color: var(--blue);
  background: rgba(255,255,255,0.1);
}

.eb-newsletter-form button {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  background: var(--blue);
  color: var(--white);
  border: 0;
  padding: 14px 24px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 180ms, transform 100ms;
  white-space: nowrap;
}

.eb-newsletter-form button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.eb-footer {
  background: var(--navy);
  color: var(--white);
  padding: 64px 0 0;
  border-top: 3px solid var(--blue);
}

.eb-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--padding-x) 56px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
}

.eb-footer-brand {}

.eb-footer-brand p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
  margin: 14px 0 6px;
}

.eb-footer-brand .cif {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-top: 6px;
}

.eb-footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.eb-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eb-footer-col li { margin-bottom: 11px; }

.eb-footer-col a {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  transition: color 180ms;
}

.eb-footer-col a:hover { color: var(--white); }

.eb-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px var(--padding-x);
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.eb-footer-copyright,
.eb-footer-location {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
}

/* ============================================================
   BREAKING NEWS / ÚLTIMA HORA
   ============================================================ */
.eb-breaking-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-live);
  border: 1px solid rgba(255,71,87,0.3);
  padding: 5px 10px;
  border-radius: 3px;
}

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

/* ============================================================
   RESPONSIVE — Tablet (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --padding-x: 24px;
  }

  .eb-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .eb-with-sidebar { grid-template-columns: 1fr; gap: 40px; }
  .eb-footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }

  /* Ocultar la columna de marca y compactar footer */
  .eb-footer-brand { grid-column: 1 / -1; }

  .eb-search input { width: 160px; }
  .eb-search input:focus { width: 190px; }

  .eb-sec-head h1 { font-size: 72px; }
  .eb-article-title { font-size: 52px; }
}

/* ============================================================
   RESPONSIVE — Móvil (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --padding-x: 16px;
    --header-h: 60px;
    --datebar-h: 32px;
  }

  /* Header móvil */
  .eb-header-inner {
    padding: 0 16px;
    gap: 12px;
    flex-wrap: nowrap;
  }

  /* Ocultar búsqueda y botón boletín en móvil, mostrar hamburger */
  .eb-search,
  .eb-btn-boletin { display: none; }
  .eb-hamburger { display: flex; }

  /* Ocultar menú desktop */
  .eb-nav { display: none; }

  /* Logo más compacto */
  .eb-logo img { height: 28px; }

  /* Datebar compacta */
  .eb-datebar { height: var(--datebar-h); }
  .eb-datebar-inner { padding: 0 16px; }
  .eb-datebar-left {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .eb-datebar-live { display: none; } /* Ocultar EN DIRECTO en móvil */

  /* Contenedor */
  .eb-container { padding: 0 16px; }
  .eb-section { padding: 32px 0; }

  /* Grids en móvil: 1 columna */
  .eb-grid-4,
  .eb-grid-3 { grid-template-columns: 1fr; gap: 16px; }

  /* Sección hero de categorías — 1 columna */
  .eb-sec-head h1 {
    font-size: clamp(48px, 12vw, 72px);
  }

  .eb-sec-head-inner { padding: 40px 16px 32px; }

  /* Sección header */
  .eb-section-header { margin-bottom: 18px; padding-bottom: 12px; }
  .eb-section-title { font-size: 26px; }

  /* Artículo individual */
  .eb-article-header { padding: 28px 16px 24px; }
  .eb-article-title { font-size: clamp(32px, 8vw, 48px); }
  .eb-article-subtitle { font-size: 17px; }
  .eb-article-body { font-size: 17px; }

  /* Layout artículo 3-col → 1 col */
  /* Los rails laterales (compartir, TOC) se ocultan en móvil */
  /* No hay clase específica pero el grid inline se sobreescribe */

  /* Cards más compactas */
  .eb-card h3 { font-size: 19px; }
  .eb-card-body { padding: 16px 16px 18px; }

  /* Ad: ocultar leaderboard grande, mostrar contenedor */
  .ad-728 { width: 100%; height: 60px; }
  .ad-leaderboard { padding: 8px 16px; }

  /* Newsletter */
  .eb-newsletter { padding: 48px 16px; }
  .eb-newsletter h2 { font-size: 36px; letter-spacing: -0.02em; }
  .eb-newsletter p { font-size: 15px; }
  .eb-newsletter-form {
    flex-direction: column;
    gap: 10px;
  }
  .eb-newsletter-form input,
  .eb-newsletter-form button { width: 100%; }

  /* Footer */
  .eb-footer { padding: 44px 0 0; }
  .eb-footer-inner {
    grid-template-columns: 1fr;
    padding: 0 16px 40px;
    gap: 28px;
  }
  .eb-footer-brand { grid-column: auto; }
  .eb-footer-bottom {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* En la calle reels: 2 columnas en móvil */
  .eb-reels-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ============================================================
   RESPONSIVE — Móvil pequeño (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root {
    --header-h: 56px;
  }

  .eb-sec-head h1 { font-size: clamp(40px, 11vw, 60px); }
  .eb-article-title { font-size: clamp(28px, 9vw, 40px); }

  .eb-grid-4 { grid-template-columns: 1fr; }

  /* Reels: 1 columna en móvil pequeño */
  .eb-reels-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   ANIMACIÓN DE ENTRADA SUAVE (para reducir CLS)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .eb-card {
    animation: fadeUp 300ms ease both;
  }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ============================================================
   PRINT — ocultar elementos no esenciales
   ============================================================ */
@media print {
  .eb-header,
  .eb-datebar,
  .ad-leaderboard,
  .eb-newsletter,
  .eb-footer,
  .progress,
  #toc { display: none !important; }

  .eb-article-body { font-size: 12pt; line-height: 1.6; }
  .eb-article-title { font-size: 28pt; }
}
