/**
 * Maestro header — sticky bar, nav hover, mega menu.
 */

:root {
  --maestro-nav-bg: var(--maestro-navy, #1a2e46);
  --maestro-dropdown-bg: #ffffff;
  --maestro-dropdown-feature-bg: #f6f6f8;
  --maestro-dropdown-border: rgba(12, 9, 10, 0.08);
  --maestro-dropdown-text: var(--maestro-black, #0c090a);
  --maestro-dropdown-muted: rgba(12, 9, 10, 0.62);
}

/* ── Sticky full-width header ─────────────────────────────────────────── */

.absolute-headers.fixed-header {
  animation: maestroHeaderSlideDown 0.45s ease-out;
}

.absolute-headers.fixed-header .maestro-header-inner {
  max-width: none;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

@keyframes maestroHeaderSlideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

.absolute-headers,
.header,
.maestro-header-nav,
.maestro-header-inner,
.header-menu,
.nav-menu {
  overflow: visible !important;
}

/* ── Logo & nav bar ───────────────────────────────────────────────────── */

.maestro-header-nav {
  width: 100%;
  transition:
    background-color 0.35s ease,
    backdrop-filter 0.35s ease,
    box-shadow 0.35s ease;
}

.maestro-header-inner {
  width: 100%;
}

.maestro-header-nav--glass {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.maestro-header-nav--solid,
.absolute-headers.fixed-header .maestro-header-nav--glass {
  background: var(--maestro-nav-bg, #1a2e46) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

@media (max-width: 991px) {
  .absolute-headers.md-bg-main-two-600 {
    background-color: var(--maestro-nav-bg, #1a2e46) !important;
  }
}

.maestro-header-nav-main {
  min-width: 0;
  background: transparent !important;
}

.maestro-header-logo {
  background: transparent !important;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.maestro-header-logo img {
  display: block;
  width: auto;
  height: 40px;
  max-width: 175px;
  object-fit: contain;
}

/* ── Top header bar ───────────────────────────────────────────────────── */

.maestro-top-header {
  font-size: calc(14px / var(--maestro-ui-scale, 0.9));
}

/* ── Nav bar layout ───────────────────────────────────────────────────── */

@media (min-width: 992px) {
  .header-menu {
    display: flex !important;
    align-items: stretch;
  }

  .header-menu .nav-menu {
    height: 100%;
    align-items: stretch !important;
  }

  .nav-menu__item {
    display: flex;
    align-items: stretch;
  }

  .nav-menu__item > .maestro-nav-link {
    height: 100%;
    padding-block: 1.75rem;
    padding-inline: 0.35rem;
  }
}

/* ── Top-level nav links ──────────────────────────────────────────────── */

.maestro-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: calc(14px / var(--maestro-ui-scale, 0.9));
  transition: color 0.2s ease;
}

.links-white .maestro-nav-link {
  color: #fff !important;
}

.links-white .maestro-nav-chevron {
  color: var(--maestro-primary, #ffbb02);
}

.links-white .nav-menu__item:hover > .maestro-nav-link,
.links-white .nav-menu__item.activePage > .maestro-nav-link {
  color: var(--maestro-primary, #ffbb02) !important;
}

@media (min-width: 992px) {
  .maestro-nav-link::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 3px;
    background: var(--maestro-primary, #ffbb02);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-menu__item:hover > .maestro-nav-link::after,
  .nav-menu__item.activePage > .maestro-nav-link::after {
    transform: scaleX(1);
  }
}

.maestro-nav-chevron {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}

.nav-menu__item:hover > .maestro-nav-link .maestro-nav-chevron,
.has-mega-menu.active > .maestro-nav-link .maestro-nav-chevron {
  transform: rotate(180deg);
}

.has-mega-menu > .maestro-nav-link::before {
  display: none !important;
}

/* ── Mega menu (nav-themed, sharp edges) ──────────────────────────────── */

@media (min-width: 992px) {
  .has-mega-menu {
    position: static !important;
  }

  .mega-menu {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    z-index: 300;
    display: flex;
    justify-content: center;
    padding: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition:
      opacity 0.2s ease,
      transform 0.25s ease,
      visibility 0.2s;
  }

  .has-mega-menu:hover > .mega-menu,
  .has-mega-menu:focus-within > .mega-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .has-mega-menu.has-mega-menu--dismissed > .mega-menu,
  .has-mega-menu.has-mega-menu--dismissed:hover > .mega-menu,
  .has-mega-menu.has-mega-menu--dismissed:focus-within > .mega-menu {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
  }

  .mega-menu__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: min(48rem, 100%);
    background: var(--maestro-dropdown-bg);
    border: 1px solid var(--maestro-dropdown-border);
    border-block-start: 3px solid var(--maestro-primary, #ffbb02);
    border-radius: 0;
    box-shadow: 0 20px 48px rgba(12, 9, 10, 0.12);
  }

  .mega-menu__card--with-feature {
    grid-template-columns: minmax(0, 1fr) 18rem;
    width: min(72rem, 100%);
  }
}

.mega-menu {
  font-size: calc(14px / var(--maestro-ui-scale, 0.9));
}

.mega-menu__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 40px;
  padding: 28px 32px;
}

.mega-menu__eyebrow {
  margin: 0 0 10px;
  padding: 0 12px;
  font-size: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maestro-primary, #ffbb02);
}

.mega-menu__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mega-menu__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 0;
  color: inherit;
  text-decoration: none;
  border-inline-start: 3px solid transparent;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.mega-menu__item:hover,
.mega-menu__item:focus-visible {
  background-color: rgba(255, 187, 2, 0.1);
  border-inline-start-color: var(--maestro-primary, #ffbb02);
}

.mega-menu__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 187, 2, 0.45);
  border-radius: 0;
  background: rgba(255, 187, 2, 0.12);
  color: #b88600;
  font-size: 20px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.mega-menu__item:hover .mega-menu__icon,
.mega-menu__item:focus-visible .mega-menu__icon {
  background: var(--maestro-primary, #ffbb02);
  color: var(--maestro-black, #0c090a);
}

.mega-menu__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-top: 2px;
}

.mega-menu__label {
  font-size: inherit;
  font-weight: 600;
  line-height: 20px;
  color: var(--maestro-dropdown-text);
  transition: color 0.2s ease;
}

.mega-menu__item:hover .mega-menu__label,
.mega-menu__item:focus-visible .mega-menu__label {
  color: var(--maestro-black, #0c090a);
}

.mega-menu__description {
  font-size: inherit;
  font-weight: 400;
  line-height: 20px;
  color: var(--maestro-dropdown-muted);
}

.mega-menu__feature {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 28px 24px;
  background: var(--maestro-dropdown-feature-bg);
  border-inline-start: 1px solid var(--maestro-dropdown-border);
  border-radius: 0;
}

.mega-menu__feature-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-menu__feature-title {
  margin: 0;
  font-size: inherit;
  font-weight: 600;
  line-height: 24px;
  color: var(--maestro-dropdown-text);
}

.mega-menu__feature-text {
  margin: 0;
  font-size: inherit;
  line-height: 20px;
  color: var(--maestro-dropdown-muted);
}

.mega-menu__feature-media {
  display: block;
  overflow: hidden;
  width: 100%;
  border-radius: 0;
  border: 1px solid var(--maestro-dropdown-border);
  aspect-ratio: 16 / 10;
  background: #ececef;
}

.mega-menu__feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  opacity: 0.92;
}

.mega-menu__feature-media:hover img {
  transform: scale(1.04);
  opacity: 1;
}

.mega-menu__feature-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: inherit;
  font-weight: 600;
  line-height: 20px;
  color: #b88600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mega-menu__feature-cta svg {
  font-size: 1em;
  transition: transform 0.2s ease;
}

.mega-menu__feature-cta:hover {
  color: var(--maestro-black, #0c090a);
}

.mega-menu__feature-cta:hover svg {
  transform: translate(2px, -2px);
}

/* ── Mobile ───────────────────────────────────────────────────────────── */

.nav-menu--mobile .maestro-nav-link {
  justify-content: space-between;
  width: 100%;
  color: var(--maestro-black, #0c090a) !important;
}

.nav-menu--mobile .mega-menu--mobile-closed {
  display: none;
}

.nav-menu--mobile .mega-menu__card {
  display: block;
  margin-top: 8px;
  background: var(--maestro-dropdown-bg);
  border: 1px solid var(--maestro-dropdown-border);
  border-block-start: 3px solid var(--maestro-primary, #ffbb02);
  border-radius: 0;
  box-shadow: 0 12px 32px rgba(12, 9, 10, 0.08);
}

.nav-menu--mobile .mega-menu__links {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 12px;
}

.nav-menu--mobile .mega-menu__item {
  padding: 8px;
}

.nav-menu--mobile .mega-menu__icon {
  width: 36px;
  height: 36px;
  font-size: 18px;
}

.nav-menu--mobile .mega-menu__description,
.nav-menu--mobile .mega-menu__feature {
  display: none;
}

/* ── Scroll to top ────────────────────────────────────────────────────── */

:root {
  --maestro-scroll-top-size: 46px;
  --maestro-scroll-top-inset: 36px;
  --maestro-faq-chat-gap: 12px;
}

@media (max-width: 991px) {
  :root {
    --maestro-scroll-top-size: 40px;
    --maestro-scroll-top-inset: 1rem;
  }
}

.progress-wrap.maestro-scroll-top {
  inset-inline-end: max(var(--maestro-scroll-top-inset), env(safe-area-inset-right));
  inset-block-end: max(var(--maestro-scroll-top-inset), env(safe-area-inset-bottom));
  width: var(--maestro-scroll-top-size);
  height: var(--maestro-scroll-top-size);
  line-height: var(--maestro-scroll-top-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  mix-blend-mode: normal;
  background: var(--maestro-navy, #1a2e46);
  box-shadow: 0 10px 28px rgba(26, 46, 70, 0.28);
  color: var(--maestro-primary, #ffbb02);
}

.progress-wrap.maestro-scroll-top::after {
  display: none;
}

.progress-wrap.maestro-scroll-top svg.progress-circle {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.progress-wrap.maestro-scroll-top svg.progress-circle path {
  fill: none;
  stroke: var(--maestro-primary, #ffbb02);
}

.maestro-scroll-top__icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--maestro-primary, #ffbb02);
}

.progress-wrap.maestro-scroll-top .maestro-scroll-top__icon svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.progress-wrap.maestro-scroll-top .maestro-scroll-top__icon svg path {
  fill: currentColor;
}

.progress-wrap.maestro-scroll-top:hover {
  background: var(--maestro-primary, #ffbb02);
  color: var(--maestro-navy, #1a2e46);
}

.progress-wrap.maestro-scroll-top:hover .maestro-scroll-top__icon {
  color: var(--maestro-navy, #1a2e46);
}

.progress-wrap.maestro-scroll-top:hover svg.progress-circle path {
  stroke: var(--maestro-navy, #1a2e46);
}

/* ── Offcanvas side panel ─────────────────────────────────────────────── */

.maestro-offcanvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  width: calc(100vw / var(--maestro-ui-scale, 0.9));
  height: calc(100svh / var(--maestro-ui-scale, 0.9));
  background: rgba(5, 9, 18, 0.58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.maestro-offcanvas-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.maestro-offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: auto;
  z-index: 1101;
  display: flex;
  flex-direction: column;
  width: min(26.5rem, calc(100vw / var(--maestro-ui-scale, 0.9)));
  height: calc(100svh / var(--maestro-ui-scale, 0.9));
  min-height: calc(100svh / var(--maestro-ui-scale, 0.9));
  padding: 1.75rem 1.6rem 1.5rem;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 187, 2, 0.12), transparent 32%),
    radial-gradient(circle at 88% 92%, rgba(0, 0, 0, 0.28), transparent 36%),
    var(--maestro-navy, #1a2e46);
  color: #fff;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.maestro-offcanvas.is-open {
  transform: translateX(0);
}

.maestro-offcanvas__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.maestro-offcanvas__logo img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.maestro-offcanvas__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.05rem;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.maestro-offcanvas__close:hover {
  background: var(--maestro-primary, #ffbb02);
  border-color: var(--maestro-primary, #ffbb02);
  color: var(--maestro-navy, #1a2e46);
}

.maestro-offcanvas__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.75rem 0;
}

.maestro-offcanvas__eyebrow {
  display: block;
  margin-bottom: 0.65rem;
  font-size: calc(13px / var(--maestro-ui-scale, 0.9));
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maestro-primary, #ffbb02);
}

.maestro-offcanvas__title {
  margin: 0 0 0.75rem;
  font-family: var(--heading-font, "Lexend", sans-serif);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
  color: #fff !important;
}

.maestro-offcanvas__text {
  margin: 0;
  font-size: calc(14px / var(--maestro-ui-scale, 0.9));
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.74);
}

.maestro-offcanvas__contacts {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.maestro-offcanvas__contact {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  color: #fff;
  text-decoration: none;
  font-size: calc(14px / var(--maestro-ui-scale, 0.9));
  line-height: 1.45;
  font-weight: 500;
  transition: color 0.2s ease;
}

.maestro-offcanvas__contact:hover {
  color: var(--maestro-primary, #ffbb02);
}

.maestro-offcanvas__contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  background: rgba(255, 187, 2, 0.14);
  border: 1px solid rgba(255, 187, 2, 0.35);
  color: var(--maestro-primary, #ffbb02);
}

.maestro-offcanvas__bottom {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.maestro-offcanvas__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: var(--maestro-primary, #ffbb02);
  color: var(--maestro-navy, #1a2e46);
  font-weight: 700;
  font-size: calc(14px / var(--maestro-ui-scale, 0.9));
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.maestro-offcanvas__cta:hover {
  background: #fff;
  color: var(--maestro-navy, #1a2e46);
}

.maestro-offcanvas__social {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.maestro-offcanvas__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.95rem;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.maestro-offcanvas__social-link:hover {
  background: var(--maestro-primary, #ffbb02);
  border-color: var(--maestro-primary, #ffbb02);
  color: var(--maestro-navy, #1a2e46);
}
