/* ==========================================================================
   XSEEDINFO — PRESTIGIOUS NEWSPAPER & EDITORIAL MAGAZINE DESIGN SYSTEM
   Supports: Classic Light Newspaper (Default/Print) & Dark Edition (Toggleable)
   ========================================================================== */

:root {
  /* LIGHT NEWSPAPER PALETTE (Classic Black & White Editorial) */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --border-heavy: #0f172a;
  
  --text-main: #0f172a;
  --text-serif-head: #090d16;
  --text-sub: #475569;
  --text-muted: #64748b;
  
  --ticker-bg: #0f172a;
  --ticker-text: #e2e8f0;
  
  --masthead-bg: #ffffff;
  --masthead-text: #0f172a;
  --masthead-accent: #dc2626;

  --nav-bg: #ffffff;
  --nav-text: #334155;
  --nav-border: #e2e8f0;
  --nav-active: #dc2626;

  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.12);

  --accent-red: #dc2626;
  --accent-blue: #1d4ed8;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-purple: #7c3aed;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* DARK EDITION OVERRIDE */
body.dark-edition {
  --bg-page: #090d16;
  --bg-card: #0f172a;
  --bg-card-hover: #162036;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-heavy: rgba(255, 255, 255, 0.25);
  
  --text-main: #f8fafc;
  --text-serif-head: #ffffff;
  --text-sub: #94a3b8;
  --text-muted: #64748b;

  --ticker-bg: #05080e;
  --ticker-text: #94a3b8;

  --masthead-bg: #090d16;
  --masthead-text: #ffffff;
  --masthead-accent: #38bdf8;

  --nav-bg: #0f172a;
  --nav-text: #cbd5e1;
  --nav-border: rgba(255, 255, 255, 0.1);
  --nav-active: #38bdf8;

  --card-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  --card-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.7);
}

/* BASE STYLES */
body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* TOP BREAMING NEWS TICKER */
.top-ticker-bar {
  background: var(--ticker-bg);
  color: var(--ticker-text);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-color);
  padding: 0.45rem 0;
  transition: all 0.2s;
}

.ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.ticker-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-badge {
  background: var(--accent-red);
  color: #fff;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticker-headline {
  color: #f8fafc;
  font-weight: 600;
  text-decoration: none;
}

.ticker-headline:hover {
  text-decoration: underline;
}

.ticker-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* THEME TOGGLE BUTTON */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
  font-family: var(--font-sans);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* MAIN EDITORIAL MASTHEAD */
.main-masthead {
  background: var(--masthead-bg);
  padding: 2rem 0 1.5rem 0;
  border-bottom: 2px solid var(--border-heavy);
  text-align: center;
  transition: all 0.2s;
}

.masthead-grid {
  display: grid;
  grid-template-columns: 1.2fr auto 1.2fr;
  align-items: center;
  gap: 1.5rem;
}

@media (max-width: 850px) {
  .masthead-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .masthead-left, .masthead-right {
    display: none;
  }
}

.masthead-left {
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.masthead-logo {
  text-decoration: none;
  display: inline-block;
}

.masthead-logo h1 {
  font-family: var(--font-serif);
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--masthead-text);
  margin-bottom: 4px;
}

.masthead-logo h1 span {
  color: var(--masthead-accent);
}

.masthead-tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--text-muted);
}

.masthead-right {
  text-align: right;
}

/* CATEGORY NAVIGATION RIBBON */
.category-nav-bar {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.2s;
}

.category-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
}

.cat-links {
  display: flex;
  align-items: center;
  list-style: none;
}

.cat-links a {
  display: block;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nav-text);
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

.cat-links a:hover,
.cat-links a.active {
  color: var(--nav-active);
  border-bottom-color: var(--nav-active);
  background: rgba(0, 0, 0, 0.02);
}

/* SECTION RIBBONS & DIVIDERS */
.section-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2.5rem 0 1.5rem 0;
  border-bottom: 2px solid var(--border-heavy);
  padding-bottom: 0.5rem;
}

.section-ribbon h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--text-serif-head);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.section-ribbon h2::after {
  content: '';
  position: absolute;
  bottom: -0.55rem;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-red);
}

.section-ribbon-blue h2::after {
  background: var(--accent-blue);
}

.section-ribbon-emerald h2::after {
  background: var(--accent-emerald);
}

/* NEWSPAPER FRONT PAGE GRID */
.frontpage-lead-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}

@media (max-width: 960px) {
  .frontpage-lead-grid {
    grid-template-columns: 1fr;
  }
}

/* Main Lead Article Card with Unsplash Image */
.lead-story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.lead-story-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.lead-story-media {
  width: 100%;
  aspect-ratio: 16/9;
  background: #0f172a;
  overflow: hidden;
  position: relative;
}

.lead-story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.lead-story-card:hover .lead-story-media img {
  transform: scale(1.03);
}

.lead-story-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--accent-red);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.lead-story-content {
  padding: 1.75rem;
}

.lead-story-content h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-serif-head);
  margin: 0.5rem 0 0.75rem 0;
}

.lead-story-content p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-sub);
  margin-bottom: 1.25rem;
}

/* TRENDING WIRE / NUMBERED RANKINGS */
.trending-wire-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}

.wire-header {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-red);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.6rem;
}

.wire-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wire-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.wire-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wire-thumb {
  width: 75px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0f172a;
}

.wire-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wire-number {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-muted);
  line-height: 1;
  min-width: 20px;
  opacity: 0.6;
}

.wire-item:hover .wire-number {
  color: var(--accent-red);
  opacity: 1;
}

.wire-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-serif-head);
  margin-bottom: 4px;
}

.wire-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 4-COLUMN NEWSPAPER STORY GRID (PHOTO CARDS) */
.newspaper-4col-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 1024px) {
  .newspaper-4col-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .newspaper-4col-grid {
    grid-template-columns: 1fr;
  }
}

.news-card-compact {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease;
}

.news-card-compact:hover {
  border-color: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.news-card-media {
  width: 100%;
  aspect-ratio: 16/10;
  background: #0f172a;
  overflow: hidden;
  position: relative;
}

.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.news-card-compact:hover .news-card-media img {
  transform: scale(1.05);
}

.news-card-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
}

.news-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-serif-head);
  margin: 0.4rem 0 0.6rem 0;
}

.news-card-body p {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* CLEAN ADSENSE WRAPPER STYLING */
.ad-slot-banner {
  background: var(--bg-card-hover);
  border: 1px dashed var(--border-color);
  border-radius: 4px;
  margin: 2.5rem 0;
  padding: 1.25rem;
  text-align: center;
}

.ad-slot-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
