/* =========================================================
   AIO Divi Gallery Carousel v1.4.0
   Author: Aio, s.r.o.

   Base class:
   aio-gallery-carousel

   Recommended project-gallery mode:
   aio-gallery-carousel aio-gallery-contained-65vh

   Optional modes:
   aio-gallery-carousel aio-gallery-contained-70vh
   aio-gallery-carousel aio-gallery-contained-80vh

   Optional width limit:
   aio-gallery-max-1200
   aio-gallery-max-1400
========================================================= */

.aio-gallery-carousel {
  --aio-gallery-gap: clamp(18px, 2vw, 30px);
  --aio-gallery-item-width: 82%;
  --aio-gallery-height: clamp(400px, 65vh, 640px);
  --aio-gallery-arrow-size: 60px;
  --aio-gallery-arrow-offset: 18px;

  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: hidden !important;
}

.aio-gallery-carousel,
.aio-gallery-carousel * {
  box-sizing: border-box !important;
}

.aio-gallery-carousel .et_pb_gallery_items {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}

.aio-gallery-carousel .et_pb_gallery_items::-webkit-scrollbar {
  display: none !important;
}

.aio-gallery-carousel .et_pb_gallery_item {
  position: relative !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  max-width: none !important;
  scroll-snap-align: start !important;
  overflow: hidden !important;
}

.aio-gallery-carousel .et_pb_gallery_image,
.aio-gallery-carousel .et_pb_gallery_image a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

.aio-gallery-carousel .et_pb_gallery_image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  image-rendering: auto !important;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
}

/* Hide Divi gallery overlay and captions/titles that can leak media metadata. */
.aio-gallery-carousel .et_overlay,
.aio-gallery-carousel .et_pb_gallery_title,
.aio-gallery-carousel .et_pb_gallery_caption,
.aio-gallery-carousel .mfp-title {
  display: none !important;
}

/* Optional max-width utilities. Use when the Divi row is fullwidth. */
.aio-gallery-carousel.aio-gallery-max-1200 {
  max-width: 1200px !important;
}

.aio-gallery-carousel.aio-gallery-max-1400 {
  max-width: 1400px !important;
}

/* Generic fallback carousel. */
.aio-gallery-carousel:not(.aio-gallery-contained-65vh):not(.aio-gallery-contained-70vh):not(.aio-gallery-contained-80vh):not(.aio-gallery-single-80vh) .et_pb_gallery_items {
  gap: 24px !important;
  padding: 0 0 12px !important;
}

.aio-gallery-carousel:not(.aio-gallery-contained-65vh):not(.aio-gallery-contained-70vh):not(.aio-gallery-contained-80vh):not(.aio-gallery-single-80vh) .et_pb_gallery_item {
  flex: 0 0 360px !important;
  width: 360px !important;
}

.aio-gallery-carousel:not(.aio-gallery-contained-65vh):not(.aio-gallery-contained-70vh):not(.aio-gallery-contained-80vh):not(.aio-gallery-single-80vh) .et_pb_gallery_image {
  height: 360px !important;
}

/* =========================================================
   Contained project-gallery modes
   Stays inside Divi row/module. No 100vw breakout.
========================================================= */

.aio-gallery-contained-65vh {
  --aio-gallery-height: clamp(400px, 65vh, 640px);
}

.aio-gallery-contained-70vh {
  --aio-gallery-height: clamp(420px, 70vh, 700px);
}

.aio-gallery-contained-80vh,
.aio-gallery-single-80vh {
  --aio-gallery-height: clamp(460px, 76vh, 760px);
}

.aio-gallery-contained-65vh,
.aio-gallery-contained-70vh,
.aio-gallery-contained-80vh,
.aio-gallery-single-80vh {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: hidden !important;
}

.aio-gallery-contained-65vh.aio-gallery-max-1200,
.aio-gallery-contained-70vh.aio-gallery-max-1200,
.aio-gallery-contained-80vh.aio-gallery-max-1200,
.aio-gallery-single-80vh.aio-gallery-max-1200 {
  max-width: 1200px !important;
}

.aio-gallery-contained-65vh.aio-gallery-max-1400,
.aio-gallery-contained-70vh.aio-gallery-max-1400,
.aio-gallery-contained-80vh.aio-gallery-max-1400,
.aio-gallery-single-80vh.aio-gallery-max-1400 {
  max-width: 1400px !important;
}

.aio-gallery-contained-65vh .et_pb_gallery_items,
.aio-gallery-contained-70vh .et_pb_gallery_items,
.aio-gallery-contained-80vh .et_pb_gallery_items,
.aio-gallery-single-80vh .et_pb_gallery_items {
  width: 100% !important;
  max-width: 100% !important;
  gap: var(--aio-gallery-gap) !important;
  padding: 0 !important;
}

.aio-gallery-contained-65vh .et_pb_gallery_item,
.aio-gallery-contained-70vh .et_pb_gallery_item,
.aio-gallery-contained-80vh .et_pb_gallery_item,
.aio-gallery-single-80vh .et_pb_gallery_item {
  flex: 0 0 var(--aio-gallery-item-width) !important;
  width: var(--aio-gallery-item-width) !important;
  max-width: none !important;
  height: var(--aio-gallery-height) !important;
  min-height: 0 !important;
}

.aio-gallery-contained-65vh .et_pb_gallery_image,
.aio-gallery-contained-70vh .et_pb_gallery_image,
.aio-gallery-contained-80vh .et_pb_gallery_image,
.aio-gallery-single-80vh .et_pb_gallery_image {
  height: 100% !important;
  background: #000 !important;
}

.aio-gallery-contained-65vh .et_pb_gallery_image img,
.aio-gallery-contained-70vh .et_pb_gallery_image img,
.aio-gallery-contained-80vh .et_pb_gallery_image img,
.aio-gallery-single-80vh .et_pb_gallery_image img {
  transform: scale(1) !important;
  transition: transform 0.7s ease !important;
}

.aio-gallery-contained-65vh .et_pb_gallery_item:hover .et_pb_gallery_image img,
.aio-gallery-contained-70vh .et_pb_gallery_item:hover .et_pb_gallery_image img,
.aio-gallery-contained-80vh .et_pb_gallery_item:hover .et_pb_gallery_image img,
.aio-gallery-single-80vh .et_pb_gallery_item:hover .et_pb_gallery_image img {
  transform: scale(1.02) !important;
}

/* =========================================================
   Centered navigation arrows
========================================================= */

.aio-gallery-carousel .aio-carousel-nav {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 50% !important;
  z-index: 20 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-left: var(--aio-gallery-arrow-offset) !important;
  padding-right: var(--aio-gallery-arrow-offset) !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
  margin: 0 !important;
}

.aio-gallery-carousel .aio-carousel-nav button {
  pointer-events: auto !important;
  width: var(--aio-gallery-arrow-size) !important;
  height: var(--aio-gallery-arrow-size) !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #111111 !important;
  font-size: 0 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18) !important;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, opacity 0.25s ease !important;
}

.aio-gallery-carousel .aio-carousel-nav button::before {
  display: block !important;
  color: currentColor !important;
  font-family: Arial, sans-serif !important;
  font-size: 30px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  transform: translateY(-1px) !important;
}

.aio-gallery-carousel .aio-carousel-prev::before {
  content: "←" !important;
}

.aio-gallery-carousel .aio-carousel-next::before {
  content: "→" !important;
}

.aio-gallery-carousel .aio-carousel-nav button:hover {
  transform: scale(1.06) !important;
  background: #111111 !important;
  color: #ffffff !important;
}

.aio-gallery-carousel .aio-carousel-nav button:disabled {
  opacity: 0.35 !important;
  cursor: default !important;
}

.aio-gallery-carousel .aio-carousel-nav button:disabled:hover {
  transform: none !important;
  background: #ffffff !important;
  color: #111111 !important;
}

@media (max-width: 980px) {
  .aio-gallery-carousel {
    --aio-gallery-gap: 22px;
    --aio-gallery-item-width: 86%;
    --aio-gallery-arrow-size: 56px;
    --aio-gallery-arrow-offset: 14px;
  }

  .aio-gallery-contained-65vh {
    --aio-gallery-height: clamp(380px, 62vh, 600px);
  }

  .aio-gallery-contained-70vh,
  .aio-gallery-contained-80vh,
  .aio-gallery-single-80vh {
    --aio-gallery-height: clamp(420px, 68vh, 660px);
  }

  .aio-gallery-carousel .aio-carousel-nav button::before {
    font-size: 27px !important;
  }
}

@media (max-width: 767px) {
  .aio-gallery-carousel {
    --aio-gallery-gap: 16px;
    --aio-gallery-item-width: 88%;
    --aio-gallery-arrow-size: 50px;
    --aio-gallery-arrow-offset: 10px;
  }

  .aio-gallery-contained-65vh {
    --aio-gallery-height: clamp(330px, 58vh, 520px);
  }

  .aio-gallery-contained-70vh,
  .aio-gallery-contained-80vh,
  .aio-gallery-single-80vh {
    --aio-gallery-height: clamp(360px, 62vh, 560px);
  }

  .aio-gallery-carousel .aio-carousel-nav button::before {
    font-size: 24px !important;
  }
}

/* =========================================================
   AIO Gallery Carousel Lightbox v1.5.0
========================================================= */

html.aio-gallery-lightbox-open,
body.aio-gallery-lightbox-open {
  overflow: hidden !important;
}

.aio-gallery-lightbox {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 32px !important;
  background: rgba(8, 8, 8, 0.92) !important;
  opacity: 0 !important;
  transition: opacity 0.22s ease !important;
}

.aio-gallery-lightbox.is-open {
  display: flex !important;
  opacity: 1 !important;
}

.aio-gallery-lightbox-stage {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.aio-gallery-lightbox-stage img {
  display: block !important;
  max-width: min(1480px, 92vw) !important;
  max-height: 88vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38) !important;
}

.aio-gallery-lightbox-caption {
  position: absolute !important;
  left: 50% !important;
  bottom: 0 !important;
  transform: translateX(-50%) !important;
  max-width: 80vw !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-align: center !important;
  opacity: 0.82 !important;
}

.aio-gallery-lightbox-close,
.aio-gallery-lightbox-prev,
.aio-gallery-lightbox-next {
  position: absolute !important;
  z-index: 1000000 !important;
  width: 58px !important;
  height: 58px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #111111 !important;
  font-size: 30px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28) !important;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease !important;
}

.aio-gallery-lightbox-close:hover,
.aio-gallery-lightbox-prev:hover,
.aio-gallery-lightbox-next:hover {
  transform: scale(1.06) !important;
  background: #111111 !important;
  color: #ffffff !important;
}

.aio-gallery-lightbox-close {
  top: 24px !important;
  right: 24px !important;
  font-size: 38px !important;
  padding-bottom: 4px !important;
}

.aio-gallery-lightbox-prev {
  left: 24px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.aio-gallery-lightbox-next {
  right: 24px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.aio-gallery-lightbox-prev:hover {
  transform: translateY(-50%) scale(1.06) !important;
}

.aio-gallery-lightbox-next:hover {
  transform: translateY(-50%) scale(1.06) !important;
}

@media (max-width: 767px) {
  .aio-gallery-lightbox {
    padding: 18px !important;
  }

  .aio-gallery-lightbox-stage img {
    max-width: 94vw !important;
    max-height: 82vh !important;
  }

  .aio-gallery-lightbox-close,
  .aio-gallery-lightbox-prev,
  .aio-gallery-lightbox-next {
    width: 48px !important;
    height: 48px !important;
    font-size: 24px !important;
  }

  .aio-gallery-lightbox-close {
    top: 14px !important;
    right: 14px !important;
    font-size: 32px !important;
  }

  .aio-gallery-lightbox-prev {
    left: 12px !important;
  }

  .aio-gallery-lightbox-next {
    right: 12px !important;
  }

  .aio-gallery-lightbox-caption {
    display: none !important;
  }
}
