/* Set your desired image area height here */
.igs-gallery {
  --igs-media-height: 720px;   /* change this value to taste */
}

/* Let Swiper overflow so captions aren’t cut off */
.igs-gallery .swiper {
  overflow: hidden;
}

/* Stack image + caption vertically */
.igs-gallery .igs-figure {
  display: flex;
  flex-direction: column;
  background: var(--bg-color-content);
}

/* The image box gets the fixed height; caption flows below */
.igs-gallery .igs-media {
  aspect-ratio: auto !important;   /* cancel previous ratio rule */
}

@media (min-width: 1025px) {
  .igs-gallery .igs-media {
    height: var(--igs-media-height);
  }
}

/* Make the image fill that box nicely */
.igs-gallery .igs-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* use 'contain' if you prefer full image letterboxed */
}

/*.igs-gallery .swiper { padding-bottom: 32px; }*/

/*.igs-gallery .swiper-button-prev,
.igs-gallery .swiper-button-next { 
  width: 44px; 
  height: 44px; 
  border-radius: 0 !important;
  color: var(--text-color) !important; 
  --swiper-navigation-color: var(--text-color);
}*/

.igs-gallery .igs-caption {
  font-size: var( --e-global-typography-57cc804-font-size );
  margin-top: 8px;
  margin-bottom: 8px;
  padding-left: 50px;
  padding-right: 50px;
  height: 40px;

  position: static !important;    /* cancel overlay */
  z-index: auto !important;
  color: var(--text-color);

}

@media (max-width: 1024px) {
  .igs-gallery .igs-caption {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (max-width: 767px) {
  .igs-gallery .igs-caption {
    padding-left: 20px;
    padding-right: 20px;
  }
}


.igs-gallery.igs-captions-overlay .igs-figure { position: relative; }
.igs-gallery.igs-captions-overlay .igs-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0; padding: 8px 10px;
  background: rgba(0,0,0,.45); color: #fff;
}
.igs-gallery.igs-captions-none .igs-caption { display: none; }

.igs-fallback-grid {
  display: grid;
  grid-template-columns: repeat( auto-fill, minmax(220px, 1fr) );
  gap: 16px;
}




/* --- IGS Swiper Arrows using your custom SVG --- */
.igs-gallery .swiper-button-prev,
.igs-gallery .swiper-button-next {
  /*color: var(--text-color);*/
  color: var(--e-global-color-secondary);
  position: absolute; /* keep Swiper's normal placement */
}

.igs-gallery .swiper-pagination-bullet {
  background: var(--e-global-color-primary);
  opacity: 1;
}

.igs-gallery .swiper-pagination-bullet-active {
  background: var(--e-global-color-secondary);
}

/* remove Swiper's built-in icon, keep button size */
.igs-gallery .swiper-button-prev::after,
.igs-gallery .swiper-button-next::after {
  content: "" !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

/* overall icon size */
.igs-gallery {
  --igs-arrow-size: 48px;      /* smaller = thinner feel, try 48–56px */
  --igs-arrow-edge-offset: 26px; /* distance from left/right edges */
}

/* common shape rendering */
.igs-gallery .swiper-button-next::before,
.igs-gallery .swiper-button-prev::before {
  content: "";
  position: absolute;
  width: var(--igs-arrow-size);
  height: var(--igs-arrow-size);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: currentColor; /* follows var(--text-color) */

  -webkit-mask-image: url('/wp-content/uploads/2025/10/arrow-right-1.svg');
  mask-image: url('/wp-content/uploads/2025/10/arrow-right-1.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* mirror right SVG for the left arrow */
.igs-gallery .swiper-button-prev::before {
  transform: translate(-50%, -50%) scaleX(-1);
}

/* adjust position a bit away from the edges */
.igs-gallery .swiper-button-next { right: var(--igs-arrow-edge-offset); }
.igs-gallery .swiper-button-prev { left:  var(--igs-arrow-edge-offset); }

/* hover/focus */
.igs-gallery .swiper-button-prev:focus-visible,
.igs-gallery .swiper-button-next:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
