/* Shared SBE inner-page header */
.topbar {
  background: #050d1a;
  color: #cbd5e1;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 110;
}

.topbar .container,
.site-header .container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 32px;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 34px;
}

.topbar-left,
.topbar-right,
.topbar-right a {
  display: flex;
  align-items: center;
}

.topbar-left { gap: 8px; }
.topbar-right {
  display: none;
  gap: 22px;
}

.topbar-left .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c8a04a;
  box-shadow: 0 0 0 3px rgba(200,160,74,0.18);
}

.topbar-right a {
  gap: 6px;
  color: #cbd5e1;
  transition: color .2s;
}

.topbar-right a:hover { color: #c8a04a; }

.site-header {
  background: #0a1628;
  color: #f3f0e8;
  border-bottom: 1px solid rgba(200,160,74,0.15);
  position: sticky;
  top: 34px;
  z-index: 100;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
  gap: 24px;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.site-header .brand-crest {
  width: 56px;
  height: 66px;
  flex-shrink: 0;
}

.site-header .brand-text {
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.1;
}

.site-header .brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  color: #c8a04a;
  letter-spacing: 1px;
}

.site-header .brand-sub {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #d4cfc2;
  text-transform: uppercase;
  border-left: 1px solid rgba(200,160,74,0.4);
  padding-left: 14px;
  line-height: 1.35;
}

.site-header .primary-nav {
  display: flex;
  gap: 28px;
}

.site-header .primary-nav a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #d4cfc2;
  padding: 8px 0;
  position: relative;
  text-decoration: none;
  transition: color .2s;
}

.site-header .primary-nav a:hover { color: #fff; }
.site-header .primary-nav a.active { color: #c8a04a; }

.site-header .primary-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: #c8a04a;
}

.site-header .header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-header .icon-btn.mobile-menu-btn,
.site-header .mobile-nav-quicklinks,
.site-header .mobile-apply-link {
  display: none;
}

.site-header .icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #d4cfc2;
  background: transparent;
  cursor: pointer;
  transition: color .2s, background .2s;
}

.site-header .icon-btn svg {
  width: 18px;
  height: 18px;
}

.site-header .icon-btn:hover {
  color: #c8a04a;
  background: rgba(200,160,74,0.08);
}

.site-header .btn-apply {
  border: 1px solid #c8a04a;
  color: #c8a04a;
  padding: 10px 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  border-radius: 2px;
  text-decoration: none;
  transition: background .25s, color .25s;
}

.site-header .btn-apply:hover {
  background: #c8a04a;
  color: #0a1628;
}

body section[id],
body main[id],
body div[id],
body article[id] {
  scroll-margin-top: 170px;
}

.site-header + .legacy-fragment.home-legacy .hero {
  min-height: calc(100vh - 126px);
  min-height: calc(100dvh - 126px);
}

.site-header + .legacy-fragment .evaluation-page,
.site-header + .legacy-fragment .evaluation-page .story-panel,
.site-header + .legacy-fragment .evaluation-page .story-shell,
.site-header + .legacy-fragment .evaluation-page .form-panel {
  min-height: calc(100vh - 126px);
  min-height: calc(100dvh - 126px);
}

.site-header + .legacy-fragment .evaluation-page .story-content {
  padding-top: clamp(48px, 6vw, 72px);
}

.site-header + .legacy-fragment #admissions,
.site-header + .legacy-fragment #contact-inquiry,
.site-header + .legacy-fragment #appointment-title {
  scroll-margin-top: 170px;
}

@media (max-width: 1100px) {
  body[data-mobile-nav-open] {
    overflow: hidden;
  }

  .topbar {
    z-index: 140;
  }

  .topbar-right {
    display: none;
  }

  .topbar-left {
    min-width: 0;
  }

  .topbar-left span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header {
    z-index: 130;
  }

  .topbar .container,
  .site-header .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-header .header-inner {
    flex-wrap: nowrap;
    height: 68px;
    gap: 12px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .site-header .brand {
    min-width: 0;
  }

  .site-header .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    z-index: 120;
    width: auto;
    height: calc(100dvh - 102px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 18px 18px max(24px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(200,160,74,0.18);
    background:
      linear-gradient(180deg, rgba(8, 18, 34, 0.98), rgba(9, 23, 42, 0.995)),
      #081222;
    box-shadow: 0 26px 48px rgba(0, 0, 0, 0.34);
    opacity: 0;
    overflow-y: auto;
    pointer-events: none;
    transform: translateY(-16px);
    transition:
      opacity .22s ease,
      transform .22s ease,
      visibility .22s ease;
    visibility: hidden;
  }

  .site-header.mobile-nav-open .primary-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .site-header .primary-nav > a {
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 6px;
    border-bottom: 1px solid rgba(212,207,194,0.12);
    color: #f3f0e8;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: .08em;
  }

  .site-header .primary-nav > a::before {
    content: "";
    width: 2px;
    height: 18px;
    margin-right: 14px;
    background: transparent;
  }

  .site-header .primary-nav > a.active {
    color: #c8a04a;
  }

  .site-header .primary-nav > a.active::before {
    background: #c8a04a;
  }

  .site-header .primary-nav > a.active::after {
    display: none;
  }

  .site-header .mobile-nav-quicklinks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
  }

  .site-header .mobile-nav-quicklinks a {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(212,207,194,0.14);
    border-radius: 4px;
    color: #d4cfc2;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .site-header .mobile-nav-quicklinks svg {
    width: 15px;
    height: 15px;
  }

  .site-header .mobile-apply-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-top: 14px;
    border: 1px solid #c8a04a;
    border-radius: 4px;
    background: #c8a04a;
    color: #071326;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
  }

  .site-header .header-actions {
    gap: 8px;
    margin-left: auto;
  }

  .site-header .icon-btn.mobile-menu-btn {
    display: inline-flex;
  }

  .site-header .icon-btn {
    width: 40px;
    height: 40px;
  }

  .site-header .icon-btn svg {
    width: 20px;
    height: 20px;
  }

  .site-header .btn-apply {
    display: none;
  }

  body section[id],
  body main[id],
  body div[id],
  body article[id] {
    scroll-margin-top: 122px;
  }

  .site-header + .legacy-fragment.home-legacy .hero {
    min-height: calc(100vh - 102px);
    min-height: calc(100dvh - 102px);
  }

  .site-header + .legacy-fragment .evaluation-page,
  .site-header + .legacy-fragment .evaluation-page .story-panel,
  .site-header + .legacy-fragment .evaluation-page .story-shell,
  .site-header + .legacy-fragment .evaluation-page .form-panel {
    min-height: auto;
  }

  .site-header + .legacy-fragment .evaluation-page .story-content {
    padding-top: 56px;
  }

  .site-header + .legacy-fragment #admissions,
  .site-header + .legacy-fragment #contact-inquiry,
  .site-header + .legacy-fragment #appointment-title {
    scroll-margin-top: 122px;
  }
}

@media (max-width: 720px) {
  .topbar-right { display: none; }

  .topbar .container,
  .site-header .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-header .brand-sub { display: none; }
  .site-header .brand-name { font-size: 30px; }
  .site-header .brand-crest { width: 48px; height: 58px; }
}

/* Keep the shared header logo identical to academic.html across pages. */
body .site-header .header-inner {
  display: flex !important;
  align-items: center !important;
}

body .site-header .brand {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
}

body .site-header .brand-crest {
  width: 56px !important;
  height: 66px !important;
  object-fit: contain !important;
  flex: 0 0 56px !important;
}

body .site-header .brand-text {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
  line-height: 1.1 !important;
}

body .site-header .brand-name {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 36px !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
  color: #c8a04a !important;
  letter-spacing: 1px !important;
  margin: 0 !important;
}

body .site-header .brand-sub {
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  border-left: 1px solid rgba(200,160,74,0.4) !important;
  padding-left: 14px !important;
  color: #d4cfc2 !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  letter-spacing: 1.6px !important;
  text-transform: uppercase !important;
}

@media (max-width: 720px) {
  body .site-header .brand-sub {
    display: none !important;
  }

  body .site-header .brand-name {
    font-size: 30px !important;
  }

  body .site-header .brand-crest {
    width: 48px !important;
    height: 58px !important;
    flex-basis: 48px !important;
  }
}

@media (max-width: 1100px) {
  body .site-header .brand-crest {
    width: 46px !important;
    height: 54px !important;
    flex-basis: 46px !important;
  }

  body .site-header .brand-name {
    font-size: 30px !important;
    line-height: 1 !important;
  }

  body .site-header .brand-sub {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .site-header .header-inner {
    gap: 8px;
  }

  body .site-header .brand-crest {
    width: 42px !important;
    height: 50px !important;
    flex-basis: 42px !important;
  }

  body .site-header .brand-name {
    font-size: 27px !important;
  }

  .site-header .icon-btn {
    width: 38px;
    height: 38px;
  }
}
