/* ==========================================================================
   ESTILOS EDITORIALES E-TINT & ALTA PRENSA - news.vecinoslaserena.cl
   Inspirado en la gran tipografía de prensa suiza, The Atlantic y Monocle.
   100% Alta Fidelidad Visual. Cero estética genérica de IA.
   ========================================================================== */

:root {
  /* MODO POR DEFECTO: PAPEL PRENSA MATUTINO (WARM PAPER & INK) */
  --bg-page: #FAF7F0;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F4EFE6;
  --bg-subtle: #EFE9DC;
  --bg-inset: #E6DFCE;
  
  --ink-primary: #181512;
  --ink-secondary: #48433D;
  --ink-muted: #7A7268;
  --ink-faint: #B3AAA0;
  
  --border-strong: #181512;
  --border-medium: #D1C7B5;
  --border-light: #E5DDCF;
  --border-double: #181512;

  --accent-navy: #0F2D4A;
  --accent-marine: #1B4965;
  --accent-terra: #B8532F;
  --accent-gold: #C29B38;
  --accent-astro: #2C3E6B;
  
  --font-serif-masthead: 'Playfair Display', 'Fraunces', Georgia, serif;
  --font-serif-reading: 'Newsreader', 'Lora', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow-sm: 0 1px 3px rgba(24, 21, 18, 0.05);
  --shadow-md: 0 4px 12px rgba(24, 21, 18, 0.08);
  --shadow-lg: 0 12px 32px rgba(24, 21, 18, 0.12);

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --reading-font-scale: 18px;
  --transition-theme: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   TEMA E-TINT: MONOCROMO TINTA ELECTRÓNICA DE ALTO CONTRASTE
   ========================================================================== */
body.theme-etint {
  --bg-page: #F2EFE9;
  --bg-surface: #EAE6DE;
  --bg-surface-elevated: #DFD9CE;
  --bg-subtle: #D8D2C5;
  --bg-inset: #CFC7B8;
  
  --ink-primary: #0A0A0A;
  --ink-secondary: #2E2E2E;
  --ink-muted: #595959;
  --ink-faint: #8C8C8C;
  
  --border-strong: #0A0A0A;
  --border-medium: #8C8C8C;
  --border-light: #B8B2A6;
  --border-double: #0A0A0A;

  --accent-navy: #1A1A1A;
  --accent-marine: #333333;
  --accent-terra: #111111;
  --accent-gold: #444444;
  --accent-astro: #222222;

  --shadow-sm: none;
  --shadow-md: 2px 2px 0px rgba(10, 10, 10, 0.15);
  --shadow-lg: 4px 4px 0px rgba(10, 10, 10, 0.2);
}

/* ==========================================================================
   TEMA OBSERVATORIO NOCTURNO (STARLIGHT DARK)
   ========================================================================== */
body.theme-observatorio {
  --bg-page: #0B0E14;
  --bg-surface: #121722;
  --bg-surface-elevated: #1B2232;
  --bg-subtle: #242D40;
  --bg-inset: #0F141E;
  
  --ink-primary: #F2F4F8;
  --ink-secondary: #C2C9D6;
  --ink-muted: #8E99AC;
  --ink-faint: #596478;
  
  --border-strong: #404F6B;
  --border-medium: #2B364B;
  --border-light: #1D2636;
  --border-double: #8E99AC;

  --accent-navy: #4582EC;
  --accent-marine: #20C997;
  --accent-terra: #E67E22;
  --accent-gold: #F1C40F;
  --accent-astro: #6E88FF;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.65);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition: var(--transition-theme);
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1360px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   TICKER / TÉLEX DE ÚLTIMA HORA (ALDEA GLOBAL)
   ========================================================================== */
.telex-bar {
  background-color: var(--border-strong);
  color: var(--bg-page);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-medium);
  overflow: hidden;
  position: relative;
  z-index: 40;
}

.telex-label {
  background-color: var(--accent-terra);
  color: #FFFFFF;
  padding: 3px 12px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  border-radius: var(--radius-xs);
  box-shadow: 0 0 10px rgba(184, 83, 47, 0.4);
}

.telex-label .pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #FFFFFF;
  border-radius: 50%;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.telex-marquee-wrapper {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  margin-left: 14px;
}

.telex-marquee {
  display: inline-block;
  white-space: nowrap;
  animation: telexScroll 35s linear infinite;
  padding-right: 50px;
}

.telex-marquee:hover {
  animation-play-state: paused;
}

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

.telex-item {
  display: inline-flex;
  align-items: center;
  margin-right: 32px;
  cursor: pointer;
  opacity: 0.95;
}

.telex-item:hover {
  text-decoration: underline;
  opacity: 1;
}

.telex-sep {
  opacity: 0.4;
  margin: 0 12px;
}

/* ==========================================================================
   TOP UTILITY BAR: TELEMETRÍA, MODOS Y COORDENADAS
   ========================================================================== */
.top-utility-bar {
  border-bottom: 1px solid var(--border-light);
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  background-color: var(--bg-surface-elevated);
}

.top-utility-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.telemetry-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.telemetry-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.telemetry-pill strong {
  color: var(--ink-primary);
  font-weight: 600;
}

.utility-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* SELECTOR DE TEMA / E-TINT */
.theme-switcher {
  display: inline-flex;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.theme-btn {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  color: var(--ink-secondary);
  transition: all 0.2s ease;
}

.theme-btn.active {
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   MASTHEAD EDITORIAL / GRAN CABECERA DE PRENSA
   ========================================================================== */
.masthead {
  padding: 24px 0 16px;
  border-bottom: 3px double var(--border-double);
  position: relative;
  background-color: var(--bg-page);
}

.masthead-meta-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.masthead-meta-top .meta-center {
  text-align: center;
  font-weight: 600;
  color: var(--ink-secondary);
}

.masthead-meta-top .meta-right {
  text-align: right;
}

.masthead-brand {
  text-align: center;
  margin: 12px 0 16px;
}

.brand-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-terra);
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.brand-title {
  font-family: var(--font-serif-masthead);
  font-size: clamp(40px, 7.5vw, 84px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
  text-transform: uppercase;
  margin: 0;
}

.brand-title span.accent {
  color: var(--accent-navy);
  font-style: italic;
  font-weight: 400;
  text-transform: capitalize;
  margin-left: 8px;
}

body.theme-observatorio .brand-title span.accent {
  color: var(--accent-astro);
}

.brand-tagline {
  font-family: var(--font-serif-reading);
  font-style: italic;
  font-size: clamp(15px, 2vw, 19px);
  color: var(--ink-secondary);
  margin-top: 10px;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   NAVEGACIÓN GLOCAL: BARRA DE NAVEGACIÓN Y SELECTOR DE COMUNAS
   ========================================================================== */
.nav-sticky-wrapper {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-theme);
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 16px;
}

.nav-categories {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.nav-categories::-webkit-scrollbar {
  display: none;
}

.nav-cat-btn {
  padding: 6px 12px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.nav-cat-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--ink-primary);
}

.nav-cat-btn.active {
  background-color: var(--ink-primary);
  color: var(--bg-page);
  border-color: var(--ink-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
  border: 1px solid var(--border-medium);
  background-color: var(--bg-surface);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background-color: var(--bg-subtle);
  border-color: var(--ink-primary);
}

.btn-pill {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.btn-pill-primary {
  background-color: var(--accent-terra);
  color: #FFFFFF;
}

.btn-pill-primary:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-sm);
}

.btn-pill-outline {
  border: 1px solid var(--border-strong);
  color: var(--ink-primary);
  background-color: transparent;
}

.btn-pill-outline:hover {
  background-color: var(--ink-primary);
  color: var(--bg-page);
}

/* CINTA DE LAS 15 COMUNAS */
.comunas-ribbon {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  padding: 6px 0;
  font-size: 12px;
}

.comunas-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.comunas-inner::-webkit-scrollbar {
  display: none;
}

.comuna-label-fixed {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
  padding-right: 8px;
  border-right: 1px solid var(--border-medium);
}

.comuna-chip {
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}

.comuna-chip:hover {
  border-color: var(--ink-primary);
  color: var(--ink-primary);
}

.comuna-chip.active {
  background-color: var(--accent-navy);
  color: #FFFFFF;
  border-color: var(--accent-navy);
  font-weight: 600;
}

/* ==========================================================================
   LAYOUT PRINCIPAL EDITORIAL
   ========================================================================== */
.main-editorial-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  margin-top: 28px;
  margin-bottom: 60px;
}

@media (max-width: 1024px) {
  .main-editorial-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ==========================================================================
   GRAN PORTADA / LEAD FEATURE ARTICLE
   ========================================================================== */
.lead-story-card {
  border-bottom: 2px solid var(--border-strong);
  padding-bottom: 32px;
  margin-bottom: 36px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

@media (max-width: 860px) {
  .lead-story-card {
    grid-template-columns: 1fr;
  }
}

.lead-story-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-medium);
  aspect-ratio: 16 / 10;
}

.lead-story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.lead-story-card:hover .lead-story-media img {
  transform: scale(1.03);
}

.badge-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--border-strong);
  color: var(--bg-page);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}

.lead-story-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.story-meta-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.story-meta-inline .comuna-badge {
  color: var(--accent-terra);
  font-weight: 700;
}

.lead-story-title {
  font-family: var(--font-serif-masthead);
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
  margin-bottom: 14px;
}

.lead-story-title:hover {
  color: var(--accent-terra);
}

.lead-story-sub {
  font-family: var(--font-serif-reading);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-secondary);
  margin-bottom: 18px;
}

.story-author-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-medium);
}

.author-info {
  font-size: 12.5px;
  line-height: 1.3;
}

.author-name {
  font-weight: 700;
  color: var(--ink-primary);
}

.author-role {
  color: var(--ink-muted);
  font-size: 11.5px;
}

/* ==========================================================================
   GRID DE ARTÍCULOS EDITORIALES
   ========================================================================== */
.stories-subgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

@media (max-width: 680px) {
  .stories-subgrid {
    grid-template-columns: 1fr;
  }
}

.story-card-standard {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-medium);
  padding-bottom: 24px;
  cursor: pointer;
}

.story-card-standard:hover .story-card-title {
  color: var(--accent-terra);
}

.story-card-media {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-bottom: 14px;
  position: relative;
}

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

.story-card-standard:hover .story-card-media img {
  transform: scale(1.04);
}

.story-card-title {
  font-family: var(--font-serif-masthead);
  font-size: 21px;
  line-height: 1.22;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink-primary);
  transition: color 0.15s ease;
}

.story-card-excerpt {
  font-family: var(--font-serif-reading);
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   SIDEBAR / TABLEROS, ENCUESTAS Y CONTROLES
   ========================================================================== */
.editorial-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--border-strong);
}

.sidebar-box-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ENCUESTA CIUDADANA VECINOS */
.poll-question {
  font-family: var(--font-serif-masthead);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--ink-primary);
}

.poll-context {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poll-option-btn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-medium);
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background-color: var(--bg-surface-elevated);
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.poll-option-btn:hover:not(.voted) {
  border-color: var(--ink-primary);
  background-color: var(--bg-subtle);
}

.poll-option-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(184, 83, 47, 0.15);
  z-index: 1;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-observatorio .poll-option-bar {
  background-color: rgba(110, 136, 255, 0.2);
}

.poll-option-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.poll-pct {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  margin-left: 8px;
  color: var(--accent-terra);
}

/* WIDGET OBSERVATORIOS & CIELO ELQUI */
.astro-widget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.astro-stat {
  background-color: var(--bg-subtle);
  padding: 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.astro-stat-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 4px;
}

.astro-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.2;
}

/* REPORTERO VECINAL / BUZÓN DE PRENSA */
.box-reportero {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-elevated) 100%);
  border-left: 4px solid var(--accent-terra);
}

/* ==========================================================================
   MODAL DE LECTURA INMERSIVA / ARTÍCULO COMPLETO (E-TINT READER)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.reader-modal-dialog {
  background-color: var(--bg-page);
  color: var(--ink-primary);
  width: 100%;
  max-width: 900px;
  max-height: 92vh;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.reader-top-controls {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-medium);
  background-color: var(--bg-surface-elevated);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.font-scale-btn {
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  background-color: var(--bg-surface);
}

.reader-body-scroll {
  overflow-y: auto;
  padding: 36px 44px;
}

@media (max-width: 640px) {
  .reader-body-scroll {
    padding: 20px 18px;
  }
}

.reader-article-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 20px;
}

.reader-title {
  font-family: var(--font-serif-masthead);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.reader-sub {
  font-family: var(--font-serif-reading);
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink-secondary);
  font-style: italic;
  margin-bottom: 18px;
}

.reader-media-block {
  margin: 24px 0 28px;
}

.reader-media-block img {
  border-radius: var(--radius-xs);
  width: 100%;
}

.reader-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 8px;
  padding-left: 4px;
  border-left: 2px solid var(--accent-terra);
}

.reader-lead-paragraph {
  font-family: var(--font-serif-reading);
  font-size: calc(var(--reading-font-scale) + 2px);
  line-height: 1.6;
  font-weight: 600;
  margin-bottom: 20px;
}

.reader-lead-paragraph::first-letter {
  font-family: var(--font-serif-masthead);
  float: left;
  font-size: 3.8em;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 8px;
  padding-bottom: 2px;
  color: var(--accent-terra);
  font-weight: 800;
}

.reader-prose p {
  font-family: var(--font-serif-reading);
  font-size: var(--reading-font-scale);
  line-height: 1.7;
  color: var(--ink-primary);
  margin-bottom: 18px;
}

/* ==========================================================================
   MODAL DE LOGIN / CLUB DE LECTORES
   ========================================================================== */
.auth-box-inner {
  padding: 30px;
  max-width: 440px;
  width: 100%;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 6px;
  font-weight: 600;
}

.form-input {
  width: 100%;
  border: 1px solid var(--border-medium);
  background-color: var(--bg-surface);
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-navy);
  box-shadow: 0 0 0 2px rgba(15, 45, 74, 0.15);
}

/* ==========================================================================
   FOOTER EDITORIAL / MAPA DE LAS 15 COMUNAS & CREDENCIALES
   ========================================================================== */
.footer-editorial {
  background-color: var(--border-strong);
  color: var(--bg-page);
  padding: 60px 0 30px;
  margin-top: 80px;
  border-top: 3px double var(--border-medium);
}

.footer-columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 40px;
}

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

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

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-list {
  list-style: none;
  font-size: 13.5px;
}

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-list a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.7;
  flex-wrap: wrap;
  gap: 14px;
}

/* SÍNTESIS DE VOZ ANIMACIÓN DE ONDA */
.audio-playing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.audio-playing-indicator span {
  width: 3px;
  background-color: var(--accent-terra);
  border-radius: 2px;
  animation: soundBar 1s ease-in-out infinite alternate;
}

.audio-playing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.audio-playing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes soundBar {
  0% { height: 4px; }
  100% { height: 16px; }
}
