/* Unified mobile header and dropdown navigation for core pages */

.bt-mobile-actions,
.bt-mobile-dropdown {
  display: none;
}

@media (min-width: 769px) and (max-width: 1023px) {
  .page-home .navbar_header,
  .page-academy .navbar_header {
    top: 18px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(1320px, calc(100vw - 34px)) !important;
    background: transparent !important;
    border: 0 !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .page-home .navbar_header.hide,
  .page-academy .navbar_header.hide {
    transform: translate(-50%, -115%) !important;
  }

  .page-home .navbar_header > .container-fluid > .row,
  .page-academy .navbar_header > .container-fluid > .row {
    display: none !important;
  }

  .page-home .bt-topbar-shell,
  .page-academy .bt-topbar-shell {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    padding-inline: 0 !important;
  }
}

@media (min-width: 769px) and (max-width: 1000px) {
  .page-home .bt-topbar-cta,
  .page-home .bt-topbar-cta:hover,
  .page-home .bt-topbar-cta:focus-visible,
  .page-academy .bt-topbar-cta,
  .page-academy .bt-topbar-cta:hover,
  .page-academy .bt-topbar-cta:focus-visible,
  .page-indicator .bt-topbar-cta,
  .page-indicator .bt-topbar-cta:hover,
  .page-indicator .bt-topbar-cta:focus-visible {
    min-width: 76px !important;
    width: 76px !important;
    height: 40px !important;
    border-radius: 11px !important;
    border: 1px solid rgba(255, 185, 106, 0.68) !important;
    background: linear-gradient(180deg, #ffb14f 0%, #ff941e 54%, #f27605 100%) !important;
    color: transparent !important;
    box-shadow:
      0 0 18px rgba(255, 137, 30, 0.34),
      inset 0 1px 0 rgba(255, 239, 208, 0.48) !important;
    font-size: 0 !important;
    font-weight: 700 !important;
    padding: 0 !important;
    transform: none !important;
    justify-content: center !important;
    position: relative !important;
  }

  .page-home .bt-topbar-cta::after,
  .page-academy .bt-topbar-cta::after,
  .page-indicator .bt-topbar-cta::after {
    content: "PRO";
    color: #fff5e8;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
  }

  .page-home .bt-topbar-cta::before,
  .page-academy .bt-topbar-cta::before,
  .page-indicator .bt-topbar-cta::before {
    display: none !important;
  }
}

@media (max-width: 768px) {
  body.bt-mobile-menu-lock {
    overflow: hidden;
    touch-action: none;
  }

  .page-home .navbar_header,
  .page-academy .navbar_header {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 10px 12px 0 !important;
    z-index: 1300 !important;
  }

  .page-home .navbar_header > .container-fluid,
  .page-academy .navbar_header > .container-fluid {
    padding: 0 !important;
  }

  .page-home .navbar_header > .container-fluid > .row,
  .page-academy .navbar_header > .container-fluid > .row {
    display: none !important;
  }

  .page-home .bt-topbar-shell,
  .page-academy .bt-topbar-shell {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    padding: 0 !important;
  }

  .page-indicator .indicator-header {
    padding: 10px 12px 0 !important;
  }

  .page-indicator .indicator-topbar-shell {
    width: 100% !important;
  }

  .page-home .bt-topbar,
  .page-academy .bt-topbar,
  .page-indicator .bt-topbar,
  .analytics-hub-page .analytics-v5-topbar {
    min-height: 62px !important;
    border-radius: 18px !important;
    padding: 10px 12px !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
  }

  .page-home .bt-topbar-brand-full,
  .page-academy .bt-topbar-brand-full,
  .page-indicator .bt-topbar-brand-full,
  .analytics-hub-page .analytics-v5-logo img {
    height: 32px !important;
    max-width: none !important;
  }

  .page-home .bt-topbar-nav,
  .page-home .bt-topbar-right,
  .page-academy .bt-topbar-nav,
  .page-academy .bt-topbar-right,
  .page-indicator .bt-topbar-nav,
  .page-indicator .bt-topbar-right,
  .analytics-hub-page .analytics-v5-nav,
  .analytics-hub-page .analytics-v5-topbar__actions {
    display: none !important;
  }

  .bt-mobile-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    position: relative;
    z-index: 3;
  }

  .bt-mobile-pro {
    min-width: 76px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid rgba(255, 185, 106, 0.68);
    background: linear-gradient(180deg, #ffb14f 0%, #ff941e 54%, #f27605 100%);
    color: #fff5e8;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow:
      0 0 18px rgba(255, 137, 30, 0.34),
      inset 0 1px 0 rgba(255, 239, 208, 0.48);
  }

  .bt-mobile-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(128, 148, 189, 0.34);
    border-radius: 10px;
    background: rgba(8, 13, 23, 0.86);
    display: inline-grid;
    align-content: center;
    justify-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
  }

  .bt-mobile-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: rgba(241, 247, 255, 0.92);
    box-shadow: 0 0 8px rgba(255, 177, 92, 0.18);
  }

  .bt-mobile-toggle:focus-visible,
  .bt-mobile-close:focus-visible {
    outline: 2px solid rgba(255, 157, 54, 0.94);
    outline-offset: 2px;
  }

  .bt-mobile-dropdown {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1400;
    padding: 10px 12px 12px;
    background: linear-gradient(180deg, rgba(3, 5, 10, 0.98), rgba(3, 5, 9, 0.98));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 220ms ease,
      transform 220ms ease,
      visibility 0s linear 220ms;
  }

  .bt-mobile-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .bt-mobile-dropdown__inner {
    width: min(560px, 100%);
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 149, 38, 0.22);
    background:
      radial-gradient(circle at 80% -10%, rgba(255, 143, 40, 0.2), transparent 46%),
      linear-gradient(180deg, rgba(8, 11, 17, 0.96), rgba(6, 9, 15, 0.97));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.48);
    padding: 14px 14px 16px;
    overflow: auto;
  }

  .bt-mobile-dropdown__head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
  }

  .bt-mobile-dropdown__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }

  .bt-mobile-dropdown__brand img {
    width: auto;
    height: 34px;
    display: block;
    object-fit: contain;
  }

  .bt-mobile-close {
    margin-left: auto;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(130, 151, 194, 0.36);
    border-radius: 10px;
    background: rgba(8, 13, 23, 0.86);
    position: relative;
    cursor: pointer;
    padding: 0;
  }

  .bt-mobile-close::before,
  .bt-mobile-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 2px;
    margin-left: -10px;
    margin-top: -1px;
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.92);
  }

  .bt-mobile-close::before {
    transform: rotate(45deg);
  }

  .bt-mobile-close::after {
    transform: rotate(-45deg);
  }

  .bt-mobile-dropdown__lead {
    margin: 0;
    color: rgba(215, 223, 237, 0.86);
    font-size: 16px;
    line-height: 1.45;
  }

  .bt-mobile-dropdown__label {
    margin: 2px 0 0;
    color: #ff9d36;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .bt-mobile-routes {
    display: grid;
    gap: 10px;
  }

  .bt-mobile-route {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(112, 132, 172, 0.32);
    background:
      radial-gradient(circle at 96% 0%, rgba(255, 143, 40, 0.12), transparent 44%),
      linear-gradient(180deg, rgba(9, 14, 24, 0.92), rgba(8, 12, 20, 0.95));
    color: inherit;
    text-decoration: none;
  }

  .bt-mobile-route.is-active {
    border-color: rgba(255, 157, 54, 0.62);
    box-shadow:
      inset 0 0 0 1px rgba(255, 166, 74, 0.2),
      0 0 24px rgba(255, 137, 30, 0.18);
  }

  .bt-mobile-route__index {
    color: #ff9d36;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    min-width: 22px;
  }

  .bt-mobile-route__body {
    min-width: 0;
  }

  .bt-mobile-route__title {
    display: block;
    color: #eef4ff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.08;
  }

  .bt-mobile-route__desc {
    display: block;
    margin-top: 3px;
    color: rgba(191, 204, 230, 0.82);
    font-size: 13px;
    line-height: 1.35;
  }

  .bt-mobile-route__arrow {
    color: #ff9b31;
    font-size: 27px;
    line-height: 1;
    font-weight: 400;
  }

  .bt-mobile-links {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(112, 132, 172, 0.26);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
  }

  .bt-mobile-links a {
    color: rgba(198, 209, 231, 0.84);
    font-size: 14px;
    line-height: 1.25;
    text-decoration: none;
  }

  .bt-mobile-links a:hover {
    color: #ffbe79;
  }

  .bt-mobile-dropdown__cta {
    margin-top: 4px;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 186, 112, 0.66);
    background: linear-gradient(180deg, #ffb14f 0%, #ff941e 54%, #f27605 100%);
    color: #1f1206;
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 0 28px rgba(255, 144, 40, 0.34);
  }
}

@media (max-width: 767px) {
  .bt-mobile-dropdown__label {
    font-size: 14px;
  }

  .bt-mobile-route__index {
    font-size: 15px;
  }

  .bt-mobile-route__title {
    font-size: 17px;
  }

  .bt-mobile-route__desc {
    font-size: 12px;
  }

  .bt-mobile-links a {
    font-size: 13px;
  }

  .bt-mobile-dropdown__cta {
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .bt-mobile-dropdown__inner {
    border-radius: 18px;
    padding: 12px 10px 14px;
  }

  .bt-mobile-pro {
    min-width: 70px;
    height: 36px;
    font-size: 16px;
  }

  .bt-mobile-toggle,
  .bt-mobile-close {
    width: 36px;
    height: 36px;
  }

  .bt-mobile-route {
    padding: 11px 10px;
  }

  .bt-mobile-route__title {
    font-size: 16px;
  }

  .bt-mobile-dropdown__lead {
    font-size: 15px;
  }

  .bt-mobile-dropdown__cta {
    min-height: 50px;
    font-size: 15px;
  }
}
