/* =========================================================
   header.css (FULL VERSION - TELKOMSEL STYLE MOBILE FIXED)
   ========================================================= */
html, body {
  margin: 0;
  padding: 0;
}

body {
  padding-top: 72px;
  background-color: var(--body-bg) !important;
}

/* ----- BASIC NAVBAR LAYOUT ----- */
.top-nav {
  width: 100%;
  background-color: var(--header-bg) !important;
  padding: 10px 0;
  font-family: 'Spectral', serif;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  overflow: visible;
  transition: transform .22s ease, box-shadow .22s ease;
  will-change: transform;
}

.top-nav.nav-hidden {
  transform: translateY(-110%);
  box-shadow: none;
}

.container.nav-inner {
  max-width: 1300px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  flex-wrap: nowrap;
  position: relative;
  overflow: visible;
}

/* ----- LOGO SECTION ----- */
.logo-section {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.logo-img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  border-radius: 50%;
}

.logo-title-wrap { line-height: 1.05; }

.logo-title-main {
  font-size: 18px;
  font-weight: 800;
  color: var(--header-text) !important;
}
.logo-title-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--header-text) !important;
  letter-spacing: 0.1em;
}

.logo-section:hover { transform: translateY(-1px); }
.logo-section:hover .logo-img { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25)); }
.logo-section:active { transform: translateY(0); }

/* ----- NAV MENU (DESKTOP) ----- */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-menu a,
.nav-menu button { position: relative; }

.nav-menu .nav-text,
.nav-dropdown > button {
  color: var(--header-text) !important;
}

.nav-menu .nav-text{
  display: inline-block;
  transition: transform 0.25s ease, text-shadow 0.25s ease, letter-spacing 0.25s ease;
  will-change: transform;
}
.nav-menu a:hover .nav-text,
.nav-menu button:hover .nav-text{
  transform: translateY(-2px) scale(1.03);
  letter-spacing: 0.02em;
  text-shadow:
    0 2px 0 rgba(255,255,255,0.55),
    0 8px 18px rgba(0,0,0,0.18);
}

.nav-menu a.active,
.nav-menu button.active {
  border-bottom: 2px solid var(--header-text);
  color: var(--header-text);
  text-shadow: none;
}
.nav-menu a.active .nav-text,
.nav-menu button.active .nav-text{
  transform: translateY(-1px);
  text-shadow:
    0 1px 0 rgba(255,255,255,0.35),
    0 6px 14px rgba(0,0,0,0.12);
}

/* ----- DROPDOWN ----- */
.nav-dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 180px;
  padding: 10px 0;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.dropdown-menu a:hover {
  background: #e8f5ef;
  color: #0b3d2a !important;
}
.dropdown-menu a.active {
  background: #e8f5ef;
  color: #003249 !important;
  font-weight: 600;
  text-shadow: none;
}

.nav-dropdown.open .dropdown-menu { display: block; }

/* ----- NESTED DROPDOWN ----- */
.dropdown-subgroup { position: relative; }

.dropdown-subtitle.is-active {
  background: #e8f5ef;
  color: #0b3d2a !important;
}

.dropdown-submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background: #ffffff;
  min-width: 180px;
  padding: 8px 0;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.dropdown-submenu a:hover {
  background: #e8f5ef;
  color: #0b3d2a !important;
}

.dropdown-subgroup.open .dropdown-submenu { display: block; }

/* ----- KUNCI UKURAN HURUF & FONT FAMILY ----- */
.nav-menu a,
.nav-menu button,
.nav-menu .nav-text,
.dropdown-menu a,
.dropdown-subtitle,
.dropdown-submenu a {
    font-family: 'Spectral', serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: normal !important;
    letter-spacing: normal !important;
    color: #0a2e23;
    background: none;
    border: none;
    text-decoration: none;
    cursor: pointer;
}
.nav-menu button {
    padding-block: 0;
    padding-inline: 0;
}

/* FLEX ALIGNMENT DROPDOWN */
.dropdown-menu a,
.dropdown-subtitle {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 18px !important;
    margin: 0 !important;
}

.dropdown-menu .nav-text,
.dropdown-subtitle .nav-text {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}
.dropdown-subtitle .nav-text span {
    position: static !important;
    transform: none !important;
    font-size: 14px !important;
    margin-left: 8px !important; 
}

/* ----- RIGHT SIDE WRAPPER ----- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========== SEARCH ICON + BAR TOGGLE ========== */
.nav-search-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}
.nav-search-icon-btn {
  border: 1px solid #0a2e23;
  background: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.nav-search-icon-btn.hide { display: none; }
.search-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.nav-search-bar {
  display: none;
  align-items: center;
  background: #ffffff;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid #a7e4c2;
  gap: 4px;
  min-width: 160px;
}
.nav-search-bar.active { display: flex; }
.nav-search-input {
  border: none;
  outline: none;
  font-size: 13px;
  width: 130px;
  color: #333;
  background: transparent;
}
.nav-search-submit {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

/* ----- SUPPORT BUTTON ----- */
.btn-donate {
  background-color: var(--btn-donate-bg) !important;
  color: var(--btn-donate-text) !important;
  border-color: var(--btn-donate-bg) !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-donate:hover {
  filter: brightness(0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.btn-donate:active {
  transform: translateY(0px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.btn-donate-active {
  filter: brightness(0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}

/* ----- AVATAR & LOGIN ----- */
.auth-user{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid #0a2e23;
  background:#ffffff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  text-decoration:none;
}
.auth-user:hover{ background:#f4fbf8; }

.auth-avatar, .auth-avatar-fallback{
  width:30px;
  height:30px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex:0 0 30px;
}
.auth-avatar{
  object-fit:cover;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
}
.auth-avatar-fallback{
  font-weight:900;
  font-size:13px;
  letter-spacing:.5px;
  color:#003249;
  border:1px solid rgba(0,0,0,.12);
  background:#e8f5ef;
}

.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #0a2e23;
  background: #ffffff;
  text-decoration: none;
  padding: 0;
  cursor: pointer;
}
.auth-svg {
  width: 18px;
  height: 18px;
  display: block;
  color: #0a2e23;
}

/* ----- LANGUAGE ----- */
.lang-switch { display: flex; align-items: center; }
.lang-pill {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #0a2e23;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #0a2e23;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.lang-pill:hover { transform: scale(1.05); }
.lang-pill:active { transform: scale(0.9); opacity: 0.7; }

/* ----- RESPONSIVE HELPER ----- */
@media (max-width: 900px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    .mobile-flex { display: flex !important; }
}
@media (min-width: 901px) {
    .mobile-only, .mobile-flex { display: none !important; }
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* =========================================================
   RESPONSIVE NAVBAR (MOBILE) - TELKOMSEL STYLE
========================================================= */
@media (max-width: 900px) {
  body { padding-top: 68px; }
  .container.nav-inner { gap: 8px; }

  /* Sembunyikan elemen kanan di menu utama agar rapi saat dilipat */
  .nav-right .nav-search-wrapper,
  .nav-right .lang-switch,
  .nav-right .auth-icon,
  .nav-right .auth-user {
      display: none !important;
  }

  .logo-img { width: 48px; height: 48px; }
  .logo-title-main { font-size: 13px; line-height: 1.1; }
  .logo-title-sub { 
    display: block !important; 
    font-size: 9px; 
    letter-spacing: 0.05em; 
    margin-top: 2px;
  }

  .btn-donate { display: none; }
  .nav-toggle { display: inline-flex; align-items:center; justify-content:center; }

  /* ===== PANEL MENU FULL SCREEN (MENUTUP HEADER) ===== */
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0a2e23 !important; 
    flex-direction: column;
    align-items: flex-start;
    padding: 0 0 20px 0;
    display: none;
    overflow-y: auto;
    z-index: 10000;
  }

  .nav-menu.show { display: flex; }

  /* TOP BAR MOBILE MENU (Teks Kiri, Search & X Kanan) */
  .mobile-menu-header {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 15px 20px;
      border-bottom: 1px solid rgba(255,255,255,0.1);
      margin-bottom: 10px;
      gap: 10px;
  }

  /* Teks Pengganti Logo di dalam Menu Mobile */
  .mobile-logo-text {
      display: flex;
      flex-direction: column;
      color: #ffffff;
      font-family: 'Spectral', serif;
      flex: 1;
      margin-right: 5px;
  }
  .mobile-logo-text .main-text {
      font-size: 13px;
      font-weight: 800;
      line-height: 1.1;
  }
  .mobile-logo-text .sub-text {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.05em;
      margin-top: 2px;
      color: rgba(255, 255, 255, 0.8);
  }

  /* Grup Search dan X di Kanan */
  .mobile-header-actions {
      display: flex;
      align-items: center;
      gap: 15px; /* Jarak antara search dan X diperlebar */
      flex-shrink: 0; 
  }

  .mobile-search-bar {
      display: flex;
      align-items: center;
      background: rgba(255,255,255,0.1);
      border-radius: 20px;
      padding: 6px 12px;
      border: 1px solid rgba(255,255,255,0.2);
      max-width: 160px; /* Diperlebar agar tulisan tidak terpotong */
  }
  .mobile-search-bar input {
      border: none;
      background: transparent;
      color: #fff;
      font-size: 13px;
      width: 100%;
      outline: none;
  }
  .mobile-search-bar input::placeholder { color: rgba(255,255,255,0.6); }
  
  .mobile-search-bar button {
      background: none;
      border: none;
      padding: 0;
      cursor: pointer;
      display: flex;
      align-items: center;
      margin-left: 5px;
  }
  .mobile-search-bar img {
      width: 16px;
      height: 16px;
      filter: brightness(0) invert(1);
  }

  /* Tombol X (Close) Diperbesar Secara Paksa */
  .nav-close-btn {
      background: none;
      border: none;
      color: #fff !important;
      font-family: Arial, Helvetica, sans-serif !important; /* Paksa font dasar agar bentuk X presisi & besar */
      font-size: 45px !important; 
      line-height: 0.5 !important;
      cursor: pointer;
      padding: 0;
      margin-top: -5px; 
      font-weight: 400;
  }

  /* ITEM MENU REGULAR SPACING */
  .nav-menu > a, .nav-menu > .nav-dropdown, .nav-menu > .mobile-only.active {
      padding: 0 20px;
      margin-bottom: 15px;
  }

  /* ====== MOBILE -> SUBMENU ACCORDION (TERTUTUP SECARA DEFAULT) ====== */
  .nav-dropdown { width: 100%; }

  .nav-dropdown .dropdown-menu {
    display: none !important;
    position: static;
    box-shadow: none;
    background: #0c3a2b !important;
    margin-top: 4px;
    border-radius: 6px;
    padding: 6px 0;
  }

  .nav-dropdown.open .dropdown-menu { display: block !important; }
  .dropdown-subgroup { position: static; }
  .dropdown-subtitle { padding: 8px 16px; cursor: default; }

  .dropdown-submenu {
    display: none !important;
    position: static;
    box-shadow: none;
    background: #0c3a2b !important;
    padding: 0 0 4px 0;
    border-radius: 6px;
    margin: 6px 0 8px;
  }

  .dropdown-subgroup.open .dropdown-submenu { display: block !important; }
  .dropdown-submenu a { padding-left: 32px !important; }
  
  .nav-dropdown > button .nav-text, 
  .dropdown-subtitle .nav-text {
      justify-content: space-between;
      width: 100%;
  }

  /* BOTTOM BAR MOBILE MENU (Lang, Daftar) */
  .mobile-menu-footer {
      width: 100%;
      margin-top: auto;
      padding: 20px;
      border-top: 1px solid rgba(255,255,255,0.1);
      display: flex;
      flex-direction: column;
      gap: 15px;
  }

  .mobile-lang-wrap {
      display: flex;
      align-items: center;
      justify-content: space-between;
  }
  .mobile-lang-wrap span {
      color: #fff;
      font-size: 14px;
      font-family: 'Spectral', serif;
  }

  .btn-daftar-mobile {
      display: block;
      width: 100%;
      text-align: center;
      background: #ffffff;
      color: #0a2e23;
      padding: 12px;
      border-radius: 999px;
      font-weight: bold;
      text-decoration: none;
      font-family: 'Spectral', serif;
      font-size: 15px;
  }

  /* ====== KONTRAS WARNA TEKS MENU MOBILE ====== */
  body header.top-nav .nav-menu .nav-text,
  body header.top-nav .nav-menu a,
  body header.top-nav .nav-menu button,
  body header.top-nav .nav-dropdown > button,
  body header.top-nav .nav-dropdown .dropdown-menu a,
  body header.top-nav .dropdown-subtitle,
  body header.top-nav .dropdown-submenu a {
    width: 100%;
    text-align: left;
    color: #ffffff !important; 
    text-shadow: none !important;
    border-bottom: none !important; /* HILANGKAN GARIS BIRU SAAT AKTIF DI MOBILE */
  }

  /* ====== FIX MUTLAK WARNA TEKS BAHASA DI MENU MOBILE ====== */
  body header.top-nav .nav-menu .mobile-menu-footer .lang-switch-mobile a.lang-pill {
      color: #0a2e23 !important; /* Paksa warna teks menjadi hijau gelap/hitam */
      background-color: #ffffff !important; /* Paksa background putih */
      font-weight: 800 !important;
      text-shadow: none !important;
      border-bottom: none !important;
      display: inline-block;
  }

  body header.top-nav .nav-dropdown .dropdown-menu a:hover,
  body header.top-nav .dropdown-submenu a:hover,
  body header.top-nav .dropdown-subtitle.is-active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
  }
}

@media (max-width: 600px) {
  .nav-right { gap: 6px; }
}

/* Fix Testimonial Text Color */
html body .impact-section-full .impact-left .impact-card .testimonial,
html body .impact-section-full .impact-left .impact-card .testimonial h3,
html body .impact-section-full .impact-left .impact-card .testimonial p{
  color:#ffffff;
}
html body .impact-section-full .impact-left .impact-card .testimonial p{
  color:rgba(255,255,255,.92);
}