/* Vig Tech X header — brand redesign */
.be-header {
  position: relative;
  z-index: 1000;
}

.be-header__accent {
  height: 3px;
  background: linear-gradient(90deg, #D4AF37 0%, #ffffff 50%, #8A9199 100%);
}

.be-header .rv-37-menubar.be-header__bar,
.rv-37-header .rv-37-menubar {
  position: relative;
  z-index: 999;
  background: #fff !important;
  /* no backdrop-filter — it traps position:fixed children */
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 33, 71, 0.08);
  box-shadow: 0 8px 24px rgba(0, 33, 71, 0.06);
  overflow: visible !important;
}

.be-header__inner.container-fluid,
.be-header .container-fluid {
  padding-left: 40px !important;
  padding-right: 40px !important;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.be-header__row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px;
  min-height: 78px;
  width: 100%;
}

.be-header__nav-host {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.be-header__logo,
.rv-37-header .rv-37-logo {
  width: auto !important;
  max-width: 110px;
  flex: 0 0 auto !important;
}

.be-header__logo img,
.rv-37-header .rv-37-logo img,
#be-header-sidebar .sidebar-heading img {
  max-height: 88px !important;
  width: auto !important;
  max-width: 96px !important;
  height: auto !important;
  display: block;
  object-fit: contain;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 2px 6px rgba(0, 33, 71, 0.18));
}

.be-header__actions,
.rv-37-header .rv-31-menu-right {
  display: flex !important;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto !important;
  width: auto !important;
  z-index: 5;
  position: relative;
}

.be-header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px !important;
  border-radius: 11px !important;
  font-family: var(--inter), "Inter", sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.be-header__btn--saffron,
.rv-37-header .rv-37-btn,
.rv-37-header .be-header__btn--saffron {
  background: #D4AF37 !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 8px 18px rgba(212, 175, 55, 0.28);
}

.be-header__btn--saffron:hover,
.rv-37-header .rv-37-btn:hover {
  background: #B8942E !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.be-header__btn--saffron i {
  font-size: 11px;
}

.be-header__icon-btn,
.rv-37-header .rv-1-header-mobile-menu-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 33, 71, 0.14) !important;
  background: #fff !important;
  color: #0A1F3D !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  z-index: 6;
}

.be-header__icon-btn:hover,
.rv-37-header .rv-1-header-mobile-menu-btn:hover {
  border-color: #D4AF37 !important;
  color: #D4AF37 !important;
}

.be-header__caret {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.rv-37-header .rv-37-menu-list__ul .sub-menu a::before {
  display: none !important;
}

/* Sticky state */
.rv-37-header .rv-37-menubar.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 8px 0;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(0, 33, 71, 0.12);
  z-index: 1000;
}

.rv-37-header .rv-37-menubar.fixed::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, #D4AF37 0%, #ffffff 50%, #8A9199 100%);
}

/* Overlay (lives on body when mobile) */
.be-header__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 33, 71, 0.5);
  z-index: 10040;
}

.be-header__overlay.is-open,
html.be-menu-open .be-header__overlay,
body.be-menu-open .be-header__overlay {
  display: block !important;
}

/* ========== TABLET + LAPTOP + DESKTOP (≥768px) ========== */
@media screen and (min-width: 768px) {
  /* Never show hamburger / drawer UI on tablet & laptop */
  #rv-1-header-mobile-menu-btn,
  .be-header__actions #rv-1-header-mobile-menu-btn {
    display: none !important;
  }

  .be-header__overlay,
  .be-header__overlay.is-open {
    display: none !important;
  }

  .be-header__sidebar,
  .rv-37-header .rv-1-header-nav__sidebar,
  #be-header-sidebar {
    display: flex !important;
    flex: 1 1 auto !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
    position: static !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .be-header .sidebar-heading,
  #be-header-sidebar .sidebar-heading {
    display: none !important;
  }

  .be-header__sidebar-cta.show-for-devices {
    display: none !important;
  }

  .rv-37-header a.rv-37-btn.hide-for-devices {
    display: inline-flex !important;
  }

  .be-header__nav .rv-37-menu-list__ul,
  .rv-37-header .rv-37-menu-list__ul,
  #be-header-sidebar .rv-37-menu-list__ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .rv-37-header .rv-37-menu-list__ul > li,
  #be-header-sidebar .rv-37-menu-list__ul > li {
    position: relative;
  }

  .rv-37-header .rv-37-menu-list__ul > li > a,
  #be-header-sidebar .rv-37-menu-list__ul > li > a {
    font-family: var(--inter), "Inter", sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: 0.01em;
    color: #0A1F3D !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px !important;
    border-radius: 10px;
    text-decoration: none;
  }

  .rv-37-header .rv-37-menu-list__ul > li > a:hover,
  .rv-37-header .rv-37-menu-list__ul > li:hover > a,
  #be-header-sidebar .rv-37-menu-list__ul > li > a:hover {
    color: #D4AF37 !important;
    background: rgba(212, 175, 55, 0.08);
  }

  #be-header-sidebar .rv-37-menu-list__ul > li:hover > a .be-header__caret {
    transform: rotate(180deg);
  }

  .be-header__caret {
    font-size: 11px !important;
  }

  .rv-37-header .rv-1-header__nav > ul > li .sub-menu,
  #be-header-sidebar .sub-menu {
    min-width: 180px;
    width: max-content;
    padding: 6px !important;
    row-gap: 2px !important;
    gap: 2px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(0, 33, 71, 0.1);
    background: #fff !important;
    box-shadow: 0 12px 28px rgba(0, 33, 71, 0.12) !important;
  }

  .rv-37-header .rv-37-menu-list__ul .sub-menu li,
  #be-header-sidebar .sub-menu li {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
  }

  .rv-37-header .rv-37-menu-list__ul .sub-menu a,
  #be-header-sidebar .sub-menu a {
    font-family: var(--inter), "Inter", sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    color: #0A1F3D !important;
    display: block;
    padding: 8px 12px !important;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
  }

  .rv-37-header .rv-37-menu-list__ul .sub-menu a:hover,
  #be-header-sidebar .sub-menu a:hover {
    background: rgba(0, 33, 71, 0.05);
    color: #D4AF37 !important;
  }

  .be-header__overlay {
    display: none !important;
  }
}

/* ========== PHONE ONLY (≤767px) ========== */
@media screen and (max-width: 767px) {
  .form {
    overflow: visible !important;
  }

  .be-header__inner.container-fluid,
  .be-header .container-fluid {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .be-header__nav-host:empty {
    display: none;
  }

  /* Keep host out of the flex row on mobile; JS moves drawer to body */
  .be-header__nav-host {
    display: none !important;
  }

  /* When still in host before JS moves it, hide from header row */
  .be-header__nav-host .be-header__sidebar {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
  }

  /* Drawer on body — closed */
  body > #be-header-sidebar,
  body > .rv-1-header-nav__sidebar.be-header__sidebar,
  #be-header-sidebar {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    width: min(320px, 88vw) !important;
    max-width: 320px !important;
    height: 100% !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 16px 0 32px !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: -16px 0 40px rgba(0, 33, 71, 0.2) !important;
    z-index: 10060 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    /* use right offset instead of transform — more reliable */
    transform: none !important;
    -webkit-transform: none !important;
    right: -110% !important;
    transition: right 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none !important;
  }

  body > #be-header-sidebar.active,
  body > .rv-1-header-nav__sidebar.be-header__sidebar.active,
  #be-header-sidebar.active,
  html.be-menu-open #be-header-sidebar,
  body.be-menu-open #be-header-sidebar {
    right: 0 !important;
    pointer-events: auto !important;
    transform: none !important;
    -webkit-transform: none !important;
  }

  #be-header-sidebar .sidebar-heading {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px 14px !important;
    margin: 0 0 8px !important;
    border-bottom: 1px solid rgba(0, 33, 71, 0.1) !important;
  }

  #be-header-sidebar .sidebar-heading img {
    max-height: 72px !important;
    max-width: 80px !important;
    width: auto !important;
    display: block !important;
    filter: drop-shadow(0 2px 6px rgba(0, 33, 71, 0.18));
  }

  #be-header-sidebar .rv-37-menu-list__ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 14px !important;
    list-style: none !important;
  }

  #be-header-sidebar .rv-37-menu-list__ul > li {
    width: 100% !important;
    display: block !important;
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  #be-header-sidebar .rv-37-menu-list__ul > li > a {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 14px 12px !important;
    border-radius: 10px !important;
    font-family: var(--inter), "Inter", sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.01em;
    color: #0A1F3D !important;
    background: transparent !important;
    text-decoration: none !important;
    white-space: normal !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  #be-header-sidebar .rv-37-menu-list__ul > li > a:hover {
    color: #D4AF37 !important;
    background: rgba(212, 175, 55, 0.08) !important;
  }

  #be-header-sidebar .sub-menu {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 2px 0 6px 8px !important;
    row-gap: 2px !important;
    gap: 2px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: none !important;
    pointer-events: auto !important;
  }

  #be-header-sidebar .rv-37-menu-list__ul > li.rv-dropdown-active > .sub-menu {
    display: flex !important;
    flex-direction: column !important;
  }

  #be-header-sidebar .sub-menu a {
    display: block !important;
    padding: 8px 10px !important;
    font-family: var(--inter), "Inter", sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    color: #0A1F3D !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    opacity: 1 !important;
  }

  #be-header-sidebar .be-header__sidebar-cta.show-for-devices {
    display: grid !important;
    gap: 10px;
    margin: 20px 16px 0;
  }

  #be-header-sidebar .be-header__sidebar-cta .be-header__btn {
    width: 100%;
  }

  .be-header__actions .be-header__btn--saffron.hide-for-devices,
  .rv-37-header a.rv-37-btn.hide-for-devices {
    display: none !important;
  }

  html.be-menu-open,
  body.be-menu-open {
    overflow: hidden !important;
  }
}

@media screen and (max-width: 1199px) and (min-width: 768px) {
  .be-header__inner.container-fluid,
  .be-header .container-fluid {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  #be-header-sidebar .rv-37-menu-list__ul {
    gap: 2px;
  }

  #be-header-sidebar .rv-37-menu-list__ul > li > a {
    padding: 9px 11px !important;
    font-size: 15px !important;
  }

  #be-header-sidebar .sub-menu a {
    font-size: 14px !important;
  }
}

@media screen and (max-width: 575px) {
  .be-header__inner.container-fluid,
  .be-header .container-fluid {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .be-header__logo img,
  .rv-37-header .rv-37-logo img {
    max-height: 68px !important;
    max-width: 74px !important;
  }

  .be-header__row {
    min-height: 64px;
    gap: 10px;
  }
}

@media screen and (max-width: 400px) {
  .be-header__inner.container-fluid,
  .be-header .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
