/**
 * Worqex Phase 5 — native Elementor mega menus.
 * Low-specificity selectors preserve Elementor's ability to override controls.
 */

:where(.worqex-native-header-phase5) {
  overflow: visible;
}

:where(.worqex-native-header-phase5 .worqex-mm-overlay) {
  display: none;
  position: fixed;
  inset: 80px 0 0 0;
  z-index: 38;
  background: rgba(6, 43, 44, 0.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: worqex-mm-rise 200ms cubic-bezier(.4,0,.2,1);
}

:where(.worqex-native-header-phase5 .worqex-mm-overlay.is-open) { display: block; }

:where(.worqex-native-header-phase5 .worqex-mega-menu) {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 80px;
  z-index: 39;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #E3EEEC;
  box-shadow: 0 40px 80px rgba(10,107,103,0.28);
  animation: worqex-mm-drop 220ms cubic-bezier(.4,0,.2,1);
}

:where(.worqex-native-header-phase5 .worqex-mega-menu.is-open) { display: flex; }

:where(.worqex-mega-menu .worqex-mm-accent) {
  min-height: 3px;
  height: 3px;
  background: linear-gradient(90deg,#12B5AE 0%,#2FD1CA 45%,#FFD23F 100%);
}

:where(.worqex-mega-menu .worqex-mm-grid) {
  display: grid !important;
  grid-template-columns: minmax(200px,250px) minmax(0,1fr) minmax(220px,300px);
  width: 100%;
  max-width: 1240px;
  min-height: 440px;
  margin: 0 auto;
  padding: 0 32px;
  align-items: stretch;
}

:where(.worqex-mega-menu .worqex-mm-left) {
  border-right: 1px solid #EDF4F3;
}

:where(.worqex-mega-menu .worqex-mm-label .elementor-heading-title) {
  letter-spacing: -.01em;
  line-height: 1.25;
}

:where(.worqex-mega-menu .worqex-mm-intro .elementor-heading-title) {
  line-height: 1.5;
  padding-right: 8px;
  text-wrap: pretty;
}

:where(.worqex-mega-menu .worqex-mm-tabs) { margin-top: 12px; }

:where(.worqex-mega-menu .worqex-mm-tab) {
  cursor: pointer;
  transition: background-color 160ms cubic-bezier(.4,0,.2,1);
}

:where(.worqex-mega-menu .worqex-mm-tab:hover,
       .worqex-mega-menu .worqex-mm-tab.is-active) {
  background: #F1FAF9 !important;
}

:where(.worqex-mega-menu .worqex-mm-tab .elementor-widget-button),
:where(.worqex-mega-menu .worqex-mm-tab .elementor-button-wrapper),
:where(.worqex-mega-menu .worqex-mm-tab .elementor-button) {
  width: 100%;
}

:where(.worqex-mega-menu .worqex-mm-tab .elementor-button) {
  justify-content: space-between;
}

:where(.worqex-mega-menu .worqex-mm-tab.is-active .elementor-button) { color: #0A6B67; }
:where(.worqex-mega-menu .worqex-mm-tab.is-active .elementor-button-icon) { color: #0B9A94; }

:where(.worqex-mega-menu .worqex-mm-search) { margin-top: auto; padding-top: 18px; }
:where(.worqex-mega-menu .worqex-mm-search .elementor-field-group) { margin: 0; }
:where(.worqex-mega-menu .worqex-mm-search input.elementor-field) {
  min-height: 38px;
  padding: 9px 11px 9px 34px;
  background-color: #F1FAF9;
  border: 1px solid #E3EEEC;
  border-radius: 9px;
  box-shadow: none;
  outline: none;
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #1A1A1A;
}
:where(.worqex-mega-menu .worqex-mm-search .elementor-form-fields-wrapper) { position: relative; }
:where(.worqex-mega-menu .worqex-mm-search .elementor-form-fields-wrapper)::before {
  content: "⌕";
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 2;
  transform: translateY(-52%);
  font-size: 18px;
  line-height: 1;
  color: #7A8391;
  pointer-events: none;
}
:where(.worqex-mega-menu .worqex-mm-search .elementor-field-type-submit,
       .worqex-mega-menu .worqex-mm-search button[type="submit"]) { display: none !important; }

:where(.worqex-mega-menu .worqex-mm-center) { min-width: 0; }
:where(.worqex-mega-menu .worqex-mm-panel) { display: none; animation: worqex-mm-rise 180ms cubic-bezier(.4,0,.2,1); }
:where(.worqex-mega-menu .worqex-mm-panel.is-active) { display: flex; }

:where(.worqex-mega-menu .worqex-mm-panel-head) {
  border-bottom: 1px solid #EDF4F3;
  padding-bottom: 10px;
}

:where(.worqex-mega-menu .worqex-mm-columns) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit,minmax(210px,1fr));
  gap: 28px !important;
}

:where(.worqex-mega-menu .worqex-mm-column-title) { margin-bottom: 7px; }
:where(.worqex-mega-menu .worqex-mm-column-title .elementor-heading-title) {
  letter-spacing: .14em;
  text-transform: uppercase;
}

:where(.worqex-mega-menu .worqex-mm-item) {
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.4,0,.2,1), background-color 180ms, border-color 180ms, box-shadow 180ms;
}

:where(.worqex-mega-menu .worqex-mm-item:hover) {
  background: #fff;
  border-color: #B9EBE8 !important;
  transform: translateX(4px);
  box-shadow: 0 10px 26px rgba(11,154,148,0.12);
}

:where(.worqex-mega-menu .worqex-mm-item-icon-wrap) {
  flex: 0 0 38px;
  box-shadow: 0 6px 14px rgba(11,154,148,0.25);
}

:where(.worqex-mega-menu .worqex-mm-item-icon .elementor-icon) { color: #fff; }
:where(.worqex-mega-menu .worqex-mm-item-copy) { min-width: 0; }
:where(.worqex-mega-menu .worqex-mm-item-title-link .elementor-button-wrapper) { text-align: left; }
:where(.worqex-mega-menu .worqex-mm-item-title-link .elementor-button) {
  width: auto;
  min-height: 0;
  justify-content: flex-start;
  line-height: 1.3;
}
:where(.worqex-mega-menu .worqex-mm-item-desc .elementor-heading-title) { line-height: 1.45; }
:where(.worqex-mega-menu .worqex-mm-item-arrow) { margin-top: 10px; flex: 0 0 auto; }
:where(.worqex-mega-menu .worqex-mm-item-arrow .elementor-icon) { color: #B9EBE8; }

:where(.worqex-mega-menu .worqex-mm-badge) {
  width: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: #FFD23F;
}
:where(.worqex-mega-menu .worqex-mm-badge .elementor-heading-title) { line-height: 1.4; }

:where(.worqex-mega-menu .worqex-mm-right) {
  min-width: 0;
  border-left: 1px solid #EDF4F3;
}
:where(.worqex-mega-menu .worqex-mm-featured-panel) { display: none; }
:where(.worqex-mega-menu .worqex-mm-featured-panel.is-active) { display: flex; }
:where(.worqex-mega-menu .worqex-mm-featured-card) {
  overflow: hidden;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.4,0,.2,1), border-color 180ms, box-shadow 180ms;
  animation: worqex-mm-rise 220ms cubic-bezier(.4,0,.2,1);
}
:where(.worqex-mega-menu .worqex-mm-featured-card:hover) {
  border-color: #2FD1CA !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(10,107,103,0.12);
}
:where(.worqex-mega-menu .worqex-mm-featured-image) {
  height: 96px;
  overflow: hidden;
  background: #F1FAF9;
  border-bottom: 1px solid #E3EEEC;
}
:where(.worqex-mega-menu .worqex-mm-featured-image img) {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-6px);
}
:where(.worqex-mega-menu .worqex-mm-featured-eyebrow) {
  align-self: flex-start;
  width: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFF3C2;
}
:where(.worqex-mega-menu .worqex-mm-featured-eyebrow .elementor-heading-title) {
  letter-spacing: .1em;
  text-transform: uppercase;
}
:where(.worqex-mega-menu .worqex-mm-featured-title .elementor-button-wrapper) { text-align: left; }
:where(.worqex-mega-menu .worqex-mm-featured-title .elementor-button) { justify-content: flex-start; line-height: 1.3; }

:where(.worqex-mega-menu .worqex-mm-quick) {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  border-top: 1px solid #EDF4F3;
  background: #F4FBFA;
}
:where(.worqex-mega-menu .worqex-mm-quick-label) { width: auto; margin-right: 8px; }
:where(.worqex-mega-menu .worqex-mm-quick-label .elementor-heading-title) {
  letter-spacing: .12em;
  text-transform: uppercase;
}
:where(.worqex-mega-menu .worqex-mm-quick-link),
:where(.worqex-mega-menu .worqex-mm-live-demo) { width: auto; }
:where(.worqex-mega-menu .worqex-mm-live-demo) { margin-left: auto; }

:where(.worqex-mega-menu .worqex-mm-search-results) { display: none; }
:where(.worqex-mega-menu .worqex-mm-search-results.is-active) { display: flex; }
:where(.worqex-mega-menu .worqex-mm-search-results-label .elementor-heading-title) {
  letter-spacing: .14em;
  text-transform: uppercase;
}
:where(.worqex-mega-menu .worqex-mm-search-results-grid) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit,minmax(210px,1fr));
  gap: 4px !important;
}
:where(.worqex-mega-menu .worqex-mm-search-results-grid .worqex-mm-item) { width: 100%; }

:where(.worqex-native-header-phase5 .worqex-mobile-drawer) { display: none; }

@keyframes worqex-mm-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes worqex-mm-drop {
  from { opacity: 0; transform: translateY(-8px) scale(.995); }
  to { opacity: 1; transform: none; }
}
@keyframes worqex-mm-slide {
  from { transform: translateX(100%); }
  to { transform: none; }
}

@media (max-width: 1080px) {
  :where(.worqex-native-header-phase5 .worqex-mm-overlay,
         .worqex-native-header-phase5 .worqex-mega-menu) { display: none !important; }
  :where(.worqex-native-header-phase5 .worqex-mobile-drawer) {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 60;
    height: 100dvh;
    overflow: hidden;
    background: #fff;
    animation: worqex-mm-slide 240ms cubic-bezier(.4,0,.2,1);
  }
  :where(.worqex-native-header-phase5 .worqex-mobile-drawer.is-open) { display: flex; }
  :where(.worqex-native-header-phase5 .worqex-mobile-head) {
    flex: 0 0 68px;
    border-bottom: 1px solid #E3EEEC;
  }
  :where(.worqex-native-header-phase5 .worqex-mobile-close) {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E3EEEC;
    border-radius: 9px;
    cursor: pointer;
  }
  :where(.worqex-native-header-phase5 .worqex-mobile-close .elementor-icon) { color: #0A6B67; }
  :where(.worqex-native-header-phase5 .worqex-mobile-body) {
    flex: 1 1 auto;
    overflow-y: auto;
  }
  :where(.worqex-native-header-phase5 .worqex-mobile-section) { border-bottom: 1px solid #EDF4F3; }
  :where(.worqex-native-header-phase5 .worqex-mobile-section-toggle .elementor-button) {
    width: 100%;
    justify-content: space-between;
  }
  :where(.worqex-native-header-phase5 .worqex-mobile-section-toggle.is-open .elementor-button-icon) { transform: rotate(180deg); }
  :where(.worqex-native-header-phase5 .worqex-mobile-section-body) { display: none; }
  :where(.worqex-native-header-phase5 .worqex-mobile-section-body.is-open) { display: flex; animation: worqex-mm-rise 200ms cubic-bezier(.4,0,.2,1); }
  :where(.worqex-native-header-phase5 .worqex-mobile-section-body .worqex-mm-item-icon-wrap) {
    flex-basis: 30px;
    width: 30px;
    min-height: 30px;
    border-radius: 8px;
    background: #E3F7F6 !important;
    box-shadow: none;
  }
  :where(.worqex-native-header-phase5 .worqex-mobile-section-body .worqex-mm-item-icon .elementor-icon) { color: #0B9A94; }
  :where(.worqex-native-header-phase5 .worqex-mobile-section-body .worqex-mm-item-arrow) { display: none; }
  :where(.worqex-native-header-phase5 .worqex-mobile-section-body .worqex-mm-item) {
    padding: 10px 8px;
    border: 0 !important;
  }
}

/* Elementor editing safeguard: reveal components while editing so each native
 * container/widget remains selectable. This never applies to public visitors. */
body.elementor-editor-active :where(.worqex-mega-menu) {
  display: flex !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 1 !important;
  box-shadow: none;
  margin-bottom: 24px;
}
body.elementor-editor-active :where(.worqex-mm-overlay) { display: none !important; }
body.elementor-editor-active :where(.worqex-mobile-drawer) {
  display: flex !important;
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  z-index: 1 !important;
  border: 1px solid #E3EEEC;
  margin-top: 24px;
}
html.worqex-mobile-menu-open,
html.worqex-mobile-menu-open body { overflow: hidden !important; }
