/* ─── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: #0d0d0d;
  color: #e8e8e8;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── Top Accent Bar ────────────────────────────────────────────────── */
.top-bar {
  height: 3px;
  background: #d62828;
}

/* ─── Header ────────────────────────────────────────────────────────── */
header {
  background: #0d0d0d;
  border-bottom: 1px solid #1f1f1f;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.masthead {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
}

.masthead .accent { color: #d62828; }

nav { display: flex; align-items: center; gap: 8px; }

nav a {
  color: #777;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 2px;
  transition: color 0.15s, background 0.15s;
}
nav a:hover { color: #fff; background: #1a1a1a; }

/* ─── Latest Ticker ─────────────────────────────────────────────────── */
.ticker {
  background: #0a0a0a;
  border-bottom: 1px solid #1c1c1c;
  padding: 0 0 0 0;
  display: flex;
  align-items: stretch;
  height: 36px;
  overflow: hidden;
  position: relative;
}

.ticker-left {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 0 16px;
  flex-shrink: 0;
  border-right: 1px solid #1c1c1c;
  background: #0a0a0a;
  z-index: 2;
  /* Fade-out edge so items disappear cleanly behind the left panel */
  box-shadow: 6px 0 18px 10px #0a0a0a;
}

.ticker-label {
  background: #d62828;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 7px 2px;
  white-space: nowrap;
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

.ticker-clock {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e0e0e0;
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', -apple-system, sans-serif;
}

.ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

/* Right-edge fade */
.ticker-track-wrap::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(to right, transparent, #0a0a0a);
  pointer-events: none;
  z-index: 1;
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  gap: 0;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: #9a9a9a;
  text-decoration: none;
  letter-spacing: 0.025em;
  padding: 0 40px 0 0;
  white-space: nowrap;
  transition: color 0.2s;
}

.ticker-item:hover {
  color: #e8e8e8;
}

.ticker-bullet {
  color: #d62828;
  font-size: 0.5rem;
  flex-shrink: 0;
}

/* ─── Main Container ────────────────────────────────────────────────── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ─── Section Header ────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid #1a1a1a;
}

.section-header h2 {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #666;
}

.section-header::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: #d62828;
  flex-shrink: 0;
}

/* ─── Hero ──────────────────────────────────────────────────────────── */
.hero {
  background: #111;
  border: 1px solid #1e1e1e;
  border-left: 4px solid #d62828;
  margin-bottom: 56px;
  position: relative;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  filter: brightness(0.55);
}

.hero-image-placeholder {
  width: 100%;
  height: 420px;
  background: linear-gradient(135deg, #1a0a0a 0%, #111 50%, #0d0d0d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  padding: 40px 56px 52px;
  position: relative;
}

.hero-content::before {
  content: '';
  position: absolute;
  top: -80px; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #111);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 280px; height: 100%;
  background: radial-gradient(ellipse at top right, #1e0a0a 0%, transparent 70%);
  pointer-events: none;
}

.category-tag {
  display: inline-block;
  background: #d62828;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 10px;
  margin-bottom: 22px;
}
.cat-politics  { background: #e74c3c; }
.cat-economy   { background: #27ae60; }
.cat-conflict  { background: #e67e22; }
.cat-technology{ background: #3498db; }
.cat-health    { background: #1abc9c; }
.cat-climate   { background: #2ecc71; color: #111; }
.cat-justice   { background: #9b59b6; }
.cat-culture   { background: #f39c12; color: #111; }
.cat-world     { background: #7f8c8d; }

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 20px;
}
.filter-btn {
  background: #1a1a1a;
  color: #ccc;
  border: 1px solid #333;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.filter-btn:hover { background: #2a2a2a; color: #fff; }
.filter-btn.active { background: #d62828; color: #fff; border-color: #d62828; }

/* Per-category active colour */
.filter-btn.cat-politics.active  { background: #e74c3c; border-color: #e74c3c; }
.filter-btn.cat-economy.active   { background: #27ae60; border-color: #27ae60; }
.filter-btn.cat-conflict.active  { background: #e67e22; border-color: #e67e22; }
.filter-btn.cat-technology.active{ background: #3498db; border-color: #3498db; }
.filter-btn.cat-health.active    { background: #1abc9c; border-color: #1abc9c; }
.filter-btn.cat-climate.active   { background: #2ecc71; border-color: #2ecc71; color: #111; }
.filter-btn.cat-justice.active   { background: #9b59b6; border-color: #9b59b6; }
.filter-btn.cat-culture.active   { background: #f39c12; border-color: #f39c12; color: #111; }
.filter-btn.cat-world.active     { background: #7f8c8d; border-color: #7f8c8d; }

/* Pagination */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 32px 0 16px;
}
.page-btn {
  background: #1a1a1a;
  color: #ccc;
  border: 1px solid #333;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.page-btn:hover { background: #2a2a2a; color: #fff; }
.page-btn.active { background: #d62828; color: #fff; border-color: #d62828; }

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.18;
  color: #fff;
  margin-bottom: 20px;
  max-width: 820px;
  position: relative;
  z-index: 1;
}

.hero h1 a { color: inherit; }
.hero h1 a:hover { color: #d62828; transition: color 0.2s; }

.hero .excerpt {
  font-size: 1.05rem;
  color: #aaa;
  max-width: 680px;
  margin-bottom: 28px;
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

.hero .meta {
  font-size: 0.76rem;
  color: #555;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero .meta .channel { color: #777; }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d62828;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(214, 40, 40, 0.4);
  padding-bottom: 3px;
  transition: border-color 0.2s, opacity 0.2s;
  position: relative;
  z-index: 1;
}
.read-more:hover { border-color: #d62828; opacity: 0.8; }

/* ─── Articles Grid ─────────────────────────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 64px;
}

.article-card {
  background: #111;
  border: 1px solid #1e1e1e;
  padding: 30px 28px;
  display: block;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0;
  background: #d62828;
  transition: height 0.2s;
}

.article-card:hover {
  border-color: #2e2e2e;
  transform: translateY(-2px);
}
.article-card:hover::before { height: 2px; }

.article-card .category-tag {
  background: transparent;
  color: #d62828;
  padding: 0;
  font-size: 0.62rem;
  margin-bottom: 14px;
}

.article-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.38;
  color: #eee;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.article-card:hover h3 { color: #fff; }

.article-card .excerpt {
  font-size: 0.84rem;
  color: #777;
  line-height: 1.65;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .meta {
  font-size: 0.71rem;
  color: #444;
  letter-spacing: 0.03em;
}

/* ─── Article Card Image ─────────────────────────────────────────────── */
.article-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: brightness(0.7);
  margin-bottom: 20px;
  transition: filter 0.2s;
}
.article-card:hover .article-card-image { filter: brightness(0.9); }

.article-card-image-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #1a0a0a 0%, #151515 100%);
  margin-bottom: 20px;
}

/* ─── Article Page ──────────────────────────────────────────────────── */
.article-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-hero-image {
  width: 100%;
  max-width: 820px;
  height: 420px;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  margin-bottom: 36px;
  filter: brightness(0.8);
}

.breadcrumb {
  font-size: 0.72rem;
  color: #555;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.breadcrumb a { color: #d62828; }
.breadcrumb a:hover { color: #ff4444; }

.article-header {
  max-width: 820px;
  margin-bottom: 40px;
}

.article-header .category-tag { margin-bottom: 20px; }

.article-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.18;
  color: #fff;
  margin-bottom: 22px;
}

.article-meta {
  font-size: 0.78rem;
  color: #555;
  letter-spacing: 0.04em;
  padding: 18px 0;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.article-meta .byline { color: #777; }
.article-meta .source-link { color: #d62828; }
.article-meta .source-link:hover { color: #ff4444; }

.article-body {
  max-width: 720px;
  margin-top: 40px;
}

.article-body p {
  font-size: 1.05rem;
  line-height: 1.82;
  color: #ccc;
  margin-bottom: 26px;
}

.article-body p:first-child {
  font-size: 1.15rem;
  color: #e0e0e0;
  font-weight: 400;
}

/* Inline quotes get pulled out */
.article-body p:has(> q),
.article-body blockquote {
  border-left: 3px solid #d62828;
  padding-left: 24px;
  color: #bbb;
  font-style: italic;
}

.article-source {
  margin-top: 48px;
  padding: 24px 28px;
  background: #111;
  border: 1px solid #1e1e1e;
  border-left: 3px solid #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.article-source .label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 4px;
}

.article-source a {
  color: #d62828;
  font-size: 0.88rem;
  word-break: break-all;
}
.article-source a:hover { color: #ff4444; }

/* ─── More Articles ─────────────────────────────────────────────────── */
.more-articles {
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid #1a1a1a;
}

/* ─── Empty State ───────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 100px 0;
  color: #444;
}
.empty-state h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  color: #555;
  margin-bottom: 12px;
}
.empty-state p { font-size: 0.9rem; }

/* ─── Footer ────────────────────────────────────────────────────────── */
footer {
  background: #080808;
  border-top: 1px solid #161616;
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 10px;
}

footer p {
  font-size: 0.76rem;
  color: #3a3a3a;
  letter-spacing: 0.04em;
  line-height: 1.8;
}

/* ─── Social Share Bar ──────────────────────────────────────────────── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
  margin-top: 36px;
  flex-wrap: wrap;
}

.share-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #555;
  margin-right: 6px;
  white-space: nowrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  min-height: 38px;
  transition: opacity 0.15s, transform 0.1s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}
.share-btn:hover { opacity: 0.8; transform: translateY(-1px); }

.share-x   { background: #000; color: #fff; border: 1px solid #2a2a2a; }
.share-fb  { background: #1877F2; color: #fff; }
.share-li  { background: #0A66C2; color: #fff; }
.share-wa  { background: #25D366; color: #fff; }
.share-copy {
  background: #1a1a1a;
  color: #888;
  border: 1px solid #2e2e2e;
  font-family: inherit;
}
.share-copy:hover { color: #fff; }

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content { padding: 28px 32px 36px; }
  .hero-image, .hero-image-placeholder { height: 300px; }
  .hero h1 { font-size: 2.1rem; }
  .article-header h1 { font-size: 2.1rem; }
  .article-hero-image { height: 280px; object-position: center bottom; }
}

@media (max-width: 600px) {
  /* Layout */
  main { padding: 32px 16px 48px; }
  .article-page { padding: 32px 16px 48px; }

  /* Header */
  header { padding: 0 16px; }
  .header-inner { padding: 14px 0; }
  .masthead { font-size: 1.25rem; }
  nav a { font-size: 0.65rem; padding: 5px 10px; }

  /* Hero */
  .articles-grid { grid-template-columns: 1fr; }
  .hero-content { padding: 18px 18px 24px; }
  .hero-image, .hero-image-placeholder { height: 200px; }
  .hero h1 { font-size: 1.55rem; }
  .hero .excerpt { font-size: 0.9rem; }

  /* Article page */
  .article-header h1 { font-size: 1.55rem; }
  .article-hero-image { height: 200px; object-position: center bottom; }
  .article-body p { font-size: 0.97rem; }
  .article-body p:first-child { font-size: 1.05rem; }
  .breadcrumb { font-size: 0.65rem; margin-bottom: 24px; }

  /* Article meta — stack items */
  .article-meta {
    gap: 10px;
    padding: 14px 0;
    font-size: 0.72rem;
  }

  /* Article source — stack */
  .article-source { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Share bar — tighter on mobile */
  .share-bar { gap: 6px; padding: 18px 0; }
  .share-btn { padding: 9px 13px; font-size: 0.65rem; min-height: 42px; }

  /* More articles */
  .more-articles { margin-top: 48px; }

  /* Footer */
  footer { padding: 28px 16px; }
}

/* ─── RSS Subscribe Page ────────────────────────────────────────────── */
.rss-url-box {
  margin: 32px 0;
  max-width: 640px;
}

.rss-box-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 10px;
}

.rss-url-row {
  display: flex;
  align-items: stretch;
  background: #111;
  border: 1px solid #2a2a2a;
}

.rss-url-text {
  flex: 1;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  color: #f26522;
  padding: 14px 18px;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

.rss-copy-btn {
  background: #1a1a1a;
  color: #888;
  border: none;
  border-left: 1px solid #2a2a2a;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 22px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.rss-copy-btn:hover { background: #222; color: #fff; }

.rss-readers { margin: 36px 0; }

.rss-readers-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 14px;
}

.rss-readers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rss-reader-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #111;
  border: 1px solid #2a2a2a;
  color: #aaa;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 10px 18px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.rss-reader-btn:hover { border-color: #f26522; color: #fff; background: #141414; }

.rss-reader-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #f26522;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  border-radius: 3px;
  letter-spacing: 0;
  flex-shrink: 0;
}

.rss-explainer {
  margin: 36px 0;
  padding: 22px 26px;
  background: #0e0e0e;
  border: 1px solid #1a1a1a;
  border-left: 3px solid #f26522;
  max-width: 640px;
}

.rss-feed-item {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid #141414;
  text-decoration: none;
  transition: color 0.15s;
}
.rss-feed-item:last-child { border-bottom: none; }
.rss-feed-item:hover .rss-feed-item-headline { color: #fff; }

.rss-feed-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
}

.rss-feed-item-meta time {
  font-size: 0.7rem;
  color: #444;
  letter-spacing: 0.04em;
}

.rss-feed-item-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: #ccc;
  line-height: 1.4;
  transition: color 0.15s;
}

/* ─── Footer RSS link ───────────────────────────────────────────────── */
.footer-rss-link {
  color: #f26522;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-rss-link:hover { color: #ff8848; }

/* ─── Nav active state ──────────────────────────────────────────────── */
nav a.nav-active { color: #fff; }
