/* Hamburger trigger — glass pill to match the header's existing CTA look */
.at-menu-bar {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.at-menu-bar:hover {
  background: var(--at-theme-primary, #f0460e);
  border-color: var(--at-theme-primary, #f0460e);
}
.at-menu-bar__line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #fefefe;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.2s ease;
}
.at-menu-bar.is-active .at-menu-bar__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.at-menu-bar.is-active .at-menu-bar__line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.at-menu-bar.is-active .at-menu-bar__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Panel top row (logo + close) */
.at-offcanvas-top {
  margin-bottom: 40px;
}
.at-offcanvas-close-btn button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--at-neutral-100, #ececec);
  background: transparent;
  color: var(--at-neutral-900, #1d1d1d);
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.3s ease;
}
.at-offcanvas-close-btn button:hover {
  border-color: var(--at-theme-primary, #f0460e);
  color: var(--at-theme-primary, #f0460e);
}

/* Top-level menu links */
.at-offcanvas-menu ul li > a:hover {
  color: var(--at-theme-primary, #f0460e);
}

/* Services accordion toggle — plus icon rotates into an X when open */
.at-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  padding: 0;
  color: var(--at-neutral-900, #1d1d1d);
}
.at-menu-close svg {
  transition: transform 0.3s ease;
}
.at-offcanvas-menu ul li.active > .at-menu-close svg {
  transform: rotate(135deg);
}

/* Simplify the cloned desktop "Services" mega-menu (an 880px hover-fan
   grid of photo cards) into a plain stacked list of links — the fixed
   width and flex-grow choreography would otherwise overflow a narrow
   offcanvas panel. */
.at-offcanvas-menu .at-services-menu {
  width: 100% !important;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0 18px !important;
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  position: static !important;
  left: auto !important;
  transform: none !important;
  border-radius: 0 !important;
}

.at-offcanvas-menu ul li.has-dropdown.active > .at-services-menu {
  display: flex !important;
}
.at-offcanvas-menu .at-services-menu__item {
  position: relative;
  flex-grow: 0 !important;
  flex-basis: auto !important;
  height: auto !important;
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  background: var(--at-neutral-50, #f2f2f2);
}
.at-offcanvas-menu .at-services-menu__img {
  position: static;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}
.at-offcanvas-menu .at-services-menu__item::after {
  display: none;
}
.at-offcanvas-menu .at-services-menu__item:hover .at-services-menu__img img {
  transform: none;
}
.at-offcanvas-menu .at-services-menu__name {
  position: static !important;
  padding: 0 !important;
  background: none !important;
  color: var(--at-neutral-900, #1d1d1d) !important;
  font-size: 14px;
}

/* Contact links + closing call-to-action at the foot of the panel */
.at-offcanvas-contact {
  margin-top: 10px;
  padding-top: 30px;
  border-top: 1px solid var(--at-neutral-100, #ececec);
}
.at-offcanvas-contact ul li a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}
.at-offcanvas-contact ul li a svg {
  flex-shrink: 0;
  color: #fefefe;
}
.at-offcanvas-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  padding: 14px 20px;
  border-radius: 50px;
  background: var(--at-theme-primary, #f0460e);
  color: #fefefe !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.at-offcanvas-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(240, 70, 14, 0.55);
}

/* Divider between the CTA button and the social links row below it.
   var(--at-neutral-100) resolves too dark against this panel's near-black
   background to actually read as a line, so this uses a fixed light
   rgba instead (same fix as the border-color contrast issue on the
   service-area map's dividers). */
.at-offcanvas-social {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* Mobile drawer accent: white-to-sky-blue instead of the global orange. */
@media (max-width: 991.98px) {
  .at-offcanvas-menu ul li.active > a,
  .at-offcanvas-menu ul li > a:hover {
    background: linear-gradient(90deg, #ffffff 0%, #bae6fd 48%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    -webkit-text-fill-color: transparent;
  }

  .at-offcanvas-cta {
    background: linear-gradient(110deg, #ffffff 0%, #bae6fd 42%, #38bdf8 100%);
    color: #082f49 !important;
    box-shadow: 0 10px 28px -12px rgba(56, 189, 248, 0.75);
  }

  .at-offcanvas-cta:hover {
    box-shadow: 0 14px 30px -10px rgba(56, 189, 248, 0.85);
  }
}
/* Mobile drawer controls and active-route underline. */
@media (max-width: 991.98px) {
  .at-menu-bar:hover,
  .at-menu-bar.is-active {
    background: linear-gradient(135deg, #ffffff 0%, #bae6fd 48%, #38bdf8 100%) !important;
    border-color: rgba(186, 230, 253, 0.95) !important;
    box-shadow: 0 8px 22px -10px rgba(56, 189, 248, 0.9);
  }

  .at-menu-bar:hover .at-menu-bar__line,
  .at-menu-bar.is-active .at-menu-bar__line {
    background: #082f49 !important;
  }

  .at-offcanvas-close-btn .close-btn:hover,
  .at-offcanvas-close-btn .close-btn:active {
    background: linear-gradient(135deg, #ffffff 0%, #bae6fd 48%, #38bdf8 100%) !important;
    border-color: rgba(186, 230, 253, 0.95) !important;
    color: #082f49 !important;
    box-shadow: 0 8px 22px -10px rgba(56, 189, 248, 0.9);
  }

  .at-offcanvas-menu nav > ul > li > a.at-nav-active {
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
  }

  .at-offcanvas-menu nav > ul > li > a.at-nav-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffffff 0%, #bae6fd 48%, #38bdf8 100%);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  }
}
/* Animated mobile drawer CTA gradient. */
@keyframes at-mobile-cta-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (max-width: 991.98px) {
  .at-offcanvas-cta {
    background-image: linear-gradient(110deg, #ffffff 0%, #bae6fd 28%, #38bdf8 52%, #bae6fd 76%, #ffffff 100%);
    background-size: 240% 100%;
    animation: at-mobile-cta-gradient 5s ease-in-out infinite;
    will-change: background-position;
  }
}

@media (prefers-reduced-motion: reduce) {
  .at-offcanvas-cta {
    animation: none;
    background-position: 50% 50%;
  }
}
/* Keep the mobile drawer above the globally fixed site header. */
.body-overlay {
  z-index: 1000;
}

.at-offcanvas {
  z-index: 1001;
}
