/* Static-site additions on top of the vendored Enfold CSS. Keep this file small: anything here is a
   deliberate replacement for something Enfold's JavaScript did on the live site. */

/* ---- LayerSlider, rendered statically (tools/import-wp.mjs: staticLayerSlider) ----
   The slider canvas (--ls-cw wide, e.g. 1280x720) scales to the full width; every layer position
   and size is multiplied by --ls-u = 1 canvas px. */
.avia-layerslider.ls-static {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: var(--ls-ratio);
  height: auto !important;
  max-width: none !important;
  container-type: inline-size;
}
.ls-static > * {
  --ls-u: calc(100cqw / var(--ls-cw));
}
.ls-static .ls-static-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}
.ls-static .ls-static-layer {
  position: absolute;
  margin: 0;
  padding: 0;
  max-width: none;
  white-space: nowrap;
  transform: translate(var(--tx, 0), var(--ty, 0));
}
.ls-static img.ls-static-layer {
  height: auto;
}

/* ---- Mobile menu overlay (public/js/enfold-lite.js builds it from the main menu) ---- */
html.av-burger-overlay-active,
html.av-burger-overlay-active body {
  overflow: hidden;
}

/* ---- YouTube click-to-load (tools/import-wp.mjs: youtube) ----
   Mirrored thumbnail + play button; the iframe (youtube-nocookie) loads only on click. */
.yt-click {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.avia-iframe-wrap > .yt-click,
.avia-iframe-wrap > iframe {
  position: absolute;
  inset: 0;
  height: 100%;
  aspect-ratio: auto;
}
.yt-click img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yt-click-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  margin: -24px 0 0 -34px;
  border: 0;
  border-radius: 12px;
  background: rgba(33, 33, 33, 0.8);
  cursor: pointer;
  transition: background 0.15s;
}
.yt-click-play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -6px;
  border-style: solid;
  border-width: 9px 0 9px 16px;
  border-color: transparent transparent transparent #fff;
}
.yt-click:hover .yt-click-play,
.yt-click-play:focus-visible {
  background: #f00;
}
.yt-click-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.yt-click iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Minimum heights in % of the viewport ----
   Enfold's JS (avia_browser_height) writes these rules at runtime for the values a page uses;
   the site uses 25 and 50. */
.avia-section.av-minimum-height .container { opacity: 1; }
.av-minimum-height-25:not(.av-slideshow-section) .container { height: 25vh; }
.av-minimum-height-50:not(.av-slideshow-section) .container,
.av-cell-min-height-50 > .flex_cell { height: 50vh; }
.av-minimum-height-25.av-slideshow-section { min-height: 25vh; }
.av-minimum-height-50.av-slideshow-section { min-height: 50vh; }

/* ---- Slideshows with more than one slide (public/js/enfold-lite.js) ---- */
.avia-slideshow-inner > li {
  transition: opacity 0.6s ease;
}

/* ---- Events Manager maps: click-to-load (tools/import-wp.mjs) ---- */
.map-click {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  background: #e5e3df; /* Google Maps' land colour, so the box reads as a map area */
}
.map-click-show {
  padding: 10px 18px;
  border: 0;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  font: inherit;
  cursor: pointer;
}
.map-click-show:hover,
.map-click-show:focus-visible {
  background: #f5f5f5;
}
.map-click-open {
  font-size: 12px;
}
.map-click iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
/* Inline embed (oEmbed iframe in a paragraph): keeps the iframe's fixed size, like live. */
.yt-click.yt-click-inline {
  display: inline-block;
  max-width: 100%;
  aspect-ratio: auto;
  vertical-align: baseline; /* the iframe's inline baseline gap, as on live */
}
