/* Static replacements for Elementor Pro's JS-built gallery and carousel (see site.js). */

/* Justified gallery: each tile grows in proportion to its aspect ratio (--w/--h). */
.bd-gallery .elementor-gallery__container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bd-gallery .elementor-gallery__container::after { content: ""; flex-grow: 999; }
.bd-gallery a.e-gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  flex-grow: calc(var(--w) / var(--h));
  flex-basis: calc(var(--w) / var(--h) * 270px);
}
.bd-gallery a.e-gallery-item img.bd-gallery-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--w) / var(--h);
  object-fit: cover;
  transition: opacity .3s;
}
.bd-gallery a.e-gallery-item:hover img.bd-gallery-img { opacity: .85; }
@media (max-width: 1024px) {
  .bd-gallery a.e-gallery-item { flex-basis: calc(var(--w) / var(--h) * 200px); }
}
@media (max-width: 767px) {
  .bd-gallery a.e-gallery-item { flex-basis: calc(var(--w) / var(--h) * 140px); }
}

/* Lightbox */
.bd-lightbox {
  position: fixed; inset: 0; z-index: 100000;
  display: none; align-items: center; justify-content: center;
  background: rgba(20, 20, 20, .94);
}
.bd-lightbox.bd-open { display: flex; }
.bd-lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; }
.bd-lightbox button {
  position: absolute; border: 0; background: none; color: #fff; cursor: pointer;
  font: 300 44px/1 sans-serif; padding: 12px 16px; opacity: .8;
}
.bd-lightbox button:hover, .bd-lightbox button:focus-visible { opacity: 1; }
.bd-lb-close { top: 6px; right: 8px; }
.bd-lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.bd-lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.bd-lb-count {
  position: absolute; bottom: 14px; left: 0; right: 0; text-align: center;
  color: #ccc; font: 14px sans-serif;
}
html.bd-noscroll, html.bd-noscroll body { overflow: hidden; }

/* Testimonials: Swiper never runs, so show one slide at a time ourselves. */
.bd-testimonials .swiper-wrapper { display: block; transform: none !important; }
.bd-testimonials .swiper-slide { display: none; width: 100% !important; }
.bd-testimonials .swiper-slide.bd-active { display: block; animation: bd-fade .6s; }
.bd-testimonials .swiper-pagination,
.bd-testimonials .elementor-swiper-button { display: none; }
.bd-dots { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.bd-dots button {
  width: 10px; height: 10px; padding: 0; border-radius: 50%;
  border: 0; background: #ccc; cursor: pointer;
}
.bd-dots button[aria-current="true"] { background: #888; }
@keyframes bd-fade { from { opacity: 0; } to { opacity: 1; } }
