/* ============================================================
   header.css  –  Shared navbar & dropdown styles
   Include this on every page BEFORE the page-specific CSS
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary: #00e6b8;
  --primary-dark: #00b894;
  --secondary: #0984e3;
  --dark: #2d3436;
  --light: #f5f6fa;
  --accent: #6c5ce7;
  --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
  --bg-dark: #0a192f;
  --bg-darker: #071120;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* ── Reset ─────────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Base body ─────────────────────────────────────────────── */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-dark);
  color: var(--light);
  line-height: 1.5;
  overflow-x: hidden;
}

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 9%;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 230, 184, 0.2);
}

.navbar.scrolled {
  padding: 1rem 5%;
  background: rgba(10, 25, 47, 0.98);
}

/* ── Logo ──────────────────────────────────────────────────── */
.logo img {
  height: 78px;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

/* ── Nav menu ──────────────────────────────────────────────── */
.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-menu.active {
  transform: translateX(0);
}

.menu-toggle.active {
  transform: rotate(90deg);
}

/* ── Nav links ─────────────────────────────────────────────── */
.nav-link {
  position: relative;
  text-decoration: none !important;
  color: inherit;
}

.nav-item a {
  position: relative;
  transition: all 0.5s ease;
  color: var(--bg-darker);
  font-size: 0.95rem;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-item a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: 0;
  background-color: var(--primary);
  transition: width 0.5s ease-in-out;
}

.nav-item a:hover::after {
  width: 100%;
}

/* ── Active nav item ───────────────────────────────────────── */
.nav-item-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  text-decoration: none !important;
}

/* Direct child selector prevents dropdown items from inheriting active colour */
.nav-item-active > a {
  color: var(--primary-dark);
  text-decoration: none !important;
  font-weight: 500;
}

/* ── Login button ──────────────────────────────────────────── */
.login-button {
  background: var(--gradient);
  border-radius: 30px;
  padding: 0.6rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.login-button:hover::before {
  left: 100%;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 230, 184, 0.5);
}

.login-button a {
  color: white;
  font-weight: 600;
  text-decoration: none;
}

/* ── Mobile menu toggle ────────────────────────────────────── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--bg-darker);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ── Dropdown – shared variables ───────────────────────────── */
.nav-item.dropdown {
  position: relative;
  --primary: #00e6b8;
  --primary-dark: #00c9a3;
  --light: #f5f6fa;
  --dark: #0a192f;
}

/* ── Dropdown trigger ──────────────────────────────────────── */
.dropdown-trigger {
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-chevron {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.dropdown:hover .dropdown-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown menu panel ───────────────────────────────────── */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 12px;
  padding: 8px;
  min-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.nav-item.dropdown:hover .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

/* Prevents dropdown re-opening immediately after a section click */
.nav-item.dropdown.no-hover:hover .dropdown-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(10px) !important;
}

/* ── Dropdown content & items ──────────────────────────────── */
.dropdown-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--dark);
  text-decoration: none;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 184, 0.1), transparent);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover::before {
  left: 100%;
}

.dropdown-item:hover {
  background: rgba(0, 230, 184, 0.08);
  transform: translateX(4px);
}

.dropdown-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(0, 230, 184, 0.1);
  border-radius: 8px;
  flex-shrink: 0;
}

.dropdown-text {
  display: flex;
  flex-direction: column;
}

.dropdown-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* ── Scrolled (dark) navbar dropdown overrides ─────────────── */
.navbar.scrolled .dropdown-menu {
  background: rgba(10, 25, 47, 0.95);
  border: 1px solid rgba(0, 230, 184, 0.15);
}

.navbar.scrolled .dropdown-item {
  color: var(--light);
}

.navbar.scrolled .dropdown-icon {
  background: rgba(0, 230, 184, 0.15);
}

.navbar.scrolled .dropdown-item:hover {
  background: rgba(0, 230, 184, 0.12);
}

/* ── "Who We Serve" dropdown accent variant ────────────────── */
.nav-item.dropdown.who-we-are .dropdown-icon {
  background: rgba(100, 181, 246, 0.1);
}

.nav-item.dropdown.who-we-are .dropdown-item:hover {
  background: rgba(100, 181, 246, 0.08);
}

.nav-item.dropdown.who-we-are .dropdown-item::before {
  background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.1), transparent);
}

.navbar.scrolled .nav-item.dropdown.who-we-are .dropdown-icon {
  background: rgba(100, 181, 246, 0.15);
}

.navbar.scrolled .nav-item.dropdown.who-we-are .dropdown-item:hover {
  background: rgba(100, 181, 246, 0.12);
}

/* ── Responsive breakpoints ────────────────────────────────── */
@media (min-width: 1921px) {
  html {
    font-size: 18px;
  }

  .logo img {
    height: 90px;
  }

  .nav-menu {
    gap: 2.5rem;
  }

  .nav-item a {
    font-size: 1rem;
  }

  .dropdown-menu {
    min-width: 500px;
  }

  .dropdown-title {
    font-size: 1rem;
  }
}

@media (max-width: 1440px) {
  .navbar {
    padding: 0.8rem 6%;
  }

  .logo img {
    height: 60px;
  }

  .nav-item a {
    font-size: 0.9rem;
  }

  .login-button {
    padding: 0.5rem 1.2rem;
  }
}

@media (max-width: 1024px) {
  .navbar {
    padding: 0.5rem 5%;
  }

  .nav-menu {
    gap: 1.2rem;
  }

  .nav-item a,
  .nav-item-active,
  .login-button {
    font-size: 0.7rem;
  }

  .logo img {
    height: 55px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.5rem 5%;
    flex-wrap: wrap;
  }

  .logo img {
    height: 55px;
  }

  .nav-menu {
    gap: 1.2rem;
    flex-direction: column;
    align-items: center;
    width: 100%;
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-item a,
  .nav-item-active,
  .login-button {
    font-size: 0.75rem;
  }

  .menu-toggle {
    display: block;
  }

  .dropdown-menu {
    min-width: 280px;
    top: 100%;
    left: -4.5rem;
  }

  .dropdown-item {
    padding: 10px 14px;
  }

  .dropdown-title {
    font-size: 0.7rem;
  }

  .dropdown-icon {
    height: 32px;
  }
}

@media (max-width: 376px) {
  .solution {
    left: -5.5rem !important;
  }
}

@media (max-width: 320px) {
  .dropdown-menu {
    left: -4.5rem;
  }

  .solution {
    left: -5.5rem !important;
  }
}