/* Header and mega menu (after serhant.com). */

/* ---------- Header ---------- */
.ha-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #fff;
  border-bottom: 1px solid #ececec;
}

/* Keep the sticky header below the Drupal toolbar for editors, so it behaves
   the same logged in as it does for visitors. Bar is 40px, 80px with a tray. */
body.toolbar-fixed .ha-header {
  top: 40px;
}

body.toolbar-fixed.toolbar-horizontal.toolbar-tray-open .ha-header {
  top: 80px;
}
.ha-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 clamp(16px, 4.2vw, 60px);
}
/* Centre links between the logo and the actions (desktop only). */
.ha-header__nav {
  display: none;
  flex: 1;
  justify-content: center;
  gap: clamp(24px, 3vw, 44px);
  padding: 0 24px;
}
.ha-header__nav a {
  font-size: 15px;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}
.ha-header__nav a:hover { opacity: .65; }
@media (min-width: 1024px) {
  .ha-header__nav { display: flex; }
}
.ha-header__actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.ha-header__icon-btn,
.ha-header__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  cursor: pointer;
}
.ha-header__icon-btn:hover,
.ha-header__link:hover { opacity: .65; }
.ha-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: 8px;
  background: #001a72;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s;
}
.ha-header__cta:hover { background: #0a2a9c; color: #fff; }
@media (max-width: 767px) {
  .ha-header__actions { gap: 14px; }
  .ha-header__link span,
  .ha-header__lang { display: none; }
  .ha-header__cta { padding: 0 14px; }
}

/* Language dropdown */
.ha-header__lang { position: relative; }
.ha-header__lang-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 160px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .12);
  z-index: 100;
}
.ha-header__lang-panel[hidden] { display: none; }
.ha-header__lang-panel ul { margin: 0; padding: 0; list-style: none; }
.ha-header__lang-panel a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #000;
  text-decoration: none;
}
.ha-header__lang-panel a:hover,
.ha-header__lang-panel a.is-active { background: #f5f5f5; }

/* ---------- Mega menu ---------- */
html.ha-mega-lock { overflow: hidden; }
.ha-mega {
  position: fixed;
  inset: 0;
  z-index: 1100;
  padding: 16px;
  background: rgba(10, 15, 40, .55);
  opacity: 0;
  transition: opacity .2s ease;
}
.ha-mega[hidden] { display: none; }
.ha-mega.is-open { opacity: 1; }
.ha-mega__sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  border-radius: 28px;
  background: #fff;
  transform: translateY(-12px);
  transition: transform .25s ease;
}
.ha-mega.is-open .ha-mega__sheet { transform: none; }

.ha-mega__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 60px 0;
}
.ha-mega__top-actions { display: flex; align-items: center; gap: 12px; }
.ha-mega__top .ha-header__cta { height: 52px; padding: 0 28px; border-radius: 9999px; font-weight: 600; }
.ha-mega__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid #e0e0e0;
  border-radius: 9999px;
  background: #fff;
  color: #000;
  cursor: pointer;
}
.ha-mega__close:hover { border-color: #000; }

.ha-mega__body {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 0 48px;
  flex: 1;
  padding: 56px 60px 64px;
}

/* The large links (main menu) */
.ha-mega__primary { grid-column: 2; }
.ha-mega .ha-mega__primary-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ha-mega .ha-mega__primary-list a {
  display: inline-block;
  padding: 4px 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.25;
  color: #001a72;
  text-decoration: none;
  transition: opacity .15s;
}
.ha-mega .ha-mega__primary-list a:hover { opacity: .65; }
.ha-mega .ha-mega__primary-sub { margin: 0 0 8px 16px; padding: 0; list-style: none; }
.ha-mega .ha-mega__primary-sub a { font-size: 22px; font-weight: 600; }

/* The smaller menus (headings with links) */
.ha-mega__side {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-left: 48px;
  border-left: 1px solid #e0e0e0;
}
.ha-mega .ha-mega__title {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #333;
}
.ha-mega__group ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ha-mega__group a {
  font-size: 16px;
  font-weight: 600;
  color: #001a72;
  text-decoration: none;
  transition: opacity .15s;
}
.ha-mega__group a:hover { color: #001a72; opacity: .65; }

@media (max-width: 1023px) {
  .ha-mega { padding: 8px; }
  .ha-mega__sheet { border-radius: 20px; }
  .ha-mega__top { padding: 20px 20px 0; }
  .ha-mega__body { grid-template-columns: 1fr; gap: 40px; padding: 32px 20px 40px; }
  .ha-mega__primary,
  .ha-mega__side { grid-column: 1; }
  .ha-mega__side { padding-left: 0; border-left: 0; }
  .ha-mega .ha-mega__primary-list a { font-size: 30px; }
}

/* Shown only while masquerading as another user (Masquerade module). */
.ha-header__unmask {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #b42318;
  border-radius: 8px;
  background: #fff;
  color: #b42318;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.ha-header__unmask:hover { background: #b42318; color: #fff; }
.ha-mega__top .ha-header__unmask { height: 52px; border-radius: 9999px; padding: 0 22px; }
