/* ==========================================================================
   Aurenda Briefing — Sistema de Diseño Editorial Broadsheet
   ========================================================================== */

:root {
  --base-font-size: 16px;

  /* Fuentes Tipográficas */
  --font-masthead: 'Cinzel', serif;
  --font-headline: 'Playfair Display', serif;
  --font-body: 'Newsreader', Georgia, serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transición fluida de temas */
  --transition-speed: 0.25s;
}

/* ---------------- TEMA 1: PAPEL PRENSA (POR DEFECTO) ---------------- */
[data-theme="paper"] {
  --bg-app: #FAF7F2;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F2EDE4;
  --bg-wire: #F4EFE6;
  --text-main: #1C1917;
  --text-secondary: #44403C;
  --text-muted: #78716C;
  --border-strong: #292524;
  --border-subtle: #D6CEC3;
  --border-double: #292524;
  --accent-ink: #8B1E1E; /* Rojo carmesí editorial */
  --accent-gold: #B48C36;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --modal-overlay: rgba(28, 25, 23, 0.7);
}

/* ---------------- TEMA 2: SEPIA ARCHIVO ---------------- */
[data-theme="sepia"] {
  --bg-app: #F4EBD8;
  --bg-surface: #FAF3E5;
  --bg-subtle: #EBE0C7;
  --bg-wire: #E8DCC2;
  --text-main: #2C241B;
  --text-secondary: #524435;
  --text-muted: #7A6953;
  --border-strong: #3D3123;
  --border-subtle: #D8CBB0;
  --border-double: #3D3123;
  --accent-ink: #7C2D12;
  --accent-gold: #A17628;
  --card-shadow: 0 2px 8px rgba(44, 36, 27, 0.06);
  --modal-overlay: rgba(44, 36, 27, 0.75);
}

/* ---------------- TEMA 3: TINTA NOCTURNA ---------------- */
[data-theme="night"] {
  --bg-app: #0F1216;
  --bg-surface: #171C23;
  --bg-subtle: #1F2630;
  --bg-wire: #13171D;
  --text-main: #F3F4F6;
  --text-secondary: #D1D5DB;
  --text-muted: #9CA3AF;
  --border-strong: #4B5563;
  --border-subtle: #2D3748;
  --border-double: #9CA3AF;
  --accent-ink: #EF4444;
  --accent-gold: #EAB308;
  --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --modal-overlay: rgba(0, 0, 0, 0.85);
}

/* ---------------- RESET Y BASE ---------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: var(--base-font-size);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  -webkit-font-smoothing: antialiased;
}

/* ---------------- HEADER / MASTHEAD BROADSHEET ---------------- */
.masthead-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.top-left, .top-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bullet-sep {
  opacity: 0.5;
}

.edition-badge {
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-ink);
}

.status-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 6px #10b981;
}

.ticker-text {
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.lang-controls, .theme-controls, .font-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px;
  background: var(--bg-surface);
}

.lang-btn, .theme-btn, .icon-btn {
  background: transparent;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 3px 8px;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}

.lang-btn {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.lang-btn:hover, .theme-btn:hover, .icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.lang-btn.active {
  background: var(--accent-gold);
  color: #FFFFFF;
}

.theme-btn.active {
  background: var(--accent-ink);
  color: #FFFFFF;
}

/* Masthead Principal */
.masthead {
  display: grid;
  grid-template-columns: 1fr 2.5fr 1fr;
  align-items: center;
  padding: 1.8rem 0 1.2rem;
  text-align: center;
  border-bottom: 4px double var(--border-double);
}

.masthead-side {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.left-quote em {
  display: block;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.right-edition {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.access-pill {
  display: inline-block;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  color: var(--accent-ink);
  margin-bottom: 4px;
}

.masthead-pre {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  font-weight: 700;
  color: var(--accent-ink);
  margin-bottom: 0.3rem;
}

.masthead-title {
  font-family: var(--font-masthead);
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.masthead-sub {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-secondary);
}

/* Barra de Canales / Navegación */
.channels-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

.channels-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.channel-pill {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.channel-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

.channel-pill.active {
  background: var(--text-main);
  color: var(--bg-surface);
  border-color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.action-btn {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s;
}

.action-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.action-btn.primary-btn {
  background: var(--accent-ink);
  color: #FFFFFF;
  border-color: var(--accent-ink);
}

.action-btn.primary-btn:hover {
  opacity: 0.92;
}

/* ---------------- CONTENEDOR PRINCIPAL ---------------- */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

.feed-header-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-strong);
}

.current-feed-name {
  font-family: var(--font-headline);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.current-feed-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
}

.feed-status-badge {
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
}

.cache-badge {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: 3px;
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
}

.count-badge {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: 3px;
  color: var(--text-muted);
}

/* ---------------- MAQUETACIÓN BROADSHEET ---------------- */
.broadsheet-layout {
  display: grid;
  grid-template-columns: 2.8fr 1.2fr;
  gap: 2.5rem;
}

/* Columna de Portada (Lead Story) */
.lead-story-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.lead-content {
  display: flex;
  flex-direction: column;
}

.lead-kicker {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-ink);
  margin-bottom: 0.5rem;
}

.lead-title {
  font-family: var(--font-headline);
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
  line-height: 1.18;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  cursor: pointer;
}

.lead-title:hover {
  color: var(--accent-ink);
}

.lead-meta {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.lead-summary {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Letra Capitular (Drop Cap) */
.lead-dropcap::first-letter {
  float: left;
  font-family: var(--font-masthead);
  font-size: 3.8rem;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 12px;
  padding-bottom: 2px;
  color: var(--accent-ink);
  font-weight: 800;
}

.lead-image-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  aspect-ratio: 16/10;
}

.lead-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.lead-image:hover {
  transform: scale(1.03);
}

/* Separador Tipográfico */
.editorial-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2rem 0;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.editorial-divider::before,
.editorial-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.editorial-divider span {
  padding: 0 1rem;
}

/* Noticias Secundarias (2 Columnas) */
.secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.card-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-kicker {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.3rem;
}

.card-title {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  cursor: pointer;
}

.card-title:hover {
  color: var(--accent-ink);
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.8rem;
  margin-top: auto;
}

.card-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-link {
  background: transparent;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-ink);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
}

.btn-link:hover {
  background: var(--bg-subtle);
}

/* ---------------- COLUMNA LATERAL: THE WIRE ---------------- */
.wire-sidebar {
  background: var(--bg-wire);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  height: fit-content;
}

.wire-header {
  border-bottom: 2px solid var(--border-strong);
  padding-bottom: 0.6rem;
  margin-bottom: 1.2rem;
}

.wire-header h3 {
  font-family: var(--font-masthead);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

.wire-sub {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-ink);
}

.wire-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.wire-item {
  border-bottom: 1px dotted var(--border-subtle);
  padding-bottom: 1.2rem;
}

.wire-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wire-time {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 0.2rem;
}

.wire-title {
  font-family: var(--font-headline);
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  margin-bottom: 0.4rem;
}

.wire-title:hover {
  color: var(--accent-ink);
}

.wire-snippet {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------- ESTADOS DE CARGA Y ERROR ---------------- */
.loading-state, .error-state {
  text-align: center;
  padding: 5rem 1rem;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-family: var(--font-headline);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.error-box {
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid #ef4444;
  padding: 2.5rem;
  border-radius: 6px;
}

.error-box h3 {
  font-family: var(--font-headline);
  color: #ef4444;
  margin-bottom: 0.8rem;
}

/* ---------------- MODALES ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2.2rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.reader-dialog {
  max-width: 820px;
  padding-top: 0;
}

.reader-top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0 0.85rem;
  margin-bottom: 1rem;
}

.reader-top-label,
.reader-source {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.modal-top-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--bg-surface-alt, rgba(0, 0, 0, 0.03));
  border: 1.5px solid var(--border-strong, #1C1917);
  border-radius: 6px;
  color: var(--text-main);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.modal-top-icon-btn svg {
  display: block;
}

.modal-top-icon-btn:hover,
.modal-top-icon-btn:active {
  background: var(--text-main);
  color: var(--bg-surface);
  border-color: var(--text-main);
}

.modal-close-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface-alt, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}



.modal-close-pill span {
  font-size: 0.95rem;
  line-height: 1;
}

.modal-close-pill:hover,
.modal-close-pill:active {
  background: var(--text-main);
  color: var(--bg-surface);
  border-color: var(--text-main);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-header h3 {
  font-family: var(--font-headline);
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.modal-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Estilos de Reader View */
.reader-title {
  font-family: var(--font-headline);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
  margin: 0.2rem 0 0.8rem;
}

.reader-meta {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.reader-image-wrap {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  margin-bottom: 1.8rem;
  border: 1px solid var(--border-subtle);
}

.reader-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reader-body {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 2rem;
}

.reader-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.2rem;
}

.reader-actions-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.close-reader-bottom-btn {
  font-weight: 500;
  font-size: 0.84rem;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.close-reader-bottom-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* Formularios en Modales */
.modal-form .form-group {
  margin-bottom: 1.2rem;
}

.modal-form label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.modal-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  border-radius: 4px;
}

.modal-form input:focus {
  outline: 2px solid var(--accent-ink);
  border-color: transparent;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.custom-feeds-list, .bookmarks-list {
  list-style: none;
  margin-top: 1rem;
  max-height: 240px;
  overflow-y: auto;
}

.custom-feed-item, .bookmark-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px dotted var(--border-subtle);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

.delete-feed-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-weight: 700;
  padding: 2px 6px;
}

/* ---------------- TOAST DE NOTIFICACIONES ---------------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-main);
  color: var(--bg-app);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 2000;
  transition: opacity 0.3s, transform 0.3s;
}

/* ---------------- FOOTER CLÁSICO ---------------- */
.footer-container {
  max-width: 1400px;
  margin: 4rem auto 2rem;
  padding: 0 1.5rem;
  font-family: var(--font-ui);
}

.footer-rule {
  border-top: 3px double var(--border-double);
  margin-bottom: 1.8rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
}

.footer-brand h4 {
  font-family: var(--font-masthead);
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: right;
}

.footer-copyright {
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

/* Clases de utilidad */
.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------------- RESPONSIVE DESIGN ---------------- */
@media (max-width: 1024px) {
  .broadsheet-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .lead-story-card {
    grid-template-columns: 1fr;
  }

  .masthead {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .masthead-side {
    display: none;
  }
}

@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .top-left {
    justify-content: center;
    font-size: 0.75rem;
  }

  .top-right {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .top-center {
    display: none;
  }

  .secondary-grid {
    grid-template-columns: 1fr;
  }

  .channels-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-actions {
    justify-content: flex-end;
  }

  .modal-backdrop {
    padding: 0.65rem;
  }

  .modal-dialog {
    padding: 1.25rem;
    max-height: 92vh;
    max-height: 92dvh;
  }

  .reader-dialog {
    padding: 0 1.15rem 1.25rem;
  }

  .reader-top-bar {
    padding: 0.85rem 0 0.75rem;
  }

  .reader-body {
    font-size: 1.08rem;
    line-height: 1.72;
  }

  .reader-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .reader-actions-right {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .reader-actions .action-btn {
    font-size: 0.82rem;
    font-weight: 500;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 0.55rem 0.6rem;
  }
}

/* ---------------- ESTILOS DE CONTACTO Y ENLACES EDITORIALES DEL FOOTER ---------------- */
.footer-actions-row {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.footer-contact-btn,
.footer-telegram-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.footer-contact-btn:hover,
.footer-telegram-btn:hover {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
  transform: translateY(-1px);
}

.modal-form textarea,
.modal-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  border-radius: 4px;
  resize: vertical;
}

.modal-form textarea:focus,
.modal-form select:focus {
  outline: 2px solid var(--accent-ink);
  border-color: transparent;
}

.field-error-msg {
  display: block;
  color: #dc2626;
  font-size: 0.78rem;
  font-family: var(--font-ui);
  margin-top: 0.35rem;
  font-weight: 500;
}

.form-status-alert {
  padding: 0.85rem 1.1rem;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
  line-height: 1.45;
}

.form-status-alert.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid #10b981;
  color: #065f46;
}

[data-theme="night"] .form-status-alert.success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.form-status-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid #ef4444;
  color: #991b1b;
}

[data-theme="night"] .form-status-alert.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
