/* ═══════════════ News X (magazine list + full-story modal) ═══════════════ */
/* Feed tabs: "X News" (aime/news) vs "Suomalaisia uutisia" (aime/news/FI). */
.news-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 2px 0;
  border-bottom: 1px dashed rgba(139, 105, 20, 0.3);
}

.news-tab {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.news-tab:hover { color: var(--gold-lt); }
.news-tab:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: 2px; }
.news-tab[aria-selected="true"] {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: rgba(212, 160, 23, 0.07);
}

.news-status {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--gold-lt);
  letter-spacing: 0.06em;
  padding: 6px 2px 2px;
  min-height: 1em;
}

.news-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 4px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}
.news-list::-webkit-scrollbar { width: 8px; }
.news-list::-webkit-scrollbar-track { background: transparent; }
.news-list::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 4px; }
.news-list::-webkit-scrollbar-thumb:hover { background: var(--gold); }

.news-empty {
  color: var(--text-dim);
  font-family: var(--serif);
  font-style: italic;
  padding: 16px 2px;
  opacity: 0.8;
}

/* Each story: headline (link) + small date + ingress, split by a dashed rule. */
.news-item {
  padding: 16px 2px 18px;
  border-bottom: 1px dashed rgba(139, 105, 20, 0.3);
  animation: bubble-in 0.35s ease both;
}
.news-item:first-child { padding-top: 6px; }
.news-item:last-child { border-bottom: none; }

.news-item-header {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: "Cinzel Decorative", serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-shadow: 0 0 22px rgba(212, 160, 23, 0.22);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.news-item-header:hover,
.news-item-header:focus-visible {
  color: var(--gold-lt);
  text-shadow: 0 0 26px rgba(255, 215, 0, 0.4);
  outline: none;
}

.news-item-date {
  display: block;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 6px 0 8px;
}

.news-item-ingress {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.9;
}

.news-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed rgba(139, 105, 20, 0.3);
}
.np-btn {
  font-family: var(--sans);
  font-size: 0.72rem;
  padding: 7px 14px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold-lt);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.np-btn:hover:not(:disabled) { border-color: var(--gold-lt); }
.np-btn:disabled { opacity: 0.35; cursor: default; }
.np-info { font-family: var(--sans); font-size: 0.7rem; color: var(--text-dim); text-align: center; }

/* ─── Full-story modal ──────────────────────────────────── */
.news-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 6, 2, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: grid;
  place-items: end center;          /* bottom-sheet on mobile */
  padding: 0;
}
@media (min-width: 560px) {
  .news-overlay { place-items: center; padding: 24px; }
}

.news-modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  background: linear-gradient(145deg, #2a1a0a 0%, var(--parchment) 45%, #0d0802 100%);
  border: 1px solid var(--gold-dim);
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow), inset 0 0 0 2px var(--gold-dim);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: sv-rise 0.34s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
@media (min-width: 560px) {
  .news-modal { border-radius: 12px; max-height: 86vh; }
}

.news-modal-close {
  position: absolute;
  top: 10px; right: 12px;
  z-index: 2;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(13, 8, 2, 0.65);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.news-modal-close:hover { color: var(--gold-lt); border-color: var(--gold); background: rgba(212, 160, 23, 0.15); }
.news-modal-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.news-modal-scroll {
  overflow-y: auto;
  padding: 30px 32px 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}
.news-modal-scroll::-webkit-scrollbar { width: 8px; }
.news-modal-scroll::-webkit-scrollbar-track { background: transparent; }
.news-modal-scroll::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 4px; }

.news-modal-date {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.news-modal-info {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-style: italic;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.news-modal-title {
  font-family: "Cinzel Decorative", serif;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-shadow: 0 0 30px rgba(212, 160, 23, 0.3);
  margin-bottom: 14px;
}
.news-modal-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 1px;
  background: var(--gold-dim);
  margin-top: 12px;
  opacity: 0.6;
}
.news-modal-ingress {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
  opacity: 0.95;
}
.news-modal-body {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text);
}
.news-modal-body p { margin: 0 0 14px; }
.news-modal-body p:last-child { margin-bottom: 0; }
.news-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px auto;
  border-radius: 6px;
  border: 1px solid var(--gold-dim);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.news-figure {
  margin: 16px auto;
}
.news-figure .news-img {
  margin: 0 auto;          /* figure owns the outer spacing now */
}
.news-caption {
  display: block;
  text-align: center;
  margin-top: 1px;
  line-height: 0.9;
  opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {
  .news-modal { animation: none !important; }
}

.news-note {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 0.90rem;
}
