/* ==========================================================
   ZENITH SHARED NAVBAR STANDARD
   Desktop height: 160px
   Shared content width: 1280px
========================================================== */

:root {
  --navbar-height-desktop: 160px;
  --navbar-height-tablet: 100px;
  --navbar-height-mobile: 72px;
  --navbar-container-width: 1280px;
  --navbar-primary: #262871;
  --navbar-secondary: #6c385e;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.site-navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: var(--navbar-height-desktop);
  min-height: var(--navbar-height-desktop);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.site-navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

.navbar-container {
  width: 100%;
  max-width: var(--navbar-container-width);
  height: 100%;
  min-height: inherit;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-sizing: border-box;
}

/* Brand */

.navbar-brand {
  min-width: 245px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.navbar-logo {
  width: 64px;
  height: 64px;
  display: block;
  flex: 0 0 64px;
  object-fit: contain;
}

.navbar-brand-text {
  min-width: 0;
}

.brand-title,
.brand-tag {
  display: block;
}

.brand-title {
  color: var(--navbar-primary);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-tag {
  margin-top: 5px;
  color: var(--navbar-secondary);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Desktop menu */

.navbar-menu {
  min-width: 0;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1 1 auto;
  list-style: none;
}

.navbar-menu > li {
  position: relative;
  flex: 0 0 auto;
}

.nav-link {
  position: relative;
  min-height: 46px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #334155;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-link[aria-current="page"] {
  color: var(--navbar-primary);
  background: #f1f5f9;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 6px;
  left: 12px;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--navbar-primary),
    var(--navbar-secondary)
  );
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Desktop CTA */

.navbar-cta {
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #ffffff;
  background: var(--navbar-primary);
  border: 1px solid var(--navbar-primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.navbar-cta:hover {
  color: #ffffff;
  background: var(--navbar-secondary);
  border-color: var(--navbar-secondary);
  box-shadow: 0 10px 24px rgba(38, 40, 113, 0.2);
  transform: translateY(-2px);
}

/* Mobile controls */

.navbar-toggle {
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  color: #ffffff;
  background: var(--navbar-primary);
  border: 0;
  border-radius: 10px;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.navbar-mobile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  max-height: calc(100vh - var(--navbar-height-tablet));
  padding: 10px 20px 20px;
  display: none;
  overflow-y: auto;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.1);
}

.navbar-mobile-menu.open {
  display: block;
}

.navbar-mobile-menu a {
  padding: 13px 14px;
  display: block;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.navbar-mobile-menu a:hover,
.navbar-mobile-menu a.active,
.navbar-mobile-menu a[aria-current="page"] {
  color: var(--navbar-primary);
  background: #f8fafc;
}

.navbar-mobile-menu .navbar-mobile-cta {
  margin-top: 12px;
  color: #ffffff;
  background: var(--navbar-primary);
  border-bottom: 0;
  text-align: center;
}

/* Laptop: preserve spacing without creating horizontal overflow */

@media (max-width: 1180px) and (min-width: 993px) {
  .navbar-container {
    gap: 14px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .navbar-brand {
    min-width: 215px;
  }

  .brand-title {
    font-size: 17px;
  }

  .navbar-menu {
    gap: 4px;
  }

  .nav-link {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
  }

  .navbar-cta {
    padding-right: 15px;
    padding-left: 15px;
    font-size: 11px;
  }
}

/* Tablet and mobile */

@media (max-width: 992px) {
  .site-navbar {
    height: var(--navbar-height-tablet);
    min-height: var(--navbar-height-tablet);
  }

  .navbar-container {
    max-width: 100%;
    padding-right: 20px;
    padding-left: 20px;
    gap: 10px;
  }

  .navbar-brand {
    min-width: 0;
    overflow: hidden;
    flex: 1 1 auto;
  }

  .navbar-logo {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .navbar-brand-text {
    min-width: 0;
    overflow: hidden;
    flex: 1 1 auto;
  }

  .brand-title,
  .brand-tag {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .brand-title {
    font-size: 17px;
  }

  .navbar-menu,
  .navbar-cta {
    display: none;
  }

  .navbar-toggle {
    display: inline-flex;
  }
}

/* Mobile */

@media (max-width: 640px) {
  .site-navbar {
    height: var(--navbar-height-mobile);
    min-height: var(--navbar-height-mobile);
  }

  .navbar-container {
    padding-right: 14px;
    padding-left: 14px;
  }

  .navbar-brand {
    gap: 10px;
  }

  .navbar-logo {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand-tag {
    margin-top: 3px;
    font-size: 8px;
    letter-spacing: 1.5px;
  }

  .navbar-toggle {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .navbar-mobile-menu {
    max-height: calc(100vh - var(--navbar-height-mobile));
    padding: 8px 14px 16px;
  }
}

/* Small mobile */

@media (max-width: 380px) {
  .navbar-container {
    padding-right: 12px;
    padding-left: 12px;
  }

  .navbar-brand {
    gap: 8px;
  }

  .navbar-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .brand-title {
    font-size: 14px;
  }

  .navbar-toggle {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-navbar,
  .nav-link,
  .nav-link::after,
  .navbar-cta {
    transition: none;
  }
}
