/* 
 *  Owl Carousel - Animate Plugin
 */
.owl-carousel .animated {
  -webkit-animation-duration: 1000ms;
  animation-duration: 1000ms;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}
.owl-carousel .owl-animated-in {
  z-index: 0;
}
.owl-carousel .owl-animated-out {
  z-index: 1;
}
.owl-carousel .fadeOut {
  -webkit-animation-name: fadeOut;
  animation-name: fadeOut;
}

@-webkit-keyframes fadeOut {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}
@keyframes fadeOut {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* 
 * 	Owl Carousel - Auto Height Plugin
 */
.owl-height {
  -webkit-transition: height 500ms ease-in-out;
  -moz-transition: height 500ms ease-in-out;
  -ms-transition: height 500ms ease-in-out;
  -o-transition: height 500ms ease-in-out;
  transition: height 500ms ease-in-out;
}

/* 
 *  Core Owl Carousel CSS File
 */
.owl-carousel {
  display: none;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  /* position relative and z-index fix webkit rendering fonts issue */
  position: relative;
  z-index: 1;
}
.owl-carousel .owl-stage {
  position: relative;
  -ms-touch-action: pan-Y;
}
.owl-carousel .owl-stage:after {
  content: ".";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}
.owl-carousel .owl-stage-outer {
  position: relative;
  overflow: hidden;
  /* fix for flashing background */
  -webkit-transform: translate3d(0px, 0px, 0px);
}
.owl-carousel .owl-controls .owl-nav .owl-prev,
.owl-carousel .owl-controls .owl-nav .owl-next,
.owl-carousel .owl-controls .owl-dot {
  cursor: pointer;
  cursor: hand;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.owl-carousel.owl-loaded {
  display: block;
}
.owl-carousel.owl-loading {
  opacity: 0;
  display: block;
}
.owl-carousel.owl-hidden {
  opacity: 0;
}
.owl-carousel .owl-refresh .owl-item {
  display: none;
}
.owl-carousel .owl-item {
  position: relative;
  min-height: 1px;
  float: left;
  -webkit-backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.owl-carousel .owl-item img {
  display: block;
  width: 100%;
  -webkit-transform-style: preserve-3d;
}
.owl-carousel.owl-text-select-on .owl-item {
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}
.owl-carousel .owl-grab {
  cursor: move;
  cursor: -webkit-grab;
  cursor: -o-grab;
  cursor: -ms-grab;
  cursor: grab;
}
.owl-carousel.owl-rtl {
  direction: rtl;
}
.owl-carousel.owl-rtl .owl-item {
  float: right;
}

/* No Js */
.no-js .owl-carousel {
  display: block;
}

/* 
 * 	Owl Carousel - Lazy Load Plugin
 */
.owl-carousel .owl-item .owl-lazy {
  opacity: 0;
  -webkit-transition: opacity 400ms ease;
  -moz-transition: opacity 400ms ease;
  -ms-transition: opacity 400ms ease;
  -o-transition: opacity 400ms ease;
  transition: opacity 400ms ease;
}
.owl-carousel .owl-item img {
  transform-style: preserve-3d;
}

/* 
 * 	Owl Carousel - Video Plugin
 */
.owl-carousel .owl-video-wrapper {
  position: relative;
  height: 100%;
  background: #000;
}
.owl-carousel .owl-video-play-icon {
  position: absolute;
  height: 80px;
  width: 80px;
  left: 50%;
  top: 50%;
  margin-left: -40px;
  margin-top: -40px;
  background: url("owl.video.play.png") no-repeat;
  cursor: pointer;
  z-index: 1;
  -webkit-backface-visibility: hidden;
  -webkit-transition: scale 100ms ease;
  -moz-transition: scale 100ms ease;
  -ms-transition: scale 100ms ease;
  -o-transition: scale 100ms ease;
  transition: scale 100ms ease;
}
.owl-carousel .owl-video-play-icon:hover {
  -webkit-transition: scale(1.3, 1.3);
  -moz-transition: scale(1.3, 1.3);
  -ms-transition: scale(1.3, 1.3);
  -o-transition: scale(1.3, 1.3);
  transition: scale(1.3, 1.3);
}
.owl-carousel .owl-video-playing .owl-video-tn,
.owl-carousel .owl-video-playing .owl-video-play-icon {
  display: none;
}
.owl-carousel .owl-video-tn {
  opacity: 0;
  height: 100%;
  background-position: center center;
  background-repeat: no-repeat;
  -webkit-background-size: contain;
  -moz-background-size: contain;
  -o-background-size: contain;
  background-size: contain;
  -webkit-transition: opacity 400ms ease;
  -moz-transition: opacity 400ms ease;
  -ms-transition: opacity 400ms ease;
  -o-transition: opacity 400ms ease;
  transition: opacity 400ms ease;
}
.owl-carousel .owl-video-frame {
  position: relative;
  z-index: 1;
}
/*
  Font fallback metrics (speed round 2, T1.8). `"Roboto"` and `"Roboto Condensed"` arrive after the first paint (Google Fonts, or our own
  files with PERF_SELF_FONTS), so the page is first drawn in the fallback and then re-set: a line of the header menu, a button or a heading
  changed width, wrapped differently and moved what sits below it (layout shift). These two faces are the fallback the stacks now name
  right after the web font (`"Roboto", "Roboto Fallback", sans-serif`): the system's Arial (Liberation Sans where Arial is missing) scaled
  to Roboto's width and given Roboto's ascent and descent, so the swap barely moves anything. `size-adjust` is measured, not taken from the
  font files' average glyph width: for each weight and style the site uses (Roboto 300 / 400 / 500 / 700, Roboto Condensed 400 / 700 / 900,
  upright and italic) it is the width of the site's own text in that style (text-transform applied) set in the web font over the same text
  in Arial (canvas `measureText`), because that ratio decides where a line wraps. Re-measure it if a new weight or style is used.
  They are used only until the web font is ready (or for a character it lacks); after it loads the page is drawn with the web font alone,
  exactly as before. A device with none of those fonts skips the face and falls on to `sans-serif`, as before.
*/

/* Per-character widths for the two heavy Roboto Condensed styles (700 and 900: the headings and buttons). Capitals run from 0.71 to 0.98 of
   Arial Bold's width, so one scale for the whole face leaves each word a percent or two off, enough to re-wrap a button and move the page.
   Each rule below is the characters whose measured width (the web font's advance over Arial Bold's, per character, canvas `measureText`)
   rounds to the same step; printable ASCII only, anything else keeps the face above. Declared after it, so these win for their characters.
   Generated: scripts/fonts/measure-fallback.mjs. */

/*
  Heroes paint from the server HTML (speed round 2, T1.1 / T1.2).

  owl.carousel.css hides every `.owl-carousel` (display: none) until Owl has loaded, so a hero's first banner only
  appeared after React hydrated and jQuery, Bootstrap and Owl had loaded in turn: the largest paint of the page was ~0.8 s late.
  Until `.owl-loaded` is added, these rules draw the hero in the layout Owl is about to give it (the centred slide and, as
  the strips either side of it, the previous and next slides, under the curtains), so nothing moves when Owl starts.
  They stop applying by themselves: Owl wraps the slides in `.owl-item`s (no longer direct children) and adds `.owl-loaded`.
  Loaded after main.css and owl.carousel.css (it must win over `.owl-carousel { display: none }`).

  1. Home hero (`#homepage-hero`): sizes come from `--aw-hero-sp` (the strip width) and `--aw-hero-min` (the fullscreen
     minimum height from 1200px), set on <html> by the pre-paint script and `HomeHero` (`carousel/homeHeroGeometry.ts`).
     `.aw-hero-track` is the one-banner hero (T1.2): the same layout with no carousel behind it, for good.
  2. Page hero slider (`.hero--slider`) and ride hero (`#ride-hero`): pure CSS. The slide is the page's first `.container`
     wide (Bootstrap's 750 / 970 / 1170px, the full width on a phone) and `sp = (width - container) / 2`.
*/

/* ---- 1. home hero ------------------------------------------------------------------------------------------------ */
#homepage-hero .hero__curtain {
  width: var(--aw-hero-sp, 0px);
}

#homepage-hero .owl-carousel:not(.owl-loaded),
#homepage-hero .aw-hero-track {
  display: block;
  height: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 1;
}

#homepage-hero :is(.owl-carousel:not(.owl-loaded), .aw-hero-track) > .hero__slide {
  height: 100%;
  position: absolute;
  top: 0;
  width: calc(100% - 2 * var(--aw-hero-sp, 0px));
}

#homepage-hero :is(.owl-carousel:not(.owl-loaded), .aw-hero-track) > .hero__slide:first-child {
  left: var(--aw-hero-sp, 0px);
}

/* the next banner, in the right-hand strip */
#homepage-hero :is(.owl-carousel:not(.owl-loaded), .aw-hero-track) > .hero__slide:nth-child(2) {
  left: calc(100% - var(--aw-hero-sp, 0px));
}

/* the previous banner (the last one: Owl's loop puts a copy of it in front), in the left-hand strip */
#homepage-hero :is(.owl-carousel:not(.owl-loaded), .aw-hero-track) > .hero__slide:last-child:not(:nth-child(2)) {
  left: calc(3 * var(--aw-hero-sp, 0px) - 100%);
}

#homepage-hero :is(.owl-carousel:not(.owl-loaded), .aw-hero-track) > .hero__slide:not(:first-child):not(:nth-child(2)):not(:last-child) {
  display: none;
}

/* ---- 2. page hero slider and ride hero ---------------------------------------------------------------------------- */
.hero--slider,
#ride-hero {
  --aw-cw: 100%;
}

@media (min-width: 768px) {
  .hero--slider,
  #ride-hero {
    --aw-cw: 750px;
  }
}

@media (min-width: 992px) {
  .hero--slider,
  #ride-hero {
    --aw-cw: 970px;
  }
}

@media (min-width: 1200px) {
  .hero--slider,
  #ride-hero {
    --aw-cw: 1170px;
  }
}

:is(.hero--slider, #ride-hero) .hero__curtain {
  width: calc((100% - var(--aw-cw)) / 2);
}

:is(.hero--slider, #ride-hero) .owl-carousel:not(.owl-loaded) {
  display: block;
  overflow: hidden;
}

:is(.hero--slider, #ride-hero) .owl-carousel:not(.owl-loaded) > .hero__slide {
  top: 0;
  width: var(--aw-cw);
}

:is(.hero--slider, #ride-hero) .owl-carousel:not(.owl-loaded) > .hero__slide img {
  display: block;
  width: 100%;
}

/* the first slide stays in the flow (it gives the hero its height); the next and previous ones sit in the strips */
:is(.hero--slider, #ride-hero) .owl-carousel:not(.owl-loaded) > .hero__slide:first-child {
  margin-left: calc((100% - var(--aw-cw)) / 2);
}

:is(.hero--slider, #ride-hero) .owl-carousel:not(.owl-loaded) > .hero__slide:not(:first-child) {
  position: absolute;
}

:is(.hero--slider, #ride-hero) .owl-carousel:not(.owl-loaded) > .hero__slide:nth-child(2) {
  left: calc((100% - var(--aw-cw)) / 2 + var(--aw-cw));
}

:is(.hero--slider, #ride-hero) .owl-carousel:not(.owl-loaded) > .hero__slide:last-child:not(:nth-child(2)) {
  left: calc((100% - var(--aw-cw)) / 2 - var(--aw-cw));
}

:is(.hero--slider, #ride-hero) .owl-carousel:not(.owl-loaded) > .hero__slide:not(:first-child):not(:nth-child(2)):not(:last-child) {
  display: none;
}

/* ---- 3. phones draw the 960 rung of the home banners (T1.6) -------------------------------------------------------
   `HomeHero` sets `--aw-bg-phone` / `--aw-bg-set-phone` (the existing 960 WebP / AVIF rungs) next to `--aw-bg` / `--aw-bg-set` (2048);
   the preload hints are scoped by `media` the same way. Same picture, same crop, a smaller file under 768px. */
@media (max-width: 767px) {
  .hero__slide.aw-bg {
    background-image: var(--aw-bg-phone, var(--aw-bg));
  }
}

@supports (background-image: image-set(url("x.avif") type("image/avif"))) {
  @media (max-width: 767px) {
    .hero__slide.aw-bg {
      background-image: var(--aw-bg-set-phone, var(--aw-bg-phone, var(--aw-bg-set, var(--aw-bg))));
    }
  }
}


/* ---- 3. contact page map (T1.8) -------------------------------------------------------------------------------------- */
/* main.css gives `.contact-map` `padding-top: 15px`, and the map box inside the page's own `.contact-map` is one too. Google Maps puts its
   canvas div in the box's flow first and then pins it to the top of the box (`position: absolute; top: 0`), so the canvas jumped up
   15px when the map finished loading (a layout shift). With no padding on the inner box the canvas starts where it ends up; the box is
   the same 500px tall, `border-box`, and the canvas covers all of it, as it did. */
.template-AdventureWorldContactPage #ContactPageMap {
  padding-top: 0;
}
