/* Astra mobile off-canvas menu. Selectors follow Astra's header builder markup. */

@media (max-width: 921px) {
  /* Drawer */
  .ast-mobile-popup-drawer .ast-mobile-popup-inner {
    width: min(90vw, 420px);
    max-width: none;
    background: var(--gyla-color-forest-night);
  }

  .ast-mobile-popup-drawer .ast-mobile-popup-overlay {
    background: color-mix(in srgb, var(--gyla-color-forest-night) 62%, transparent);
    backdrop-filter: blur(2px);
  }

  /* Close button */
  .ast-mobile-popup-drawer .ast-mobile-popup-header {
    padding: 18px 22px 0;
  }

  .ast-mobile-popup-drawer .menu-toggle-close {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--gyla-color-teal);
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--gyla-color-teal) 55%, transparent);
    border-radius: 4px;
    place-items: center;
  }

  /* Content */
  .ast-mobile-popup-drawer .ast-mobile-popup-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 28px 30px;
  }

  .ast-mobile-popup-drawer .ast-mobile-popup-content > * {
    padding-right: 0;
    padding-left: 0;
  }

  /* Main navigation */
  .ast-mobile-popup-drawer .ast-builder-menu-mobile {
    padding: 0;
  }

  .ast-mobile-popup-drawer #ast-hf-mobile-menu {
    margin: 0;
  }

  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .menu-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .menu-item > .menu-link {
    display: flex;
    min-height: 68px;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--gyla-text-title);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    align-items: center;
    justify-content: space-between;
    transition:
      color 180ms ease,
      padding-left 180ms ease;
  }

  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .menu-item > .menu-link::after {
    color: var(--gyla-color-teal);
    font-size: 22px;
    font-weight: 400;
    content: "→";
    transition: transform 180ms ease;
  }

  /* Items with a submenu already show Astra's dropdown toggle */
  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .menu-item-has-children > .menu-link::after {
    content: none;
  }

  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .menu-item > .menu-link:hover,
  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .menu-item > .menu-link:focus-visible {
    padding-left: 5px;
    color: #ffffff;
  }

  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .menu-item > .menu-link:hover::after,
  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .menu-item > .menu-link:focus-visible::after {
    transform: translateX(4px);
  }

  /* Current page */
  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .current-menu-item > .menu-link,
  .ast-mobile-popup-drawer
  #ast-hf-mobile-menu > .current-menu-ancestor > .menu-link {
    color: var(--gyla-color-teal-bright);
  }

  /* CTA and phone area */
  .ast-mobile-popup-content
  [data-section="section-hb-html-2"] {
    width: 100%;
    margin-top: clamp(28px, 7vh, 54px);
    padding: 0;
  }

  .gyla-mobile-menu-actions {
    display: grid;
    gap: 18px;
    width: 100%;
  }

  /* Button look comes from components.css; here only the full-width layout with the arrow */
  .gyla-mobile-menu-cta {
    width: 100%;
    padding: 14px 18px;
    justify-content: space-between;
  }

  .gyla-mobile-menu-phone {
    display: flex;
    color: rgba(255, 255, 255, 0.65);
    font-size: var(--gyla-text-caption);
    line-height: 1.4;
    text-decoration: none;
    flex-direction: column;
    gap: 3px;
  }

  .gyla-mobile-menu-phone strong {
    color: #ffffff;
    font-size: var(--gyla-text-lead);
    font-weight: 600;
  }

  .gyla-mobile-menu-phone:hover strong,
  .gyla-mobile-menu-phone:focus-visible strong {
    color: var(--gyla-color-teal-bright);
  }

  @media (prefers-reduced-motion: reduce) {
    .ast-mobile-popup-drawer *,
    .ast-mobile-popup-drawer *::after {
      transition: none;
    }
  }
}
