/* ==========================================================
   MOBILE HEADER (header-mob.css)
   Used only when: max-width: 900px
========================================================== */

* {
  box-sizing: border-box;
}

.site-header {
  width: 100%;
  position: relative;
  top: 0;
  left: 0;
  height: 100px;
  z-index: 999;
  background: #010c16e0;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: fadeInDown 0.7s ease;
}

.nav-container {
  width: 100%;
  height: 70px;
  margin: 0 auto;
  padding: 0 14px;

  display: flex;
  flex-direction: row-reverse;       
  justify-content: space-between; 
  align-items: center;
  gap: 10px;
}

/* ============ MOBILE MENU BUTTON (RIGHT SIDE) ============ */

.mobile-menu-toggle {
  width: 58px;
  height: 58px;
  background: #010c1600;
  border: none;
  border-radius: 10px;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;

  cursor: pointer;
  
  padding: 0;

  margin-left: auto;  /* FORCE IT TO RIGHT SIDE */
}

.mobile-menu-toggle span {
  width: 26px;
  height: 3px;
  background: #fbdd94;
  border-radius: 3px;
  transition: 0.3s ease;
}

/* Turn into X when open */
.mobile-menu-toggle.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.mobile-menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ============ LOGO ============ */

.logo {
  display: flex;
  align-items: center;
  margin-top: 30px;
  
  gap: 16px;
}

.logo img {
  height: 50px;
  width: auto;
  margin-left: 14px;
}

#brand-name {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.4px;
}

/* ============ NAV AS SLIDE PANEL (RIGHT SIDE) ============ */

.main-nav {
  position: fixed;
  top: 70px;
  right: 0;                         
  width: 75%;
  max-width: 320px;
  height: calc(100vh - 70px);

  background: #010c16e0;
  backdrop-filter: blur(10px);

  transform: translateX(100%);       
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.3s ease;

}

.main-nav.open {
  transform: translateX(0);           
  opacity: 1;
  
  pointer-events: auto;
}

/* Vertical menu */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 18px 18px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-nav ul li {
  position: relative;
}

/* Links */
.main-nav ul li a {
  display: block;
  width: 100%;
  padding: 10px 4px;

  color: #fbdd94;
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;

  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: 0.25s ease;
}

/* Active + hover */
.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: #0abf53;
  padding-left: 6px;
}

/* Remove desktop underline animation */
.main-nav ul li a::after {
  display: none;
}

/* ============ SUBMENU ============ */

.submenu {
  list-style: none;
  padding-left: 10px;
  margin-top: 4px;
}

.submenu li a {
  font-size: 1.1rem;
  color: #e6e6e6;
  border-bottom: none;
}

.submenu li a:hover {
  color: #0abf53;
}

/* ============ SMALL SCREENS ============ */

@media (max-width: 400px) {
  .nav-container {
    height: 35px;
  }

  #brand-name {
    
    font-size: 1.15rem;

  }

  .site-header {
    height: 70px;
  }
  .main-nav {
    top: 64px;
    height: calc(100vh - 70px);
  }

  .brand-name {
    font-size: 0.7rem;
  }

  .logo img {
    height: 46px;
  }
}

/* ======= SUBMENU ARROW STYLE ======= */

.has-submenu > a {
  position: relative;
  padding-right: 26px; /* space for arrow */
}

.submenu-arrow {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  border: solid #fbdd94;
  border-width: 0 2px 2px 0;
  padding: 4px;
  transform-origin: center;
  display: inline-block;
  transition: transform 0.25s ease;
  rotate: 45deg; /* down arrow ▾ */
}

/* Rotate arrow when open */
.has-submenu.open > a .submenu-arrow {
  transform: translateY(-50%) rotate(-180deg); /* up arrow ▴ */
}

/* ======= SUBMENU ANIMATION ======= */

.submenu {
  list-style: none;
  padding-left: 10px;
  margin-top: 4px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.has-submenu.open > .submenu {
  max-height: 500px;  /* enough height */
  opacity: 1;
}

.submenu li a {
  font-size: 1.1rem;
  color: #e6e6e6;
  border-bottom: none;
  padding: 10px 4px;
}

/******** PREVENT MOBILE TAP HIGHLIGHTING ******* */
* {
    -webkit-tap-highlight-color: transparent;
}
/* Prevent mobile highlighting on active tap */
button:active, a:active {
    background: none !important;
}