/* ==========================================
   SITE HEADER & CONTAINER LAYOUT (3 PILAR)
========================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: linear-gradient(180deg, rgba(3, 17, 38, .96), rgba(6, 26, 51, .90));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .24);
  transition: all .35s ease;
}

.site-header.scrolled {
  background: rgba(4, 18, 45, 0.98);
  box-shadow: 0 10px 35px rgba(0,0,0,.35);
  border-bottom: 1px solid rgba(79, 195, 247, .25);
}

.container {
  max-width: 1400px;
  margin: auto;
  padding: 0 25px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Membagi Kiri, Tengah, Kanan scr otomatis */
  height: 85px;
}

/* ==========================================
   BAGIAN KIRI: LOGO & BRAND TEXT
========================================== */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
  flex: 1; /* Memberikan ruang proporsional di sisi kiri */
  justify-content: flex-start;
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(56, 189, 248, .55);
  box-shadow: 0 0 0 6px rgba(18, 155, 255, .10), 0 0 28px rgba(18, 155, 255, .35);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--blue-300);
  text-shadow: 0 0 18px rgba(56, 189, 248, .55);
}

.logo-text small {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

/* ==========================================
   BAGIAN TENGAH: NAV MENU (CENTERED)
========================================== */
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 38px;
  flex: 2; /* Mengunci porsi tengah lebih besar agar menu tidak melorot */
}

.nav-menu a {
  color: #eaf7ff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
  transition: .3s ease;
  position: relative;
  padding: 10px 0;
  white-space: nowrap;
}

.nav-menu a:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-300));
  transition: .3s ease;
  border-radius: 20px;
  box-shadow: 0 0 16px rgba(56, 189, 248, .65);
}

.nav-menu a:hover {
  color: var(--blue-300);
}

.nav-menu a:hover:after {
  width: 100%;
}

/* ==========================================
   BAGIAN KANAN: CTA BUTTONS (RIGHT ALIGNED)
========================================== */
.header-action {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1; /* Memberikan ruang proporsional di sisi kanan */
  justify-content: flex-end;
}

.btn-login,
.btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 27px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  transition: .3s ease;
  white-space: nowrap;
}

.btn-login {
  color: var(--blue-300);
  border: 1px solid rgba(125, 211, 252, .75);
  background: rgba(8, 38, 77, .55);
}

.btn-login:hover {
  color: var(--white);
  background: rgba(18, 155, 255, .22);
  border-color: var(--blue-400);
  box-shadow: 0 0 25px rgba(56, 189, 248, .30);
  transform: translateY(-2px);
}

.btn-register {
  color: var(--white);
  border: 1px solid rgba(125, 211, 252, .50);
  background: linear-gradient(135deg, var(--blue-500), #0b6fe8 48%, var(--navy-700));
  box-shadow: var(--shadow);
}

.btn-register:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 55px rgba(18, 155, 255, .35);
  filter: brightness(1.08);
}

/* ==========================================
   HAMBURGER TRIGGER (MOBILE ONLY)
========================================== */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(18, 155, 255, .25), rgba(8, 38, 77, .80));
  border: 1px solid rgba(125, 211, 252, .35);
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
  transition: .3s ease;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--white);
  border-radius: 2px;
  transition: .3s ease;
}

/* Animasi X Hamburger */
.mobile-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ==========================================
   MEDIA QUERIES (SISTEM RESPONSIVE HP)
========================================== */
@media (max-width: 1024px) {
  .container {
    height: 78px;
    padding: 0 18px;
  }

  /* Tarik Navigasi & Tombol Masuk ke Sidebar Kanan saat di HP */
  .nav-menu {
    position: fixed;
    right: -100%;
    top: 78px;
    width: min(320px, 85vw);
    height: calc(100vh - 78px);
    background: 
      radial-gradient(circle at top right, rgba(18, 155, 255, .25), transparent 34%), 
      linear-gradient(180deg, var(--navy-900), var(--navy-950));
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 55px rgba(0, 0, 0, .35);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px 24px;
    gap: 10px;
    transition: right .35s cubic-bezier(0.4, 0, 0.2, 1);
    flex: none;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu a {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
  }

  .nav-menu a:hover {
    background: rgba(18, 155, 255, .15);
    border-color: rgba(125, 211, 252, .3);
    padding-left: 22px;
  }

  .nav-menu a:after {
    display: none;
  }

  /* Bungkus tombol CTA di bawah link menu saat di HP */
  .header-action {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: auto;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex: none;
  }

  .btn-login, .btn-register {
    width: 100%;
    text-align: center;
  }

  .mobile-toggle {
    display: flex;
  }
}

@media (max-width: 600px) {
  .logo { gap: 10px; }
  .brand { font-size: 20px; letter-spacing: 1px; }
  .logo-text small { font-size: 11px; }
  .logo img { width: 42px; height: 42px; }
}