/* ------------------------------------------------------------------
   Compensations for the runtime that the WordPress export lost to a
   filename collision (Elementor's frontend.min.js). These rules only
   restore what that script would have set at load time — no redesign.
   ------------------------------------------------------------------ */

/* Elementor "stretched" sections are stretched to the viewport width by JS at
   runtime. The export froze a stale inline `width:800px; left:0` on them, which
   left white space on the right. Force them back to full width. */
.elementor-section.elementor-section-stretched {
  width: 100% !important;
  left: 0 !important;
  right: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Guard against any horizontal overflow from the breakout above. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ---- Header nav: submenu caret only on items that actually have a submenu ----
   Astra outputs its caret SVG as the first child of every menu link. Move it
   after the label, and hide it on items without a submenu (Careers, Partnership,
   Contact, Field Team) so only About Us and Our Services show a dropdown arrow. */
.main-header-menu .menu-link {
  display: inline-flex;
  align-items: center;
}
.main-header-menu .menu-item > .menu-link > .ast-icon.icon-arrow {
  order: 10;
  margin-left: 6px;
}
.main-header-menu > .menu-item:not(.menu-item-has-children) > .menu-link > .ast-icon.icon-arrow {
  display: none !important;
}
/* The mobile submenu toggle button shows a duplicate caret on desktop — hide it. */
.main-header-menu .dropdown-menu-toggle {
  display: none !important;
}

/* Desktop dropdowns: the export's menu JS (smartmenus) parks each submenu
   off-screen (left:-999em) and repositions it on hover at runtime. With that JS
   gone, reveal the submenu on hover for the items that have one (About Us,
   Our Services) via pure CSS. */
.main-header-menu .menu-item-has-children {
  position: relative;
}
.main-header-menu .menu-item-has-children > .sub-menu {
  top: 100%;
}
.main-header-menu .menu-item-has-children:hover > .sub-menu,
.main-header-menu .menu-item-has-children:focus-within > .sub-menu,
.main-header-menu .menu-item-has-children.vh-open > .sub-menu {
  left: 0 !important;
  right: auto !important;
  margin: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
  transform: none !important;
}
/* Nested (third-level) submenus open to the side of their parent item. */
.main-header-menu .sub-menu .menu-item-has-children:hover > .sub-menu,
.main-header-menu .sub-menu .menu-item-has-children.vh-open > .sub-menu {
  left: 100% !important;
  top: 0 !important;
}

/* ---- Hero valknut logo: anchor it to the ridge and enlarge it ----
   The export gave it a fixed top offset + small size, so on wide/short screens
   it shrank below the fold behind the ridge. Anchor to the bottom (the ridge)
   and make it the prominent centered mark. */
.elementor-element-6dc1db8 img {
  width: 230px !important;
  max-width: 42vw !important;
}
.elementor-element-6dc1db8 {
  transform: translateY(-14vh) !important;
}

/* ---- Self-contained carousel (replaces the export's dead Slick instance) ---- */
.vh-carousel {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}
.vh-viewport { overflow: hidden; flex: 1 1 0; min-width: 0; }
.vh-track { display: flex; transition: transform 0.6s ease; will-change: transform; }
.vh-slide { flex: 0 0 33.3333%; max-width: 33.3333%; box-sizing: border-box; }
.vh-arrow {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border: none; border-radius: 50%;
  background: #b7e0f5; color: #0b2a3a;
  font-size: 24px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s ease, transform 0.15s ease;
}
.vh-arrow:hover { background: #93cff0; transform: scale(1.06); }
.vh-dots {
  flex: 0 0 100%;
  display: flex; justify-content: center; gap: 9px;
  margin-top: 22px;
}
.vh-dot {
  width: 11px; height: 11px; padding: 0;
  border: none; border-radius: 50%;
  background: #9aa0a6; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.vh-dot:hover { transform: scale(1.15); }
.vh-dot.active { background: #3aa0dc; }

/* Blog post sidebar (Latest Blogs): keep it in the right column and sticky while
   the article scrolls. Search/author/meta/comments were removed from these pages. */
.vh-blog-sidebar {
  align-self: flex-start;
  position: -webkit-sticky;
  position: sticky;
  top: 100px;
}
/* Ancestors must not clip, or sticky won't engage. */
.vh-blog-sidebar,
.vh-blog-sidebar .elementor-widget-wrap { overflow: visible; }

/* ---- "Apply Job" button + application popup (see public/_apply.js) ---- */
/* Make the Apply button pop: gradient, lift on hover, subtle sheen. */
a.vh-apply-btn {
  background-image: linear-gradient(135deg, #2f6fb0 0%, #3aa0dc 100%) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 9px !important;
  box-shadow: 0 6px 18px rgba(47, 111, 176, 0.35) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
  cursor: pointer;
}
a.vh-apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(47, 111, 176, 0.45) !important;
  filter: brightness(1.05);
}
a.vh-apply-btn:active { transform: translateY(0); }

/* Overlay + modal */
.vh-apply-overlay {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(10, 25, 40, 0.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.vh-apply-overlay.vh-open { opacity: 1; visibility: visible; }
.vh-apply-modal {
  position: relative;
  width: min(940px, 94vw); height: min(88vh, 920px);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.vh-apply-overlay.vh-open .vh-apply-modal { transform: translateY(0) scale(1); }
.vh-apply-frame { width: 100%; height: 100%; border: 0; display: block; }
.vh-apply-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); color: #0b2a3a;
  font-size: 26px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease, transform 0.15s ease;
}
.vh-apply-close:hover { background: #fff; transform: scale(1.08); }
.vh-apply-loader {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: Arial, sans-serif; font-size: 15px; color: #4a5b68;
  background: #f6f9fc;
}
.vh-apply-loader.vh-hide { display: none; }
.vh-apply-spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid #d3e2ef; border-top-color: #3aa0dc;
  animation: vh-apply-spin 0.8s linear infinite;
}
@keyframes vh-apply-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .vh-apply-overlay { padding: 0; }
  .vh-apply-modal { width: 100vw; height: 100vh; border-radius: 0; }
}

/* ---- Header dropdown: remove the divider lines that appear only on the home
   page (Astra's .submenu-with-border adds a 1px border via a home-only sheet). ---- */
.submenu-with-border .sub-menu .menu-link,
.main-navigation .sub-menu .menu-link,
.sub-menu .menu-link,
.sub-menu a { border-top: 0 !important; border-bottom: 0 !important; }

/* ---- Mobile off-canvas menu (see initMobileNav in _widgets.js) ---- */
/* The drawer ships both a mobile and a desktop content block; only the mobile
   one belongs in the hamburger drawer, so hide the desktop duplicate. */
.ast-mobile-popup-drawer .ast-desktop-popup-content { display: none !important; }
/* Expanded sub-menu (caret tapped) flows inline inside the drawer. */
.ast-mobile-popup-content .menu-item.vh-sub-open > .sub-menu,
.ast-mobile-popup-drawer .menu-item.vh-sub-open > .sub-menu {
  display: block !important;
  position: static !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  box-shadow: none !important;
  left: auto !important;
}

/* Mobile drawer menu must always stack vertically. The drawer is only ever the
   off-canvas hamburger menu, but the export kept the desktop row layout, so on
   wider phones/tablets the items wrapped into a cramped horizontal grid. Force a
   single-column list with full-width rows at every width the drawer appears. */
.ast-mobile-popup-drawer .main-header-menu,
.ast-mobile-popup-content .main-header-menu,
.ast-mobile-popup-drawer .sub-menu {
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
}
.ast-mobile-popup-drawer .main-header-menu .menu-item {
  width: 100% !important;
  flex: 0 0 auto !important;
}

/* Mobile drawer sub-menus are a plain inline list — never the desktop "bordered
   card" panel. Kill any border/box-shadow/outline/absolute-positioning that the
   theme's dropdown styling (e.g. .submenu-with-border) would otherwise draw as a
   weird rectangle around the expanded items in the drawer. */
.ast-mobile-popup-drawer .sub-menu,
.ast-mobile-popup-drawer .menu-item.vh-sub-open > .sub-menu {
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  min-width: 0 !important;
}

/* Mobile drawer: make expandable parents (About Us, Our Services, Areas We Serve)
   obviously tappable — a wide arrow that rotates when open, taller rows, and the
   whole row acts as the toggle (see initMobileNav; these labels are href="#"). */
.ast-mobile-popup-drawer .menu-item-has-children > .menu-link { cursor: pointer; }
.ast-mobile-popup-drawer .main-header-menu .menu-link {
  padding-top: 15px !important;
  padding-bottom: 15px !important;
}
.ast-mobile-popup-drawer .ast-menu-toggle {
  min-width: 56px !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.ast-mobile-popup-drawer .ast-menu-toggle svg,
.ast-mobile-popup-drawer .ast-menu-toggle .ast-icon {
  width: 18px;
  height: 18px;
}
/* Rotate the arrow to point up while the sub-menu is open. */
.ast-mobile-popup-drawer .menu-item.vh-sub-open > .ast-menu-toggle,
.ast-mobile-popup-drawer .menu-item.vh-sub-open > .menu-link > .ast-menu-toggle,
.ast-mobile-popup-drawer .menu-item.vh-sub-open > .menu-link .ast-menu-toggle {
  transform: rotate(180deg);
}
/* Indent nested sub-menu items so the hierarchy reads clearly. */
.ast-mobile-popup-drawer .sub-menu .menu-link { padding-left: 24px !important; }
.ast-mobile-popup-drawer .sub-menu .sub-menu .menu-link { padding-left: 44px !important; }
