/* ==========================================================================
   Indetix — primary navigation, mega menus and mobile drawer
   Loaded after style.css; overrides and extends the base masthead.
   ========================================================================== */

/* Anchor the mega wrap to the content well. */
.nav .wrap {
  position: relative;
}

.primary-nav {
  flex: 1;
  min-width: 0;
}

.nav-links .chev {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  opacity: 0.75;
}

.nav-links > li.has-mega > a {
  cursor: pointer;
}

.nav-links > li.has-mega > a[aria-expanded="true"] {
  color: var(--royal);
  border-bottom-color: var(--royal);
}

/* ---- Mega wrap + panels -------------------------------------------------- */

.mega-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: none;
  z-index: 70;
}

.mega-wrap.is-open {
  display: block;
}

.mega-panel {
  display: none;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-top: none;
  box-shadow: 0 26px 54px rgba(16, 35, 63, 0.14);
}

.mega-panel.is-open {
  display: block;
}

.mega-panel__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 262px;
  gap: 26px;
  padding: 24px 24px 26px;
}

.mega-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: var(--royal);
}

.mega-col h5 {
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(38, 52, 69, 0.52);
}

.mega-col a {
  display: block;
  padding: 0;
  border: 0;
  font-size: 12px;
  line-height: 2.02;
  color: rgba(38, 52, 69, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mega-col a:hover,
.mega-col a:focus-visible {
  color: var(--royal);
  border: 0;
}

.mega-col a.all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--royal);
}

.mega-col a.all svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
}

.mega-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 236px;
  padding: 18px;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}

.mega-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
}

.mega-feature__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(16, 35, 63, 0.36) 0%,
    rgba(16, 35, 63, 0.74) 45%,
    rgba(16, 35, 63, 0.97) 100%
  );
}

.mega-feature__body {
  position: relative;
  display: flex;
  flex-direction: column;
}

.mega-feature .k {
  font-size: 8.5px;
  line-height: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.mega-feature .h {
  margin-top: 8px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  max-width: 200px;
}

.mega-feature .l {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 10.5px;
  line-height: 15px;
  color: rgba(255, 255, 255, 0.74);
}

.mega-feature .l svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
}

/* ---- Mobile drawer: dark, inline-expanding ------------------------------- */

.mobile-nav {
  background: var(--navy);
  color: #fff;
}

.mobile-nav__close {
  border-color: rgba(255, 255, 255, 0.26);
  background: transparent;
  color: #fff;
}

.mobile-nav ul {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.mobile-nav li {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.mobile-nav a {
  color: #fff;
}

.mobile-nav a svg {
  width: 15px;
  height: 15px;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.6;
  fill: none;
}

.m-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 17px;
  line-height: 23px;
  font-weight: 500;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.m-sub-toggle svg {
  width: 14px;
  height: 14px;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.6;
  fill: none;
  transition: transform 0.2s var(--ease);
}

.m-sub-toggle[aria-expanded="true"] {
  color: var(--cyan);
}

.m-sub-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
  stroke: var(--cyan);
}

.m-sub {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
  padding: 8px 0 14px;
}

.m-sub.is-open {
  display: grid;
}

.mobile-nav .m-sub a {
  display: block;
  padding: 0;
  font-size: 11px;
  line-height: 19px;
  color: rgba(255, 255, 255, 0.62);
}

.mobile-nav .m-sub a.hi {
  color: var(--cyan);
}

.mobile-nav .mobile-nav__cta .btn {
  width: 100%;
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--navy);
}

.mobile-nav .mobile-nav__cta .btn:hover {
  background: #00bbdd;
  border-color: #00bbdd;
}

.mobile-nav__meta {
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 9.5px;
  line-height: 16px;
}

.mobile-nav__meta a {
  display: inline-block;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

/* ---- Desktop breakpoints ------------------------------------------------- */

@media (max-width: 1200px) {
  .mega-panel__inner {
    grid-template-columns: repeat(4, 1fr) 230px;
    gap: 20px;
  }
}

@media (max-width: 960px) {
  .mega-wrap {
    display: none !important;
  }
}
