/* Make header and navigation wider for index2.html only */

.header-content {
  max-width: 100%;
  display: flex;
  align-items: center;
  min-width: 0; /* Allow children to shrink */
  padding: 0 var(--space-lg) !important;
}

.logo {
  margin-right: 32px !important;
  flex: 0 0 auto;
  margin-left: 0 !important;
}

.main-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 24px;
  min-width: 0;
  overflow-x: visible;
  justify-content: flex-end;
  width: 100%;
}

@media (max-width: 991px) {
  .header-content {
    max-width: 100%;
    padding: 0 16px !important;
  }

  .logo {
    margin-right: 16px !important;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .nav-list {
    position: fixed;
    top: calc(var(--header-height) + 37px);
    left: 0;
    width: 100%;
    height: calc(100vh - (var(--header-height) + 37px));
    background-color: var(--color-secondary-dark);
    flex-direction: column;
    padding: var(--space-xl);
    transform: translateX(-100%);
    transition: transform var(--transition-medium);
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: flex-start;
    gap: var(--space-md);
    z-index: 999;
    white-space: normal;
  }

  .nav-list.active {
    transform: translateX(0);
  }

  .nav-item {
    width: 100%;
  }

  .nav-item a {
    padding: var(--space-sm) 0;
    width: 100%;
    text-align: left;
  }

  .nav-item.cta {
    margin: var(--space-md) 0 0;
  }

  .nav-item.cta a {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .nav-list {
    gap: var(--space-md);
  }
}

@media (max-width: 767px) {
  .footer-content {
    flex-direction: column !important;
    align-items: center !important;
    display: flex !important;
  }
  .footer-brand,
  .footer-logo,
  .social-links {
    text-align: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
  .header {
    position: relative !important;
    z-index: 1000;
  }

  .nav-item a {
    text-align: left;
    width: 100%;
    position: relative;
    overflow: visible;
  }
  .nav-item a::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    bottom: 0;
    height: 2px;
    background: var(--color-primary-light);
    width: 0;
    transition: width 0.2s, left 0.2s;
    transform: translateX(-50%);
  }
  .nav-item.current a::after,
  .nav-item a:hover::after {
    width: 35%; /* Tighter underline for text */
  }
} 

@media (min-width: 992px) and (max-width: 1100px) {
  .header-content {
    padding: 0 20px !important;
  }

  .logo {
    margin-right: 18px !important;
  }

  .nav-list {
    gap: 14px;
  }

  .nav-item a {
    padding: 0 4px;
    font-size: 0.95rem;
  }

  .nav-item.cta {
    margin-left: 14px;
  }
}

/* Services dropdown */

.nav-item.dropdown {
  position: relative;
}

.nav-item .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: rgba(19, 8, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  padding: 10px 0;
  display: none;
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: rgba(138, 43, 226, 0.15);
}

.nav-item.dropdown:hover .dropdown-menu {
  display: block;
}

@media (max-width: 900px) {
  .dropdown-menu {
    position: static;
    display: block;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: 6px;
  }

  .dropdown-menu a {
    padding: 8px 0 8px 20px;
  }
}
