

.slc-gallery {
  opacity: 1;
  transition: opacity 0.4s;
  overflow: hidden;
  -moz-user-select: -moz-none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* .slc-gallery.fade-in {
  opacity: 0;
} */

.slc-gallery .glide {
  min-width: 100%;
}

.slc-gallery * {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.slc-gallery .gallery-mobile .controls-outer,
.slc-gallery .glide__controls {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.slc-gallery .glide__control {
  position: absolute;
  opacity: 0.9;
  padding: 20px;
  width: 6%;
  min-width: 60px;
  box-sizing: border-box;
  pointer-events: all;
}

.slc-gallery .glide__control img {
  width: 100%;
  object-fit: contain;
  object-position: center;
  aspect-ratio: 1;
}

.slc-gallery .glide__arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 7%;
  min-width: 65px;
}

.slc-gallery .glide__control:hover {
  opacity: 1;
  cursor: pointer;
}

.slc-gallery .glide__arrow--left {
  left: 0;
}

.slc-gallery .glide__arrow--right {
  right: 0;
}

.slc-gallery .top-right {
  top: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: absolute;
}

.slc-gallery .top-right .glide__control {
  position: static;
  display: inline-block;
}

.slc-gallery .glide__slides {
  margin-bottom: 0;
}

.slc-gallery .glide__slide {
  margin-bottom: 0;
  align-self: center;
  width: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-transform: translate3D(0px, 0px, 0px);
  display: flex;
  align-items: center;
}

.slc-gallery .glide__track {
  transition: all 0.3s;
}

.slc-gallery-desktop .clear-left {
  clear: left;
}

.slc-gallery-desktop .thumbnails {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.slc-gallery .thumbnail-item {
  background: #4F89A8;
  float: left;
  width: 100%;
  overflow: hidden;
  position: relative;
  height: 0;
}

.slc-gallery .thumbnail-item.loaded {
  height: auto;
}

.slc-gallery .thumbnail-item::before {
  content: "";
  float: left;
  padding-bottom: calc(550 / 1024 * 100%); 
}

.slc-gallery-desktop .thumbnail-item.is-vertical::before {
  padding-bottom: calc(805 / 750  * 100%);
}

.slc-gallery .thumbnail-item img:not(.play) {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slc-gallery-desktop .thumbnail-item img:hover {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.gallery-expanded .carousel-wrapper {
  position: fixed;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 10000000000;
}

.gallery-expanded .overlay {
  position: absolute;
  width: 200%;
  height: 200%;
  background-color: rgba(0,0,0,0.7);
  left: -50%;
  top: -50%;
}

.gallery-expanded .glide__slides,
.gallery-expanded .glide {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.gallery-expanded .glide-outer {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100vw;
}

.gallery-expanded .controls-outer {
  position: relative;
  display: inline-block;
  pointer-events: none;
}

.gallery-expanded .glide__expand {
  display: none;
}

.exit, .left, .right {
  pointer-events: all;
}

.gallery-expanded .placeholder-imgs {
  opacity: 0;
  pointer-events: none;
}

.gallery-expanded .video_thumb .thumbnail,
.gallery-expanded .placeholder-img,
.gallery-expanded .glide__slide .slide-img {
  display: block;
  margin: 0 auto;
  object-fit: contain;
  height: auto;
  width: 100%;
}

.gallery-expanded .landscape {
  height: auto;
  max-width: 1024px;
  max-height: 90vh;
  width: 90vw;
}

.gallery-expanded .placeholder-img,
.gallery-expanded .slide-img,
.gallery-expanded .video_container,
.gallery-expanded .has_video,
.gallery-expanded .portrait {
  height: auto;
  max-height: 90vh;
  width: auto;
  max-width: 90vw;
}

.gallery-expanded .video_container {
  overflow: hidden;
  position: relative;
}

.gallery-expanded .video_container video {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
}

.gallery-expanded .video_container.nothumb {
  aspect-ratio: auto;
}

.gallery-expanded .video_thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.gallery-expanded .video_thumb .thumbnail {
  object-fit: cover;
  object-position: center;
  height: 100%;
  width: 100%;
  position: absolute;
  filter: blur(5px);
  transform: scale(1.1);
}

.gallery-expanded .video_thumb .play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  cursor: pointer;
  transition: filter 0.3s;
}

.gallery-expanded .video_thumb .play:hover {
  filter: invert(0.5);
}

.gallery-expanded .transition-400 {
  transition: all 0.4s;
}

.gallery-expanded .invisible {
  opacity: 0;
  z-index: -1;
  pointer-events: none;
}

.gallery-mobile .glide-outer {
  position: relative;
}

.gallery-mobile .glide__slide {
  aspect-ratio: 1024 / 550;
  width: 100%;
}

.slc-gallery[data-gallery-title*="Programming"] .glide__slide {
  aspect-ratio: auto;
}

.gallery-mobile .glide__slide .slide-img {
  width: 100%;
  object-fit: contain;
}

.gallery-mobile .glide__track,
.gallery-mobile .glide__slides,
.gallery-mobile .glide__slide {
  width: 100%;
}

.gallery-mobile .placeholder-img {
  opacity: 0;
  pointer-events: none;
}

.slc-gallery-mobile .thumbnails {
  margin-top: 4px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 20px) / 6); /* 6 items, accounting for gaps */
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 14px;
}

.slc-gallery-mobile .thumbnail-item {
  width: 100%;
  aspect-ratio: 1024 / 550;
  overflow: hidden;
  display: block;
  background: #f3f3f3;
  position: relative;  /* ← Add this */
}

.slc-gallery-mobile .thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

.slc-gallery-mobile .thumbnail-item.loading {
  opacity: 0;
  height: 0;
  width: 0;
}

.slc-gallery-mobile .scroll-mobile {
  width: calc(100% + 4px);
  margin-right: -4px;
}

.slc-gallery-mobile .scroll-mobile .thumbnail-item {
  aspect-ratio: 1024 / 550;
  overflow: hidden;
  width: 100%;
}

.slc-gallery-mobile .gallery-5-imgs .thumbnails {
  grid-template-columns: repeat(5, 1fr);
}

.slc-gallery-mobile .gallery-4-imgs .thumbnails {
  grid-template-columns: repeat(4, 1fr);
}

.slc-gallery-mobile .gallery-3-imgs .thumbnails {
  grid-template-columns: repeat(3, 1fr);
}

.slc-gallery-mobile .thumbnails .is-active::after {
  content: ""; 
  position: absolute;
  border: 1px solid #000;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px; 
  z-index: 10;
}

.gallery-mobile .video_container {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.gallery-mobile .video_thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.gallery-mobile .video_thumb .thumbnail {
  object-fit: cover;
  object-position: center;
  height: 100%;
  width: 100%;
  position: absolute;
  filter: blur(5px);
  transform: scale(1.1);
  top: 0;
  left: 0;
}

.gallery-mobile .video_thumb .play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  cursor: pointer;
  transition: filter 0.3s;
}

.gallery-mobile .video_thumb .play:hover {
  filter: invert(0.5);
}

.gallery-mobile .glide__slide video {
  width: 100%;
  height: 100%;
  background: #000;
  aspect-ratio: 1;
}

.gallery-expanded .placeholder-img.has_video,
.gallery-mobile .placeholder-img.has_video {
  aspect-ratio: 1;
}

.thumbnail-item .play {
  height: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
}

.opacity-0 {
  opacity: 0;
}

.slc-gallery-desktop .gallery-mobile {
  display: none;
}

.gallery-expanded .controls-outer,
.gallery-expanded .video_container {
  height: auto;
  width: auto;
}

.gallery-expanded .controls-outer {
  position: relative;
}

.slc-gallery * {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.aspect-ratio-sq .video_container {
  aspect-ratio: 1;
}

.aspect-ratio-sq .video_container video {
  width: 100%;
  height: 100%;
  background: #000;
  aspect-ratio: 1;
}

.safari .video_thumb {
  opacity: 0;
}

.ff-hide {
  max-height: calc(100% - 40px);
  opacity: 0;
}



@media (max-width: 900px) {
  .slc-gallery .glide__expand {
    display: none !important;
  }
}


@media (max-width: 480px) {
  .slc-gallery .glide__arrow {
    padding: 10px;
  }
  .slc-gallery .glide__arrow {
    min-width: auto;
    max-width: auto;
    width: 40px;
  }
}
