﻿



/* ============================================================= */
/* ZONIXTEC NAVBAR – Desktop + Mobile (Hover + Click)            */
/* ============================================================= */

:root {
  --primary: #0066ff;
  --secondary: #00f2ff;
  --dark: #0a0a1a;
  --light: #f8f9fa;
  --dark-transparent: rgba(10, 10, 26, 0.8);
}


/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 15px 0;
  transition: all 0.3s ease;
  background-color: solid;
}
header.scrolled {
  background-color: var(--dark-transparent);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* ---------- Layout ---------- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 20px;
}

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; text-decoration: none; transition: transform .3s; }
.logo:hover { transform: scale(1.05); }
.logo img { height: 40px; width: auto; display: block; }

/* ---------- Desktop Nav Links ---------- */
.nav-links {
  display: flex;
  gap: 15px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}
.nav-links > a,
.nav-links .dropdown > a {
  color: var(--light);
  text-decoration: none;
  padding: 8px 9px;
  border-radius: 5px;
  transition: all .3s;
  font-weight: 500;
  font-size: .95rem;
  white-space: nowrap;
}
.nav-links > a:hover,
.nav-links .dropdown > a:hover {
  color: var(--secondary);
  background: rgba(0,242,255,.1);
}

/* ---------- Dropdown (shared) ---------- */
.dropdown { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 5px; cursor: pointer; }

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(10,10,26,.98);
  min-width: 280px;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  border-radius: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity .3s, transform .3s, visibility .3s;
  z-index: 1001;
  margin-top: 10px;
}
.dropdown-scroll { max-height: 400px; overflow-y: auto; padding: 10px 0; }
.dropdown-content a {
  display: block;
  padding: 12px 20px;
  color: var(--light);
  text-decoration: none;
  transition: all .3s;
}
.dropdown-content a:hover {
  background: rgba(0,242,255,.1);
  color: var(--secondary);
}

/* ---------- CTA Button ---------- */
.cta-buttons {
  background: linear-gradient(45deg,var(--primary),var(--secondary));
  color: var(--light);
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cta-buttons i { margin-right: 6px; transform: scaleX(-1); }

/* ---------- Hamburger ---------- */
.mobile-menu-btn {
  z-index: 1001;
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.hamburger-line {
  width: 30px;
  height: 3px;
  background: var(--light);
  border-radius: 3px;
  transition: transform .3s, opacity .3s;
}

/* ---------- Mobile Close Button (hidden on desktop by default) ---------- */
.mobile-close-btn {
  display: none;
}

/* Hamburger lines */

/* When active (menu open), turn to X */
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================================= */
/* DESKTOP – Hover behaviour (default)                         */
/* ============================================================= */
.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ============================================================= */
/* MOBILE – Click behaviour (≤768px)                           */
/* ============================================================= */
@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }


  /* .dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  } */

  .dropdown .dropdown-content {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }
  .dropdown.active .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
  }


  /* ----- Sidebar ----- */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10,10,26,.98);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 80px 5px 20px;
    /* padding: 80px 20px 20px; */
    transition: right .4s ease;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: -5px 0 20px rgba(0,0,0,.15);
  }
  .nav-links.active { right: 0; }

  /* ----- Mobile Close Button ----- */
  .mobile-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
    padding: 0;
    margin: 0;
  }

  .mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary);
    color: var(--secondary);
    transform: rotate(90deg) scale(1.1);
  }

  .mobile-close-btn:active {
    transform: rotate(90deg) scale(0.95);
  }

  /* ----- Links inside sidebar ----- */
  .nav-links > a:not(.mobile-close-btn),
  .nav-links .dropdown > a {
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    font-size: 1.1rem;
  }

  /* ----- Dropdown inside sidebar ----- */
  .dropdown-content {
    position: static;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
    margin-top: 0;
    border-radius: 0;
    transition: max-height .4s cubic-bezier(.4,0,.2,1);
  }
  .dropdown.active .dropdown-content {
     max-height: 600px;  /*               enough for all items */
    padding: 5px 0 10px;
    background: rgba(10,10,26,.96);
  }
  .dropdown-content a {
    padding: 12px 40px;              /* indent sub-items */
    font-size: 1rem;
    border-top: 1px solid rgba(255,255,255,.05);
  }

  .dropdown-content {
  min-height: auto; /* Allow content to dictate height */
  max-height: none; /* Remove any max height limits */
  padding: 10px 20px; /* Add padding inside dropdown */
  overflow: visible; /* Ensure content is not clipped */
  white-space: normal; /* Allow text wrap */
}


  

  /* ----- CTA button ----- */
  .cta-buttons {
    width: 100%;
    justify-content: center;
    margin: 20px 0;
    font-size: 1.1rem;
    padding: 15px 20px;
  }

  /* ----- Prevent page scroll when sidebar open ----- */
  body.mobile-menu-open { overflow: hidden; height: 100vh; }
}

/* ============================================================= */
/* OPTIONAL – keep desktop links aligned when window >768px    */
/* ============================================================= */
@media (min-width: 769px) {
  .nav-links { justify-content: flex-end; }
  .mobile-close-btn { display: none !important; }
}