/* ==========================================================================
   TAPIS LAMPUNG NEWS - MODERN EDITORIAL STYLESHEET
   Desain High-End Digital Newspaper: Bersih, Tajam, Berwibawa, & Nyaman Dibaca.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@600;700;800;900&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;0,6..72,700;1,6..72,400&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-editorial: 'Newsreader', Georgia, serif;

  /* Default Theme: Cobalt Royal & Tapis Gold (Clean Light) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --primary-accent: #1e40af;
  --gold-accent: #f59e0b;
  --coral-accent: #ef4444;
  --hero-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #0284c7 100%);
  --tapis-bar-gradient: linear-gradient(90deg, #1e40af 0%, #f59e0b 50%, #ef4444 100%);
}

/* Theme: Sunset Flame */
html[data-theme="sunset"] {
  --primary-accent: #e11d48;
  --gold-accent: #fb923c;
  --hero-gradient: linear-gradient(135deg, #e11d48 0%, #f97316 100%);
  --tapis-bar-gradient: linear-gradient(90deg, #e11d48 0%, #fb923c 50%, #f59e0b 100%);
}

/* Theme: Deep Violet */
html[data-theme="violet"] {
  --primary-accent: #6366f1;
  --gold-accent: #06b6d4;
  --hero-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --tapis-bar-gradient: linear-gradient(90deg, #6366f1 0%, #06b6d4 100%);
}

/* Theme: Obsidian Dark */
html[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-surface: #0f172a;
  --bg-elevated: #1e293b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --hero-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

h1, h2, h3, .font-display {
  font-family: var(--font-display);
}

.font-editorial {
  font-family: var(--font-editorial);
}

/* Editorial Card Base */
.editorial-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.editorial-card:hover {
  transform: translateY(-2.5px);
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.08);
  border-color: var(--primary-accent);
}

html[data-theme="dark"] .editorial-card:hover {
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.4);
}

/* Double Hairline Border (Batas Surat Kabar Elegan) */
.editorial-double-rule {
  border-top: 3px double var(--border-strong);
  height: 4px;
}

/* Tapis Modern Accent Bar */
.tapis-ribbon-bar {
  height: 3.5px;
  background: var(--tapis-bar-gradient);
  width: 100%;
}

/* Story Reels Circular Badges */
.story-reel-ring {
  background: var(--tapis-bar-gradient);
  padding: 2.5px;
  border-radius: 9999px;
  display: inline-block;
  transition: transform 0.2s ease;
}
.story-reel-ring:hover {
  transform: scale(1.06);
}

/* Live Wire News Agency Timeline */
.live-wire-item {
  position: relative;
  padding-left: 1.5rem;
}
.live-wire-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}
.live-wire-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 3.5px;
  top: 17px;
  bottom: -12px;
  width: 1px;
  background-color: var(--border-subtle);
}

/* Infinite Breaking Ticker Slide */
.ticker-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: tickerSlideInfinite 38s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes tickerSlideInfinite {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Reading Progress Bar (Fixed Top) */
#reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: var(--tapis-bar-gradient);
  width: 0%;
  z-index: 100;
  transition: width 0.1s ease-out;
}

/* Gradient Ranking Numbers (01, 02, 03...) */
.rank-number-tapis {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--primary-accent);
  opacity: 0.85;
  line-height: 1;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Print Clean Mode */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  nav, header, footer, aside, .no-print {
    display: none !important;
  }
  main {
    max-width: 100% !important;
    padding: 0 !important;
  }
}
