/* ============================================================
   PULSO DIGITAL — Portal de noticias tecnológico
   Paleta light: bg #f0f4fb, nav #1a2744, accent #e53935
   Dark mode: .dark class on body
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1a2744;
  --navy-dark:  #0d1b38;
  --red:        #e53935;
  --red-dark:   #c62828;
  --bg:         #f0f4fb;
  --surface:    #ffffff;
  --gray:       #6b7280;
  --light-gray: #e5e9f0;
  --text:       #1a2744;
  --border:     #dde3ee;

  /* category colors */
  --ia:         #7c3aed;
  --tech:       #2563eb;
  --ciencia:    #059669;
  --negocios:   #d97706;

  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --t: 0.22s ease;

  /* ticker height */
  --ticker-h: 34px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--ticker-h) + var(--nav-h)); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.3s, color 0.3s;
}

/* ── DARK MODE ── */
body.dark {
  --bg:         #0f1520;
  --surface:    #1a2135;
  --text:       #e2e8f0;
  --gray:       #94a3b8;
  --light-gray: #2a3550;
  --border:     #2a3550;
  --navy:       #1e293b;
}
body.dark .nav { background: #0d1322; }
body.dark .category-strip { background: #1a2135; border-color: #2a3550; }
body.dark .card { background: #1a2135; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
body.dark .card__title a { color: #e2e8f0; }
body.dark .sidebar__block { background: #1a2135; }
body.dark .analisis { background: #1a2135; }
body.dark .analisis__card { border-color: #2a3550; background: #0f1520; }
body.dark .analisis__body h3 { color: #e2e8f0; }
body.dark .most-read__link { color: #e2e8f0; }
body.dark .section-header { border-color: #e53935; }
body.dark .section-header h2 { color: #e2e8f0; }
body.dark .sidebar__title { color: #e2e8f0; }
body.dark .tag-cloud-item { color: #cbd5e1; border-color: #2a3550; }
body.dark .tag-cloud-item:hover { background: var(--red); border-color: var(--red); color: white; }
body.dark .footer { background: #070c14; }
body.dark .nav__darkmode .icon-moon { display: none; }
body.dark .nav__darkmode .icon-sun { display: block; }

/* Default: show moon, hide sun */
.nav__darkmode .icon-sun { display: none; }
.nav__darkmode .icon-moon { display: block; }

/* CONTAINERS */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   TICKER BAR
   ============================================================ */
.ticker-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--ticker-h);
  background: var(--red);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ticker-label {
  background: var(--red-dark);
  color: white;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  padding: 0 16px;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
}

.ticker-inner {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker 38s linear infinite;
}

.ticker-inner span {
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  padding-right: 0;
}

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

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: var(--ticker-h);
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  transition: background 0.3s;
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  color: white;
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-pulse {
  display: inline-block;
  width: 9px; height: 9px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.65; }
}

.logo-red { color: var(--red); margin-left: 2px; }

.nav__links {
  display: flex;
  list-style: none;
  gap: 4px;
  flex: 1;
}

.nav__links a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 4px;
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}

.nav__links a:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* Nav right actions */
.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Search */
.nav__search-wrap { position: relative; display: flex; align-items: center; }

.nav__search-icon {
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: background var(--t), color var(--t);
}
.nav__search-icon:hover { background: rgba(255,255,255,0.1); color: white; }

.nav__search-expand {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  display: flex;
  align-items: center;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  width: 0;
  opacity: 0;
  pointer-events: none;
  transition: width 0.3s ease, opacity 0.3s ease;
}

.nav__search-expand.is-open {
  width: 280px;
  opacity: 1;
  pointer-events: all;
}

.nav__search-expand input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  background: transparent;
}

.nav__search-submit {
  background: var(--red);
  border: none;
  color: white;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Dark mode toggle */
.nav__darkmode {
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: background var(--t), color var(--t);
}
.nav__darkmode:hover { background: rgba(255,255,255,0.1); color: white; }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  min-height: 520px;
  position: relative;
  overflow: hidden;
}

/* Real background image */
.hero__img-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  transition: transform 8s ease;
}
.hero:hover .hero__img-wrap img { transform: scale(1); }

.hero__img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,27,56,0.93) 0%, rgba(13,27,56,0.80) 50%, rgba(13,27,56,0.65) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.hero__meta { display: flex; align-items: center; gap: 12px; }

.tag {
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 3px;
  text-transform: uppercase;
}

.tag--red   { background: var(--red); color: white; }
.tag--white { background: white; color: var(--navy); }

.hero__date { color: rgba(255,255,255,0.5); font-size: 0.8rem; }

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  max-width: 680px;
}

.hero__excerpt {
  color: rgba(255,255,255,0.72);
  font-size: 1rem;
  line-height: 1.72;
  max-width: 580px;
}

.hero__byline { display: flex; align-items: center; gap: 12px; }

.hero__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}

.hero__author { display: block; color: white; font-weight: 600; font-size: 0.9rem; }
.hero__readtime { display: block; color: rgba(255,255,255,0.45); font-size: 0.78rem; }

.btn-hero {
  display: inline-block;
  background: var(--red);
  color: white;
  padding: 12px 28px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 4px;
  width: fit-content;
  transition: background var(--t), transform var(--t);
}
.btn-hero:hover { background: var(--red-dark); transform: translateY(-2px); }

/* Hero side */
.hero__side {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.05);
  border-left: 1px solid rgba(255,255,255,0.08);
  padding: 40px 24px;
  backdrop-filter: blur(4px);
}

.hero__trending h3 {
  color: rgba(255,255,255,0.48);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--font-head);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hero__trending ul { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.hero__trending li { display: flex; gap: 12px; align-items: flex-start; }

.trend-num {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  flex-shrink: 0;
}

.hero__trending a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.4;
  transition: color var(--t);
}
.hero__trending a:hover { color: white; }

/* ============================================================
   CATEGORY STRIP
   ============================================================ */
.category-strip {
  background: var(--surface);
  border-bottom: 2px solid var(--light-gray);
  display: flex;
  overflow-x: auto;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  scrollbar-width: none;
  transition: background 0.3s, border-color 0.3s;
}
.category-strip::-webkit-scrollbar { display: none; }

.category-strip__item {
  text-decoration: none;
  color: var(--gray);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 14px 20px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--t), border-color var(--t);
}

.category-strip__item:hover,
.category-strip__item.active {
  color: var(--navy);
  border-bottom-color: var(--red);
}
body.dark .category-strip__item:hover,
body.dark .category-strip__item.active { color: white; }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--navy);
  transition: border-color 0.3s;
}

.section-header h2 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.3px;
}

.see-all {
  color: var(--red);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity var(--t);
}
.see-all:hover { opacity: 0.7; }

/* ============================================================
   ARTICLE CARDS
   ============================================================ */
.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(26,39,68,0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 28px rgba(26,39,68,0.13); }

/* Card image with aspect ratio and overlay */
.card__img-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.card:hover .card__img-wrap img { transform: scale(1.07); }

/* Hover overlay */
.card__img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,27,56,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover .card__img-overlay { opacity: 1; }

.card__overlay-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  line-height: 1.3;
  text-align: center;
}

.card__overlay-btn {
  display: inline-block;
  background: var(--red);
  color: white;
  padding: 8px 18px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background var(--t);
}
.card__overlay-btn:hover { background: var(--red-dark); }

/* Category tag on image */
.card__tag {
  position: absolute;
  top: 10px; left: 10px;
  font-family: var(--font-head);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.card__tag--ia      { background: rgba(124,58,237,0.85); }
.card__tag--tech    { background: rgba(37,99,235,0.85); }
.card__tag--ciencia { background: rgba(5,150,105,0.85); }
.card__tag--negocios { background: rgba(217,119,6,0.85); }

/* Card body */
.card__body { padding: 18px 20px; display: flex; flex-direction: column; flex: 1; }

.card__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card__category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
}
.card__category--ia      { color: var(--ia); }
.card__category--tech    { color: var(--tech); }
.card__category--ciencia { color: var(--ciencia); }
.card__category--negocios { color: var(--negocios); }

.card__readtime {
  font-size: 0.72rem;
  color: var(--gray);
  background: var(--light-gray);
  padding: 2px 8px;
  border-radius: 20px;
  transition: background 0.3s;
}

.card__title {
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}
.card__title a { color: var(--text); text-decoration: none; transition: color var(--t); }
.card__title a:hover { color: var(--red); }

.card__excerpt {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.58;
  margin-bottom: 14px;
  flex: 1;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--light-gray);
  padding-top: 12px;
  gap: 8px;
  transition: border-color 0.3s;
}

.card__author-wrap { display: flex; align-items: center; gap: 8px; }

.card__author-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border: 1.5px solid var(--light-gray);
}

.card__author { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text); }
.card__date   { display: block; font-size: 0.7rem; color: var(--gray); }

/* Share buttons */
.card__share { display: flex; gap: 6px; }
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 4px;
  background: var(--light-gray);
  color: var(--gray);
  text-decoration: none;
  transition: background var(--t), color var(--t);
  flex-shrink: 0;
}
.share-btn:hover { background: var(--navy); color: white; }
body.dark .share-btn { background: #2a3550; color: #94a3b8; }
body.dark .share-btn:hover { background: var(--red); color: white; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 28px; }

.sidebar__block {
  background: var(--surface);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(26,39,68,0.07);
  transition: background 0.3s;
}

.sidebar__block--ad {
  background: linear-gradient(135deg, var(--navy) 0%, #2a3f6e 100%);
  color: white;
}

.sidebar__block--ad h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin: 10px 0;
  line-height: 1.3;
  color: white;
}

.sidebar__block--ad p { font-size: 0.82rem; opacity: 0.8; line-height: 1.55; margin-bottom: 16px; }

.sidebar__label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(229,57,53,0.1);
  padding: 3px 8px;
  border-radius: 3px;
}

.sidebar__block--ad .sidebar__label {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
}

.sidebar__title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
  transition: color 0.3s;
}

.most-read { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.most-read__item { display: flex; gap: 10px; align-items: flex-start; }

.most-read__num {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--light-gray);
  line-height: 1;
  flex-shrink: 0;
  min-width: 26px;
  transition: color 0.3s;
}

.most-read__link {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
  display: block;
  transition: color var(--t);
}
.most-read__link:hover { color: var(--red); }

.most-read__meta { font-size: 0.7rem; color: var(--gray); display: block; margin-top: 3px; }

.btn-sidebar {
  display: inline-block;
  background: var(--red);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 4px;
  transition: background var(--t);
}
.btn-sidebar:hover { background: var(--red-dark); }

.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-cloud-item {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 5px 11px;
  border: 1.5px solid var(--light-gray);
  border-radius: 20px;
  transition: all var(--t);
}
.tag-cloud-item:hover { background: var(--navy); color: white; border-color: var(--navy); }

/* ============================================================
   ANÁLISIS
   ============================================================ */
.analisis {
  background: var(--surface);
  padding: 64px 0;
  border-top: 1px solid var(--light-gray);
  transition: background 0.3s;
}

.analisis__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.analisis__card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.25s, transform 0.25s;
  background: var(--surface);
}
.analisis__card:hover { box-shadow: 0 12px 36px rgba(26,39,68,0.1); transform: translateY(-4px); }

.analisis__img-wrap {
  position: relative;
  height: 230px;
  overflow: hidden;
}
.analisis__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.analisis__card:hover .analisis__img-wrap img { transform: scale(1.06); }

.analisis__img-wrap .tag {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 2;
}

.analisis__body { padding: 28px; }

.analisis__body h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin: 12px 0;
  transition: color 0.3s;
}

.analisis__body p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.68;
  margin-bottom: 20px;
}

.analisis__byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--light-gray);
  transition: border-color 0.3s;
}

.analisis__avatar-img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border: 2px solid var(--light-gray);
}

.analisis__byline strong { display: block; font-size: 0.85rem; color: var(--navy); font-weight: 600; transition: color 0.3s; }
.analisis__byline span  { font-size: 0.78rem; color: var(--gray); }

.analisis__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: opacity var(--t);
}
.btn-link:hover { opacity: 0.7; }

/* ============================================================
   NEWSLETTER / PODCAST
   ============================================================ */
.newsletter {
  background: linear-gradient(135deg, var(--navy-dark) 0%, #1a3060 50%, var(--navy) 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 80% 50%, rgba(229,57,53,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 30% 50% at 20% 20%, rgba(100,150,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.newsletter__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.newsletter__label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--red);
  background: rgba(229,57,53,0.18);
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 16px;
}

.newsletter__text h2 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.newsletter__text p { color: rgba(255,255,255,0.65); line-height: 1.72; margin-bottom: 24px; font-size: 0.95rem; }

.newsletter__perks { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.newsletter__perks li {
  color: rgba(255,255,255,0.82);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.newsletter__perks svg { color: #4ade80; flex-shrink: 0; }

/* Podcast card */
.podcast-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 14px 16px;
  transition: background var(--t);
}
.podcast-card:hover { background: rgba(255,255,255,0.12); }

.podcast-icon {
  width: 44px; height: 44px;
  background: var(--red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.podcast-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.podcast-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  line-height: 1.4;
}

.podcast-play {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  transition: background var(--t), transform var(--t);
}
.podcast-play:hover { background: var(--red); transform: scale(1.08); }

/* Newsletter form */
.newsletter__form label {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}

.newsletter__inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.newsletter__inputs input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  color: white;
  padding: 13px 16px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--t), background var(--t);
}

.newsletter__inputs input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter__inputs input:focus { border-color: var(--red); background: rgba(255,255,255,0.12); }

.btn-newsletter {
  width: 100%;
  background: var(--red);
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-head);
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--t), transform var(--t);
}
.btn-newsletter:hover { background: var(--red-dark); transform: translateY(-1px); }

.newsletter__disclaimer {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.32);
  margin-top: 10px;
  line-height: 1.5;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #0d1322;
  color: rgba(255,255,255,0.62);
  padding: 56px 0 0;
  transition: background 0.3s;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.footer__logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: white;
  margin-bottom: 14px;
  display: block;
}
.footer__logo span { color: var(--red); }

.footer__brand p { font-size: 0.875rem; line-height: 1.65; margin-bottom: 24px; max-width: 300px; }

.footer__social { display: flex; gap: 10px; }
.footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
  color: rgba(255,255,255,0.68);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background var(--t), color var(--t);
}
.footer__social a:hover { background: var(--red); color: white; }

.footer__links { display: flex; gap: 44px; }

.footer__col h4 { font-family: var(--font-head); font-weight: 700; color: white; font-size: 0.875rem; margin-bottom: 14px; }
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { color: rgba(255,255,255,0.52); text-decoration: none; font-size: 0.85rem; transition: color var(--t); }
.footer__col a:hover { color: white; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.28);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-3col { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr 260px; }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: fixed;
    top: calc(var(--ticker-h) + var(--nav-h));
    left: 0; right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    padding: 20px 24px;
    gap: 4px;
    z-index: 99;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav__links.open { display: flex; }
  .nav__hamburger { display: flex; }
  .nav__inner { gap: 8px; }
  .nav__links li a { display: block; padding: 10px 14px; }

  .hero { grid-template-columns: 1fr; }
  .hero__content { padding: 40px 24px; }
  .hero__side { display: none; }

  .main-layout { grid-template-columns: 1fr; padding: 32px 20px; }
  .grid-3col { grid-template-columns: 1fr; }
  .analisis__grid { grid-template-columns: 1fr; }
  .newsletter__inner { grid-template-columns: 1fr; gap: 36px; }
  .footer__top { grid-template-columns: 1fr; gap: 28px; }
  .footer__links { flex-wrap: wrap; gap: 24px; }
  .footer__bottom { flex-direction: column; gap: 6px; }

  .nav__search-expand.is-open { width: 240px; }
}

/* ============================================================
   RESPONSIVE FIXES — mobile & tablet (appended)
   ============================================================ */

/* Global: prevent horizontal scroll & ensure images scale */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
img, svg, video { max-width: 100%; height: auto; }
.hero__img-wrap img,
.card__img-wrap img,
.analisis__img-wrap img { height: 100%; }

/* TABLET (≤1024px) */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .main-layout {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 40px 20px;
  }
  .sidebar { flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .sidebar__block { flex: 1 1 280px; }
  .hero { min-height: auto; }
  .hero__content { padding: 48px 32px; }
  .hero__side { padding: 32px 20px; }
  .analisis__grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .analisis__body { padding: 22px; }
  .newsletter { padding: 64px 0; }
  .newsletter__inner { gap: 40px; }
  .footer__top { gap: 36px; }
  .nav__logo img { height: 90px !important; }
}

/* MOBILE (≤768px) */
@media (max-width: 768px) {
  :root { --nav-h: 60px; --ticker-h: 30px; }

  .container { padding: 0 16px; }

  /* Ticker */
  .ticker-label { font-size: 0.6rem; padding: 0 10px; letter-spacing: 1px; }
  .ticker-inner span { font-size: 0.72rem; }

  /* Nav */
  .nav__inner { padding: 0 16px; gap: 6px; }
  .nav__logo img { height: 70px !important; }
  .nav__actions { gap: 4px; }
  .nav__search-icon,
  .nav__darkmode,
  .nav__hamburger { min-width: 44px; min-height: 44px; justify-content: center; }
  .nav__links li a {
    padding: 14px 16px;
    font-size: 0.95rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav__search-expand.is-open {
    position: fixed;
    top: calc(var(--ticker-h) + var(--nav-h) + 4px);
    left: 12px; right: 12px;
    width: auto;
  }

  /* Hero */
  .hero { display: block; min-height: auto; }
  .hero__content {
    padding: 36px 20px;
    gap: 14px;
    text-align: left;
  }
  .hero__title {
    font-size: clamp(1.4rem, 6vw, 2rem);
    line-height: 1.22;
  }
  .hero__excerpt { font-size: 0.92rem; line-height: 1.6; }
  .hero__meta { flex-wrap: wrap; gap: 8px; }
  .hero__byline { gap: 10px; }
  .btn-hero {
    padding: 12px 22px;
    font-size: 0.85rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .hero__side { display: none; }

  /* Category strip */
  .category-strip { padding: 0 12px; }
  .category-strip__item { padding: 12px 14px; font-size: 0.78rem; }

  /* Main layout */
  .main-layout {
    grid-template-columns: 1fr;
    padding: 28px 16px;
    gap: 32px;
  }
  .section-header h2 { font-size: 1.1rem; }
  .section-header { margin-bottom: 22px; }

  /* Cards grid: 1 col mobile */
  .grid-3col { grid-template-columns: 1fr; gap: 18px; }
  .card__body { padding: 16px; }
  .card__title { font-size: 1rem; }
  .card__excerpt { font-size: 0.85rem; }
  .card__footer { flex-wrap: wrap; gap: 10px; }

  /* Disable hover overlay on touch — show content normally */
  .card__img-overlay { display: none; }

  /* Sidebar stacks below, full width */
  .sidebar { flex-direction: column; gap: 20px; }
  .sidebar__block { flex: 1 1 100%; padding: 20px; }

  /* Análisis */
  .analisis { padding: 48px 0; }
  .analisis__grid { grid-template-columns: 1fr; gap: 20px; }
  .analisis__img-wrap { height: 200px; }
  .analisis__body { padding: 20px; }
  .analisis__body h3 { font-size: 1.05rem; }
  .analisis__body p { font-size: 0.88rem; }
  .analisis__actions { flex-wrap: wrap; gap: 14px; }

  /* Newsletter */
  .newsletter { padding: 48px 0; }
  .newsletter__inner { grid-template-columns: 1fr; gap: 32px; }
  .newsletter__text h2 { font-size: clamp(1.4rem, 5vw, 1.8rem); }
  .newsletter__text p { font-size: 0.9rem; }
  .podcast-card { flex-wrap: wrap; padding: 12px; gap: 10px; }
  .podcast-title { font-size: 0.78rem; }
  .podcast-play { margin-left: auto; min-width: 44px; min-height: 44px; }
  .newsletter__inputs input,
  .btn-newsletter {
    min-height: 48px;
    font-size: 0.95rem;
  }

  /* Footer: stack columns */
  .footer { padding: 40px 0 0; }
  .footer__top {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 32px;
  }
  .footer__brand p { max-width: 100%; }
  .footer__links {
    flex-direction: column;
    gap: 24px;
  }
  .footer__col h4 { margin-bottom: 10px; }
  .footer__col ul { gap: 8px; }
  .footer__social a { width: 40px; height: 40px; }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 6px;
    padding: 16px;
  }

  /* Tap targets */
  .share-btn { width: 36px; height: 36px; }
  .btn-sidebar,
  .btn-link,
  .see-all { min-height: 36px; display: inline-flex; align-items: center; }
}

/* MOBILE PEQUEÑO (≤480px) */
@media (max-width: 480px) {
  :root { --nav-h: 56px; }

  .container { padding: 0 12px; }

  .ticker-label { display: none; }
  .ticker-inner span { font-size: 0.7rem; }

  .nav__inner { padding: 0 12px; }
  .nav__logo img { height: 56px !important; }

  .hero__content { padding: 28px 16px; }
  .hero__title { font-size: clamp(1.25rem, 7vw, 1.7rem); }
  .hero__excerpt { font-size: 0.88rem; }
  .btn-hero { width: 100%; justify-content: center; text-align: center; }

  .category-strip__item { padding: 10px 12px; font-size: 0.74rem; }

  .main-layout { padding: 22px 12px; gap: 26px; }
  .section-header { flex-wrap: wrap; gap: 8px; }
  .section-header h2 { font-size: 1rem; }

  .card__body { padding: 14px; }
  .card__title { font-size: 0.95rem; }
  .card__excerpt { font-size: 0.82rem; }
  .card__meta-row { flex-wrap: wrap; gap: 6px; }
  .card__footer { flex-direction: column; align-items: flex-start; }

  .sidebar__block { padding: 16px; }
  .sidebar__title { font-size: 0.95rem; }
  .most-read__num { font-size: 1.25rem; min-width: 22px; }
  .most-read__link { font-size: 0.82rem; }

  .analisis { padding: 36px 0; }
  .analisis__img-wrap { height: 170px; }
  .analisis__body { padding: 16px; }
  .analisis__body h3 { font-size: 1rem; }
  .analisis__actions { flex-direction: column; align-items: flex-start; }

  .newsletter { padding: 40px 0; }
  .newsletter__text h2 { font-size: 1.35rem; }
  .podcast-card { flex-direction: column; align-items: flex-start; }
  .podcast-play { margin-left: 0; align-self: flex-end; }

  .footer { padding: 32px 0 0; }
  .footer__logo { font-size: 1.2rem; }
  .footer__bottom { font-size: 0.7rem; }

  /* Reduce ticker animation a bit on small screens */
  .ticker-inner { animation-duration: 28s; }
}

/* Touch-friendly: disable image-zoom hover transforms on coarse pointers */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: 0 2px 8px rgba(26,39,68,0.07); }
  .card:hover .card__img-wrap img { transform: none; }
  .card__img-overlay { display: none; }
  .hero:hover .hero__img-wrap img { transform: scale(1.04); }
  .analisis__card:hover { transform: none; }
}
