/* ==============================================================================
   INDOLEKOH NEWS - DESIGN SYSTEM & MAIN STYLES
   ============================================================================== */

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

:root {
  /* Color Palette - Light Mode (Refined High-End Editorial) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-overlay: rgba(15, 23, 42, 0.6);
  --bg-modal: #ffffff;

  --text-primary: #090d16;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverted: #ffffff;

  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-strong: #cbd5e1;

  /* Accent Colors */
  --accent-primary: #dc2626;      /* Editorial Crimson */
  --accent-primary-hover: #b91c1c;
  --accent-gold: #d97706;         /* Amber/Gold highlight */
  --accent-navy: #0f172a;         /* Deep obsidian */
  --accent-blue: #2563eb;

  /* Category Badges */
  --cat-tech: #0284c7;
  --cat-world: #4f46e5;
  --cat-business: #059669;
  --cat-science: #7c3aed;
  --cat-culture: #db2777;
  --cat-climate: #16a34a;
  --cat-opinion: #ea580c;

  /* Typography */
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 20px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

  /* Layout */
  --max-width: 1320px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1e293b;
  --bg-card: #131b2e;
  --bg-overlay: rgba(3, 7, 18, 0.8);
  --bg-modal: #131b2e;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverted: #090d16;

  --border-color: #1e293b;
  --border-subtle: #192237;
  --border-strong: #334155;

  --accent-navy: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 25px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 35px rgba(0, 0, 0, 0.6);
}

/* Universal Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Utility Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.badge-tech, .badge-teknologi { background-color: rgba(2, 132, 199, 0.12); color: var(--cat-tech); }
.badge-world, .badge-dunia { background-color: rgba(79, 70, 229, 0.12); color: var(--cat-world); }
.badge-business, .badge-bisnis { background-color: rgba(5, 150, 105, 0.12); color: var(--cat-business); }
.badge-science, .badge-sains { background-color: rgba(124, 58, 237, 0.12); color: var(--cat-science); }
.badge-culture, .badge-budaya { background-color: rgba(219, 39, 119, 0.12); color: var(--cat-culture); }
.badge-climate, .badge-iklim { background-color: rgba(22, 163, 74, 0.12); color: var(--cat-climate); }
.badge-opinion, .badge-opini { background-color: rgba(234, 88, 12, 0.12); color: var(--cat-opinion); }
.badge-breaking { background-color: var(--accent-primary); color: #ffffff; animation: pulse 2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* ==============================================================================
   HEADER & NAVIGATION
   ============================================================================== */

.site-header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  position: relative;
  z-index: 50;
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

/* Top Utility Bar */
.top-bar {
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
  font-size: 0.775rem;
  color: var(--text-secondary);
  padding: 0.4rem 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.date-indicator {
  font-family: var(--font-mono);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.weather-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.edition-pill {
  font-size: 0.7rem;
  background-color: var(--border-color);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Theme & Quick Controls */
.top-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.top-action-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
}

.admin-studio-btn {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #f8fafc;
  border: 1px solid #334155;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.admin-studio-btn:hover {
  background: linear-gradient(135deg, #0f172a, #dc2626);
  color: #ffffff;
  border-color: #ef4444;
}

/* Main Brand Row */
.brand-row {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--text-primary);
}

.brand-wrapper {
  text-align: center;
  flex: 1;
}

.brand-logo {
  font-family: var(--font-serif);
  font-size: 2.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-primary);
  text-transform: uppercase;
}

.brand-logo span {
  color: var(--accent-primary);
  font-style: italic;
}

.brand-tagline {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 600;
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  background-color: var(--bg-card);
  transition: all var(--transition-fast);
  position: relative;
}

.icon-btn:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.bookmark-counter {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--accent-primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Primary Navigation Categories */
.main-nav {
  position: sticky;
  top: 0;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  z-index: 40;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0;
  margin: 0;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link,
.nav-links a,
.nav-links li a {
  display: inline-block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active,
.nav-links a:hover,
.nav-links li a:hover,
.nav-links li.current-menu-item > a,
.nav-links li.current_page_item > a,
.nav-links li.current-category-ancestor > a,
.nav-links li.active > a {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.nav-link.home-link,
.nav-links li.menu-item-home > a {
  color: var(--text-primary);
  font-weight: 700;
}

.nav-link.home-link:hover,
.nav-links li.menu-item-home > a:hover {
  color: var(--accent-primary);
}

.nav-search-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-search-trigger:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.kbd-shortcut {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--border-color);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* ==============================================================================
   FOOTER
   ============================================================================== */

.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  padding: 4rem 0 2rem;
  color: var(--text-secondary);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr;
  gap: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.footer-brand h3 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 0.6rem;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--accent-primary);
  padding-left: 4px;
}

.newsletter-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.newsletter-input {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.newsletter-btn {
  background: var(--accent-navy);
  color: var(--text-inverted);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.newsletter-btn:hover {
  background: var(--accent-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* ==============================================================================
   TOAST NOTIFICATION SYSTEM
   ============================================================================== */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--accent-navy);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideUp 0.25s ease-out;
  pointer-events: auto;
  border-left: 4px solid var(--accent-primary);
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .brand-logo {
    font-size: 2.1rem;
  }
  .brand-row {
    flex-direction: column;
    gap: 1rem;
  }
  .top-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
