:root {
  color-scheme: light;
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #475569;
  --muted-light: #64748b;
  --paper: #f8fafc;
  --white: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #f0fdfa;
  --whatsapp: #128c7e;
  --whatsapp-dark: #075e54;
  --whatsapp-soft: #dcf8c6;
  --focus: #f59e0b;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  top: -80px;
  left: 12px;
  background: #fff;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-weight: 700;
  z-index: 50;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

.shell {
  width: min(100% - 32px, 760px);
  margin-inline: auto;
}

/* ---------------------------------------------------- CABECERA */
.site-header {
  position: relative;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  width: min(100% - 32px, 1000px);
  margin: auto;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.brand-word {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -1.2px;
  color: var(--ink);
}
.brand-word > span {
  color: var(--teal);
}

.brand-mark {
  font-size: 10px;
  color: #10b981;
  margin-top: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.edition-chip {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 5px 8px;
  color: var(--teal-dark);
  background: var(--teal-light);
  border: 1px solid #ccfbf1;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.languages {
  display: flex;
  gap: 3px;
}

.lang-option {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 8px;
  color: var(--muted);
  border-radius: 6px;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.lang-option:hover {
  color: var(--ink);
  background: var(--line);
}

.lang-option.selected {
  color: var(--white);
  background: var(--ink);
}

/* ---------------------------------------------------- TIPOGRAFÍA Y LABELS */
.overline {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
}

.eyebrow {
  color: var(--teal-dark);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.crumb {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
}
.crumb a {
  text-decoration: none;
}
.crumb a:hover {
  text-decoration: underline;
  color: var(--ink);
}

/* ---------------------------------------------------- BOTONES TÁCTILES */
.button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.button:active {
  transform: scale(0.98);
}

.button-small {
  display: inline-flex;
  min-height: 42px;
  padding: 9px 14px;
  font-size: 14px;
}

.button-channel {
  color: #064e3b;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}
.button-channel:hover {
  background: #bbf7d0;
}

.button-share {
  color: var(--white);
  background: var(--whatsapp-dark);
  border: 1px solid var(--whatsapp-dark);
}
.button-share:hover {
  background: #064e3b;
}

.button-outline {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.button-outline:hover {
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}

.button-more {
  max-width: 340px;
  margin: 24px auto 0;
}

/* ---------------------------------------------------- PORTADA PRINCIPAL */
.home-hero {
  padding: 36px 0 24px;
}
.home-hero h1 {
  font-size: clamp(28px, 7vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  max-width: 760px;
  margin: 0 0 14px;
  font-weight: 900;
  color: var(--ink);
}
.home-hero .hero-sub {
  color: var(--muted);
  font-size: clamp(16px, 4.2vw, 19px);
  line-height: 1.55;
  max-width: 640px;
  margin: 0;
}

.sections {
  padding: 16px 0 28px;
}
.section-heading {
  margin: 12px 0 16px;
}
.section-heading h2 {
  font-size: 23px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 850;
  color: var(--ink);
}

.editions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.edition-card {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 16px;
  display: block;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.edition-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.08);
}
.edition-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.edition-badge {
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 2px 7px;
  letter-spacing: 0.02em;
}
.edition-card .eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
}
.edition-card h2 {
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 6px 0 8px;
  font-weight: 850;
  color: var(--ink);
}
.edition-card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 10px;
}
.edition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 14px;
}
.edition-tags span {
  font-size: 11.5px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 7px;
  font-weight: 550;
}

.home-recent {
  margin: 16px auto 36px;
}

.home-features {
  margin: 28px auto 40px;
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.feature-icon {
  font-size: 24px;
  color: var(--teal-dark);
  margin-bottom: 10px;
}
.feature-card h3 {
  font-size: 17.5px;
  font-weight: 850;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.home-cta-box {
  margin: 16px auto 52px;
  background: linear-gradient(135deg, #09232c 0%, #064e3b 100%);
  color: var(--white);
  border-radius: 16px;
  padding: 26px 20px;
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.15);
}
.home-cta-box .overline {
  color: #6ee7b7;
}
.home-cta-box h2 {
  font-size: clamp(20px, 5.2vw, 26px);
  color: var(--white);
  margin: 0 0 8px;
  font-weight: 850;
  line-height: 1.25;
}
.home-cta-box p {
  color: #d1fae5;
  font-size: 15px;
  margin: 0 0 18px;
  line-height: 1.5;
}
.cta-box-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------------------------------------------------- CONTACTO */
.contact-hero {
  padding: 28px 0 20px;
}
.contact-section {
  padding-bottom: 50px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 16px 0 24px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.contact-card-icon {
  font-size: 26px;
  margin-bottom: 8px;
}
.contact-card h2 {
  font-size: 18px;
  font-weight: 850;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.contact-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 16px;
  flex-grow: 1;
}
.contact-card .button {
  width: 100%;
}
.contact-direct {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
}
.contact-direct a {
  color: var(--teal-dark);
  text-decoration: underline;
}

.read-link {
  display: inline-block;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 800;
}

.home-explain {
  padding: 24px 0 60px;
  color: var(--muted);
}
.home-explain h2 {
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 800;
}
.home-explain p {
  margin: 0;
  line-height: 1.6;
}

/* ---------------------------------------------------- PORTADA DE EDICIÓN */
.edition-hero {
  padding: 24px 0 24px;
}
.edition-hero h1 {
  font-size: clamp(28px, 7.5vw, 46px);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 12px;
  font-weight: 900;
}
.edition-hero > p:not(.overline) {
  color: var(--muted);
  font-size: 16px;
  max-width: 600px;
  line-height: 1.55;
  margin: 0 0 16px;
}

.scroll-nav {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 6px 0 14px;
  scrollbar-width: thin;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.scroll-nav a {
  flex: none;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line-strong);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  min-height: 38px;
  display: flex;
  align-items: center;
}
.scroll-nav a.active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.news-section {
  padding: 0 0 44px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-row {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.news-row-link {
  text-decoration: none;
  display: block;
  padding: 18px;
}
.news-row-link:hover .read-link {
  text-decoration: underline;
}

.story-meta {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  flex-wrap: wrap;
  line-height: 1.3;
}

.news-row h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.28;
  font-weight: 800;
  margin: 8px 0;
  color: var(--ink);
}

.news-row p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 12px;
}

.news-row.compact h3 {
  font-size: 16.5px;
}
.news-row.compact p {
  display: none;
}
.news-row.compact .news-row-link {
  padding: 14px;
}

.empty-news {
  padding: 32px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------------------------------- LECTURA DE NOTICIA MÓVIL */
.article-container {
  padding-top: 22px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.article-shell {
  max-width: 720px;
}
.article-shell .crumb {
  margin-bottom: 16px;
}
.article-meta {
  margin-bottom: 10px;
}

.article-shell h1 {
  font-size: clamp(24px, 6.2vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 900;
  margin: 0 0 14px;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.article-date {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 18px;
}

.article-lead {
  font-size: clamp(17px, 4.4vw, 20px);
  line-height: 1.52;
  font-weight: 550;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--ink-soft);
  border-left: 3px solid var(--teal);
  padding-left: 14px;
}

.article-image {
  max-width: 760px;
  margin: 0 auto 20px;
}
.article-image img {
  display: block;
  max-height: 480px;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--line);
  border-radius: 12px;
}
.article-image figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  padding-left: 4px;
}

.article-text {
  max-width: 720px;
  padding-bottom: 32px;
}

.body-copy {
  font-size: 17.5px;
  line-height: 1.7;
  letter-spacing: -0.003em;
  color: var(--ink-soft);
  overflow-wrap: break-word;
}
.body-copy p {
  margin: 0 0 1.15em;
}

.key-facts {
  padding: 18px 20px;
  margin: 24px 0;
  background: var(--teal-light);
  border-left: 3px solid var(--teal);
  border-radius: 0 12px 12px 0;
}
.key-facts h2 {
  font-size: 16px;
  font-weight: 850;
  color: var(--teal-dark);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.key-facts ul {
  padding-left: 18px;
  margin: 0;
}
.key-facts li {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 7px;
  color: var(--ink-soft);
}
.key-facts li:last-child {
  margin-bottom: 0;
}

.source-note {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

.sources-list {
  margin-top: 18px;
  padding: 14px;
  background: var(--paper);
  border-radius: 10px;
}
.sources-list h2 {
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
  color: var(--muted);
}
.sources-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sources-list li {
  margin-bottom: 6px;
}
.sources-list a {
  font-size: 14px;
  color: var(--teal-dark);
  text-decoration: none;
  font-weight: 600;
}
.sources-list a:hover {
  text-decoration: underline;
}

.story-actions {
  margin: 26px 0 18px;
  display: grid;
  gap: 10px;
}
.story-actions .button {
  width: 100%;
}

.article-text > .button-channel {
  width: 100%;
  margin-top: 6px;
}

/* ---------------------------------------------------- PUBLICIDAD / PATROCINIO */
.ad-position {
  margin-top: 24px;
  margin-bottom: 32px;
}

.ad-slot {
  background: var(--white);
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 18px;
}
.ad-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 10.5px;
  color: var(--muted-light);
  font-weight: 800;
  margin-bottom: 10px;
}
.ad-slot a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
}
.ad-slot strong {
  font-size: 16.5px;
  line-height: 1.3;
  color: var(--ink);
}
.ad-slot a > span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.ad-slot img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  margin: 10px 0;
  border-radius: 10px;
}

.related-section {
  padding-bottom: 50px;
}

/* ---------------------------------------------------- ANÚNCIATE & 404 */
.advertise,
.not-found {
  padding: 48px 0 80px;
}
.advertise h1,
.not-found h1 {
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 900;
}
.advertise .button {
  max-width: 360px;
}
.advertise > p:last-child {
  color: var(--muted);
  font-size: 14px;
  margin-top: 20px;
}

/* ---------------------------------------------------- PIE DE PÁGINA */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 36px 0 calc(36px + env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  width: min(100% - 32px, 760px);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.footer-brand {
  font-weight: 900;
  font-size: 22px;
  text-decoration: none;
  color: var(--white);
  letter-spacing: -0.03em;
}
.footer-inner p {
  font-size: 12.5px;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 580px;
  margin: 6px 0;
}
.footer-inner nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
}
.footer-inner nav a {
  text-decoration: none;
  color: #cbd5e1;
}
.footer-inner nav a:hover {
  color: var(--white);
  text-decoration: underline;
}
.footer-inner small {
  font-size: 11.5px;
  color: #64748b;
}

/* ---------------------------------------------------- MEDIA QUERIES (DESKTOP / TABLET) */
@media (min-width: 650px) {
  .site-header-inner {
    min-height: 68px;
  }
  .home-hero {
    padding-top: 72px;
    padding-bottom: 44px;
  }
  .editions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .news-row h3 {
    font-size: 21px;
  }
  .news-row-link {
    padding: 22px;
  }
  .article-shell h1 {
    font-size: 40px;
  }
  .story-actions {
    grid-template-columns: 1fr 1fr;
  }
  .article-image img {
    border-radius: 14px;
  }
  .section-heading h2 {
    font-size: 28px;
  }
  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cta-box-actions {
    flex-direction: row;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .edition-card,
  .button {
    transition: none;
  }
}
