/* ==========================================================================
   Header & Navigation - Dark Premium
   ========================================================================== */
   
/* Header Base */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background-color: transparent;
  padding: 28px 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Scrolled State (Dark Glassmorphism) */
.header.scrolled {
  background-color: rgba(5, 5, 5, 0.85); /* Deep dark background */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 18px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Image Styling */
.brand-logo {
  display: flex;
  align-items: center;
  z-index: 10001;
  position: relative;
  text-decoration: none;
}

.logo-img {
  max-height: 70px; /* Adjust this based on your exact logo proportions */
  width: auto;
  transition: transform 0.3s ease;
}

.brand-logo:hover .logo-img {
  transform: scale(1.02);
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 48px;
}

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

.nav-link {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff; /* Always white */
  text-decoration: none;
  position: relative;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 5px;
  left: 50%;
  background-color: #50708F;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.has-mega-menu:hover .nav-link::after {
  width: 100%;
}

.nav-link:hover,
.has-mega-menu:hover .nav-link {
  color: #50708F;
}

.chevron {
  transition: transform 0.3s ease;
}

.has-mega-menu:hover .chevron {
  transform: rotate(180deg);
}

/* ==========================================================================
   Elegant Mega Menu
   ========================================================================== */
.has-mega-menu {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  width: 800px;
  background-color: #0c0c0e; /* Sleek, dark panel */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
  z-index: 1000;
}

/* Invisible bridge so mouse doesn't fall off when hovering down */
.mega-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
}

.has-mega-menu:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mega-menu-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 32px;
  gap: 32px;
}

.mega-title {
  color: #ffffff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.mega-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mega-list a {
  color: #a1a1aa;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: inline-block;
}

.mega-list a:hover {
  color: #50708F;
  transform: translateX(5px);
}

/* Featured Column in Mega Menu */
.featured-col {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 32px;
}

.mega-featured {
  background: linear-gradient(145deg, rgba(80, 112, 143, 0.15), rgba(0, 0, 0, 0));
  border: 1px solid rgba(80, 112, 143, 0.2);
  padding: 24px;
  border-radius: 6px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mega-featured h6 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.mega-featured p {
  color: #a1a1aa;
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.btn-text {
  color: #50708F;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.btn-text:hover {
  color: #ffffff;
}

/* Header Button */
.btn-header {
  font-family: var(--font-main);
  background-color: #50708F;
  color: #ffffff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-header:hover {
  background-color: transparent;
  border-color: #50708F;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(80, 112, 143, 0.2);
}

/* ==========================================================================
   Mobile Navigation & Toggle
   ========================================================================== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  z-index: 10001;
}

.mobile-toggle .bar {
  display: block;
  width: 28px;
  height: 2px;
  background-color: #ffffff;
  transition: all 0.3s ease;
}

.mobile-toggle.is-active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.mobile-toggle.is-active .bar:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.is-active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Full-Screen Menu */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #050505;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile-nav.is-active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-content {
  text-align: center;
  width: 100%;
  padding: 0 20px;
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
}

.mobile-nav-links > li {
  margin-bottom: 24px;
}

.mobile-link {
  font-family: var(--font-main);
  font-size: 2rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.mobile-link:hover, .mobile-dropdown-menu a:hover {
  color: #50708F;
}

/* Mobile Dropdown */
.mobile-dropdown-menu {
  display: none;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.mobile-dropdown-menu.is-open {
  display: flex;
}

.mobile-dropdown-menu a {
  color: #a1a1aa;
  text-decoration: none;
  font-size: 1.2rem;
}

.btn-mobile-cta {
  display: inline-block;
  background-color: #50708F;
  color: #ffffff;
  text-decoration: none;
  padding: 16px 40px;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .header-container { padding: 0 24px; }
  .desktop-nav { display: none; }
  .mobile-toggle { display: flex; }
}