/* Vsquare clean navbar - isolated from template rules
   - Desktop: wide pill white bar, centered links, hover dropdowns
   - Dropdowns: always visible (no clipping), no page scroll needed
   - Sticky: works the same because containers never hide overflow
*/
:root {
  --vs-primary: #df4923;
  --vs-text: #241c37;
  --vs-shadow: 0 10px 30px rgba(0,0,0,.06);
  --vs-hover-text: #251444; /* requested hover text color */
  --vs-dot: #DF4293;        /* requested right-side dot color */
}

/* Wrapper mimics screenshot: pill white on transparent page bg */
.vs-header {
  position: sticky; /* default: stick at top */
  top: 0;
  z-index: 100000; /* keep above content */
  display: block;
  padding: 12px 0; /* reduced padding for tighter navbar */
  transition: transform .2s ease, opacity .2s ease;
}
/* Ensure sticky works across browsers */
.page-wrapper { position: relative; }
/* On index (home) only: overlay hero with a small gap like screenshot */
.home .vs-header { position: fixed; left: 0; right: 0; top: 20px; }

/* Reveal/hide behavior classes controlled by JS */
.vs-header--pinned { transform: translateY(0); opacity: 1; }
.vs-header--unpinned { transform: translateY(-110%); opacity: .99; }

/* Inner pages: keep default flow without extra gaps */
body:not(.home) .page-wrapper { padding-top: 0; }
body:not(.home) .page-header { margin-top: 0 !important; }

.vs-header__wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
  background: #fff;
  border-radius: 56px;
  box-shadow: var(--vs-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: visible !important; /* never clip dropdowns */
  height: 100px;
}

/* Logo: Large size but contained within navbar */
.vs-header__logo { 
  display: flex; 
  align-items: center; 
  height: 100%; 
  overflow: visible; 
  position: relative;
  z-index: 2;
  padding: 10px 0;
}
.vs-header__wrap { height: 100px; }
.vs-header__logo img { 
  height: 100% !important; 
  max-height: 72px; /* slightly smaller logo on desktop */
  width: auto; 
  display: block; 
  max-width: 320px; 
  object-fit: contain;
  position: relative;
}
@media (min-width: 1200px) { 
  .vs-header__logo img { 
    max-height: 80px; /* slightly smaller on large screens as well */
    max-width: 340px; 
  } 
}
@media (max-width: 991.98px) { 
  .vs-header__logo { 
    min-height: 80px; 
    position: static;
    margin-right: auto;
  } 
  .vs-header__wrap { 
    height: auto; 
    flex-direction: column;
    padding: 15px;
  } 
  .vs-header__logo img { 
    height: 100px !important; 
    max-width: 280px; 
    position: relative; 
    top: 0;
    margin: 0 auto;
  } 
  .vs-nav {
    width: 100%;
    margin-top: 15px;
  }
  .vs-nav__list {
    justify-content: center;
    margin-left: 0;
  }
}

/* Burger for mobile */
.vs-burger { display: none; background: none; border: 0; padding: 8px; }
.vs-burger span{ display:block; width:24px; height:2px; background:#333; margin:5px 0; }

/* Nav */
.vs-nav { position: relative; }
.vs-nav__list { 
  display: flex; 
  align-items: center; 
  justify-content: flex-end; 
  gap: 36px; 
  list-style: none; 
  margin: 0; 
  padding: 0;
  flex: 1;
}
.vs-nav__link { color: var(--vs-text); font-weight:600; font-size:18px; text-decoration:none; display:inline-block; padding:10px 0; }
.vs-nav__link:focus, .vs-nav__link:active, .vs-nav__link[aria-current="page"] { color: var(--vs-primary); }

/* Dropdown base */
.vs-dropdown { position: relative; }
.vs-dropdown__menu {
  position: absolute; top: 100%; left: 0; /* no gap to prevent hover drop */
  min-width: 360px; background:#fff; border-radius:14px; /* curved dropdown */
  border: 1px solid rgba(0,0,0,.05); /* subtle edge for cleaner UI */
  box-shadow: 0 18px 50px rgba(0,0,0,.12);
  padding: 14px 16px; margin:0; list-style:none;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  z-index: 9999;
  max-height: min(60vh, 520px); /* limit height so it can scroll */
  overflow-y: auto; /* enable internal scroll */
  overscroll-behavior: contain; /* prevent page scroll while scrolling dropdown */
  -webkit-overflow-scrolling: touch; /* smooth on iOS */
  overflow-x: hidden; /* clip horizontally to rounded edges */
  pointer-events: none; /* avoid accidental hover flickers */
}
/* hover bridge so cursor can cross to dropdown without closing */
.vs-dropdown__menu::before { content:""; position:absolute; left:0; right:0; top:-10px; height:10px; }
/* visible state */
.vs-dropdown:hover > .vs-dropdown__menu,
.vs-dropdown.is-open > .vs-dropdown__menu { pointer-events: auto; }
/* Sub items */
.vs-dropdown__menu > li { width:100%; }
/* remove hard dividers; use spacing instead */
.vs-dropdown__menu > li + li { border-top:none; margin-top:6px; }
.vs-dropdown__menu a { display:block; padding:12px 36px 12px 16px; color:#4a4a4a; text-decoration:none; white-space:nowrap; position:relative; border-radius:10px; transition:background .2s ease, box-shadow .2s ease, color .2s ease; }
/* Right-side hover dot (hidden by default) */
.vs-dropdown__menu a::before { content:""; position:absolute; right:12px; top:50%; width:8px; height:8px; background: var(--vs-dot); border-radius:50%; transform: translateY(-50%); opacity:0; transition: opacity .2s ease; pointer-events:none; }
/* Hover styles per request */
.vs-dropdown__menu a:hover { color: var(--vs-hover-text); background:#f6f3f2; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.vs-dropdown__menu a:hover::before { opacity:1; }

/* Open on hover (desktop) */
@media (hover:hover) and (pointer:fine) {
  .vs-dropdown:hover > .vs-dropdown__menu,
  .vs-dropdown:focus-within > .vs-dropdown__menu { /* also open when focusing with keyboard */
    opacity:1; visibility:visible; transform:translateY(0);
  }
}
/* also allow open state via JS for dynamic/async builds */
.vs-dropdown.is-open > .vs-dropdown__menu { opacity:1; visibility:visible; transform:translateY(0); }

/* Mega dropdown for Our Solutions (same white UI as other dropdowns) */
.vs-dropdown--mega { position: static !important; }
.vs-dropdown--mega > .vs-dropdown__menu {
  /* Center the panel and keep it within viewport */
  left: 50% !important; top: 100%;
  width: min(1100px, calc(100vw - 64px)) !important; /* leave 32px margin on both sides */
  margin: 0; padding: 16px;
  display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 20px;
  background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,.05);
  max-height: min(65vh, 560px); /* allow scrolling inside mega */
  overflow-y: auto; /* internal scroll */
  overscroll-behavior: contain; /* stop page scroll while scrolling mega */
  z-index: 100000; /* keep above CTA/hero */
  /* No animation: keep centered without vertical offset */
  transform: translateX(-50%);
  transition: none !important;
}
/* Ensure mega stays centered when visible */
.vs-dropdown--mega:hover > .vs-dropdown__menu,
.vs-dropdown--mega.is-open > .vs-dropdown__menu,
.vs-dropdown--mega:focus-within > .vs-dropdown__menu {
  transform: translate(-50%, 0) !important;
}
/* Hide right-side hover dot inside mega so it never overlaps text */
.vs-dropdown--mega .vs-dropdown__menu a::before { display: none !important; }
.vs-dropdown--mega > .vs-dropdown__menu > li { list-style: none; }
/* 3-panel columns */
.vs-mega3__col--l1 .vs-mega3__l1 > li > a { font-weight:700; color:#241c37; display:block; padding:10px 12px; border-radius:8px; }
.vs-mega3__col--l2 .vs-mega3__l2group > li > a { font-weight:600; color:#4a4a4a; display:block; padding:8px 12px; border-radius:8px; }
.vs-mega3__col--l3 .vs-mega3__l3group > li > a { color:#4a4a4a; display:block; padding:8px 12px; border-radius:8px; }
/* remove inner dividers; rely on spacing */
.vs-mega3__col--l1 .vs-mega3__l1 > li + li,
.vs-mega3__col--l2 .vs-mega3__l2group > li + li,
.vs-mega3__col--l3 .vs-mega3__l3group > li + li { border-top:none; margin-top:6px; }
/* soften column separation */
.vs-mega3__col + .vs-mega3__col { border-left:1px dashed rgba(0,0,0,.06); padding-left:16px; }

/* Show/hide groups */
.vs-mega3__l2group, .vs-mega3__l3group { margin:0; padding:0; list-style:none; }
.vs-mega3__l1, .vs-mega3__l2group, .vs-mega3__l3group { max-height:none; }

/* Ensure dropdown remains visible when hovering over the mega menu */
.vs-dropdown--mega:hover > .vs-dropdown__menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate(-50%, 0) !important; /* keep centered when opened */
}

/* Default state: only first L2 and L3 groups visible */
.vs-mega3__l2group, .vs-mega3__l3group {
  display: none;
}
.vs-mega3__l2group:first-child, .vs-mega3__l3group:first-child {
  display: block;
}

/* Hover colors */
.vs-mega3__col a:hover { color: var(--vs-hover-text); background:transparent; }

/* Maintain hover interactions */
@media (hover:hover) and (pointer:fine) {
  .vs-dropdown--mega:hover > .vs-dropdown__menu,
  .vs-dropdown--mega:focus-within > .vs-dropdown__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
}

/* Extra: Products dropdown force-open class support for async/dynamic rendering */
.vs-dropdown--products.is-open > .vs-dropdown__menu { opacity:1; visibility:visible; transform:translateY(0); pointer-events:auto; }

/* CTA */
.vs-btn { display:inline-flex; align-items:center; gap:10px; border-radius:999px; padding:12px 22px; text-decoration:none; font-weight:800; text-transform:uppercase; letter-spacing:.02em; }
.vs-btn--primary { background: var(--vs-primary); color:#fff; }
.vs-btn__icon { display:inline-flex; }

/* Containers never clip dropdowns */
.vs-header, .vs-header__wrap, .vs-nav, .vs-nav__list, body, html, .page-wrapper, .container, .container-fluid,
.main-header, .main-header__inner, .main-header__nav, .main-menu, .main-menu__list, .sticky-header--cloned {
  overflow: visible !important;
}

/* Prevent horizontal scrollbars */
html, body { overflow-x: hidden; }

/* Remove unintended white gap at top of index by killing top margins on first section/hero */
.home .page-wrapper > *:first-child { margin-top: 0 !important; }
.home .hero, .home .banner, .home .slider, .home .main-slider { margin-top: 0 !important; padding-top: 0 !important; }

/* Mobile collapse */
@media (max-width: 991.98px) {
  .vs-burger { display: inline-block; }
  .vs-header__wrap { grid-template-columns: auto auto 1fr; }
  .vs-nav { position: static; }
  .vs-nav__list { display:none; flex-direction:column; align-items:flex-start; gap:0; padding:8px 0; }
  .vs-nav__item { width:100%; }
  .vs-nav__link { padding:12px 8px; width:100%; }
  .vs-dropdown__menu { position: static; top:auto; left:auto; box-shadow:none; padding:0; opacity:1; visibility:visible; transform:none; }
  .vs-dropdown__menu > li + li { border-top:none; }
  .vs-nav.is-open .vs-nav__list { display:flex; }
}