/* =====================================================================
   EmQuest Mega Menu — megamenu.css  v1.1.0
   Colors: #E8821A (orange), #1A6FB5 (blue), #0f1923 (dark)
   Font:   DM Sans
   ===================================================================== */


/* ── Reset & base ───────────────────────────────────────────────────── */
.emqm-nav *, .emqm-nav *::before, .emqm-nav *::after,
.emqm-drawer *, .emqm-drawer *::before, .emqm-drawer *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Body padding for the fixed nav ────────────────────────────────── */
/* 
   IMPORTANT: On pages where the header/hero section bleeds to the top
   (homepage, travel packages, tour pages), set padding-top: 0 on that
   page's section or add class "emqm-no-pad" to body via Elementor
   Body Class field (Page Settings > Advanced > CSS Classes).
   
   On inner content pages (blog, about, contact) the padding below
   prevents content hiding behind the fixed nav.
*/
body.emqm-active-body {
  padding-top: 96px; /* matches nav height */
}

/* Prevent horizontal overflow on mobile — target the nav specifically */
.emqm-nav,
.emqm-nav-inner {
  max-width: 100vw;
  box-sizing: border-box;
}

/* Prevent the fixed nav from causing horizontal overflow on mobile */
body.emqm-active-body {
  overflow-x: hidden;
}

/* Pages with a full-screen hero: nav floats over them, no padding needed */
body.emqm-active-body.home,
body.emqm-active-body.emqm-hero-page,
body.emqm-active-body.emqm-no-pad {
  padding-top: 0 !important;
}

/* ═════════════════════════════════════════════════════════════════════
   NAV BAR
   ===================================================================== */
.emqm-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99990;
  font-family: 'DM Sans', Arial, sans-serif;
  /* Solid white — logo and menu always clearly visible */
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(15, 25, 35, 0.08);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

/* ── Frosted luminance overlay — disabled, nav is now solid white ───── */
.emqm-nav::before {
  content: none;
}

/* ── When a mega panel is open: solid white bar, overlay fades ──────── */
.emqm-nav.emqm-open {
  background: #fff;
  box-shadow: 0 2px 28px rgba(15, 25, 35, 0.10);
}
.emqm-nav.emqm-open::before {
  opacity: 0;
}

/* ── When page is scrolled (JS adds class) ──────────────────────────── */
.emqm-nav.emqm-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(15, 25, 35, 0.08);
}
.emqm-nav.emqm-scrolled::before {
  opacity: 0;
}

/* ── Inner row ──────────────────────────────────────────────────────── */
.emqm-nav-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  gap: 24px;
}

/* ═════════════════════════════════════════════════════════════════════
   LOGO
   ===================================================================== */
.emqm-logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.emqm-logo-img {
  height: 68px !important;
  width: auto !important;
  display: block;
  object-fit: contain;
  max-width: 200px;
  max-height: 68px !important;
}
.emqm-logo-text {
  font-size: 20px;
  font-weight: 800;
  color: #0f1923;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

/* ═════════════════════════════════════════════════════════════════════
   DESKTOP MENU LIST
   ===================================================================== */
.emqm-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

/* ── Each top-level item ────────────────────────────────────────────── */
.emqm-item {
  position: static; /* mega panel escapes to .emqm-nav */
  list-style: none;
}

/* ── Simple link (no children) ──────────────────────────────────────── */
.emqm-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0f1923;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
  background: transparent;
}
.emqm-link:hover {
  background: rgba(26, 111, 181, 0.07);
  color: #1A6FB5;
}
.emqm-item.emqm-current .emqm-link {
  color: #E8821A;
}

/* ── Trigger button (has children) ─────────────────────────────────── */
.emqm-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0f1923;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.emqm-trigger:hover,
.emqm-item.emqm-active .emqm-trigger {
  background: rgba(26, 111, 181, 0.07);
  color: #1A6FB5;
}

/* ── Icons & thumbnails in the nav bar ──────────────────────────────── */
.emqm-item-icon,
.emqm-item-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.emqm-item-icon img  { width: 18px; height: 18px; object-fit: contain; }
.emqm-item-thumb img { width: 22px; height: 22px; object-fit: cover; border-radius: 4px; }

/* ── Chevron ────────────────────────────────────────────────────────── */
.emqm-chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: #7a8fa6;
}
.emqm-item.emqm-active .emqm-chevron {
  transform: rotate(180deg);
  color: #1A6FB5;
}

/* ═════════════════════════════════════════════════════════════════════
   MEGA PANEL
   ===================================================================== */
.emqm-mega-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;            /* flush with bottom of nav bar */
  background: #fff;
  border-top: 2px solid #f0f4f8;
  box-shadow: 0 16px 40px rgba(15, 25, 35, 0.12);

  /* Hidden state */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
  z-index: 99998;
}

/* ── Open state ─────────────────────────────────────────────────────── */
.emqm-item.emqm-active .emqm-mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.emqm-mega-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
}

/* ── Grid of items ──────────────────────────────────────────────────── */
.emqm-mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 1100px) {
  .emqm-mega-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Each mega item ─────────────────────────────────────────────────── */
.emqm-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.18s ease, transform 0.18s ease;
  border: 1.5px solid transparent;
}
.emqm-mega-item:hover {
  background: #f4f8ff;
  border-color: #d8eaff;
  transform: translateX(3px);
}

/* Thumbnail (card image) */
.emqm-mega-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: #e8f0f8;
}
.emqm-mega-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Icon (SVG or image) */
.emqm-mega-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f0f7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1A6FB5;
}
.emqm-mega-icon img { width: 24px; height: 24px; object-fit: contain; }
.emqm-mega-icon--default { color: #1A6FB5; }

/* Text body */
.emqm-mega-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}
.emqm-mega-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f1923;
  line-height: 1.2;
}
.emqm-mega-sub {
  font-size: 12px;
  color: #7a8fa6;
  line-height: 1.4;
}

/* ── Backdrop (transparent, captures clicks to close) ───────────────── */
.emqm-backdrop {
  position: fixed;
  inset: 0;
  top: 96px; /* start below the nav bar */
  background: transparent;
  z-index: 99985; /* BELOW the mega panel (9998) so panel links are clickable */
  display: none;
}
.emqm-nav.emqm-open .emqm-backdrop {
  display: block;
}

/* ═════════════════════════════════════════════════════════════════════
   CTA BUTTON (right side)
   ===================================================================== */
.emqm-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.emqm-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #365679;
  color: #fff;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.2px;
  box-shadow: 0 3px 14px rgba(54, 86, 121, 0.38);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.emqm-cta-btn:hover {
  background: #264060;
  box-shadow: 0 4px 18px rgba(54, 86, 121, 0.45);
  transform: translateY(-1px);
  color: #fff;
}
.emqm-cta-icon { flex-shrink: 0; }

/* ═════════════════════════════════════════════════════════════════════
   HAMBURGER (mobile only)
   ===================================================================== */
.emqm-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
}
.emqm-hamburger:hover { background: rgba(26, 111, 181, 0.08); }

.emqm-ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: #0f1923;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Animated X when drawer is open */
.emqm-hamburger.emqm-ham-open .emqm-ham-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.emqm-hamburger.emqm-ham-open .emqm-ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.emqm-hamburger.emqm-ham-open .emqm-ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═════════════════════════════════════════════════════════════════════
   MOBILE DRAWER
   ===================================================================== */
.emqm-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 90vw;
  background: #fff;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(15, 25, 35, 0.18);

  /* Hidden state */
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.emqm-drawer.emqm-drawer-open {
  transform: translateX(0);
}

/* Header */
.emqm-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 18px;
  border-bottom: 1px solid #f0f4f8;
  flex-shrink: 0;
}
.emqm-drawer-logo {
  height: 54px;
  width: auto;
  object-fit: contain;
  max-width: 160px;
}
.emqm-drawer-logo-text {
  font-size: 18px;
  font-weight: 800;
  color: #0f1923;
}
.emqm-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #f4f7fb;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #555;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.emqm-drawer-close:hover { background: #fde8d4; color: #E8821A; }

/* ── Drawer menu list ───────────────────────────────────────────────── */
.emqm-drawer-menu {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}

.emqm-ditem { list-style: none; }

.emqm-drow {
  display: flex;
  align-items: center;
}

.emqm-dlink {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  color: #0f1923;
  text-decoration: none;
  flex: 1;
  transition: color 0.18s, background 0.18s;
}
.emqm-dlink:hover { color: #1A6FB5; background: rgba(26,111,181,0.05); }

.emqm-ditem--current .emqm-dlink { color: #E8821A; }

/* Icon in drawer */
.emqm-dicon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0f7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.emqm-dicon img { width: 18px; height: 18px; object-fit: contain; }
.emqm-dicon--placeholder { background: #f0f4f8; }

.emqm-dlabel { flex: 1; }

/* Expand toggle */
.emqm-dexpand {
  padding: 13px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #7a8fa6;
  display: flex;
  align-items: center;
  transition: color 0.18s, transform 0.2s;
  flex-shrink: 0;
}
.emqm-dexpand:hover { color: #1A6FB5; }
.emqm-dexpand.emqm-dexpand-open { transform: rotate(180deg); color: #1A6FB5; }

/* ── Sub-list ───────────────────────────────────────────────────────── */
.emqm-dsub {
  list-style: none;
  background: #fafcff;
  border-top: 1px solid #f0f4f8;
  border-bottom: 1px solid #f0f4f8;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}
.emqm-dsub.emqm-dsub-open { max-height: 800px; }

.emqm-dsub-item { list-style: none; }
.emqm-dsub-link {
  display: block;
  padding: 11px 22px 11px 56px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  text-decoration: none;
  transition: color 0.18s, background 0.18s;
  border-left: 2px solid transparent;
}
.emqm-dsub-link:hover { color: #1A6FB5; background: rgba(26,111,181,0.05); border-left-color: #1A6FB5; }
.emqm-dsub-item--current .emqm-dsub-link { color: #E8821A; border-left-color: #E8821A; }

/* ── Drawer footer CTA ──────────────────────────────────────────────── */
.emqm-drawer-footer {
  padding: 16px 22px 32px; /* extra bottom padding so CTA button is never cut off */
  border-top: 1px solid #f0f4f8;
  flex-shrink: 0;
}
.emqm-drawer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: #E8821A;
  color: #fff;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 14px rgba(232,130,26,0.35);
  transition: background 0.25s, box-shadow 0.25s;
}
.emqm-drawer-cta:hover {
  background: #1A6FB5;
  box-shadow: 0 4px 18px rgba(26,111,181,0.38);
  color: #fff;
}

/* ── Overlay behind drawer ──────────────────────────────────────────── */
.emqm-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 35, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 19999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s;
}
.emqm-drawer-overlay.emqm-overlay-active {
  opacity: 1;
  visibility: visible;
}

/* ═════════════════════════════════════════════════════════════════════
   RESPONSIVE — hide desktop menu, show hamburger
   ===================================================================== */
@media (max-width: 1024px) {
  .emqm-menu       { display: none; }
  .emqm-hamburger  { display: flex; }
  .emqm-cta-label  { display: none; } /* hide text, keep icon on tablet */
  .emqm-cta-btn    { padding: 9px 14px; }
}

@media (max-width: 600px) {
  .emqm-cta-btn    { display: none; } /* hide CTA entirely on small phones */
  .emqm-nav-inner  { padding: 0 18px; }
  .emqm-logo-img   { height: 56px !important; max-height: 56px !important; }
}

/* ═════════════════════════════════════════════════════════════════════
   UTILITY — hide mega panels on mobile (they don't show anyway)
   ===================================================================== */
@media (max-width: 1024px) {
  .emqm-mega-panel { display: none !important; }
  .emqm-backdrop   { display: none !important; }
}

/* ── Search panel open: disable backdrop-filter on nav ──────────────────
   backdrop-filter creates a stacking context that traps elements behind
   the nav even at z-index:99999. Removing it when the search panel is
   open lets the panel render correctly above everything.
   The class 'emqs-panel-active' is added to <body> by the search plugin. */
body.emqs-panel-active .emqm-nav,
body.emqs-panel-active .emqm-nav.emqm-scrolled {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 1 !important;
}
