/* ADVISER mobile off-canvas drawer — under 992px only
   Brand: dark navy glass + #0362c1 accents */

:root {
  --amd-navy: rgba(1, 22, 48, 0.88);
  --amd-navy-solid: #011630;
  --amd-panel: rgba(2, 36, 72, 0.78);
  --amd-blue: #0362c1;
  --amd-blue-soft: rgba(3, 98, 193, 0.35);
  --amd-text: #f2f6fb;
  --amd-muted: rgba(242, 246, 251, 0.62);
  --amd-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Animated hamburger in header */
.navbar-toggler.adviser-hamburger {
  display: none;
}
.adviser-hamburger__box {
  position: relative;
  display: block;
  width: 22px;
  height: 16px;
}
.adviser-hamburger__bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.32s var(--amd-ease),
    opacity 0.22s ease,
    top 0.32s var(--amd-ease);
}
.adviser-hamburger__bar:nth-child(1) { top: 0; }
.adviser-hamburger__bar:nth-child(2) { top: 7px; }
.adviser-hamburger__bar:nth-child(3) { top: 14px; }
.navbar-toggler.adviser-hamburger.is-active .adviser-hamburger__bar:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}
.navbar-toggler.adviser-hamburger.is-active .adviser-hamburger__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}
.navbar-toggler.adviser-hamburger.is-active .adviser-hamburger__bar:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

/* Drawer shell — body-level, above ScrollSmoother */
.adviser-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 10080;
  pointer-events: none;
  visibility: hidden;
}
.adviser-mobile-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.adviser-mobile-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(1, 18, 40, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s var(--amd-ease);
  -webkit-tap-highlight-color: transparent;
}
.adviser-mobile-drawer.is-open .adviser-mobile-drawer__backdrop {
  opacity: 1;
}

.adviser-mobile-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 360px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(165deg, rgba(3, 98, 193, 0.22) 0%, transparent 42%),
    linear-gradient(180deg, rgba(2, 42, 82, 0.92) 0%, var(--amd-navy-solid) 100%);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -24px 0 64px rgba(0, 12, 32, 0.45);
  color: var(--amd-text);
  transform: translate3d(104%, 0, 0);
  transition: transform 0.42s var(--amd-ease);
  padding:
    max(6px, env(safe-area-inset-top, 0px))
    max(14px, env(safe-area-inset-right, 0px))
    max(10px, env(safe-area-inset-bottom, 0px))
    14px;
  overflow: hidden;
}
.adviser-mobile-drawer.is-open .adviser-mobile-drawer__panel {
  transform: translate3d(0, 0, 0);
}
html[dir="rtl"] .adviser-mobile-drawer__panel {
  right: auto;
  left: 0;
  border-left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 24px 0 64px rgba(0, 12, 32, 0.45);
  transform: translate3d(-104%, 0, 0);
}
html[dir="rtl"] .adviser-mobile-drawer.is-open .adviser-mobile-drawer__panel {
  transform: translate3d(0, 0, 0);
}

/* Header */
.adviser-mobile-drawer__header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 4px 2px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.adviser-mobile-drawer__logo {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
}
.adviser-mobile-drawer__logo img {
  display: block;
  height: 34px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
.adviser-mobile-drawer__lang {
  display: none !important;
}
.adviser-mobile-drawer__lang-btn {
  display: none !important;
}
.adviser-mobile-drawer__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.adviser-mobile-drawer__close:hover,
.adviser-mobile-drawer__close:focus-visible {
  background: rgba(3, 98, 193, 0.35);
  border-color: rgba(3, 98, 193, 0.55);
  outline: none;
}
.adviser-mobile-drawer__close:active {
  transform: scale(0.96);
}
.adviser-mobile-drawer__close-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: block;
}
.adviser-mobile-drawer__close-icon::before,
.adviser-mobile-drawer__close-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.adviser-mobile-drawer__close-icon::before { transform: rotate(45deg); }
.adviser-mobile-drawer__close-icon::after { transform: rotate(-45deg); }

/* Nav links */
.adviser-mobile-drawer__nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 8px 2px 6px;
  overscroll-behavior: contain;
}
.adviser-mobile-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adviser-mobile-drawer__link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px 8px 14px;
  border-radius: 12px;
  color: var(--amd-text) !important;
  text-decoration: none !important;
  font-family: "Barlow Semi Condensed", "Cairo", sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s var(--amd-ease),
    padding-inline-start 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}
.adviser-mobile-drawer__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 2px;
  background: var(--amd-blue);
  transform: translateY(-50%);
  transition: height 0.25s var(--amd-ease);
  opacity: 0;
}
html[dir="rtl"] .adviser-mobile-drawer__link::before {
  left: auto;
  right: 0;
}
.adviser-mobile-drawer__link:hover,
.adviser-mobile-drawer__link:focus-visible {
  background: rgba(3, 98, 193, 0.16);
  color: #fff !important;
  outline: none;
  padding-inline-start: 20px;
}
.adviser-mobile-drawer__link.active {
  background: rgba(3, 98, 193, 0.22);
  color: #fff !important;
  font-weight: 600;
}
.adviser-mobile-drawer__link.active::before,
.adviser-mobile-drawer__link:hover::before,
.adviser-mobile-drawer__link:focus-visible::before {
  height: 18px;
  opacity: 1;
}
.adviser-mobile-drawer__link.is-cta {
  margin-top: 4px;
  justify-content: center;
  background: linear-gradient(135deg, var(--amd-blue), #024a91);
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(3, 98, 193, 0.28);
}
.adviser-mobile-drawer__link.is-cta::before {
  display: none;
}
.adviser-mobile-drawer__link.is-cta:hover,
.adviser-mobile-drawer__link.is-cta:focus-visible {
  padding-inline-start: 14px;
  filter: brightness(1.06);
}

/* Footer CTAs hidden — Book now lives once in the drawer nav list */
.adviser-mobile-drawer__footer {
  display: none !important;
}
.adviser-mobile-drawer__book {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0362c1, #194172);
  color: #fff !important;
  text-decoration: none !important;
  font-family: "Barlow Semi Condensed", "Cairo", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 28px rgba(3, 98, 193, 0.3);
  transition: filter 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.adviser-mobile-drawer__book:hover,
.adviser-mobile-drawer__book:focus-visible {
  filter: brightness(1.07);
  outline: none;
}
.adviser-mobile-drawer__book:active {
  transform: scale(0.98);
}
.adviser-mobile-drawer__quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.adviser-mobile-drawer__quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--amd-text) !important;
  text-decoration: none !important;
  font-family: "Barlow Semi Condensed", "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.adviser-mobile-drawer__quick-btn:hover,
.adviser-mobile-drawer__quick-btn:focus-visible {
  background: rgba(3, 98, 193, 0.22);
  border-color: rgba(3, 98, 193, 0.45);
  outline: none;
}
.adviser-mobile-drawer__quick-btn i {
  font-size: 16px;
  color: #5ba0e0;
}
.adviser-mobile-drawer__quick-btn--wa i {
  color: #25d366;
}

/* Desktop: drawer never shown; hamburger stays Bootstrap-hidden via adviser.css */
@media (min-width: 992px) {
  .adviser-mobile-drawer {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .navbar-toggler.adviser-hamburger {
    display: inline-flex !important;
  }
  /* In-nav Bootstrap collapse stays closed — drawer owns mobile menu */
  .navbar .navbar-collapse,
  .navbar .navbar-collapse.show,
  .navbar .navbar-collapse.collapsing {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body.adviser-nav-open {
    overflow: hidden !important;
    touch-action: none;
  }
  body.adviser-nav-open #smooth-wrapper {
    /* Drawer is body-level; no need to unlock wrapper stacking */
    overflow: hidden !important;
  }
}
