/* ── Full page width breakout ────────────────────────────────────────────── */

/* Remove padding from parent Elementor element when full page width is active */
.elementor-element > .e-con-inner:has(.elementor-widget-blaek-image-gallery-slider .blaek-image-gallery-slider--page-width) {
  padding: 0 !important;
}

/* The widget element and its container must stay overflow-visible so the breakout is not clipped */
.elementor-widget-blaek-image-gallery-slider:has(.blaek-image-gallery-slider--page-width),
.elementor-widget-blaek-image-gallery-slider:has(.blaek-image-gallery-slider--page-width) > .elementor-widget-container {
  overflow: visible !important;
}

/* JS sets width + margin-left on .elementor-widget-blaek-image-gallery-slider */
.blaek-image-gallery-slider--page-width {
  box-sizing: border-box;
}

/* Inner wrapper: constrains content to --content-width inside the full-vw breakout */
.blaek-image-gallery-slider__inner {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

/* ── Base ───────────────────────────────────────────────────────────────── */

.blaek-image-gallery-slider {
  position: relative;
}

.blaek-image-gallery-slider--fullwidth .blaek-igs-swiper {
  overflow: visible;
}

.blaek-igs-widget-title {
  margin-top: 0;
  margin-bottom: 40px;
}

.blaek-igs-slide {
  height: auto;
}

.blaek-igs-slide__image {
  position: relative;
  display: block;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: #f1f1f1;
  cursor: zoom-in;
  text-decoration: none;
}

.blaek-igs-slide__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blaek-igs-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}

.blaek-igs-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.32s ease;
}

.blaek-igs-lightbox__inner {
  position: relative;
  width: min(100%, 1200px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 50px 70px 50px;
  transform: translateY(12px) scale(0.985);
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.blaek-igs-lightbox.is-open .blaek-igs-lightbox__inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.blaek-igs-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  transform: none;
  min-width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #ffffff;
  color: #111827;
  font-size: 20px;
  line-height: 1;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.blaek-igs-lightbox__close i,
.blaek-igs-lightbox__close svg {
  display: block;
}

.blaek-igs-lightbox__close svg {
  width: 1em;
  height: 1em;
}

/* Swiper inside the lightbox */
.blaek-igs-lightbox__swiper {
  width: 100%;
  overflow: hidden;
}

.blaek-igs-lightbox__slide {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.blaek-igs-lightbox__media {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  min-height: 160px;
}

.blaek-igs-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 200px);
  width: auto;
  height: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Swiper sets swiper-lazy-loaded once the image is fully loaded */
.blaek-igs-lightbox__image.swiper-lazy-loaded {
  opacity: 1;
}

/* Lightbox prev / next navigation buttons */
.blaek-igs-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.blaek-igs-lightbox__nav:hover,
.blaek-igs-lightbox__nav:focus {
  background: rgba(255, 255, 255, 0.3);
}

.blaek-igs-lightbox__nav.swiper-button-disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.blaek-igs-lightbox__prev {
  left: 12px;
  transform: translateY(-50%) rotate(180deg);
}

.blaek-igs-lightbox__next {
  right: 12px;
}

.blaek-igs-lightbox__meta {
  margin-top: 12px;
  text-align: center;
}

body.blaek-igs-lightbox-open {
  overflow: hidden;
}

.blaek-igs-slide__title {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: #111827;
}

.blaek-igs-slide__caption {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
}

.blaek-igs-slide__description {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
}

/* Navigation */
.blaek-igs-nav {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.blaek-igs-nav__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: rgb(255 255 255 / 80%);
  border-radius: 100px;
  padding: 20px 24px 20px 24px;
  gap: 32px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.blaek-igs-nav__btn {
  width: auto;
  height: auto;
  padding: 0;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
}

.blaek-igs-nav__btn svg {
  width: 10px;
  height: 20px;
}

.blaek-igs-nav__btn.blaek-igs-prev {
  transform: rotate(180deg);
}

.blaek-igs-nav__btn:hover,
.blaek-igs-nav__btn:focus {
  background: transparent;
}

.blaek-igs-nav__btn.swiper-button-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.elementor-element.elementor-widget-blaek-image-gallery-slider:has(.blaek-image-gallery-slider--fullwidth),
.elementor-element.elementor-widget-blaek-image-gallery-slider .elementor-widget-container {
  overflow: visible !important;
}

/* Only the container (e-parent), not the widget, gets overflow hidden so the widget can stay overflow visible */
.elementor-element.e-parent:has(.elementor-widget-blaek-image-gallery-slider .blaek-image-gallery-slider--fullwidth) {
  overflow: hidden !important;
}


@media (max-width: 767px) {
  .blaek-igs-lightbox {
    padding-inline: 0;
  }

  .blaek-igs-lightbox__inner {
    padding: 0;
    padding-inline: 20px;
  }

  .blaek-igs-lightbox__close {
    top: -18px;
    right: 0;
  }
}