/* =====================================================================
   MEGA MENU
   The header's menus as full-width panels: a rail of groups on the left, a
   thin rule, and the group in view as a three-column grid of items — a round
   photograph, a name, and one line saying what and where it is — with an
   "Explore all" link underneath.

   In the site's own colours: navy type on white, the live group and the open
   menu marked in Champagne.

   js/mega-menu.js moves each panel to the page body and sets its top edge to
   the bottom of the header, so it spans the whole screen whatever the header's
   own layout does.
   ===================================================================== */
.gmega {
  --gm-ink: #2e4755;
  --gm-soft: rgba(46, 71, 85, .62);
  --gm-mute: rgba(46, 71, 85, .5);
  --gm-line: rgba(46, 71, 85, .12);
  --gm-accent: #BD830D;
  --gm-top: 78px;

  position: fixed;
  top: var(--gm-top);
  left: 0;
  right: 0;
  z-index: 1200;
  max-height: calc(100vh - var(--gm-top));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #FFFFFF;
  color: var(--gm-ink);
  box-shadow: 0 18px 40px rgba(46, 71, 85, .14);
  font-family: inherit;
  animation: gmega-in .22s cubic-bezier(.22, .61, .36, 1);
}
.gmega[hidden] { display: none; }
@keyframes gmega-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.gmega__in {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  width: min(1320px, calc(100% - 2 * clamp(20px, 5vw, 96px)));
  margin: 0 auto;
  padding: clamp(28px, 3vw, 44px) 0 clamp(30px, 3.2vw, 48px);
}

/* ------------------------------- the rail ------------------------------- */
.gmega__rail {
  margin: 0;
  padding: 4px clamp(20px, 2.4vw, 40px) 0 0;
  list-style: none;
  border-right: 1px solid var(--gm-line);
}
.gmega__tab {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(14px, 1.4vw, 22px);
  padding: 0 0 0 26px;
  border: 0;
  background: none;
  color: var(--gm-mute);
  font: inherit;
  font-size: clamp(1.05rem, 1.35vw, 1.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease;
}
.gmega__tab:hover { color: var(--gm-ink); }
/* The group in view: dark, with the Champagne dot beside it. */
.gmega__tab.is-on { color: var(--gm-ink); }
.gmega__tab.is-on::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gm-accent);
  box-shadow: 0 0 0 4px rgba(189, 131, 13, .18);
}
.gmega__tab:focus-visible { outline: 2px solid var(--gm-accent); outline-offset: 4px; border-radius: 4px; }

/* ------------------------------- the grid ------------------------------- */
.gmega__body { min-width: 0; padding-left: clamp(24px, 3vw, 56px); }
.gmega__pane[hidden] { display: none; }

.gmega__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.6vw, 26px) clamp(20px, 2.4vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gmega__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 4px;
  margin: -4px;
  border-radius: 10px;
  color: var(--gm-ink);
  text-decoration: none;
  transition: background-color .18s ease;
}
.gmega__item:hover,
.gmega__item:focus-visible { background: rgba(46, 71, 85, .045); outline: none; }

.gmega__img {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(46, 71, 85, .07);
}
.gmega__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gmega__item:hover .gmega__img img { transform: scale(1.08); }
.gmega__img--icon { color: var(--gm-ink); background: rgba(189, 131, 13, .14); }
.gmega__img--icon svg { width: 22px; height: 22px; }

.gmega__txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-top: 2px; }
.gmega__name {
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.3;
  /* Two lines at most, so one long title cannot push its row apart. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gmega__item:hover .gmega__name { color: var(--gm-accent); }
.gmega__sub {
  color: var(--gm-soft);
  font-size: .86rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gmega__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(22px, 2.4vw, 34px);
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--gm-ink);
  color: var(--gm-ink);
  font-size: .98rem;
  font-weight: 600;
  text-decoration: none;
}
.gmega__all svg { width: 17px; height: 17px; transition: transform .2s ease; }
.gmega__all:hover { color: var(--gm-accent); border-color: var(--gm-accent); }
.gmega__all:hover svg { transform: translateX(3px); }

/* ------------------------ the menu names in the bar ------------------------
   Sentence case, a touch larger, and the open one underlined in Champagne. */
.ghead .gnav__item--mega > .gnav__btn {
  position: relative;
  height: 100%;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.ghead .gnav__item--mega > .gnav__btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #BD830D;
  transform: scaleX(0);
  transition: transform .22s ease;
}
.ghead .gnav__item--mega > .gnav__btn[aria-expanded="true"]::after { transform: scaleX(1); }
.ghead .gnav__item--mega { align-self: stretch; display: flex; }

/* ------------------------------ dark theme ------------------------------ */
:root[data-theme="dark"] .gmega {
  --gm-ink: #FAF8F3;
  --gm-soft: rgba(250, 248, 243, .66);
  --gm-mute: rgba(250, 248, 243, .5);
  --gm-line: rgba(250, 248, 243, .14);
  background: #223a48;
}
:root[data-theme="dark"] .gmega__item:hover { background: rgba(250, 248, 243, .06); }

/* ------------------------------ narrower screens ------------------------------ */
@media (max-width: 1280px) {
  .gmega__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .gmega { animation: none; }
  .gmega__img img, .gmega__all svg { transition: none; }
}
