/* Desktop mega menu panels (rendered by assets/js/header.js). */

.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid rgb(20 20 22 / 10%);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 26px 44px -28px rgb(20 20 22 / 45%);
  opacity: 0;
  transform: translateY(-10px);
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  transition: opacity .26s var(--ease), transform .34s var(--ease), clip-path .34s var(--ease);
}
.mega.is-open { opacity: 1; transform: none; clip-path: inset(0 0 -60px 0); pointer-events: auto; }
.mega__grid { max-width: var(--maxw); margin: 0 auto; padding: 32px var(--gutter) 40px; display: grid; gap: 10px 26px; }
.mega--2 .mega__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) 1.3fr; }
.mega--3 .mega__grid { grid-template-columns: repeat(3, minmax(0, 1fr)) 1.15fr; }
.mega--4 .mega__grid { grid-template-columns: repeat(4, minmax(0, 1fr)) 1.3fr; }
.mega__kicker { grid-column: 1 / -1; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--stone-2); margin-bottom: 4px; }

.mega__col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .38s var(--ease);
}
.mega.is-open .mega__col,
.mega.is-open .mega__promo { opacity: 1; transform: none; }
.mega__col--ruled { border-left: 1px solid #f0ede6; padding-left: 26px; }
.mega__col--row2 { padding-top: 30px; }

.mega__head {
  display: flex;
  align-items: flex-start;
  min-height: 2.6em;
  padding-bottom: 11px;
  margin-bottom: 3px;
  border-bottom: 1px solid #ebe8e0;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink);
  transition: color .18s ease;
}
a.mega__head:hover { color: var(--blue-deep); }

.mega__link {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.25;
  color: #6b6f76;
  transition: color .18s ease, transform .18s ease;
}
.mega__link:hover { color: var(--ink); transform: translateX(4px); }
.mega__link span { opacity: .45; font-size: 12px; }

.mega__promo {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(155deg, #1b2438 0%, #0f1524 62%, var(--ink) 100%);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .34s ease .22s, transform .42s var(--ease) .22s;
}
.mega__promo-dots { position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / 16%) 1px, transparent 1px); background-size: 14px 14px; opacity: .5; }
.mega__promo-glow { position: absolute; top: -40px; right: -50px; width: 190px; height: 190px; border-radius: 50%; }
.mega__promo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.mega__promo:hover .mega__promo-img { transform: scale(1.04); }
.mega__promo-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(15 21 36 / 10%) 0%, rgb(15 21 36 / 55%) 45%, rgb(15 21 36 / 95%) 100%); }
.mega__promo-body { position: relative; padding: 24px; }
.mega__promo-kicker { font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.mega__promo-num { display: flex; align-items: baseline; gap: 10px; margin-top: 78px; }
.mega__promo-num b { font-size: 44px; line-height: 1; color: var(--white); }
.mega__promo-num span { font-size: 13px; color: #9aa3b8; }
.mega__promo-spacer { height: 120px; }
.mega__promo-title { margin-top: 14px; font-weight: 600; font-size: 17px; line-height: 1.35; color: var(--white); }
.mega__promo p { margin: 8px 0 18px; font-size: 13.5px; line-height: 1.55; color: #9aa3b8; }

.mega__promo-cta { align-self: flex-start; }

/* Social Mafia banner */
.mega__promo--sm { background: #07080b; justify-content: center; }
.mega__promo--sm .mega__promo-img { object-position: 72% 55%; }
.mega__promo--sm .mega__promo-fade { background: linear-gradient(90deg, rgb(5 6 9 / 92%) 0%, rgb(5 6 9 / 70%) 42%, rgb(5 6 9 / 0%) 72%); }
.mega__promo--sm .mega__promo-body { max-width: 66%; padding: 28px 26px; }
.mega__promo--sm .mega__promo-kicker { color: #f5c842; font-weight: 700; letter-spacing: .08em; font-size: 10.5px; }
.mega__promo--sm .mega__promo-spacer { display: none; }
.mega__promo--sm .mega__promo-title { margin-top: 12px; font-size: 34px; line-height: .98; font-weight: 800; letter-spacing: -.035em; color: #fff; text-wrap: balance; }
.mega__promo--sm .mega__promo-title em { font-style: normal; color: #f5c842; }
.mega__promo--sm p { margin: 14px 0 20px; font-size: 14px; line-height: 1.45; color: #e4e4e7; }
.mega__promo:hover .mega__promo-cta { transform: translateY(-2px); }

.mega-scrim { position: fixed; inset: 0; z-index: 30; opacity: 0; pointer-events: none; }
.mega-scrim.is-open { opacity: 1; }

.mega__desc { margin-top: 4px; font-size: 14px; line-height: 1.5; color: #6b6f76; }

/* Rail layout (Services): a floating card with the service list | its sub-services | promo.
   Type scale: 11px labels, 28px headline, 15-16px body, 13.5px secondary lines. */
.mega--rail { left: max(24px, 50% - 920px); right: max(24px, 50% - 920px); top: calc(100% + 10px); border: 1px solid rgb(20 20 22 / 8%); border-radius: 26px; box-shadow: 0 30px 70px -30px rgb(20 20 22 / 35%); }
.mega--rail.is-open { clip-path: inset(-20px -60px -80px -60px); }
.mrail { display: grid; grid-template-columns: minmax(250px, max-content) minmax(0, 1fr) 340px; padding: 44px 48px 48px; }
.mrail .mega__kicker { margin: 4px 0 22px 18px; font-size: 11px; letter-spacing: .2em; }
.mrail__rail { display: flex; flex-direction: column; gap: 6px; padding-right: 28px; border-right: 1px solid #ece9e2; }
.mrail__svc { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-radius: 12px; font-weight: 500; font-size: 16px; line-height: 1.3; white-space: nowrap; color: #2a2925; transition: background-color .2s ease, color .2s ease; }
.mrail__svc::after { content: "\2192"; opacity: 0; transform: translateX(-6px); transition: opacity .2s ease, transform .25s ease; }
.mrail__svc:hover { color: var(--blue-mid); }
.mrail__svc.is-on { background: var(--blue-tint); color: var(--blue-mid); font-weight: 600; }
.mrail__svc.is-on::after { opacity: 1; transform: none; }
.mrail__panes { padding: 0 48px; border-right: 1px solid #ece9e2; }
.mrail__pane[hidden] { display: none; }
/* The headline runs the full width; "View all" sits beside the description. */
.mrail__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0 40px; padding-bottom: 28px; border-bottom: 1px solid #ece9e2; }
.mrail__top > div { display: contents; }
.mrail__eyebrow, .mrail__title { grid-column: 1 / -1; }
.mrail__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--blue-mid); }
.mrail__title { margin: 14px 0 12px; font-weight: 700; font-size: 28px; line-height: 1.12; letter-spacing: -.02em; color: var(--ink); }
.mrail__top p { max-width: 62ch; margin: 0; font-size: 15px; line-height: 1.55; color: #6b6f76; }
.mrail__all { display: inline-flex; align-items: center; gap: 6px; flex: none; font-weight: 500; font-size: 14px; color: var(--blue-mid); white-space: nowrap; }
.mrail__all:hover { color: var(--blue-deep); }
/* Sub-services: three columns with rules between columns and between rows. */
.mrail__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mrail__item { display: flex; align-items: center; gap: 16px; padding: 26px 28px; border-top: 1px solid #ece9e2; }
.mrail__item:nth-child(-n + 3) { border-top: 0; }
.mrail__item:nth-child(3n + 1) { padding-left: 0; }
.mrail__item:nth-child(3n) { padding-right: 0; }
.mrail__item:not(:nth-child(3n + 1)) { border-left: 1px solid #ece9e2; }
.mrail__text { flex: 1; min-width: 0; }
.mrail__item b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--ink); transition: color .2s ease; }
.mrail__text > span { display: -webkit-box; margin-top: 6px; overflow: hidden; font-size: 13.5px; line-height: 1.5; color: #7d7a72; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mrail__arrow { flex: none; color: #3d3b37; transition: transform .2s ease, color .2s ease; }
.mrail__item:hover b, .mrail__item:focus-visible b { color: var(--blue-mid); }
.mrail__item:hover .mrail__arrow, .mrail__item:focus-visible .mrail__arrow { color: var(--blue-mid); transform: translateX(3px); }
.mrail .mega__promo { min-height: 100%; margin-left: 48px; border-radius: 18px; opacity: 1; transform: none; }
.mrail .mega__promo--sm .mega__promo-body { max-width: none; padding: 30px 28px; }
.mrail .mega__promo--sm .mega__promo-title { max-width: 85%; font-size: 30px; }
.mrail .mega__promo--sm p { font-size: 14px; }
/* In this narrow card the text sits low, over a fade, with the megaphone visible above it. */
.mrail .mega__promo--sm { justify-content: flex-end; }
.mrail .mega__promo--sm .mega__promo-img { object-position: 64% 8%; }
.mrail .mega__promo--sm .mega__promo-fade { background: linear-gradient(180deg, rgb(5 6 9 / 0%) 18%, rgb(5 6 9 / 78%) 52%, rgb(5 6 9 / 96%) 100%); }
.mrail .mega__promo-cta { max-width: 100%; height: 48px; padding-left: 18px; font-size: 14px; }
/* Below 1600px the promo moves under the service list (the empty space there), so the
   sub-services keep their full width and three columns. */
@media (max-width: 1599px) {
  .mrail { grid-template-columns: minmax(250px, max-content) minmax(0, 1fr); grid-template-rows: auto 1fr; padding: 40px 44px 44px; }
  .mrail__rail { grid-row: 1; border-right: 0; }
  .mrail__panes { grid-column: 2; grid-row: 1 / span 2; padding-right: 0; border-right: 0; border-left: 1px solid #ece9e2; }
  .mrail .mega__promo { grid-column: 1; grid-row: 2; align-self: end; min-height: 250px; margin: 24px 28px 0 0; contain: inline-size; }
  .mrail .mega__promo--sm .mega__promo-body { padding: 22px 20px; }
  .mrail .mega__promo--sm .mega__promo-title { max-width: none; font-size: 22px; }
  .mrail .mega__promo--sm p { display: none; }
  .mrail .mega__promo-cta { height: 44px; margin-top: 14px; padding-left: 16px; font-size: 13.5px; }
  .mrail .mega__promo-cta .btn__icon { width: 30px; height: 30px; }
}
@media (max-width: 1280px) {
  .mrail { grid-template-columns: minmax(240px, max-content) minmax(0, 1fr); padding: 36px 36px 40px; }
  .mrail__panes { padding-left: 36px; }
  .mrail__item { padding: 22px 20px; }
}
