/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  z-index: 1000;
  padding: 0;
  transition: all 0.3s ease;
  height: 80px;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: none;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.navbar.scrolled .navbar-logo {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.navbar.scrolled .navbar-logo-img {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.navbar.scrolled .navbar-logo span {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.navbar.scrolled .navbar-logo:hover {
  color: var(--secondary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transform: scale(1.05);
}

.navbar.scrolled .navbar-logo:hover span {
  color: var(--accent);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.navbar.scrolled .navbar-menu a {
  color: var(--text-dark);
  text-shadow: none;
  filter: none;
}

.navbar.scrolled .navbar-menu a:hover,
.navbar.scrolled .navbar-menu a.active {
  color: var(--secondary);
}

.navbar.scrolled .login-btn {
  background: var(--primary);
  color: var(--white);
  border: 2px solid var(--primary);
  text-shadow: none;
}

.navbar.scrolled .login-btn:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
  box-shadow: 0 5px 15px rgba(0, 163, 184, 0.3);
}

.navbar.scrolled .menu-toggle span {
  background: var(--primary);
}

.navbar-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  height: 100%;
}

/* Logo */
.navbar-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.navbar-logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.navbar-logo span {
  color: var(--white);
  transition: all 0.3s ease;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* When background is white (on scroll), make logo text colored for contrast */
.navbar.scrolled .navbar-logo {
  color: var(--primary);
  text-shadow: none;
}
.navbar.scrolled .navbar-logo span {
  color: var(--secondary);
  text-shadow: none;
}

.navbar-logo:hover {
  color: var(--secondary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transform: scale(1.05);
}

.navbar-logo:hover span {
  color: var(--accent);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Menu */
.navbar-menu {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
  flex: 1;
  justify-content: center;
  margin: 0 2rem;
}

.navbar-menu li {
  position: relative;
}

.navbar-menu a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  padding: 1.5rem 1.5rem;
  white-space: nowrap;
  position: relative;
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: 1rem;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--white);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar.scrolled .navbar-menu a::after {
  background: var(--secondary);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 80%;
}

/* Hover effect untuk semua menu items */
.navbar-menu a:hover {
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.navbar-menu a.active {
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.navbar-menu a.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.navbar-menu a.disabled:hover {
  color: inherit;
  text-shadow: inherit;
  filter: inherit;
  transform: none;
}

.navbar-menu a.disabled::after {
  display: none;
}

/* Login Button */
.login-btn {
  background: transparent;
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 25px;
  border: 2px solid #fff;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
  flex-shrink: 0;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 1.5rem;
  }

  .navbar-logo {
    font-size: 1.1rem;
  }

  .navbar-logo-img {
    width: 45px;
    height: 45px;
  }

  .navbar-logo span {
    display: none;
  }

  .navbar-menu {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
  }

  .navbar-menu.active {
    max-height: 600px;
  }

  .navbar-menu li {
    width: 100%;
  }

  .navbar-menu a {
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-shadow: none;
    filter: none;
    text-align: left;
  }

  .navbar-menu a::after {
    display: none;
  }

  .navbar-menu a:hover,
  .navbar-menu a.active {
    background: var(--light-gray);
    color: var(--secondary);
  }

  .navbar-menu a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: none;
    color: var(--text-dark);
  }

  .navbar-menu a.disabled:hover {
    background: none;
    color: var(--text-dark);
  }

  .menu-toggle {
    display: flex;
    order: 2;
    margin-left: 1rem;
  }

  .navbar-logo {
    order: 1;
    flex: 1;
  }

  .navbar-container {
    flex-wrap: nowrap;
  }

  /* Hide login button outside menu on mobile */
  .login-btn {
    display: none;
  }

  /* Show mobile login button in menu */
  .mobile-only {
    display: block;
  }

  /* Show login button inside toggle menu on mobile */
  .navbar-menu .login-btn-mobile {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-shadow: none;
    filter: none;
    text-align: left;
    border: none;
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
  }

  .navbar-menu .login-btn-mobile:hover {
    background: var(--secondary);
    color: var(--white);
  }

  .navbar {
    height: auto;
    padding: 1rem 0;
  }

  .navbar-container {
    flex-wrap: wrap;
    padding: 0 1.5rem;
  }
}

/* Hide mobile-only items on desktop */
.mobile-only {
  display: none;
}
