/* ===== Header Styles ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #1f2937;
  width: 100%;
  transition: all 0.3s ease;
}

/* ===== Navigation Container ===== */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1536px;
  margin: 0 auto;
}

/* ===== Logo ===== */
.nav-brand {
  flex-shrink: 0;
}

.logo-image {
  width: 8rem;
  transition: all 0.3s ease;
}

.logo-image:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(88, 166, 255, 0.25);
  filter: brightness(1.1);
}

/* ===== Navigation Menu ===== */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0 2rem;
}

.nav-link {
  position: relative;
  color: #c9d1d9;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-link.active,
.nav-link:active {
  color: #58a6ff;
  background-color: rgba(88, 166, 255, 0.1);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #0d1117;
  transition: all 0.15s ease-in-out;
  transform: translateX(-50%);
  border-radius: 9999px;
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link.active::after {
  width: 100%;
}

/* ===== Navigation Actions (Desktop) ===== */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-actions .btn-outline,
.nav-actions .btn-primary {
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}

/* Outline Button */
.nav-actions .btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.nav-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #58a6ff;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Primary Button */
.nav-actions .btn-primary {
  color: #fff;
}

/* ===== Mobile Menu Toggle ===== */
.mobile-menu-checkbox {
  display: none;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1050;
  
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
  transform-origin: 1px;
}

.mobile-toggle:hover .hamburger-line {
  background-color: rgb(29, 78, 216);
}

/* ===== Mobile Navigation ===== */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
  }

  .logo-image {
    max-width: 100px;
    padding: 6px;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: #161b22;
    border-left: 1px solid #58a6ff;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.5s ease-in-out;
    z-index: 1030;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: 0;
  }

  .mobile-menu-checkbox:checked ~ .nav-menu {
    right: 0;
  }

  .nav-link {
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 12px;
    text-align: center;
    background-color: #1f2731;
    border: 1px solid #58a6ff;
  }

  .nav-link:hover {
    background-color: #161b22;
    border-color: #0d1117;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-actions {
    display: none;
  }
}

/* ===== Mobile Overlay ===== */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-checkbox:checked ~ .mobile-overlay {
    display: block;
    opacity: 1;
  }
}

/* ===== Hamburger Animation ===== */
.mobile-menu-checkbox:checked + .nav-menu + .nav-actions + .mobile-toggle .hamburger-line:nth-child(1) {
  transform: rotate(45deg);
}

.mobile-menu-checkbox:checked + .nav-menu + .nav-actions + .mobile-toggle .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.mobile-menu-checkbox:checked + .nav-menu + .nav-actions + .mobile-toggle .hamburger-line:nth-child(3) {
  transform: rotate(-45deg);
}

/* ===== Mobile Actions ===== */
.nav-actions-mobile {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-actions-mobile .btn-outline,
.nav-actions-mobile .btn-primary {
  width: 100%;
  text-align: center;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease-in-out;
}

/* Outline Button (Mobile) */
.nav-actions-mobile .btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-actions-mobile .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #58a6ff;
}

/* Primary Button (Mobile) */
.nav-actions-mobile .btn-primary {
   /* background-color: rgb(29, 78, 216); */
  color: #fff;
  border: 2px solid #6366f1;
}

.nav-actions-mobile .btn-primary:hover {
  /* background: linear-gradient(135deg, #818cf8, #6366f1); */
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Responsive Toggle Visibility */
@media (min-width: 769px) {
  .nav-actions-mobile {
    display: none;
  }
}
