/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s ease-in-out;
  background-color: transparent;
}

.site-header.scrolled {
  background-color: #0c1b23;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem; /* 80px */
}

.logo img {
  transition: all 0.5s ease-in-out;
  width: 400px;
  height: auto;
  padding-top: 4rem; /* 64px */
}

.site-header.scrolled .logo img {
  width: auto;
  height: 3rem; /* 48px */
  padding-top: 0;
}

.desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 2rem; /* 32px */
  }
}

.nav-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #36a0b8;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-family: inherit; /* Match other nav links */
  font-size: inherit; /* Match other nav links */
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding-bottom: 1.5rem; /* Add padding to create space for menu */
  margin-bottom: -1.5rem; /* Negate padding to keep alignment */
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.5rem; /* Space below the button */
  width: 16rem; /* 256px */
  background-color: #0c1b23;
  border: 1px solid #36a0b8;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform-origin: top center;
  animation: fadeInDown 0.3s ease-out forwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) scaleY(0.95);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scaleY(1);
  }
}

.dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #dbdddf;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
  border-radius: 0.5rem;
}

.dropdown-item .menu-icon {
  color: #36a0b8;
  width: 1.25rem; /* 20px */
  text-align: center;
  transition: color 0.2s;
}

.dropdown-item:hover {
  color: #ffffff;
  background-color: #2d5f7a;
}

.dropdown-item:hover .menu-icon {
  color: #c4283f;
}

.dropdown-item:first-child {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.dropdown-item:last-child {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

.mobile-menu-button {
  display: block;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-button {
    display: none;
  }
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%; /* Start off-screen */
  width: 300px;
  height: 100%;
  background-color: #0c1b23;
  z-index: 100;
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-left: 1px solid #36a0b8;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 1rem;
  border-bottom: 1px solid #2d5f7a;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
}

.mobile-nav-links a,
.mobile-nav-links .dropdown-toggle {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
  display: block; /* Ensure links take full width */
}

.mobile-nav-links a:hover,
.mobile-nav-links .dropdown-toggle:hover {
  background-color: #2d5f7a;
}

/* Remove bottom padding from the mobile dropdown toggle */
.mobile-nav-links .dropdown-toggle {
  padding-bottom: 0.75rem;
  margin-bottom: 0;
}


.mobile-dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.mobile-dropdown-menu {
  display: none;
  padding-left: 1rem;
  margin-top: 0.5rem;
  border-left: 2px solid #36a0b8;
}

.mobile-dropdown-menu.open {
  display: block;
}

.mobile-dropdown-menu a {
  font-weight: normal;
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}
