/* Shared finishing rules: keep the approved homepage proportions. */
:root {
  --af-slider-radius: 28px;
  --af-slider-height: min(clamp(520px, 82svh, 900px), calc(100svh - 110px));
}

/* One menu breakpoint prevents tablet links from running off the screen. */
body > header.airvo-header { gap: 24px; }
body > header.airvo-header #primary-navigation {
  display: flex; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap;
  align-items: center; justify-content: flex-end; gap: 6px;
}
body > header.airvo-header #primary-navigation > a,
body > header.airvo-header #primary-navigation > button {
  box-sizing: border-box; display: inline-flex; flex: 0 1 150px;
  width: 150px; min-width: 0; min-height: 44px; margin: 0;
  align-items: center; justify-content: center; padding: 10px 8px;
  border: 1px solid #a8c7dc; border-radius: 3px; background: #fff;
  color: #2e2e2e; font: 600 11px/1.25 var(--airform-sans, Arial, sans-serif);
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none;
  white-space: nowrap; cursor: pointer;
}
body > header.airvo-header #primary-navigation > [aria-current="page"] { background: #e8f0f5; }
body > header.airvo-header #primary-navigation > .airvo-contact-link,
body > header.airvo-header #primary-navigation > .airvo-booking-link { background: #a8c7dc; }
body > header.airvo-header #primary-navigation > :hover { background: #e8f0f5; }
body > header.airvo-header #primary-navigation > .airvo-contact-link:hover,
body > header.airvo-header #primary-navigation > .airvo-booking-link:hover { background: #c6dce9; }
.cal-booking-button { display: inline-flex; margin-top: 22px; }

/* Clip the outer frame as well as the image, including during transitions. */
body .af-panorama .work-panorama,
body .work-gallery {
  border-radius: var(--af-slider-radius); overflow: hidden;
  clip-path: inset(0 round var(--af-slider-radius)); isolation: isolate;
}
body .af-panorama .swiper-slide { border-radius: 0; }
body:not(.home-page) .af-panorama .work-panorama,
body:not(.home-page) .work-gallery-swiper {
  width: 100%; height: var(--af-slider-height) !important;
  min-height: 0; aspect-ratio: auto;
}
body .af-panorama .panorama-project > img { object-fit: cover; }
body .af-panorama .panorama-stage { position: relative; }
body .service-intro-panorama, body .packages-panorama { margin-top: 0; }
body .work-gallery { margin-bottom: 24px; scroll-margin-top: 16px; }
body .af-panorama, body .af-panorama.work-index-panorama { scroll-margin-top: 16px; }
body.work-page .work-index-panorama { margin-top: 28px; }

/* Playback is separate from the centred selectors, without changing the frame. */
body .af-panorama .panorama-stage > .panorama-playback {
  position: absolute; z-index: 5; top: 20px; right: 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 88px; min-height: 44px; padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.8); border-radius: 999px;
  background: rgba(24,31,35,.8); color: #fff;
  font: 500 14px/1.2 var(--airform-sans, Arial, sans-serif);
  text-transform: none; letter-spacing: 0; cursor: pointer;
}
body .af-panorama .panorama-stage > .panorama-playback[hidden] { display: none; }
body .af-panorama .panorama-stage > .panorama-playback:hover { background: #182023; }
body .af-panorama .panorama-stage > .panorama-playback:focus-visible {
  outline: 2px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 5px #182023;
}

/* Service links belong beneath the copy, on the selector baseline. */
body.services-page .panorama-project > .panorama-project-arrow {
  /* The selector row is relative to the stage, which has 12px bottom padding. */
  position: absolute; z-index: 3; left: 6%; right: auto; top: auto; bottom: 24px;
  display: grid; place-items: center; box-sizing: border-box;
  width: 62px; height: 62px; min-width: 62px; margin: 0;
}

/* A dedicated bottom row keeps selectors centred and away from the copy. */
body .af-panorama .panorama-stage .panorama-controls,
body .work-gallery .work-gallery-controls {
  position: absolute; z-index: 4; left: 50%; right: auto; bottom: 36px;
  width: max-content; max-width: calc(100% - 32px); margin: 0;
  transform: translateX(-50%); display: flex; align-items: center;
  justify-content: center; gap: 12px; color: #fff;
}
body .af-panorama .panorama-stage .panorama-controls[hidden],
body .work-gallery .work-gallery-controls[hidden] { display: none; }
body .af-panorama .panorama-stage .panorama-counter,
body .work-gallery .work-gallery-controls > span {
  margin: 0 12px 0 0; color: #fff; font-size: 12px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
body .af-panorama .panorama-stage .panorama-controls button,
body .work-gallery .work-gallery-controls button {
  box-sizing: border-box; display: inline-grid; place-items: center;
  flex: 0 0 62px; width: 62px; height: 62px; min-width: 62px; min-height: 62px;
  padding: 0; border: 1px solid rgba(255,255,255,.8); border-radius: 50%;
  color: #fff !important; background: rgba(24,31,35,.35); font-size: 24px;
  line-height: 1; text-shadow: none; cursor: pointer;
}
body .af-panorama .panorama-stage .panorama-controls button:hover,
body .work-gallery .work-gallery-controls button:hover { background: rgba(24,31,35,.75); }
body .af-panorama .panorama-project-copy,
body .work-gallery .work-gallery-caption {
  left: 6%; right: 6%; bottom: 126px; max-width: none;
}
body .af-panorama .panorama-project-copy p,
body .work-gallery .work-gallery-caption p { max-width: 65ch; }
body .af-panorama .panorama-project-copy > div { min-width: 0; }
body.home-page .af-panorama .panorama-stage > .af-text-link {
  position: absolute; z-index: 4; left: 6%; bottom: 44px;
  box-sizing: border-box; display: inline-flex; align-items: center;
  min-height: 46px; padding: 0 18px; border: 1px solid rgba(255,255,255,.8);
  border-radius: 999px; color: #fff; background: rgba(24,31,35,.35);
}

@media (max-width: 1199px) {
  body > header.airvo-header { flex-wrap: wrap; min-height: 76px; padding: 10px 5%; gap: 8px; }
  body > header.airvo-header .brand-logo { width: 190px; height: 52px; }
  body > header.airvo-header .menu-toggle { display: inline-flex; margin-left: auto; align-items: center; min-height: 44px; }
  body > header.airvo-header #primary-navigation { display: none; flex: 0 0 100%; }
  body > header.airvo-header.menu-open #primary-navigation {
    display: flex; flex-direction: column; gap: 6px; padding: 8px 0;
    max-height: calc(100svh - 100px); overflow-y: auto;
  }
  body > header.airvo-header #primary-navigation > a,
  body > header.airvo-header #primary-navigation > button {
    flex: 0 0 auto; width: 100%; min-height: 44px; font-size: 12px;
  }
}
@media (max-width: 900px) {
  body.home-page .af-panorama .panorama-project-copy { bottom: 182px; }
  body.home-page .af-panorama .panorama-stage > .af-text-link { bottom: 112px; }
}
@media (max-width: 760px) {
  body.work-page .work-index-panorama { margin-top: 16px; }
  :root {
    --af-slider-radius: 20px;
    --af-slider-height: min(clamp(420px, 68svh, 620px), calc(100svh - 100px));
  }
  body > header.airvo-header .brand-logo { width: 180px; }
  body .af-panorama .panorama-stage .panorama-controls,
  body .work-gallery .work-gallery-controls { bottom: 28px; gap: 10px; }
  body.services-page .panorama-project > .panorama-project-arrow {
    bottom: 16px; width: 46px; height: 46px; min-width: 46px; font-size: 26px;
  }
  body .af-panorama .panorama-stage .panorama-controls button,
  body .work-gallery .work-gallery-controls button {
    flex-basis: 46px; width: 46px; height: 46px; min-width: 46px; min-height: 46px; font-size: 22px;
  }
  body .af-panorama .panorama-project-copy,
  body .work-gallery .work-gallery-caption { bottom: 104px; }
  body .af-panorama .panorama-project-copy h3,
  body .work-gallery .work-gallery-caption h3 { font-size: clamp(28px, 7.5vw, 42px); }
  body .af-panorama .panorama-project-copy p,
  body .work-gallery .work-gallery-caption p { font-size: 16px; line-height: 1.45; max-width: none; }
  body.home-page .af-panorama .panorama-project-copy { bottom: 162px; }
  body.home-page .af-panorama .panorama-stage > .af-text-link { bottom: 100px; }
  body .work-gallery-label { top: 24px; }
}
