/* Header Wrapper & Top Bar Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.top-bar {
  background-color: var(--secondary);
  color: var(--primary);
  height: 40px;
  font-size: 13px;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border-bottom: 1px solid rgba(30, 58, 110, 0.1);
}

.top-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.top-bar__left a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 700;
  transition: var(--transition);
}

.top-bar__left a:hover {
  color: var(--primary-dark);
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.top-bar__info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.top-bar__info a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.top-bar__info a:hover {
  text-decoration: underline;
}

.top-bar__left-icon {
  background-color: var(--primary);
  color: var(--secondary);
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
}

/* Navbar Styles */
.navbar {
  width: 100%;
  height: 100px;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Scrolled/Sticky State */
.header.scrolled .top-bar {
  height: 0;
  border: none;
  opacity: 0;
}

.header.scrolled .navbar {
  height: 80px;
  background-color: var(--primary-dark);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}

.navbar__logo {
  display: flex;
  align-items: center;
}

.navbar__logo img {
  height: 72px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: var(--transition);
}

.header.scrolled .navbar__logo img {
  height: 58px;
}

.navbar__logo-text {
  font-family: var(--font-heading);
  color: var(--secondary);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar__logo-mark {
  background-color: var(--secondary);
  color: var(--primary);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 20px;
}

.navbar__links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 32px;
}

.navbar__links a {
  color: var(--text-on-primary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding: 8px 0;
}

/* Hover effects */
.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  transition: var(--transition);
}

.navbar__links a:hover::after,
.navbar__links li.active a::after {
  width: 100%;
}

.navbar__links a:hover,
.navbar__links li.active a {
  color: var(--secondary);
}

/* CTA in navbar */
.navbar__cta {
  display: inline-block;
}

/* Hamburger button */
.navbar__hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-on-primary);
  cursor: pointer;
  outline: none;
  padding: 4px;
  line-height: 1;
}

/* Mobile Nav Styles */
@media (max-width: 1024px) {
  .navbar__links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--primary-dark);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    overflow: hidden;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }

  .navbar__links.active {
    height: calc(100vh - 100px);
    padding: 30px 0;
  }

  .header.scrolled .navbar__links.active {
    height: calc(100vh - 80px);
  }

  .navbar__links li {
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .navbar__links.active li {
    opacity: 1;
    transform: translateY(0);
    padding: 16px 0;
  }

  /* stagger effect for list items in mobile menu */
  .navbar__links.active li:nth-child(1) { transition-delay: 0.05s; }
  .navbar__links.active li:nth-child(2) { transition-delay: 0.1s; }
  .navbar__links.active li:nth-child(3) { transition-delay: 0.15s; }
  .navbar__links.active li:nth-child(4) { transition-delay: 0.2s; }
  .navbar__links.active li:nth-child(5) { transition-delay: 0.25s; }
  .navbar__links.active li:nth-child(6) { transition-delay: 0.3s; }

  .navbar__links a {
    display: block;
    font-size: 18px;
  }

  .navbar__cta {
    display: none;
  }

  .navbar__hamburger {
    display: block;
  }

  /* Hide top bar on very small devices or adjust layout */
  @media (max-width: 600px) {
    .top-bar__right {
      display: none;
    }
    .top-bar__inner {
      justify-content: center;
    }
  }
}
