/* ============================================================
   HEADER / NAV — header.css (WORKING)
   ============================================================ */

/* ── Base Nav ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

#mainNav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  z-index: 1000;
  transition: background 0.3s ease-in-out;
  background: rgba(10, 15, 30, 0.85);
}

#mainNav.scrolled {
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(6, 182, 212, 0.1);
}

/* ── Container ────────────────────────────────────────────── */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  height: 70px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ── Logo ─────────────────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.9;
}

.icon-nav {
  width: 100px;
  height: 80px;
  object-fit: contain;
  border: none;
}

.site-brand {
  margin-left: 12px;
  display: flex;
  flex-direction: column;
}

.site-name {
  font-family: 'Roboto', 'Segoe UI', Tahoma, sans-serif;
  color: #ffd700;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .site-name { display: none; }
}

/* ── Nav Links ────────────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  margin-left: 2.5rem;
  padding: 0;
}

.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #06b6d4;
}

#mainNav .nav-links li a.active {
  color: #06b6d4 !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #06b6d4 !important;
}

/* ── CTA Button ───────────────────────────────────────────── */
.nav-cta {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  color: #06b6d4;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: #06b6d4;
  color: #ffffff;
}

#mainNav .nav-links li a.nav-cta.active {
  background: rgba(6, 182, 212, 0.35) !important;
  border: 1px solid #06b6d4 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3) !important;
}

/* ── Dropdown ──────────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
  list-style: none;
}

.nav-dropdown-toggle {
  background: transparent;
  border: none;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-toggle:hover {
  color: #06b6d4;
}

.nav-dropdown-toggle::after {
  content: "▾";
  font-size: 0.8rem;
  color: #06b6d4;
  transition: transform 0.25s ease;
}

#mainNav .nav-dropdown-toggle.active {
  color: #06b6d4 !important;
  font-weight: 700 !important;
}

/* Desktop hover — show menu */
@media (min-width: 993px) {
  .nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
  
  .nav-dropdown:hover .nav-dropdown-toggle::after {
    transform: rotate(180deg);
  }
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 200px;
  padding: 0.8rem;
  border-radius: 16px;
  background: rgba(10, 15, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 1200;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.nav-dropdown-menu li {
  width: 100%;
  flex: none;
  margin: 0;
  padding: 0;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 1.2rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus,
.nav-dropdown-menu a.active {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.12);
}

/* ── Overlay ──────────────────────────────────────────────── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

.nav-overlay.active {
  display: block;
}

/* ── Hamburger ────────────────────────────────────────────── */
.menu-toggle {
  display: none !important;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 2200;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  pointer-events: none;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background-color: #06b6d4;
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background-color: #06b6d4;
}

/* ── Mobile (≤ 992px) ─────────────────────────────────────── */
@media (max-width: 992px) {
  /* Show hamburger on mobile */
  .menu-toggle {
    display: flex !important;
  }

  /* Hide nav links on mobile by default */
  .nav-links {
    display: none !important;
    flex-direction: column;
    position: fixed;
    top: 70px;
    right: 20px;
    min-width: 260px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    background: rgba(10, 15, 30, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 2rem 1.75rem;
    gap: 1.25rem;
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 20px;
    z-index: 999;
    align-items: flex-start;
    list-style: none;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    margin-left: 0;
  }

  /* Show when open */
  .nav-links.mobile-drawer-open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }

  .nav-links li {
    width: 100%;
    flex-shrink: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
    width: 100%;
    display: block;
    padding: 0.4rem 0;
    text-decoration: none;
  }

  #mainNav .nav-links li a.active {
    color: #06b6d4 !important;
    background: transparent !important;
    border: none !important;
  }

  /* Mobile Dropdown */
  .nav-dropdown {
    width: 100%;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .nav-dropdown-toggle {
    color: #cbd5e1;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.4rem 0;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .nav-dropdown-toggle::after {
    content: "▼";
    font-size: 0.75rem;
    color: #06b6d4;
    transition: transform 0.25s ease;
  }

  .nav-dropdown-toggle.open::after {
    transform: rotate(180deg);
  }

  .nav-dropdown-menu {
    position: static !important;
    width: 100%;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #06b6d4;
    border-radius: 12px;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
    box-shadow: none;
    min-width: auto !important;
  }

  .nav-dropdown-menu.open {
    max-height: 500px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    padding: 12px !important;
    margin-top: 8px !important;
  }

  .nav-dropdown-menu li {
    width: 100%;
  }

  .nav-dropdown-menu a {
    padding: 10px 16px;
    text-align: center;
    font-size: 0.95rem;
    border-radius: 8px;
  }
}

/* ── Extra small screens ──────────────────────────────────── */
@media (max-width: 480px) {
  .nav-links {
    min-width: 220px;
    padding: 1.5rem 1.25rem;
    right: 10px;
    max-width: calc(100vw - 20px);
    top: 65px;
    max-height: calc(100vh - 80px);
  }

  .nav-links a {
    font-size: 1rem;
  }

  .nav-dropdown-toggle {
    font-size: 1rem;
  }

  .icon-nav {
    width: 60px;
    height: 50px;
  }

  .nav-container {
    height: 60px;
    padding: 0 4%;
  }
}

/* ── Tablet (769px - 992px) ───────────────────────────────── */
@media (min-width: 769px) and (max-width: 992px) {
  .nav-links {
    right: 20px;
    min-width: 280px;
  }
}

/* ── Desktop (≥ 993px) ────────────────────────────────────── */
@media (min-width: 993px) {
  .menu-toggle {
    display: none !important;
  }

  .nav-links {
    display: flex !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    padding: 0 !important;
    gap: 1.75rem !important;
    max-height: none !important;
    overflow: visible !important;
    width: auto !important;
    margin-left: 2.5rem;
  }
}