/* =========================================
   NAV + MOBILE POPUP MENU
   File: assets/css/nav.css
========================================= */

/* NAVIGATION BAR */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 217, 255, 0.15);
  padding: 16px 0;
  box-shadow: 0 4px 16px rgba(0, 217, 255, 0.08);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', 'Noto Sans Lao', monospace;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-dark);
  flex-shrink: 0;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-lime));
  border-radius: 6px;
  color: white;
  font-weight: 800;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-gray);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-cyan), var(--primary-lime));
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--primary-cyan); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-lime)) !important;
  color: white !important;
  padding: 9px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 217, 255, 0.25);
  transition: all 0.3s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 217, 255, 0.35);
}

.nav-links .nav-cta::after { display: none; }

/* Burger button */
.nav-burger {
  display: none;
}

@media (max-width: 900px) {
  .nav-links { display: none; }

  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.25s ease;
  }

  .nav-burger:hover { background: rgba(0, 217, 255, 0.08); }

  .nav-burger span {
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.is-active span:nth-child(2) { opacity: 0; }
  .nav-burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 16px; }
  .logo-text { font-size: 16px; }
}

/* =========================================
   MOBILE POPUP MENU — PRO VERSION
========================================= */
.menu-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 25, 0.6);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.menu-popup {
  position: relative;
  background: #ffffff;
  border-radius: 24px;
  padding: 0 0 28px;
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.menu-popup-overlay.is-open .menu-popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* --- Header strip: logo + company name --- */
.menu-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 24px 20px;
  background: linear-gradient(135deg, rgba(0,217,255,0.08), rgba(163,230,53,0.08));
  border-bottom: 1px solid var(--border-light);
}

.menu-popup-header .logo-icon {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.menu-popup-header .logo-text {
  font-family: 'Space Grotesk', 'Noto Sans Lao', monospace;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-dark);
}

.menu-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  background: #ffffff;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: background 0.25s ease, transform 0.25s ease;
}

.menu-popup-close:hover {
  background: rgba(0, 217, 255, 0.15);
  transform: rotate(90deg);
}

/* --- Links list --- */
.menu-popup-links {
  list-style: none;
  margin: 8px 0 20px;
  padding: 4px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-popup-links li {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* stagger entrance when opened */
.menu-popup-overlay.is-open .menu-popup-links li:nth-child(1) { transition-delay: 0.08s; }
.menu-popup-overlay.is-open .menu-popup-links li:nth-child(2) { transition-delay: 0.13s; }
.menu-popup-overlay.is-open .menu-popup-links li:nth-child(3) { transition-delay: 0.18s; }
.menu-popup-overlay.is-open .menu-popup-links li:nth-child(4) { transition-delay: 0.23s; }
.menu-popup-overlay.is-open .menu-popup-links li:nth-child(5) { transition-delay: 0.28s; }

.menu-popup-overlay.is-open .menu-popup-links li {
  opacity: 1;
  transform: translateY(0);
}

.menu-popup-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
}

.menu-popup-links a .menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary-cyan);
}

.menu-popup-links a .menu-arrow {
  margin-left: auto;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  color: var(--text-gray);
}

.menu-popup-links a:hover {
  background: rgba(0, 217, 255, 0.08);
  color: var(--primary-cyan);
  padding-left: 16px;
}

.menu-popup-links a:hover .menu-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- Footer / CTA area --- */
.menu-popup-footer {
  padding: 4px 24px 0;
}

.menu-popup-cta {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-align: center;
  padding: 14px 22px !important;
  font-size: 15px !important;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease 0.32s, transform 0.35s ease 0.32s, box-shadow 0.3s ease, transform 0.3s ease;
}

.menu-popup-overlay.is-open .menu-popup-cta {
  opacity: 1;
  transform: translateY(0);
}

body.menu-popup-open { overflow: hidden; }