.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.site-header {
  display: flex;
  flex-direction: column;
}

.banner-header {
  overflow: visible;
  border: 1px solid #cfd8d2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 30;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  background: #ffffff;
  border-bottom: 1px solid #dfe5df;
}

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

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #155f63;
  border: 1px solid #0d4347;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.brand-mark span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}


.brand-kicker {
  display: block;
  margin-bottom: 4px;
  color: #8b2d48;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-copy h1 {
  font-family: var(--font-display);
  color: #182522;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.brand-sub-text {
  display: inline-block;
  margin-top: 4px;
  color: #66736f;
  font-size: 13px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 12;
}

.header-actions .primary-btn,
.banner-action-row .primary-btn,
.shortcut-card {
  position: relative;
  z-index: 13;
  pointer-events: auto;
}

.outline-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-link-btn {
  border: 1px solid #d4ded8;
  border-radius: 8px;
  background: #f7f8f6;
  color: #155f63;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.header-link-btn::after {
  content: ">";
  margin-left: 6px;
}

.header-top-row .primary-btn {
  border: 1px solid #155f63;
  border-radius: 8px;
  background: #155f63;
  color: #fff;
}

.header-link-btn:hover,
.header-top-row .primary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn.small {
  min-width: 96px;
  line-height: 1;
}

.header-top-row .primary-btn,
.banner-action-row .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  text-decoration: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 8px;
  background: #f4f6f3;
  border-top: none;
  border-bottom: 1px solid #d8ded8;
  position: relative;
  z-index: 31;
}

.nav-item {
  display: flex;
}

.main-nav a {
  position: relative;
  padding: 14px 18px;
  color: #33433f;
  font-size: 15px;
  font-weight: 800;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  background: transparent;
}

.main-nav a:hover {
  color: #155f63;
  background: #e9f5f3;
}

.main-nav a:hover::after {
  background: #9b2745;
}


.mega-menu {
  position: absolute;
  left: 50%;
  top: 100%;
  width: min(920px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
  border: 1px solid #cfd8d2;
  border-radius: 0 0 8px 8px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(24, 37, 34, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  visibility: hidden;
  z-index: 40;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  visibility: visible;
}

.mega-menu-intro {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 14px;
  border-right: 1px solid #e2e8e3;
}

.mega-menu-intro span {
  color: #8b2d48;
  font-size: 12px;
  font-weight: 800;
}

.mega-menu-intro strong {
  color: #182522;
  font-size: 20px;
  line-height: 1.3;
}

.mega-menu-intro p {
  margin: 0;
  color: #66736f;
  font-size: 13px;
  line-height: 1.6;
}

.mega-menu-group {
  display: grid;
  align-content: start;
  gap: 8px;
}

.mega-menu-group strong {
  color: #155f63;
  font-size: 13px;
  font-weight: 800;
}

.mega-menu .mega-menu-group a {
  display: block;
  padding: 8px 0;
  color: #33433f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.mega-menu .mega-menu-group a::after {
  display: none;
}

.mega-menu .mega-menu-group a:hover {
  background: transparent;
  color: #9b2745;
}


/* Keep header stable in narrow editor and preview panes. */
@media (max-width: 1080px) {
  .main-nav {
    flex-wrap: wrap;
    padding: 6px;
  }

  .nav-item {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0;
  }

  .main-nav > .nav-item > a {
    flex: 1 1 100%;
    min-width: 0;
    padding: 12px 10px;
    text-align: center;
    white-space: nowrap;
  }

  .mega-menu {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-item {
    flex-basis: calc(50% - 6px);
  }
}

@media (max-width: 560px) {
  .nav-item {
    flex-basis: 100%;
  }
}
