/* ============================================================
   NUSANTARA TODAY — Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400&family=Source+Sans+3:wght@300;400;500&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --navy:        #1a2e4a;
  --navy-light:  #2a4a6e;
  --navy-pale:   #e8eef5;
  --accent:      #185FA5;
  --accent-pale: #E6F1FB;
  --accent-mid:  #B5D4F4;

  --text-primary:   #1c1c1e;
  --text-secondary: #4a4a52;
  --text-muted:     #8a8a96;

  --bg-page:    #f5f4f0;
  --bg-white:   #ffffff;
  --bg-surface: #f0eeea;

  --border:     rgba(0,0,0,0.10);
  --border-mid: rgba(0,0,0,0.18);

  --cat-teknologi: #185FA5;
  --cat-politik:   #8B2615;
  --cat-budaya:    #2E6010;
  --cat-sains:     #3C3489;
  --cat-gaya:      #7A2040;
  --cat-sosial:    #6B3A08;
  --cat-esai:      #534AB7;

  --font-display: 'Lora', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --container: 1100px;
  --sidebar-w: 300px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; object-fit: cover; }
button { cursor: pointer; font-family: inherit; }

/* ── Utilities ───────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.serif { font-family: var(--font-display); }

/* Category badge */
.cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 20px;
}
.cat-teknologi  { color: var(--cat-teknologi); background: #E6F1FB; }
.cat-politik    { color: var(--cat-politik);   background: #FAECE7; }
.cat-budaya     { color: var(--cat-budaya);    background: #EAF3DE; }
.cat-sains      { color: var(--cat-sains);     background: #EEEDFE; }
.cat-gaya       { color: var(--cat-gaya);      background: #FBEAF0; }
.cat-sosial     { color: var(--cat-sosial);    background: #FAEEDA; }
.cat-esai       { color: var(--cat-esai);      background: #EEEDFE; }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  background: var(--navy);
  padding: 6px 0;
  font-size: 11px;
  color: #85B7EB;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-links { display: flex; gap: 16px; }
.topbar-links a { color: #85B7EB; transition: color 0.2s; }
.topbar-links a:hover { color: #fff; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1;
}
.site-logo span {
  display: block;
  font-size: 10px;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}
.header-right { display: flex; align-items: center; gap: 12px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-page);
  cursor: pointer;
  transition: border-color 0.2s;
}
.search-box:hover { border-color: var(--accent); }
.search-box svg { width: 15px; height: 15px; opacity: 0.5; }
.btn-subscribe {
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  border: none;
  transition: background 0.2s;
}
.btn-subscribe:hover { background: var(--navy-light); }

/* ── Main nav ────────────────────────────────────────────── */
.main-nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.main-nav .container {
  display: flex;
  align-items: center;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.main-nav .container::-webkit-scrollbar { display: none; }
.nav-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 12px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-item:hover { color: var(--navy); }
.nav-item.active { color: var(--navy); font-weight: 500; border-bottom-color: var(--navy); }
.nav-item:first-child { padding-left: 0; }

/* ── Breaking bar ────────────────────────────────────────── */
.breaking-bar {
  background: var(--accent-pale);
  padding: 7px 0;
  border-bottom: 1px solid var(--accent-mid);
  font-size: 12px;
  color: var(--accent);
}
.breaking-bar .container { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.breaking-label {
  background: var(--accent-mid);
  color: var(--accent);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Page layout ─────────────────────────────────────────── */
.page-body {
  padding: 28px 0 48px;
}
.layout-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
  gap: 32px;
  align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sidebar-card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.sidebar-card-body { padding: 14px 16px; }

/* Trending */
.trending-list { display: flex; flex-direction: column; gap: 0; }
.trending-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.trending-item:last-child { border-bottom: none; padding-bottom: 0; }
.trending-item svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; margin-top: 2px; }
.trending-title {
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 2px;
}
.trending-meta { font-size: 11px; color: var(--text-muted); }

/* Newsletter */
.newsletter-box { text-align: left; }
.newsletter-box h3 { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.newsletter-box p { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-form input {
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button {
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 9px;
  border-radius: var(--radius-md);
  border: none;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--navy-light); }

/* Tags */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--navy); color: var(--navy); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: #8aa6c0;
  padding: 32px 0 20px;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 20px;
}
.footer-brand h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: #fff;
  margin-bottom: 8px;
}
.footer-brand p { line-height: 1.6; max-width: 240px; }
.footer-col h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: #8aa6c0; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #5a7a96;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .layout-main { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .site-logo { font-size: 20px; }
  .header-right .search-box span { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
