/* ============ MEGA MENU NAV ============ */
:root {
  --primary: #9c1f5c;
  --primary-dark: #7d1849;
  --primary-light: #f5e6ee;
  --gray-700: #4b5563;
  --gray-100: #f3f4f6;
}

/* Nav sits above Elementor sections and any page widgets */
.nav {
  position: relative;
  z-index: 9999;
  background: var(--primary);
}

.nav__inner {
  display: flex;
  align-items: stretch;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 20px 14px 0;
  border-right: 1px solid rgba(255,255,255,.25);
  margin-right: 8px;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-bottom: none;
  border-left: none;
  cursor: pointer;
}

.nav__list {
  display: flex;
  align-items: stretch;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 14px 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s;
}

.nav__link:hover{
  color:#fff;
}
.nav__item:hover > .nav__link {
  background: rgba(255,255,255,.15);
}

.nav__link--highlight {
  background: #fff;
  color: var(--primary);
  margin-left: auto;
  border-radius: 6px;
  padding: 8px 18px;
  align-self: center;
  font-weight: 700;
}

.nav__item:hover .nav__link--highlight {
  background: var(--gray-100);
}

/* ── Mega menu panel ─────────────────────────────────────────────────── */
.mega {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  border-radius: 0 0 10px 10px;
  width: max-content;
  min-width: 240px;
  max-width: min(900px, 90vw);
  padding: 28px;
  display: none;
  z-index: 100;
  border-top: 3px solid var(--primary);
  gap: 32px;
}

.nav__item:hover .mega {
  display: flex;
}

/* Right-edge fix: JS adds .mega--flip when it would overflow the viewport */
.mega--flip {
  left: auto;
  right: 0;
}

.mega__col { flex: 1; }

.mega__col-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  margin-bottom: 14px;
}


.mega__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega__col ul li { margin-bottom: 10px; }

.mega__col ul li a {
  font-size: 14px;
  color: var(--gray-700);
  text-decoration: none;
  transition: color .15s;
}

.mega__col ul li a:hover { color: var(--primary); }

.nav__inner button {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

/* Hide mega on tablet — mobile handles it via JS accordion */
@media (max-width: 1024px) {
  .mega { display: none !important; }
}

.nav__toggle { display: none; }

/* ============ MOBILE: hamburger + accordion ============ */
@media (max-width: 768px) {
  .mega__col-title a{
  color: #fff;
}
  .nav__toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 14px 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,.25);
    margin-right: 0;
  }

  .nav__inner {
    flex-wrap: wrap;
    padding: 0 16px;
  }

  .nav__list {
    display: none;
    flex-direction: column;
    width: 100%;
    position: static;
  }

  .nav__list.is-open { display: flex; }

  .nav__item {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.15);
    box-sizing: border-box;
    overflow: hidden;
  }

  .nav__link {
    padding: 13px 4px;
    justify-content: space-between;
    width: 100%;
    height: auto;
  }

  .nav__link--highlight {
    margin-left: 0;
    align-self: stretch;
    text-align: center;
    margin: 10px 0;
  }

  .nav__item:hover > .nav__link {
    background: rgba(255,255,255,.12);
    color: #fff;
    height: auto;
  }

  .mega {
    position: static;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: none;
    box-shadow: none;
    border-radius: 0;
    border-top: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.06);
    padding: 14px 4px 14px 16px;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
    /* Reset flip on mobile — it's always static */
    left: auto !important;
    right: auto !important;
  }

  .nav__item.is-open .mega { display: flex !important; }

  .nav__item.has-mega > .nav__link::after {
    content: "+";
    font-size: 18px;
    font-weight: 400;
  }

  .nav__item.has-mega.is-open > .nav__link::after { content: "−"; }

  .mega__col { flex: none; width: 100%; }
  .mega__col-title { color: #fff; }
  .mega__col ul li a { color: rgba(255,255,255,.85); }
  .mega__col ul li a:hover { color: #fff; }
}
