:root {
  --bg-page: #f5f6f8;
  --bg-surface: #ffffff;
  --bg-surface-2: #f1f5f9;
  --bg-dark-bar: #111827;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --brand-red: #c81e2b;
  --brand-red-dark: #9f1239;
  --brand-pink-bg: #fce7f3;
  --brand-pink-text: #be123c;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-card: 16px;
}

[data-theme="dark"] {
  --bg-page: #0b1120;
  --bg-surface: #111827;
  --bg-surface-2: #1e293b;
  --bg-dark-bar: #030712;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1f2937;
  --brand-pink-bg: rgba(225, 29, 72, 0.2);
  --brand-pink-text: #fda4af;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* TOP UTILITY BAR */
.top-utility-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  font-size: 12.5px;
  color: var(--text-muted);
}

.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}

.utility-date {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.utility-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.utility-tagline {
  font-weight: 600;
  color: var(--text-muted);
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.theme-toggle-btn:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

/* MAIN HEADER */
.site-header {
  background: var(--bg-surface);
  border-bottom: 2px solid var(--brand-red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 18px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-img {
  height: 54px;
  width: 54px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
  padding: 4px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.brand-logo-full {
  height: 64px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
  padding: 6px 10px;
}

.brand-badge-mnn {
  background: linear-gradient(135deg, #c81e2b 0%, #dc2626 100%);
  color: #ffffff;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.5px;
  padding: 9px 14px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(200, 30, 43, 0.28);
  line-height: 1;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: var(--text-main);
  line-height: 1.08;
}

.brand-subtitle {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 2.4px;
  color: var(--brand-red);
  text-transform: uppercase;
  margin-top: 3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-pill {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border-color);
  border-radius: 999px;
  padding: 3px 4px 3px 14px;
  transition: all 0.2s ease;
}

.search-pill:focus-within {
  border-color: var(--brand-red);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(200, 30, 43, 0.15);
}

.search-pill input {
  width: 220px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  padding: 6px 8px 6px 0;
  transition: width 0.2s;
}

.search-pill:focus-within input {
  width: 260px;
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
}

.search-clear-btn:hover {
  color: var(--brand-red);
  background: rgba(200, 30, 43, 0.1);
}

.search-btn {
  background: var(--brand-red);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(200, 30, 43, 0.3);
}

.search-btn:hover {
  background: #a51320;
  transform: scale(1.05);
}

.search-btn:active {
  transform: scale(0.95);
}

.btn-redaksi {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-2);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-redaksi:hover {
  background: var(--brand-red);
  color: #ffffff;
  border-color: var(--brand-red);
}

/* CATEGORY NAV STRIP */
.category-nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}

.category-list {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-pill:hover {
  background: var(--bg-surface-2);
  color: var(--brand-red);
}

.cat-pill.active {
  background: var(--brand-pink-bg);
  color: var(--brand-pink-text);
  font-weight: 700;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* FEED QUICK CATEGORY BAR */
.feed-cat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 2px 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--border-color);
}
.feed-cat-bar::-webkit-scrollbar {
  display: none;
}
.feed-cat-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.feed-cat-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-2);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.feed-cat-btn.active {
  background: var(--brand-red);
  color: #ffffff;
  border-color: var(--brand-red);
  box-shadow: 0 3px 8px rgba(200, 30, 43, 0.25);
}
.feed-cat-btn.active .cat-dot {
  background: #ffffff !important;
}

/* BREAKING TICKER ("KILAT") */
.kilat-bar {
  background: var(--bg-dark-bar);
  color: #ffffff;
  height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.kilat-inner {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
}

.kilat-badge {
  background: linear-gradient(90deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 0 16px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 2;
}

.kilat-marquee-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.kilat-track {
  display: flex;
  align-items: center;
  gap: 48px;
  white-space: nowrap;
  padding-left: 24px;
  animation: tickerScroll 34s linear infinite;
}

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

.kilat-item {
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.15s;
}

.kilat-item:hover {
  color: #ffffff;
  text-decoration: underline;
}

.kilat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
}

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

/* HERO SECTION */
.hero-section {
  padding: 22px 0 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  gap: 18px;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #0f172a;
  display: block;
  box-shadow: var(--shadow-md);
}

.hero-main-card {
  min-height: 410px;
}

.hero-side-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-side-card {
  flex: 1;
  min-height: 196px;
}

.hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.45) 45%, rgba(10, 15, 28, 0.94) 100%);
}

.hero-overlay-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  color: #ffffff;
  z-index: 2;
}

.hero-side-card .hero-overlay-content {
  padding: 18px 20px;
}

.cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #ffffff;
  background: #e11d48;
  padding: 4px 11px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.hero-main-card h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  color: #ffffff;
}

.hero-side-card h2 {
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.32;
  margin-bottom: 8px;
  color: #ffffff;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 500;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* MAIN PORTAL FEED + SIDEBAR */
.portal-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  padding: 16px 0 56px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.section-heading h2 {
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-heading h2::before {
  content: '';
  width: 5px;
  height: 20px;
  background: var(--brand-red);
  border-radius: 3px;
  display: inline-block;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.news-card {
  background: var(--bg-surface);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.news-card-img {
  position: relative;
  height: 185px;
  overflow: hidden;
  background: #0f172a;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-card:hover .news-card-img img {
  transform: scale(1.05);
}

.news-card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  color: #ffffff;
}

.news-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-body h3 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.38;
  margin-bottom: 8px;
  color: var(--text-main);
}

.news-card:hover .news-card-body h3 {
  color: var(--brand-red);
}

.news-card-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  font-weight: 600;
}

/* SIDEBAR */
.sidebar-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}

.popular-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-rank {
  font-size: 24px;
  font-weight: 900;
  color: var(--brand-red);
  line-height: 1;
  min-width: 26px;
  opacity: 0.85;
}

.popular-info h4 {
  font-size: 13.8px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 5px;
}

.popular-item:hover h4 {
  color: var(--brand-red);
}

.popular-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-surface-2);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s;
}

.tag-chip:hover {
  background: var(--brand-red);
  color: #ffffff;
  border-color: var(--brand-red);
}

/* ARTICLE DETAIL PAGE (Detik.com Reference Typography & Layout) */
.article-wrap {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 32px;
  padding: 24px 0 64px;
}

.article-main-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
  font-weight: 500;
}

.article-breadcrumb a:hover {
  color: var(--brand-red);
}

.article-header-center {
  text-align: center;
  padding: 0 8px;
}

.article-title {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 14px;
  letter-spacing: -0.2px;
  color: #1e3a8a;
}

[data-theme="dark"] .article-title {
  color: #f8fafc;
}

.article-byline {
  font-size: 13.5px;
  color: #475569;
  font-weight: 500;
  margin-bottom: 5px;
}

[data-theme="dark"] .article-byline {
  color: #cbd5e1;
}

.article-byline .byline-brand {
  color: var(--brand-red);
  font-weight: 700;
}

.article-date-line {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.article-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px 10px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.share-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  line-height: 1.2;
}

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

.share-wa { background: #16a34a; }
.share-fb { background: #1877f2; }
.share-tw { background: #0f172a; }
.share-tg { background: #0284c7; }
.share-copy {
  background: var(--bg-surface-2);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.share-native {
  background: var(--brand-red);
  color: #ffffff;
}

.article-cover {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
}

.article-content {
  font-size: 16px;
  line-height: 1.78;
  color: var(--text-main);
}

.article-content p {
  margin-bottom: 16px;
}

.article-content h3 {
  font-size: 18.5px;
  font-weight: 800;
  margin: 24px 0 10px;
}

.article-content blockquote {
  border-left: 4px solid var(--brand-red);
  background: var(--bg-surface-2);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  margin: 20px 0;
}

.article-content ul {
  margin: 12px 0 18px 22px;
}

/* FOOTER */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 42px 0 24px;
  border-top: 3px solid var(--brand-red);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 12px;
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero-grid, .portal-layout, .article-wrap, .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-main-card { min-height: 320px; }
  .hero-side-card { min-height: 200px; }
  .search-pill input { width: 170px; }
  .search-pill input:focus { width: 200px; }
}

@media (max-width: 640px) {
  .container { padding: 0 12px; }
  .news-grid { grid-template-columns: 1fr; }
  .header-main { flex-wrap: wrap; }
  .brand-logo-img { height: 46px; width: 46px; border-radius: 10px; }
  .brand-title { font-size: 18.5px; }
  .brand-subtitle { font-size: 10px; letter-spacing: 2px; }
  .search-pill { order: 3; width: 100%; }
  .search-pill input { width: 100% !important; }
  .utility-tagline { display: none; }
  .hero-main-card h1 { font-size: 20px; line-height: 1.3; }
  .article-wrap { padding: 12px 0 42px; gap: 20px; }
  .article-main-card { padding: 18px 16px; border-radius: 12px; }
  .article-breadcrumb { font-size: 13px; margin-bottom: 14px; }
  .article-header-center { padding: 0 2px; }
  .article-title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 12px;
  }
  .article-byline { font-size: 13px; }
  .article-date-line { font-size: 12px; margin-bottom: 14px; }
  .article-share-bar { padding: 10px 6px; gap: 6px; }
  .share-btn { padding: 6px 10px; font-size: 11.5px; }
  .article-content { font-size: 15.5px; line-height: 1.75; }
  .article-content h3 { font-size: 17.5px; }
}
