/* =========================
   NAVBAR MODULE
   Logo path controlled from navbar.js
========================= */

:root {
  --nav-logo-height: 40px;
  --nav-logo-max-width: 230px;

  --nav-logo-height-mobile: 32px;
  --nav-logo-max-width-mobile: 165px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 18px 0 0;
}

.header-inner {
  max-width: 1040px;
  height: 64px;
  margin: 0 auto;
  padding: 0 12px 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow:
    0 16px 45px rgba(7, 20, 47, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Logo */
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-image {
  min-width: 205px;
  height: 52px;
}

.brand-image img {
  width: auto;
  height: var(--nav-logo-height);
  max-width: var(--nav-logo-max-width);
  object-fit: contain;
  display: block;
}

/* Desktop Nav */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 26px;
}

.main-nav button {
  border: 0;
  background: transparent;
  color: #344054;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
  font-size: 0.88rem;
  transition: 0.18s ease;
  white-space: nowrap;
}

.main-nav button:hover {
  color: var(--brand);
}

.main-nav button span {
  width: 8px;
  height: 8px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
}

/* Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-actions a {
  color: #344054;
  font-weight: 850;
  font-size: 0.88rem;
  white-space: nowrap;
}

.header-cta {
  height: 48px;
  padding: 0 23px;
  border: 0;
  border-radius: 999px;
  background: #07142f;
  color: #ffffff;
  font-weight: 920;
  font-size: 0.92rem;
  box-shadow: 0 14px 34px rgba(7, 20, 47, 0.18);
  transition: 0.2s ease;
  white-space: nowrap;
}

.header-cta:hover {
  transform: translateY(-1px);
  background: #0b1d45;
}

/* Mobile Menu */
.mobile-menu-btn,
.mobile-menu {
  display: none;
}

.mobile-menu-btn.active span:first-child {
  top: 21px;
  transform: rotate(45deg);
}

.mobile-menu-btn.active span:last-child {
  top: 21px;
  transform: rotate(-45deg);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1080px) {
  .header-inner {
    max-width: calc(100% - 32px);
  }

  .brand-image {
    min-width: 180px;
  }

  .main-nav {
    gap: 20px;
  }

  .main-nav button {
    font-size: 0.82rem;
  }

  .header-actions a {
    display: none;
  }
}

@media (max-width: 980px) {
  .main-nav,
  .header-actions {
    display: none;
  }

  .mobile-menu-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(238, 242, 247, 0.8);
    display: block;
    position: relative;
  }

  .mobile-menu-btn span {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 2px;
    background: var(--navy);
    border-radius: 99px;
    transition: 0.2s ease;
  }

  .mobile-menu-btn span:first-child {
    top: 16px;
  }

  .mobile-menu-btn span:last-child {
    top: 26px;
  }

  .mobile-menu {
    position: fixed;
    top: 96px;
    left: 20px;
    right: 20px;
    z-index: 150;
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: 0.2s ease;
  }

  .mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-menu a,
  .mobile-menu button {
    padding: 14px;
    border: 0;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.78);
    color: var(--navy);
    font-weight: 850;
    text-align: left;
  }

  .mobile-menu button {
    background: var(--brand);
    color: #ffffff;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 12px;
  }

  .header-inner {
    height: 62px;
    max-width: calc(100% - 28px);
    padding: 0 12px;
  }

  .brand-image {
    min-width: auto;
    height: 44px;
  }

  .brand-image img {
    height: var(--nav-logo-height-mobile);
    max-width: var(--nav-logo-max-width-mobile);
  }
}