/* Site header, dropdowns, mega-menu, search overlay and mobile drawer (navbar.php). */
.site-header { position: sticky; top: 0; z-index: 1030; background: var(--brand); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 6px 20px rgba(0, 25, 60, .28); }
.site-header-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; max-width: 1440px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

.site-logo { flex-shrink: 0; display: block; line-height: 0; }
.site-logo img { width: 190px; height: auto; }

/* ---------- Desktop navigation ---------- */
.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-top { display: flex; align-items: center; gap: 5px; height: 68px; padding: 0 12px; color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap; position: relative; }
.nav-top:hover, .nav-top:focus { color: #fff; text-decoration: none; }
.nav-top::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 14px; height: 2px; border-radius: 2px; background: #fff; transform: scaleX(0); transition: transform .2s; }
.nav-top:hover::after, .nav-top.is-active::after, .has-drop:hover > .nav-top::after, .has-drop:focus-within > .nav-top::after { transform: scaleX(1); }
.nav-top .fa-angle-down { font-size: 14px; opacity: .8; transition: transform .2s; }
.has-drop:hover > .nav-top .fa-angle-down, .has-drop:focus-within > .nav-top .fa-angle-down { transform: rotate(180deg); }

/* Dropdown panels: open on hover, keyboard focus or (touch) first tap */
.drop { position: absolute; top: calc(100% - 6px); left: 50%; min-width: 300px; background: #fff; border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 25, 60, .22); padding: 10px; opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: opacity .18s, transform .18s, visibility 0s .18s; z-index: 10; }
.drop::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.has-drop:hover > .drop, .has-drop:focus-within > .drop, .has-drop.touch-open > .drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.drop-wide { width: 560px; }
.drop-grid.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.drop-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--ink); }
.drop-item:hover, .drop-item:focus { background: var(--soft); color: var(--ink); text-decoration: none; }
.drop-item i { width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; background: #e8f0fb; color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.drop-item:hover i { background: var(--brand); color: #fff; }
.drop-item strong { display: block; font-size: 14px; line-height: 1.3; }
.drop-item small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.drop-footer { display: block; margin-top: 6px; padding: 10px 12px; border-top: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--brand); }
.drop-footer:hover { color: var(--accent); text-decoration: none; }

/* Mega-menu: full width under the header */
.has-mega { position: static; }
.mega { left: 50%; width: min(1180px, calc(100vw - 40px)); display: grid; grid-template-columns: 1fr 250px; gap: 18px; padding: 22px; top: calc(100% - 6px); }
.site-header-inner { position: relative; }
.mega-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 22px; }
.mega-col { min-width: 0; }
.mega-title { display: block; font-weight: 800; font-size: 14px; color: var(--ink); padding-bottom: 7px; margin-bottom: 6px; border-bottom: 2px solid var(--line); }
.mega-title:hover { color: var(--brand); text-decoration: none; border-bottom-color: var(--brand); }
.mega-link { display: block; font-size: 13.5px; color: var(--muted); padding: 4px 0; line-height: 1.35; transition: color .15s, padding-left .15s; }
.mega-link:hover { color: var(--brand); padding-left: 4px; text-decoration: none; }
.mega-more { display: inline-block; font-size: 13px; font-weight: 700; margin-top: 4px; }
.mega-promo { background: linear-gradient(160deg, #0b1f3a, var(--brand)); color: #fff; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 8px; align-self: start; }
.mega-promo .eyebrow { color: #ffb3b9; margin: 0; }
.mega-promo strong { font-size: 18px; line-height: 1.3; }
.mega-promo p { font-size: 13.5px; color: #d6e2f3; line-height: 1.5; margin: 0 0 6px; }
.mega-promo .btn { width: 100%; }

/* Right side actions */
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.icon-btn { width: 42px; height: 42px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s; }
.icon-btn:hover { background: rgba(255, 255, 255, .24); }
.icon-btn:focus-visible { outline: 3px solid #ffd6d9; outline-offset: 2px; }
.site-header .header-cta { padding: .5rem 1rem; font-size: 14px; }
.menu-btn { display: none; }

/* ---------- Search overlay ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(7, 18, 36, .72); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.search-overlay[hidden] { display: none; }
.search-box { position: relative; width: 100%; max-width: 680px; background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.search-box form { display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 14px; }
.search-box form:focus-within { border-color: var(--brand); }
.search-box form > i { color: var(--muted); }
.search-box input { flex: 1; border: 0; outline: 0; font-size: 17px; min-width: 0; padding: 8px 0; }
.search-hints { margin-top: 12px; font-size: 13px; color: var(--muted); }
.search-hints a { display: inline-block; margin: 4px 4px 0; padding: 3px 10px; border-radius: 14px; background: var(--soft); color: var(--ink); font-weight: 600; }
.search-hints a:hover { background: var(--brand); color: #fff; text-decoration: none; }
.search-close { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 24px; line-height: 1; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); cursor: pointer; }

/* ---------- Drawer (tablet & phone) ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 1090; background: rgba(7, 18, 36, .55); }
.drawer-backdrop[hidden] { display: none; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1095; width: min(360px, 88vw); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s ease; box-shadow: -10px 0 40px rgba(0, 0, 0, .25); visibility: hidden; }
.drawer.open { transform: translateX(0); visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--brand); }
.drawer-head img { width: 150px; height: auto; }
.drawer-head .icon-btn { font-size: 28px; line-height: 1; }
.drawer-search { display: flex; margin: 12px 14px 4px; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; }
.drawer-search:focus-within { border-color: var(--brand); }
.drawer-search input { flex: 1; border: 0; outline: 0; padding: 10px 12px; font-size: 15px; min-width: 0; }
.drawer-search button { border: 0; background: var(--brand); color: #fff; width: 46px; font-size: 16px; }
.drawer-nav { flex: 1; overflow-y: auto; padding: 6px 8px 12px; -webkit-overflow-scrolling: touch; }
.d-link, .d-group > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 10px; color: var(--ink); font-weight: 700; font-size: 15.5px; cursor: pointer; list-style: none; }
.d-link:hover, .d-group > summary:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.d-link.is-active { color: var(--brand); background: #e8f0fb; }
.d-link > i, .d-group > summary > i { width: 20px; text-align: center; color: var(--brand); }
.d-group > summary::-webkit-details-marker { display: none; }
.d-group > summary::after { content: "\f107"; font-family: FontAwesome; margin-left: auto; font-size: 18px; color: var(--muted); transition: transform .2s; }
.d-group[open] > summary::after { transform: rotate(180deg); }
.d-group[open] > summary { color: var(--brand); }
.d-sub { padding: 2px 0 8px 44px; display: flex; flex-direction: column; }
.d-sub a { display: flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.d-sub a:hover { background: var(--soft); color: var(--brand); text-decoration: none; }
.d-sub a.d-all { color: var(--brand); font-weight: 700; }
.d-nested > summary { min-height: 42px; font-size: 14.5px; font-weight: 700; color: var(--ink); padding-left: 10px; }
.d-nested .d-sub { padding-left: 12px; border-left: 2px solid var(--line); margin-left: 10px; }
.drawer-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.drawer-foot .btn { padding: .55rem .4rem; font-size: 14px; }
body.no-scroll { overflow: hidden; }

/* ---------- Breakpoints ---------- */
@media (max-width: 1279px) {
  .nav-top { padding: 0 9px; font-size: 14.5px; }
  .nav-top::after { left: 9px; right: 9px; }
  .site-logo img { width: 165px; }
  .site-header .header-cta { display: none; }
}
@media (max-width: 1099px) {
  .main-nav, .site-header .header-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .site-header-inner { min-height: 62px; padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 575px) {
  .site-logo img { width: 150px; }
  .site-header-inner { min-height: 58px; gap: 10px; }
  .icon-btn { width: 40px; height: 40px; }
  .search-overlay { padding-top: 70px; }
  .search-box { padding: 14px; }
  .search-box form .btn { padding: .5rem .8rem; }
  .search-close { top: -12px; right: -6px; }
}
@media (prefers-reduced-motion: reduce) {
  .drop, .drawer, .nav-top::after { transition: none; }
}

/* Hide the ShareThis bar while the menu or search is open */
body.no-scroll #st-1, body.no-scroll .st-sticky-share-buttons { display: none !important; }
