/* ========================================================
   KABAR SAI BUMI • STYLESHEET & DESIGN SYSTEM
   Modern Digital Journalism • Responsive & High-End Aesthetic
   ======================================================== */

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

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', -apple-system, sans-serif;
  --font-serif: 'Newsreader', Georgia, Cambria, 'Times New Roman', serif;
  
  /* Brand Accent Colors */
  --crimson: #E11D48;
  --crimson-hover: #BE123C;
  --cobalt: #2563EB;
  --cobalt-dark: #1D4ED8;
  --amber-gold: #F59E0B;
  
  /* Light Theme Colors (Default) */
  --bg-main: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --border-color: #E2E8F0;
  --border-light: #F1F5F9;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -2px rgba(15, 23, 42, 0.03);
  --card-shadow-hover: 0 14px 28px -4px rgba(15, 23, 42, 0.1), 0 6px 12px -3px rgba(15, 23, 42, 0.06);
}

/* Dark Theme Overrides */
html.dark {
  --bg-main: #090D16;
  --bg-surface: #0F172A;
  --bg-surface-elevated: #162036;
  --border-color: #1E293B;
  --border-light: #162036;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --card-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.45);
  --card-shadow-hover: 0 16px 36px -4px rgba(0, 0, 0, 0.65);
}

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

/* Headings font */
h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
}

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

/* ========================================================
   MICRO-INTERACTIONS & CARD ANIMATIONS
   ======================================================== */
.editorial-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s ease;
}

.editorial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(37, 99, 235, 0.3);
}

/* Glassmorphism elements */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-panel-light {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

html.dark .glass-panel-light {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(30, 41, 59, 0.8);
}

/* ========================================================
   SMOOTH TICKER & MARQUEE
   ======================================================== */
.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  position: relative;
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  min-width: 100%;
  animation: scrollMarquee 38s linear infinite;
}

@keyframes scrollMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* ========================================================
   SOUNDWAVE VISUALIZER FOR AUDIO BREVIARY
   ======================================================== */
.soundwave-bar {
  width: 3px;
  background: currentColor;
  border-radius: 2px;
  animation: soundwavePulse 1.2s ease-in-out infinite alternate;
}

.soundwave-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.soundwave-bar:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.soundwave-bar:nth-child(3) { height: 20px; animation-delay: 0.15s; }
.soundwave-bar:nth-child(4) { height: 12px; animation-delay: 0.4s; }
.soundwave-bar:nth-child(5) { height: 18px; animation-delay: 0.25s; }
.soundwave-bar:nth-child(6) { height: 8px; animation-delay: 0.35s; }

@keyframes soundwavePulse {
  0% { transform: scaleY(0.35); }
  100% { transform: scaleY(1.15); }
}

/* ========================================================
   READING PROGRESS BAR (baca.html)
   ======================================================== */
#reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, #E11D48, #2563EB, #06B6D4);
  z-index: 9999;
  transition: width 0.12s ease-out;
}

/* ========================================================
   EDITORIAL RULE ACCENT
   ======================================================== */
.editorial-rule {
  height: 3px;
  background: linear-gradient(90deg, #E11D48 0%, #2563EB 50%, transparent 100%);
  border-radius: 2px;
}

/* Custom Rank Numbers */
.rank-digit {
  font-family: var(--font-heading);
  font-weight: 900;
  background: linear-gradient(135deg, #E11D48 0%, #2563EB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

/* Clean Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.65);
}

/* Pulse Beacon */
.pulse-beacon {
  position: relative;
}
.pulse-beacon::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background: inherit;
  opacity: 0.6;
  animation: beaconPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes beaconPing {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Print styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  header, footer, .no-print, aside, #admin-auth-guard {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
}
