/**
 * Bangeko Media - Modern High-Performance Magazine & SEO Theme
 * Designed for Google AdSense & Google AdX Optimization
 * 0 jQuery - 100% Modern Vanilla CSS - 0 Cumulative Layout Shift (CLS)
 */

:root {
  /* Color Palette - Light Theme */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f1f5f9;
  --bg-elevated: #ffffff;
  
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-dark: #075985;
  
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-light: #ffedd5;
  
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  
  --ad-bg: #f8fafc;
  --ad-border: #e2e8f0;
  --ad-label: #94a3b8;
  
  /* Typography System (Zero External Font Latency) */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* Layout Dimensions */
  --container-max: 1200px;
  --sidebar-width: 320px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-secondary: #1f2937;
  --bg-elevated: #1e293b;
  
  --text-main: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-inverse: #0f172a;
  
  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-light: #082f49;
  --primary-dark: #bae6fd;
  
  --border-light: #1f2937;
  --border-medium: #374151;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  
  --ad-bg: #131d2e;
  --ad-border: #1e293b;
  --ad-label: #475569;
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

a:hover {
  color: var(--primary);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Reading Progress Bar (Fixed Top) */
#bangeko-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 99999;
  transition: width 0.1s linear;
}

/* Top Bar: Breaking News & Date */
.top-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

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

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.breaking-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.breaking-label svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.breaking-ticker {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.current-date {
  display: none;
}
@media (min-width: 768px) {
  .current-date {
    display: inline-block;
  }
}

.top-social-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.top-social-links a:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.top-social-links svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Main Site Header */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  gap: 1.5rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-title {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.site-title a {
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-title .brand-accent {
  color: var(--primary);
}

.site-description {
  display: none;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.55rem;
  line-height: 1.4;
  white-space: nowrap;
  background-color: var(--bg-surface-secondary);
}
@media (min-width: 992px) {
  .site-description {
    display: inline-block;
  }
}

/* Primary Navigation */
.main-navigation {
  display: none;
}
@media (min-width: 992px) {
  .main-navigation {
    display: block;
  }
}

.primary-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.primary-menu > li {
  position: relative;
}

.primary-menu > li > a {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-main);
  padding: 0.5rem 0;
  display: inline-block;
  position: relative;
}

.primary-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width var(--transition-fast);
}

.primary-menu > li:hover > a::after,
.primary-menu > li.current-menu-item > a::after {
  width: 100%;
}

/* Dropdown Menu */
.primary-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  min-width: 200px;
  z-index: 100;
  list-style: none;
}

.primary-menu > li:hover > .sub-menu {
  display: block;
}

.primary-menu .sub-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-main);
}

.primary-menu .sub-menu li a:hover {
  background-color: var(--bg-surface-secondary);
  color: var(--primary);
}

/* Header Actions: Theme Toggle, Search, Mobile Hamburger */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.mobile-menu-toggle {
  display: inline-flex;
}
@media (min-width: 992px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Search Dropdown / Bar */
.header-search-bar {
  display: none;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 0.75rem 0;
}

.header-search-bar.active {
  display: block;
}

.search-form-wrap {
  position: relative;
  max-width: 600px;
  margin-inline: auto;
}

.search-form-wrap input[type="search"] {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.75rem;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-main);
  outline: none;
  font-size: 0.9375rem;
}

.search-form-wrap input[type="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-icon-inside {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-lg);
  z-index: 10001;
  overflow-y: auto;
  transition: left var(--transition-normal);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-drawer.open {
  left: 0;
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal);
}

.mobile-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu-list li a {
  display: block;
  padding: 0.625rem 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.mobile-menu-list li a:hover {
  background-color: var(--bg-surface-secondary);
  color: var(--primary);
}

/* =========================================================
 * ADSENSE & GOOGLE ADX OPTIMIZED CONTAINERS (ANTI-CLS)
 * ========================================================= */
.bangeko-ad-unit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  text-align: center;
  background-color: var(--ad-bg);
  border: 1px dashed var(--ad-border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  overflow: hidden;
  clear: both;
}

/* Compliance Label */
.bangeko-ad-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--ad-label);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  user-select: none;
}

/* Strict Predefined Dimensions to Eliminate CLS */
.ad-slot-leaderboard {
  min-height: 90px;
  max-width: 728px;
  width: 100%;
}

.ad-slot-billboard {
  min-height: 250px;
  max-width: 970px;
  width: 100%;
}

.ad-slot-rectangle {
  min-height: 250px;
  width: 300px;
  max-width: 100%;
}

.ad-slot-large-rectangle {
  min-height: 280px;
  width: 336px;
  max-width: 100%;
}

.ad-slot-halfpage {
  min-height: 600px;
  width: 300px;
  max-width: 100%;
}

.ad-slot-in-feed {
  min-height: 120px;
  width: 100%;
  margin: 1.5rem 0;
}

/* Header Banner Slot */
.ad-header-banner {
  margin: 1rem auto;
}

/* Sticky Mobile Bottom Ad (AdSense Anchor Style) */
.bangeko-sticky-mobile-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.25rem 0.5rem 0.5rem;
}

.bangeko-sticky-mobile-ad .ad-close-btn {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.5rem;
  margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
  .bangeko-sticky-mobile-ad {
    display: none !important;
  }
}

/* =========================================================
 * BREADCRUMBS (SEO-RICH)
 * ========================================================= */
.bangeko-breadcrumbs {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 1rem 0;
  padding: 0.5rem 0;
}

.bangeko-breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.bangeko-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.bangeko-breadcrumbs .separator {
  color: var(--border-medium);
  font-size: 0.75rem;
}

.bangeko-breadcrumbs a {
  color: var(--text-secondary);
}

.bangeko-breadcrumbs a:hover {
  color: var(--primary);
}

.bangeko-breadcrumbs .current-item {
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}
@media (min-width: 768px) {
  .bangeko-breadcrumbs .current-item {
    max-width: 500px;
  }
}

/* =========================================================
 * HERO MAGAZINE / FEATURED GRID
 * ========================================================= */
.hero-featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 768px) {
  .hero-featured-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.featured-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.featured-card-lead {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.featured-sub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 500px) and (max-width: 767px) {
  .featured-sub-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.featured-card-sub {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.featured-img-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-card:hover .featured-img-wrap img {
  transform: scale(1.04);
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
  z-index: 2;
}

.featured-content {
  position: relative;
  z-index: 3;
  padding: 1.25rem;
  color: #ffffff;
}

.badge-cat {
  display: inline-block;
  background-color: var(--primary);
  color: #fff !important;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  transition: opacity var(--transition-fast);
}

.badge-cat:hover {
  opacity: 0.9;
}

.badge-cat-alt {
  background-color: var(--accent);
}

/* Post Card Category (Grid Cards) - Matches Live Preview */
.post-category-tag {
  margin-bottom: 0.2rem;
}

.post-card-category {
  display: inline-block;
  font-size: 0.6875rem; /* ~11px */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  transition: opacity var(--transition-fast);
  text-decoration: none;
}

.post-card-category:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Category Color Palette Classes */
.cat-color-blue { color: #0284c7; }
.cat-color-amber { color: #d97706; }
.cat-color-orange { color: #ea580c; }
.cat-color-emerald { color: #059669; }
.cat-color-teal { color: #0d9488; }
.cat-color-purple { color: #7c3aed; }
.cat-color-rose { color: #e11d48; }
.cat-color-cyan { color: #0891b2; }
.cat-color-indigo { color: #4f46e5; }

/* Dark mode category text colors slightly brighter for contrast */
[data-theme="dark"] .cat-color-blue { color: #38bdf8; }
[data-theme="dark"] .cat-color-amber { color: #fbbf24; }
[data-theme="dark"] .cat-color-orange { color: #fb923c; }
[data-theme="dark"] .cat-color-emerald { color: #34d399; }
[data-theme="dark"] .cat-color-teal { color: #2dd4bf; }
[data-theme="dark"] .cat-color-purple { color: #c084fc; }
[data-theme="dark"] .cat-color-rose { color: #fb7185; }
[data-theme="dark"] .cat-color-cyan { color: #22d3ee; }
[data-theme="dark"] .cat-color-indigo { color: #818cf8; }

/* Category Background Classes for Badges */
.badge-cat.cat-color-blue { background-color: #0284c7; }
.badge-cat.cat-color-amber { background-color: #d97706; }
.badge-cat.cat-color-orange { background-color: #ea580c; }
.badge-cat.cat-color-emerald { background-color: #059669; }
.badge-cat.cat-color-teal { background-color: #0d9488; }
.badge-cat.cat-color-purple { background-color: #7c3aed; }
.badge-cat.cat-color-rose { background-color: #e11d48; }
.badge-cat.cat-color-cyan { background-color: #0891b2; }
.badge-cat.cat-color-indigo { background-color: #4f46e5; }

.featured-title {
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.featured-card-lead .featured-title {
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  .featured-card-lead .featured-title {
    font-size: 1.875rem;
  }
}

.featured-card-sub .featured-title {
  font-size: 1rem;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

/* =========================================================
 * MAIN CONTENT & SIDEBAR LAYOUT
 * ========================================================= */
.site-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 1.5rem 0 3rem;
}

@media (min-width: 1024px) {
  .site-layout {
    flex-direction: row;
    align-items: stretch; /* Must be stretch so sidebar height matches content height for sticky */
  }
}

.content-area {
  flex: 1;
  min-width: 0;
}

.widget-area {
  width: 100%;
}

@media (min-width: 1024px) {
  .widget-area {
    width: var(--sidebar-width);
    flex-shrink: 0;
    align-self: stretch; /* Stretches to full column height */
  }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light);
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--primary);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: -0.2px;
}

/* =========================================================
 * POST CARDS & FEED
 * ========================================================= */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.post-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.post-thumbnail-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-surface-secondary);
  overflow: hidden;
}

.post-thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail-wrap img {
  transform: scale(1.05);
}

.post-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.25rem 0 0.5rem;
}

.post-card-title a {
  color: var(--text-main);
}

.post-card-title a:hover {
  color: var(--primary);
}

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 0.5rem;
}

.meta-author {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.meta-author img {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
}

/* =========================================================
 * SINGLE POST TEMPLATE (SEO & ENGAGEMENT FOCUS)
 * ========================================================= */
.article-header {
  margin-bottom: 1.5rem;
}

.article-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin: 0.75rem 0;
}

@media (min-width: 768px) {
  .article-title {
    font-size: 2.375rem;
  }
}

.article-meta-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
}

.author-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.author-info-chip img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
}

.updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.reading-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.article-featured-media {
  margin-bottom: 1.75rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-featured-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-caption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.35rem;
}

/* Table of Contents (Daftar Isi) */
.bangeko-toc {
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.bangeko-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.bangeko-toc-title {
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.bangeko-toc-toggle-btn {
  font-size: 0.8125rem;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.bangeko-toc-list {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.bangeko-toc-list li a {
  color: var(--text-secondary);
}

.bangeko-toc-list li a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Article Typography (Prose) */
.article-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-main);
  word-break: break-word;
}

.article-content p {
  margin-bottom: 1.35rem;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 2rem 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-main);
}

.article-content h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
}

.article-content ul, 
.article-content ol {
  margin: 1rem 0 1.5rem 1.75rem;
}

.article-content li {
  margin-bottom: 0.35rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background-color: var(--bg-surface-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-content pre {
  background-color: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin: 1.5rem 0;
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--bg-surface-secondary);
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
  color: var(--primary);
}

.article-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.article-content th,
.article-content td {
  border: 1px solid var(--border-light);
  padding: 0.75rem;
  text-align: left;
}

.article-content th {
  background-color: var(--bg-surface-secondary);
  font-weight: 700;
}

/* Social Share Bar */
.social-share-wrap {
  margin: 2rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.share-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff !important;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.share-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.share-btn-wa { background-color: #25D366; }
.share-btn-fb { background-color: #1877F2; }
.share-btn-x { background-color: #000000; }
.share-btn-tg { background-color: #229ED9; }
.share-btn-copy { background-color: var(--primary); cursor: pointer; }

/* Article Tags */
.article-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.article-tags-wrap .tag-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
}

.article-tag-pill {
  font-size: 0.75rem;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.article-tag-pill:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Author Box */
.author-bio-card {
  display: flex;
  gap: 1.25rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 2rem 0;
}

.author-bio-avatar img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.author-bio-content {
  flex: 1;
}

.author-bio-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.author-bio-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Prev / Next Navigation */
.post-pagination-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 640px) {
  .post-pagination-links {
    grid-template-columns: 1fr 1fr;
  }
}

.nav-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.nav-card-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.nav-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

/* Related Posts */
.related-posts-section {
  margin: 2.5rem 0;
}

/* Comments */
.comments-area {
  margin: 2.5rem 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.comment-list {
  list-style: none;
  margin: 1.5rem 0;
}

.comment-body {
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.comment-author-avatar img {
  border-radius: var(--radius-full);
}

.comment-content {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-main);
}

.comment-respond {
  margin-top: 1.5rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.comment-form input[type="submit"] {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.comment-form input[type="submit"]:hover {
  background-color: var(--primary-hover);
}

/* =========================================================
 * SIDEBAR & WIDGETS
 * ========================================================= */
.sidebar-sticky-wrapper {
  position: -webkit-sticky;
  position: sticky;
  top: 85px;
  align-self: flex-start;
  will-change: transform;
}

.widget {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1.0625rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-main);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-light);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary);
}

/* Trending & Populer Widget (Matches Live Preview Exactly) */
.trending-widget-title {
  font-size: 0.875rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  border-bottom: 1px solid var(--border-light) !important;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.trending-widget-title::after {
  display: none !important;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.trending-rank {
  font-size: 1.5rem; /* 24px */
  font-weight: 900;
  color: var(--text-muted);
  line-height: 1;
  min-width: 32px;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.trending-item:hover .trending-rank {
  color: var(--primary);
}

.trending-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.trending-title {
  font-size: 0.8125rem; /* 13px */
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  margin: 0;
  transition: color var(--transition-fast);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-item:hover .trending-title {
  color: var(--primary);
}

.trending-meta {
  font-size: 0.6875rem; /* 11px */
  color: var(--text-muted);
}

.widget-post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.widget-post-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.widget-post-thumb {
  width: 75px;
  height: 75px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-surface-secondary);
}

.widget-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-post-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

.widget-post-meta {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Categories List Widget */
.widget ul:not(.widget-post-list) {
  list-style: none;
}

.widget ul:not(.widget-post-list) li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget ul:not(.widget-post-list) li:last-child {
  border-bottom: none;
}

/* =========================================================
 * PAGINATION
 * ========================================================= */
.bangeko-pagination {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.bangeko-pagination .nav-links {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.bangeko-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.bangeko-pagination .page-numbers:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.bangeko-pagination .page-numbers.current {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* =========================================================
 * FOOTER
 * ========================================================= */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  margin-top: auto;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-widgets {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links-list a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .top-bar-inner,
  .header-main,
  .footer-widgets,
  .footer-bottom-inner {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    flex-direction: row;
    text-align: left;
  }
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
}

.footer-legal-links a {
  color: var(--text-secondary);
}

.footer-legal-links a:hover {
  color: var(--primary);
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

#back-to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Toast Notification (Copy Link Feedback) */
.bangeko-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #0f172a;
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 100000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.bangeko-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
