.topbar {
  background: var(--navy-dark);
  color: var(--white);
  font-size: 0.9rem;
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 42px;
}

.topbar a,
.topbar span {
  color: rgba(255, 255, 255, 0.9);
}

.topbar strong {
  color: var(--gold);
  font-weight: 900;
}

.topbar-dot {
  opacity: 0.42;
}

.site-header {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 237, 245, 0.88);
  box-shadow: 0 10px 28px rgba(6, 43, 85, 0.07);
  position: sticky;
  top: 0;
  z-index: 90;
}

.site-header .container {
  width: min(100% - 56px, 1560px);
}

.header-main {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 90px;
  position: relative;
}

.brand {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  height: 52px;
  width: auto;
}

.brand > span:last-child {
  min-width: 0;
}

.brand-mark {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 70px;
  justify-content: center;
  width: 70px;
}

.brand-mark img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.brand-name {
  color: var(--navy-dark);
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-align: center;
}

.brand-name > span {
  display: block;
  white-space: nowrap;
}

.brand-line1 {
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.brand-line2 {
  border-top: 2px solid #6d28b8;
  color: var(--navy);
  font-size: clamp(0.38rem, 0.54vw, 0.5rem);
  font-weight: 800;
  letter-spacing: 0;
  margin-top: 5px;
  padding-top: 4px;
  text-align: justify;
  text-align-last: justify;
  text-transform: uppercase;
  white-space: normal;
}

.brand-tag {
  color: var(--green);
  display: none !important;
  font-size: 0.82rem;
  font-weight: 900;
  margin-top: 2px;
}

.nav-check {
  display: none;
}

.nav-toggle {
  align-items: center;
  background: var(--navy);
  border-radius: var(--radius);
  cursor: pointer;
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 5px;
  height: 46px;
  justify-content: center;
  width: 50px;
}

.nav-toggle span {
  background: var(--white);
  border-radius: 999px;
  display: block;
  height: 2px;
  width: 22px;
}

.main-nav {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: clamp(22px, 2vw, 38px);
  justify-content: center;
}

.main-nav a {
  color: #233149;
  font-size: 1.02rem;
  font-weight: 900;
  padding: 12px 0;
  position: relative;
  white-space: nowrap;
}

.main-nav a:after {
  background: var(--gold);
  border-radius: 999px;
  bottom: 5px;
  content: "";
  height: 3px;
  left: 0;
  opacity: 0;
  position: absolute;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: opacity 0.22s ease, transform 0.22s ease;
  width: 100%;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--navy);
}

.main-nav a:hover:after,
.main-nav a.is-active:after {
  opacity: 1;
  transform: scaleX(1);
}

.header-cta {
  flex: 0 0 auto;
  font-size: 1rem;
  min-height: 48px;
  padding: 12px 20px;
  white-space: nowrap;
}

/* Desktop: flex layout — brand left, nav centered between brand and CTA,
   CTA right. Flex collapses gracefully (no overlap) as the width tightens. */
@media (min-width: 1221px) {
  .main-nav {
    min-width: 0;
  }
}

@media (min-width: 1500px) {
  .brand-name {
    max-width: 300px;
    white-space: normal;
  }
}


/* ===== Dropdown navigation (desktop) ===== */
.main-nav .nav-item { align-items: center; display: inline-flex; position: relative; }
.main-nav .nav-parent { align-items: center; cursor: pointer; display: inline-flex; gap: 5px; }
.nav-caret { flex: 0 0 auto; height: 11px; transition: transform 0.25s ease; width: 11px; }
.main-nav .nav-item:hover .nav-caret,
.main-nav .nav-item:focus-within .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 46px rgba(6, 43, 85, 0.16);
  display: flex;
  flex-direction: column;
  gap: 2px;
  left: 0;
  min-width: 234px;
  opacity: 0;
  padding: 8px;
  position: absolute;
  top: 100%;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  visibility: hidden;
  z-index: 95;
}

/* Invisible bridge so the cursor can travel from the parent into the menu
   without crossing a dead gap (prevents the menu closing mid-move). */
.nav-dropdown::before { content: ''; height: 16px; left: 0; position: absolute; right: 0; top: -16px; }

.main-nav .nav-item:hover .nav-dropdown,
.main-nav .nav-item:focus-within .nav-dropdown,
.main-nav .nav-item.is-open .nav-dropdown { opacity: 1; transform: translateY(0); visibility: visible; }

.main-nav .nav-item.is-open .nav-caret { transform: rotate(180deg); }

.nav-dropdown a {
  border-radius: 9px;
  color: #233149;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 9px 12px;
  white-space: nowrap;
}

.nav-dropdown a:hover { background: rgba(255, 198, 0, 0.16); color: var(--navy); }
.nav-dropdown a::after { content: none; }

/* Drawer-only elements (injected by JS) — hidden on desktop, shown in the mobile drawer */
.nav-drawer-cta,
.nav-close { display: none; }
