/* ===========================
   AKPsi — Navbar (partials/navbar.html)
   =========================== */

/* reset inside the header */
.site-header nav ul { list-style: none; margin: 0; padding: 0; }
.site-header a { text-decoration: none; }

/* header layout (overlays the hero) */
.site-header{
  position: absolute;           /* sits on top of hero imagery */
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  z-index: 100;
}

/* logo */
.site-header .logo img{
  height: 56px;
  width: auto;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.25));
}

/* Hamburger Menu Button (Hidden on Desktop) */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  user-select: none;
  -webkit-user-select: none;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
  transform-origin: center;
  display: block;
  pointer-events: none;
}

/* Enhanced mobile hamburger menu visibility and touch */
@media screen and (max-width: 820px) {
  .hamburger-menu {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: rgba(255,255,255,0.1) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    position: relative !important;
    z-index: 1001 !important;
  }
  
  .hamburger-menu:active {
    transform: scale(0.95) !important;
    background: rgba(255,255,255,0.2) !important;
  }
}

/* Hamburger Animation States */
.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* links */
.site-header .nav__list{
  display: flex;
  gap: clamp(16px, 3.6vw, 36px);
  align-items: center;
}
.site-header .nav__list a{
  color: #fff;                                 /* white by default (over hero) */
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: clamp(.78rem, 1.4vw, .95rem);
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
  position: relative;
}
.site-header .nav__list a::after{
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: rgba(255,255,255,.85);
  transform: scaleX(0); transform-origin: left;
  transition: transform .18s ease;
}
.site-header .nav__list a:hover::after{ transform: scaleX(1); }

/* Optional: when you add .solid (e.g., on scroll or on light pages) */
.site-header.solid{
  position: fixed;
  background: rgba(16,24,40,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-header.solid .nav__list a{
  text-shadow: none;
}

.site-header .nav__list a.active::after { transform: scaleX(1); }

/* Mobile Navigation Styles - FORCE OVERRIDE */
@media screen and (max-width: 820px){
  .site-header{ 
    padding: 12px 20px !important;
    position: fixed !important;
    background: rgba(16,24,40,.92) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255,255,255,.15) !important;
  }
  .site-header .logo img{ height: 42px !important; }
  
  /* FORCE SHOW hamburger menu on mobile */
  .hamburger-menu {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* FORCE HIDE the default nav menu on mobile */
  .nav-menu {
    position: fixed !important;
    top: 68px !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 68px) !important;
    background: rgba(16,24,40,.95) !important;
    backdrop-filter: blur(15px) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
    z-index: 99 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1) !important;
  }
  
  .nav-menu.active {
    transform: translateX(0) !important;
  }
  
  /* FORCE Reset the navigation list for mobile */
  .site-header .nav__list{
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 2rem 0 !important;
    height: 100% !important;
    justify-content: flex-start !important;
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s !important;
    /* FORCE Override any existing mobile styles */
    overflow-x: visible !important;
    white-space: normal !important;
    -webkit-overflow-scrolling: auto !important;
    scrollbar-width: auto !important;
  }
  
  .nav-menu.active .nav__list{
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
  
  .site-header .nav__list li{
    width: 100% !important;
    border-bottom: 1px solid rgba(255,255,255,.1) !important;
  }
  
  .site-header .nav__list a{
    display: block !important;
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    letter-spacing: .1em !important;
    text-shadow: none !important;
    transition: all 0.3s ease !important;
    border-left: 4px solid transparent !important;
    min-width: auto !important;
  }
  
  .site-header .nav__list a:hover,
  .site-header .nav__list a.active{
    background: rgba(255,255,255,.08) !important;
    border-left-color: #6ea8fe !important;
    transform: translateX(5px) !important;
  }
  
  .site-header .nav__list a::after{
    display: none !important;
  }
  
  body{ padding-top: 68px !important; }
}

/* Smaller mobile screens */
@media (max-width: 480px){
  .site-header{ padding: 10px 16px; }
  .site-header .logo img{ height: 38px; }
  .nav-menu { top: 60px; height: calc(100vh - 60px); }
  .site-header .nav__list a{ padding: 0.9rem 1.5rem; font-size: 1rem; }
  body{ padding-top: 60px; }
}

/* Enhanced Mobile Hamburger Menu Styles - Apply to ALL pages */
@media (max-width: 820px){
  /* FORCE hamburger menu to be clickable on all pages */
  .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9998 !important;
    background: rgba(16,24,40,.92) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255,255,255,.15) !important;
    padding: 12px 20px !important;
  }
  
  /* Ensure hamburger menu is ALWAYS on top and fully clickable */
  .hamburger-menu {
    position: relative !important;
    z-index: 9999 !important;
    background: rgba(255,255,255,0.15) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    pointer-events: auto !important;
    cursor: pointer !important;
  }
  
  .hamburger-menu:active,
  .hamburger-menu:focus {
    transform: scale(0.95) !important;
    background: rgba(255,255,255,0.25) !important;
    outline: 2px solid rgba(255,255,255,0.5) !important;
  }
  
  /* Ensure hamburger lines are visible and clickable */
  .hamburger-line {
    pointer-events: none !important;
    width: 25px !important;
    height: 3px !important;
    background-color: #fff !important;
    margin: 2px 0 !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
    transform-origin: center !important;
    display: block !important;
  }
  
  /* FORCE nav menu overlay on all pages */
  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(16,24,40,.97) !important;
    backdrop-filter: blur(25px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.4s ease !important;
    z-index: 9997 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .nav-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Mobile nav list styling */
  .nav__list {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 0 !important;
    height: auto !important;
    justify-content: center !important;
    transform: scale(0.8) translateY(50px) !important;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s !important;
    max-width: 300px !important;
    width: 100% !important;
  }
  
  .nav-menu.active .nav__list {
    transform: scale(1) translateY(0) !important;
  }
  
  .nav__list li {
    width: 100% !important;
    margin-bottom: 8px !important;
    border: none !important;
  }
  
  .nav__list a {
    display: block !important;
    padding: 1rem 2rem !important;
    font-size: 1.3rem !important;
    letter-spacing: .05em !important;
    text-shadow: none !important;
    transition: all 0.3s ease !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(10px) !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  }
  
  .nav__list a:hover,
  .nav__list a.active {
    background: rgba(110, 168, 254, 0.2) !important;
    border-color: rgba(110, 168, 254, 0.4) !important;
    transform: translateY(-2px) scale(1.02) !important;
    color: #6ea8fe !important;
    box-shadow: 0 8px 25px rgba(110, 168, 254, 0.15) !important;
  }
  
  /* Hamburger animation */
  .hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px) !important;
  }
  
  .hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0 !important;
  }
  
  .hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px) !important;
  }
  
  /* Close button when menu is active */
  .hamburger-menu.active {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
    background: rgba(255,255,255,0.15) !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
  }
}

/* Desktop - ensure hamburger is hidden */
@media (min-width: 821px){
  .hamburger-menu { display: none !important; }
  .nav-menu { position: static; transform: none; background: none; backdrop-filter: none; height: auto; }
}

