/* ============================================================
   DAFTAR ISI CSS (PANDUAN TROUBLESHOOTING)
   ============================================================
   1. VARIABEL GLOBAL & TEMA (Light/Dark Mode)
   2. PENGATURAN DASAR (Body, Typography, Reset)
   3. HEADER & NAVBAR (Menu, Hamburger, Search)
   4. HALAMAN UTAMA (Pilih Region: Alpha, Beta, Apendiks)
   5. HALAMAN REGION (Pilih Tim: Audio, Video, IT, Podium)
   6. HALAMAN ARTIKEL (Detail Panduan & Isi Teks)
   7. KOMPONEN UMUM (Footer)
   ============================================================ */

/* ============================================================
   1. VARIABEL GLOBAL & TEMA
   ============================================================ */
:root {
  --primary-orange: #ff7e27;
  --soft-orange: #fff0e5;
  --primary-blue: #003366;
  --soft-blue: #e8efff;
  --bg-color: #f4f5f7;
  --text-dark: #1a1a1a;
  --text-gray: #6b7280;
  --card-radius: 24px;
  --card-bg: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
  --bg-color: #0f172a;
  --text-dark: #f8fafc;
  --text-gray: #94a3b8;
  --card-bg: #1e293b;
  --nav-bg: rgba(30, 41, 59, 0.9);
  --soft-blue: #334155;
  --soft-orange: #452a1a;
  --border-color: #415068;
}

/* ============================================================
   2. PENGATURAN DASAR
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  padding-bottom: 80px;
  overflow-x: hidden;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

/* ============================================================
   3. HEADER & NAVBAR (KOMPONEN GLOBAL)
   ============================================================ */
header {
  padding: 15px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--nav-bg);
  border-radius: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

/* --- KIRI: Logo & Tagline --- */
.nav-group-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.main-logo {
  height: 40px;
  width: auto;
  display: block;
}
.site-tagline {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  opacity: 0.8;
  margin-left: 8px;
  border-left: 1px solid var(--border-color);
  padding-left: 8px;
}

/* --- MENU DESKTOP --- */
.nav-menu {
  display: flex;
  gap: 15px;
  align-items: center;
}
.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  transition: 0.3s;
}
.menu-content-top {
  display: flex;
  gap: 10px;
}

/* --- KANAN: Search, Mode, Badge --- */
.nav-group-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle {
  cursor: pointer;
  background: var(--soft-blue);
  border: 1px solid var(--border-color);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.location-badge {
  background: var(--primary-blue);
  color: white;
  padding: 6px 16px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
}

/* --- SEARCH DESKTOP (Expand Animation) --- */
.search-wrapper-desktop {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  width: 40px;
  overflow: hidden;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-wrapper-desktop.active {
  width: 250px;
  padding-left: 15px;
}
.search-wrapper-desktop input {
  width: 0;
  opacity: 0;
  border: none;
  background: transparent;
  outline: none;
  transition: 0.3s;
  font-size: 14px;
  color: var(--text-dark);
}
.search-wrapper-desktop.active input {
  width: 100%;
  opacity: 1;
}
.search-toggle-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}

/* Sembunyikan Elemen Mobile di Desktop */
.hamburger,
.menu-close,
.mobile-search-trigger,
.search-dropdown-mobile,
.menu-content-bottom-mobile {
  display: none;
}

/* --- RESPONSIVE MOBILE NAVBAR (Max 600px) --- */
@media (max-width: 600px) {
  .nav-container {
    padding: 8px 15px;
  }
  .site-tagline {
    display: inline-block;
    font-size: 12px; /* Ukuran diperkecil sedikit untuk HP */
    padding-left: 6px;
    margin-left: 6px;
  }
  .main-logo {
    height: 30px;
  }
  .location-badge {
    font-size: 11px;
    padding: 6px 12px;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1005;
  }
  .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
  }

  /* Side Menu Drawer */
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--card-bg);
    flex-direction: column;
    justify-content: space-between;
    padding: 80px 25px 30px 25px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
  }
  .nav-menu.active {
    left: 0;
  }
  .menu-content-top {
    flex-direction: column;
    width: 100%;
  }
  .nav-link {
    font-size: 18px;
    width: 100%;
    padding: 12px 0;
  }

  .menu-close {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
  }

  .menu-content-bottom-mobile {
    display: block;
    width: 100%;
    margin-top: auto;
  }
  .theme-toggle-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    background: var(--soft-blue);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 15px;
  }

  /* Ubah Search ke Dropdown */
  .search-wrapper-desktop,
  .theme-toggle {
    display: none;
  }
  .mobile-search-trigger {
    display: block;
    background: none;
    border: none;
    font-size: 20px;
  }

  .search-dropdown-mobile {
    display: block;
    position: absolute;
    top: 75px;
    left: 15px;
    right: 15px;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border: 1px solid var(--border-color);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
  }
  .search-dropdown-mobile.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .search-inner input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--text-dark);
  }
  .search-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-gray);
    cursor: pointer;
  }
}

/* ============================================================
   4. HALAMAN UTAMA (ROOT INDEX - PILIH REGION)
   ============================================================ */
.hero {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
}
.hero h1 span {
  transform: rotate(-2deg);
  background: #ffe066;
  padding: 0 10px;
  border-radius: 8px;
  display: inline-block;
}
body.dark-mode .hero h1 span {
  background: #ca8a04;
  color: #ffffff;
}
.hero p {
  color: var(--text-gray);
  font-size: 16px;
  margin-top: 12px;
}

.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px;
}

/* Kartu Region Utama */
.location-main-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  margin-bottom: 24px;
}
.location-main-card {
  background: var(--card-bg);
  border-radius: 32px;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-color);
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}
.location-main-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}
.card-illustration {
  font-size: 80px;
  opacity: 0.15;
  transition: 0.3s;
}

/* Tata Letak Teks Dalam Kartu */
.location-main-card h2 {
  margin-top: 8px;
  margin-bottom: 12px;
  font-size: 26px;
  font-weight: 800;
}
.location-main-card p {
  margin-bottom: 24px;
  line-height: 1.6;
  color: var(--text-gray);
}

/* Label Lencana (Pill) */
.location-label {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

/* Tombol Buka Region */
.btn-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 100px;
  transition: 0.3s;
}

/* --- WARNA TEMA KARTU REGION --- */
.jw-card {
  border-left: 10px solid var(--primary-orange);
}
.badge-jw {
  background-color: var(--soft-orange);
  color: var(--primary-orange);
}
.jw-card .btn-enter {
  background-color: var(--soft-orange);
  color: var(--primary-orange);
}
.jw-card:hover .btn-enter {
  background-color: var(--primary-orange);
  color: #ffffff;
  transform: translateX(5px);
}

.ja-card {
  border-left: 10px solid var(--primary-blue);
}
.badge-ja {
  background-color: var(--soft-blue);
  color: var(--primary-blue);
}
.ja-card .btn-enter {
  background-color: var(--soft-blue);
  color: var(--primary-blue);
}
.ja-card:hover .btn-enter {
  background-color: var(--primary-blue);
  color: #ffffff;
  transform: translateX(5px);
}

.apendiks-card {
  border-left: 10px solid #4f46e5;
}
.badge-apendiks {
  background-color: #eef2ff;
  color: #4f46e5;
}
.apendiks-card .btn-enter {
  background-color: #eef2ff;
  color: #4f46e5;
}
.apendiks-card:hover .btn-enter {
  background-color: #4f46e5;
  color: #ffffff;
  transform: translateX(5px);
}

/* Dark Mode Overrides Khusus Halaman Utama */
body.dark-mode .location-main-card {
  border: 1px solid var(--border-color) !important;
}
body.dark-mode .jw-card {
  border-left: 10px solid #ffa366 !important;
}
body.dark-mode .ja-card {
  border-left: 10px solid #60a5fa !important;
}
body.dark-mode .apendiks-card {
  border-left: 10px solid #a78bfa !important;
}

body.dark-mode .badge-jw,
body.dark-mode .jw-card .btn-enter {
  background-color: rgba(255, 126, 39, 0.15);
  color: #ffa366;
}
body.dark-mode .badge-ja,
body.dark-mode .ja-card .btn-enter {
  background-color: rgba(0, 51, 102, 0.4);
  color: #60a5fa;
}
body.dark-mode .badge-apendiks,
body.dark-mode .apendiks-card .btn-enter {
  background-color: rgba(99, 102, 241, 0.15);
  color: #a78bfa;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 32px;
  }
  .location-main-card {
    padding: 25px;
    flex-direction: column;
    align-items: flex-start;
  }
  .card-illustration {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 40px;
  }
  .btn-enter {
    width: 100%;
    margin-top: 15px;
  }
}

/* ============================================================
   5. HALAMAN REGION (INDEX JA-01 & JW-08 - PILIH TIM/MISI)
   ============================================================ */
.team-section {
  margin-bottom: 30px;
  background: var(--card-bg);
  border-radius: 32px;
  padding: 30px;
  border: 1px solid var(--border-color);
}
.team-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
}
.team-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

/* Desain Kartu Misi */
.card-link {
  text-decoration: none !important;
  color: inherit !important;
  display: block;
  height: 100%;
}
.mission-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 24px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}
.mission-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.card-emoji {
  font-size: 24px;
  background: var(--bg-color);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 4px;
}
.mission-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
}
.mission-card p {
  font-size: 14px;
  color: var(--text-gray);
  line-height: 1.6;
  margin: 0;
}

/* Tombol Masuk Misi */
.btn-go {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 100px;
  transition: all 0.3s ease;
  text-decoration: none;
}
.card-link:hover .btn-go {
  transform: translateX(5px);
}

/* --- TEMA WARNA DIVISI/TIM --- */
/* Tim Audio */
.badge-audio {
  background-color: var(--primary-orange);
  color: white;
}
.audio-link .btn-go {
  background-color: var(--soft-orange);
  color: var(--primary-orange);
}
.audio-link .mission-card:hover {
  border-color: var(--primary-orange);
}

/* Tim Video */
.badge-video {
  background-color: var(--primary-blue);
  color: white;
}
.video-link .btn-go {
  background-color: var(--soft-blue);
  color: var(--primary-blue);
}
.video-link .mission-card:hover {
  border-color: var(--primary-blue);
}

/* Tim IT (Opsional) */
.badge-it {
  background-color: #94a3b8;
  color: white;
}
.it-link .btn-go {
  background-color: #f1f5f9;
  color: #475569;
}
.it-link .mission-card:hover {
  border-color: #94a3b8;
}

/* Tim Podium (Opsional) */
.badge-podium {
  background-color: #6d28d9;
  color: white;
}
.podium-link .btn-go {
  background-color: #f5f3ff;
  color: #6d28d9;
}
.podium-link .mission-card:hover {
  border-color: #6d28d9;
}

/* Dark Mode Overrides Khusus Kartu Misi */
body.dark-mode .team-section,
body.dark-mode .mission-card {
  border: 1px solid var(--border-color) !important;
  background: var(--card-bg);
}
body.dark-mode .card-emoji {
  background: rgba(255, 255, 255, 0.05);
}
body.dark-mode .badge-audio {
  background-color: #ff914d;
}
body.dark-mode .badge-video {
  background-color: #1e40af;
}

body.dark-mode .audio-link .btn-go {
  background-color: rgba(255, 126, 39, 0.1);
  color: #ffa366;
}
body.dark-mode .video-link .btn-go {
  background-color: rgba(0, 51, 102, 0.2);
  color: #60a5fa;
}
body.dark-mode .it-link .btn-go {
  background-color: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}
body.dark-mode .podium-link .btn-go {
  background-color: rgba(109, 40, 217, 0.1);
  color: #a78bfa;
}

@media (max-width: 600px) {
  .team-section {
    padding: 20px;
  }
  .grid-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   6. HALAMAN ARTIKEL (DETAIL PANDUAN SPESIFIK)
   ============================================================ */
.article-master-container {
  padding: 60px 20px;
  background: var(--bg-color);
  min-height: 100vh;
}
.article-content-card {
  max-width: 800px;
  margin: 0 auto;
  background: transparent;
  padding: 25px 15px;
  border: none;
  width: 100%;
}
.article-tags-row {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}
.badge-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 50px;
  color: #ffffff !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
}

.article-main-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.2;
}
.article-title-line {
  width: 60px;
  height: 6px;
  background: var(--primary-blue);
  margin-top: 25px;
  border-radius: 10px;
}

.article-main-body {
  margin-top: 30px;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-gray);
}
.article-main-body h2 {
  margin-top: 45px;
  margin-bottom: 20px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  border-left: 6px solid var(--primary-blue);
  padding-left: 20px;
}
.article-main-body p {
  margin-bottom: 25px;
}
.article-main-body blockquote {
  background: var(--soft-blue);
  border-left: 6px solid var(--primary-blue);
  padding: 30px;
  margin: 40px 0;
  border-radius: 0 20px 20px 0;
  font-style: italic;
  color: var(--text-dark);
}

.article-bottom-footer {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}
.btn-back {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

@media (max-width: 600px) {
  .article-master-container {
    padding: 20px 10px;
  }
  .article-content-card {
    padding: 30px 15px;
  }
  .article-main-title {
    font-size: 2.2rem;
  }
}

/* ============================================================
   7. KOMPONEN UMUM (FOOTER)
   ============================================================ */
.simple-footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
  color: var(--text-gray);
  font-size: 13px;
  font-weight: 600;
  border-top: 1px solid var(--border-color);
}
