/* Assets/css/header-nav.css
   - Header + Nav + Mega Menu ONLY
   - Gold + Red hover accents (clean + fixed)
*/

/* -----------------------------
   Header
----------------------------- */
.header{
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: visible; /* allow dropdown overlay */
}

.header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #ffffff;

  /* keep top corners rounded */
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.brand__logo{
  max-height: 64px;
  width: auto;
}

.header__tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

.iconbtn{
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
}
.iconbtn:hover{ background: rgba(0,0,0,0.05); }
.iconbtn__img{
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* -----------------------------
   Nav (pill bar)
----------------------------- */
.nav{
  position: relative; /* anchor mega overlay */
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  padding: 10px 12px;

  /* rounded edges like screenshot */
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);

  /* calm shadow like old header/nav */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 10px 18px rgba(0,0,0,0.18);

  overflow: visible;
}

.nav__inner{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* hamburger (mobile) */
.nav__hamburger{
  display:none;
  align-items:center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 8px 10px;
  border-radius: 12px;
  cursor:pointer;
}
.nav__hamburgerLines{
  width: 20px;
  height: 12px;
  position: relative;
  display:inline-block;
}
.nav__hamburgerLines:before,
.nav__hamburgerLines:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height: 2px;
  background: #fff;
  border-radius: 5px;
}
.nav__hamburgerLines:before{ top: 1px; }
.nav__hamburgerLines:after{ bottom: 1px; }
.nav__hamburgerText{ font-weight: 700; font-size: 13px; }

/* top menu */
.nav__menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap: 18px;
  flex-wrap: nowrap;
  width: 100%;
  justify-content: center;
}

/* IMPORTANT: mega panel positions relative to FULL menu row */
#navMenu{ position: relative; }
#navMenu > li.hasMega{ position: static; }

.nav__menu a{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  color:#fff;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
  transition: background .15s ease, box-shadow .15s ease;
}

.nav__menu a:active{ transform: translateY(1px); }

/* -----------------------------
   DRB Mega Menu
----------------------------- */
.drbCaret{
  display:inline-block;
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.9;
  transition: transform .15s ease;
}

/* Mega panel (desktop) */
.drbMega{
  display:none;

  position:absolute;
  left: 0;
  right: 0;
  top: 100%;

  /* no gap (prevents disappearing) */
  margin-top: 0;

  /* visual spacing without hover gap */
  transform: translateY(10px);

  width: 100%;
  padding: 14px 14px 16px;

  background: rgba(16, 40, 80, 0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(0,0,0,0.25);
  z-index: 6000;
}

/* hover “bridge” so pointer can travel down without closing */
.drbMega:before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:-14px;
  height:14px;
  background: transparent;
}

/* Grid inside mega */
.drbMega__grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items:start;
}

.drbMega__title a{
  display:inline-block;
  font-weight:900;
  color:#fff;
  text-decoration: underline;
  margin-bottom: 8px;
  transition: background .15s ease, box-shadow .15s ease;
}

/* list */
.drbMega__list{
  list-style:none;
  margin: 8px 0 0;
  padding:0;
}
.drbMega__list li{ margin: 8px 0; }

/* submenu items */
.drbMega__list a{
  display:flex;
  align-items:center;
  justify-content:space-between;

  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(255,255,255,0.06);
  color:#fff;
  font-weight:800;

  transition: background .15s ease, box-shadow .15s ease;
}

/* Calm right arrow “pill” */
.drbMega__list a:after{
  content:"›";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  font-size: 18px;
  line-height: 1;
  opacity: 0.95;
}

/* banner */
.drbMega__media img{
  width:100%;
  height:auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

/* Open states */
#navMenu > li.hasMega.is-open > .drbMega{ display:block; }
#navMenu > li.hasMega.is-open .drbCaret{ transform: rotate(180deg); }

/* Desktop hover opens (CSS only) */
@media (hover:hover) and (pointer:fine){
  #navMenu > li.hasMega:hover > .drbMega{ display:block; }
  #navMenu > li.hasMega:hover .drbCaret{ transform: rotate(180deg); }
}

/* -----------------------------
   Mobile behavior
----------------------------- */
@media (max-width: 860px){
  .nav__hamburger{ display:inline-flex; }

  /* ✅ KEY FIX: allow wrap so menu can drop under hamburger */
  .nav__inner{
    flex-wrap: wrap;
    align-items: flex-start;
  }

  /* ✅ force UL to be full-width on its own line */
  .nav__menu{
    display:none;
    flex: 0 0 100%;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 0 2px;
    margin: 0;
  }
  .nav__menu.is-open{ display:flex; }

  /* ✅ left-justified buttons on mobile */
  .nav__menu a{
    width: 100%;
    justify-content: flex-start;   /* left */
    text-align: left;
    padding-left: 14px;           /* comfortable left padding */
    padding-right: 14px;
    background: rgba(255,255,255,0.10);
    border-radius: 12px;
  }

  /* ✅ push the caret to the far right on mobile */
  .drbCaret{
    margin-left: auto;
  }


  /* mega panel becomes accordion section */
  .drbMega{
    position: static;
    transform: none;
    margin-top: 6px;
    padding: 10px 10px 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
  }
  .drbMega:before{ display:none; }
  .drbMega__grid{ grid-template-columns: 1fr; }
}

/* ==========================================================
   DRB NAV HOVER COLORS (Gold + Red Accent)
   - Works for ALL top items + ALL submenu items
   - No broken @media syntax
========================================================== */

/* TOP NAV: hover/focus = warm gold */
.nav__menu a:hover,
.nav__menu a:focus{
  background: rgba(255, 215, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.22);
}

/* TOP NAV: open/active state = gold + slight red warmth */
#navMenu > li.hasMega.is-open > a{
  background: rgba(255, 215, 0, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 215, 0, 0.22),
    0 0 0 2px rgba(255, 80, 80, 0.06);
}

/* TOP NAV: desktop hover highlight also applies */
@media (hover:hover) and (pointer:fine){
  #navMenu > li.hasMega:hover > a{
    background: rgba(255, 215, 0, 0.18);
    box-shadow:
      inset 0 0 0 1px rgba(255, 215, 0, 0.22),
      0 0 0 2px rgba(255, 80, 80, 0.06);
  }
}

/* SUBMENU: hover/focus = white lift + gold outline + red warmth */
.drbMega__list a:hover,
.drbMega__list a:focus{
  background: rgba(255,255,255,0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 215, 0, 0.20),
    0 0 0 2px rgba(255, 120, 120, 0.06);
}

/* Optional: title hover gets a soft accent */
.drbMega__title a:hover,
.drbMega__title a:focus{
  background: rgba(255, 215, 0, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.18);
  border-radius: 10px;
  padding: 2px 6px;
}
/* ===============================
   Header / Nav link cleanup
   =============================== */

.header a,
.nav a,
.nav__menu a,
.nav__menu a:visited,
.nav__menu a:hover,
.nav__menu a:focus,
.nav__menu a:active {
  text-decoration: none !important;
}
.nav__menu a:hover {
  opacity: 0.9;
}
.nav__menu li:hover > a {
  background: rgba(255,255,255,0.08);
}
