/* News Feed & Article Styles */

.news-section {
  padding: 3rem 0 5rem;
}

.news-header-bar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .news-header-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.category-scroll-container {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

/* Pinned Featured Article Card */
.pinned-article-card {
  position: relative;
  border-radius: 3px;
  background: var(--grain), linear-gradient(135deg, rgba(42, 30, 18, 0.95), rgba(20, 13, 8, 0.97));
  border: 1px solid rgba(207, 165, 69, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 180, 0.1),
    0 0 0 1px #0a0705,
    0 0 0 2px rgba(168, 129, 47, 0.7),
    0 0 0 3px #0a0705,
    0 18px 36px -10px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  margin: 0 3px 3rem;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 992px) {
  .pinned-article-card {
    grid-template-columns: 1.1fr 1fr;
  }
}

.pinned-article-card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 180, 0.14),
    0 0 0 1px #0a0705,
    0 0 0 2px var(--gold-400),
    0 0 0 3px #0a0705,
    0 22px 44px -10px rgba(0, 0, 0, 0.9),
    0 0 34px rgba(232, 194, 90, 0.22);
}

.pinned-image-wrapper {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}

.pinned-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.pinned-article-card:hover .pinned-image {
  transform: scale(1.04);
}

.pinned-badge-overlay {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  flex-wrap: wrap;
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.pinned-content-body {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pinned-title {
  font-family: var(--font-deco);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--parch-100);
  text-shadow: 0 2px 0 #000;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.pinned-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-gold);
  margin-bottom: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.pinned-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Standard Article Card */
.article-card {
  background: var(--grain), linear-gradient(180deg, rgba(40, 28, 17, 0.92), rgba(22, 14, 9, 0.96));
  border: 1px solid var(--border-card);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 236, 180, 0.07), 0 8px 18px -8px rgba(0, 0, 0, 0.75);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow-ember);
}

.card-image-box {
  border-bottom: 2px solid var(--gold-600);
  position: relative;
  height: 190px;
  overflow: hidden;
  background: #120c07;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.article-card:hover .card-image {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: color var(--transition-fast);
}

.article-card:hover .card-title {
  color: var(--gold-300);
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-author-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.author-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.author-role-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 236, 190, 0.08);
  color: var(--text-secondary);
}

/* Breaking Banner */
.breaking-ticker-wrap {
  position: relative;
  background: var(--grain), linear-gradient(90deg, #7a1f17, #5f150f 55%, #3a0c08);
  border-bottom: 2px solid var(--gold-600);
  border-top: 1px solid rgba(232, 194, 90, 0.4);
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 6px 22px rgba(122, 31, 23, 0.4);
}

.breaking-label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f6e4a6, #b98b2e);
  color: #3a0c08;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  white-space: nowrap;
}

.breaking-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f4d9cf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ---------------------------------------------------------------------------
 * The scroll: a chronicle opened in the modal. Parchment and ink, a hanging
 * rod of gold at the top, the title in dark red as a rubricator would.
 * ------------------------------------------------------------------------- */
.scroll-modal { max-width: 52rem; }
.scroll-art { position: relative; height: 15rem; overflow: hidden; background: var(--wood-950); border-bottom: 3px solid var(--gold-600); }
@media (min-width: 640px) { .scroll-art { height: 19rem; } }
.scroll-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scroll-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(10, 6, 3, 0.85)); }
.scroll-art-tags { position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1rem; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.scroll-body { padding: 1.75rem 1.5rem 1.5rem; }
@media (min-width: 640px) { .scroll-body { padding: 2.5rem 2.75rem 2rem; } }
.scroll-title {
  font-family: var(--font-deco);
  font-weight: 900;
  font-size: 1.7rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--ink-red);
  text-shadow: 0 1px 0 rgba(255, 245, 210, 0.6);
}
@media (min-width: 640px) { .scroll-title { font-size: 2.2rem; } }
.scroll-subtitle { margin-top: 0.6rem; font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; line-height: 1.45; color: var(--ink-soft); }
.scroll-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(90, 69, 42, 0.5);
  border-bottom: 1px solid rgba(90, 69, 42, 0.5);
}
.scroll-byline-rune {
  display: flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  font-family: var(--font-rune); font-size: 1.2rem; color: var(--gold-100);
  background: radial-gradient(circle at 35% 30%, #7a2a20, #3d100b 75%);
  border: 2px solid var(--gold-600);
  box-shadow: inset 0 1px 0 rgba(255, 200, 170, 0.3), 0 1px 3px rgba(60, 35, 10, 0.5);
}
.scroll-author { font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; color: var(--ink); }
.scroll-author-role { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); }
.scroll-footnote { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(90, 69, 42, 0.45); font-family: var(--font-mono); font-size: 0.7rem; line-height: 1.6; color: var(--ink-soft); }
.scroll-footnote strong { color: var(--ink); }
.scroll-footnote .link-inline { color: #1f6f82; font-weight: 700; }
.scroll-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 2px solid rgba(90, 69, 42, 0.55); }
.scroll-foot-realm { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); }
.scroll-body .btn-outline { background: linear-gradient(180deg, #8a6a3a, #6b4f26); color: var(--parch-100); border-color: #3a2610; }
.scroll-body .btn-outline:hover { color: #fff; border-color: var(--gold-400); }

/* ---------------------------------------------------------------------------
 * Proxima Maxi: News & Chronicles Theme
 * ------------------------------------------------------------------------- */
[data-realm="proximamaxi"] .pinned-article-card {
  background: var(--grain), linear-gradient(135deg, rgba(26, 15, 42, 0.95), rgba(12, 7, 20, 0.98));
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(239, 68, 68, 0.25),
    0 0 0 1px #050308,
    0 0 0 2px rgba(168, 85, 247, 0.75),
    0 0 0 3px #050308,
    0 18px 36px -10px rgba(0, 0, 0, 0.95);
}

[data-realm="proximamaxi"] .pinned-article-card:hover {
  border-color: #ef4444;
  box-shadow:
    inset 0 1px 0 rgba(248, 113, 113, 0.35),
    0 0 0 1px #050308,
    0 0 0 2px #ef4444,
    0 0 0 3px #050308,
    0 22px 44px -10px rgba(0, 0, 0, 0.95),
    0 0 34px rgba(239, 68, 68, 0.4);
}

[data-realm="proximamaxi"] .pinned-subtitle {
  color: #d8b4fe;
}

[data-realm="proximamaxi"] .article-card {
  background: var(--grain), linear-gradient(180deg, rgba(22, 13, 36, 0.94), rgba(11, 6, 18, 0.98));
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: inset 0 1px 0 rgba(216, 180, 254, 0.12), 0 8px 18px -8px rgba(0, 0, 0, 0.85);
}

[data-realm="proximamaxi"] .article-card:hover {
  border-color: #ef4444;
  background: rgba(30, 18, 50, 0.96);
  box-shadow: 0 0 26px rgba(239, 68, 68, 0.35), 0 14px 28px rgba(0, 0, 0, 0.9);
}

[data-realm="proximamaxi"] .card-image-box {
  border-bottom: 2px solid #ef4444;
  background: #0d0615;
}

[data-realm="proximamaxi"] .article-card:hover .card-title {
  color: #fca5a5;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

[data-realm="proximamaxi"] .card-author-footer {
  border-top-color: rgba(168, 85, 247, 0.2);
}

/* ---------------------------------------------------------------------------
 * Wubarrks Scoop of Vanilla: News Theme
 * ------------------------------------------------------------------------- */
[data-realm="scoop"] .pinned-article-card {
  background: var(--grain), linear-gradient(135deg, rgba(12, 34, 56, 0.95), rgba(4, 15, 25, 0.98));
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: inset 0 1px 0 rgba(56, 189, 248, 0.2), 0 18px 36px -10px rgba(0, 0, 0, 0.95);
}

[data-realm="scoop"] .article-card {
  background: var(--grain), linear-gradient(180deg, rgba(10, 28, 46, 0.94), rgba(4, 15, 25, 0.98));
  border-color: rgba(56, 189, 248, 0.35);
}

[data-realm="scoop"] .article-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.35), 0 14px 28px rgba(0, 0, 0, 0.9);
}

[data-realm="scoop"] .card-image-box {
  border-bottom: 2px solid #38bdf8;
}
