.mobile-slideshow-works {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.mobile-slideshow-works .slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}



.work-caption {
  display: none;
}


.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 80px;
  row-gap: 80px;
  margin-bottom: 5em;
}

.work-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.work-item img {
  max-width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
}

/* .work-item {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
} */


/*
.work-item img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
} */




.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}





/* Work Info Styling */
.work-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px;
  text-align: center;
}

/* Style for the filter buttons (if needed) */
.filter {
  font-size: 0.8em;
  margin-bottom: 1.5em;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 2.5em auto 3em auto;
}

.filter-button  {
  border: none;
  cursor: pointer;
  color: #9d9d9c;
  font-size: 1.6em;
  padding-right: 11px;
  padding-left: 11px;
  padding-top: 1px;
  padding-bottom: 1px;
  margin: 0;
  background-color: white;
  outline: none;
}

.filter-button:focus:not(:focus-visible) {
  outline: none; /* Removes outline for mouse interactions */
}

.filter-button.active, .filter-button:hover {

  color: black;
}


/* 💡 lightbox */
body.gallery-fancybox .fancybox__container {
  display: flex;
  flex-direction: column;
  background-color: white !important;
  /* cursor: url('/images/icons_Homepage_arrow_right.cur'), auto; */
  cursor:pointer;

}

.fancybox__slide,
.fancybox__content {
  cursor: url('/images/icons_Homepage_arrow_right.cur'), auto !important;

}


.fancybox__slide.can-zoom_in {
  cursor: url('/images/icons_Homepage_arrow_right.cur'), auto !important;
   cursor: pointer;
  mix-blend-mode: difference;
  pointer-events: none;
}



.fancybox__image {
  overflow: hidden;
}

.fancybox__toolbar {
  background: none !important;
}
.fancybox__caption {
  font-family: "minion-3", serif !important;
  font-size: 1.2rem;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 10px;
  color: black;
  text-align: center
}




.fancybox__caption em {
  font-family: "minion-3", serif !important;
  display:inline;
}

.fancybox__image {
  max-width: 100% !important;
  max-height: 100% !important;

}



.gallery-fancybox,
.fancybox__container,
.fancybox__backdrop,
.fancybox__carousel,
.fancybox__slide,
.fancybox__content {
    background-color: white;

}

.fancybox__container .fancybox__caption,
.fancybox__container .fancybox__toolbar,
.fancybox__container .fancybox__nav {
  font-family: "minion-3", serif !important;

}

.carousel-control-prev,
.carousel-control-next {
  display: none;
  }

  .fancybox__nav {
   display: none;
  }


body.fancybox-open .navbar-toggler {
  display: none !important;
}

.fancybox__container .fancybox__button--close {
  background: url('/images/icons_Homepage_v2-02.svg') no-repeat center;
  z-index: 99999;
  pointer-events: auto !important;
  box-shadow: none !important;
  --carousel-button-svg-filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0)) !important;
  width: 30px;
  height: 30px;
}



.carousel__button {
  width: 20px;
  height:20px;
}

.carousel__button svg circle {
  stroke-width: 0;
}

.carousel__button svg g {
  stroke-width: 0;
}

body.gallery-fancybox .carousel__button svg {
  stroke-width: 1;
  color: rgb(67, 65, 65) !important;
}

.fancybox__container {
  --carousel-button-svg-filter: none !important;
}




button.carousel__button.fancybox__button--zoom {
  display: none;
}
.fancybox__counter {
  position: absolute;
  font-size: 1.2em !important;
  color: black;
  z-index: 1000;
  text-shadow: var(--fancybox-toolbar-text-shadow, 0 0 0 rgba(0, 0, 0, 0)) !important;
  line-height: 0;
  padding-top: 10px;
}

/* Ensure the arrows are visible */
/* .fancybox__nav {
  display: flex !important;
} */


.fancybox__nav .carousel__button.is-next {
  color: black;
}

.fancybox__nav .carousel__button.is-prev {
  color: black;
}

.fancybox__slide {
  position: relative;
}





@media (max-width: 576px) {

  .index-title {
    padding-left: 0.4em;
    margin-bottom: 1em;
    margin-top: 1em;
  }

  .index-title-works {
    padding-left: 0.4em;
    margin-bottom: 1em;
    margin-top: 1em;
  }



.works-heading {
  font-size: 5em;
}



.filter-button {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
}

.filter-buttons {
  flex-wrap: wrap;
  margin-top: 2em;
  gap: 0;

}

  .fancybox__image {
    max-height: 70vh !important;
    width: auto;
    height: auto;

  }
  .fancybox__button--close {
    transform: scale(1);
  }

  .fancybox__container {
    display: flex;
    flex-direction: column;
  }

  .fancybox__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 10px 10px;
    color: black;
    font-size: 14px;
  }

  .work-item {
    padding: 0 10px;
  }

}


@media (max-width: 768px) {

  .filter-buttons {
    flex-wrap: wrap;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 10px;

  }



  .work-item img {
    max-height: none;
  }

}

@media (min-width: 769px) and (max-width: 992px) {
  .works-grid {
    grid-template-columns:  1fr;
    column-gap: 30px;
    row-gap: 0;
  }

.work-item img {
  max-height: 500px;
}


  .filter-buttons {
    flex-wrap: wrap;
  }

  .fancybox__thumbs {
    display: none !important;
  }


}

@media (min-width: 1100px) and (max-width:1300px) {
  .work-item img {
    max-height: 240px;

  }

}

@media (min-width: 1301px) and (max-width:1599px) {
  .work-item img {
    max-height: 290px;
  }
  .fancybox__thumbs {
    display: none !important;
  }
}

@media (min-width: 1600px) and (max-width:3000px) {
  .work-item img {
    max-height: 400px;
  }

    .fancybox__thumbs {
      display: none !important;
    }

}

/* ----- MOBILE VIEW (Up to 992px) ----- */
@media (max-width: 992px) {
  .fancybox__thumbs {
    display: none !important;
  }
  .works-grid {
    grid-gap: 0;
  }
  .desktop-view {
    display: none;
  }

  .mobile-view {
    display: block;
  }

  /* Enable mobile slideshow */
  .mobile-slideshow-works {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-slideshow-works .slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    margin: 0 auto;
  }

  /* Carousel indicators */
  .carousel-indicators-works {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
  }

  .indicator-works {
    width: 10px;
    height: 10px;
    background: #aaa;
    border-radius: 50%;
    cursor: pointer;
  }

  .carousel-indicators-works .indicator-works {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #bbb;
    transition: background-color 0.3s ease;
  }

  .carousel-indicators-works .indicator-works.active {
    background-color: #333;
  }

  /* Hide scrollbar for Chrome/Safari */
  .mobile-slideshow-works::-webkit-scrollbar {
    display: none;
  }

  /* Hide Fancybox */
  .fancybox__container {
    display: none;
  }

  .mobile-caption {
    display: block;
    text-align: center;
    font-size: 1em;
    color: #333;
    max-width: 100%;
    margin: 20px 40px 80px ;
    line-height: 1.2em;
    font-weight: 600;
  }
}


/* ----- DESKTOP VIEW (Above 993px) ----- */
@media (min-width: 993px) {
  .fancybox__thumbs {
    display: none !important;
  }
  .desktop-view {
    display: block;
  }

  .mobile-view {
    display: none;
  }

  /* Disable mobile slideshow */
  .mobile-slideshow-works {
    display: none;
  }

  /* Disable carousel indicators */
  .carousel-indicators-works {
    display: none;
  }

  /* Enable grid layout */
  .works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 80px;
    column-gap: 80px;
  }

  .mobile-caption {
    display: none;
  }
}
