/* Gallery Padding */
.slider-padding {
  max-width: unset !important;
}

/* Gallery Section */
.gallery-section {
  position: relative;
  background-color: #5d5179;
  overflow: hidden;
}

.gallery-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* height is set in JS file - DO NOT CHANGE THIS */
  padding: 0 5vw;
  will-change: transform;
}

.gallery-title {
  position: absolute;
  font-size: 4rem;
  font-weight: bold;
  line-height: 1.2;
  color: white;
  z-index: 5;
  /* top, left values are set in JS file */
}

.gallery-item {
  position: absolute;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
  /* top, left values are set in JS file */
}

.gallery-item:hover {
  transform: scale(1.05);
  z-index: 10;
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding-top: 2rem;
  padding-bottom: 3rem;
  padding-left: 2rem;
  padding-right: 2rem;
  /* opacity: 0; */
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* .gallery-item:hover .overlay {
  opacity: 1;
} */

.overlay h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.overlay p {
  font-size: 0.8rem;
  color: white;
  /* opacity: 0.8; */
  opacity: 0;
}

.gallery-item:hover .overlay p {
  opacity: 0.8;
}

/* Images of various sizes */
.gallery-item.x-large {
  height: 60vh;
  aspect-ratio: 4/5;
}
.gallery-item.large {
  height: 60vh;
  aspect-ratio: 4/7;
}
.gallery-item.medium {
  height: 50vh;
  aspect-ratio: 4/5;
}
.gallery-item.small {
  height: 40vh;
  aspect-ratio: 4/5;
}
.gallery-item.landscape {
  height: 40vh;
  aspect-ratio: 7/5;
}
.gallery-item.long-landscape {
  height: 40vh;
  aspect-ratio: 11/7;
}
.gallery-item.square {
  height: 40vh;
  aspect-ratio: 1/1;
}
.gallery-item.small-square {
  height: 30vh;
  aspect-ratio: 1/1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* text shows up */
.gallery-item .text-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* textbox with background */
.gallery-item.textbox {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgb(47, 41, 61) 0%, rgb(93, 81, 121) 100%);
  padding: 2rem;
}

.gallery-item:hover .text-overlay {
  opacity: 1;
}

.text-overlay h4,
.textbox h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: white;
}

.text-overlay p,
.textbox p {
  font-size: 0.9rem;
  opacity: 0.8;
  color: white;
}

/* Navigation Hint */
.scroll-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.5;
  z-index: 100;
  pointer-events: auto;
  color: white;
  text-decoration: none;
}
.scroll-hint:hover {
  text-decoration: underline;
}

.scroll-hint svg {
  width: 24px;
  height: 24px;
  animation: slide 2s ease-in-out infinite;
}

@keyframes slide {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10px);
  }
}

/* ----- Tablet and Mobile View (<1366px) ----- */
@media screen and (max-width: 1367px) {
  .gallery-item .overlay {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .gallery-container .text-overlay h4,
  .gallery-container .textbox h4 {
    font-size: 0.9rem !important;
    line-height: 1.5rem !important;
    margin-bottom: 0.4rem;
  }

  .gallery-container .text-overlay p,
  .gallery-container .textbox p {
    font-size: 0.85rem;
  }

  .overlay p {
    opacity: 0.8;
  }
}

/* ----- Mobile View (<768px) ----- */
@media screen and (max-width: 767px) {
  .on-services-page .gallery-item.medium {
    width: 84vw;
  }

  .on-services-page .gallery-item.long-landscape {
    width: 94vw;
  }
}

/* ----- Small Mobile (<400px) ----- */
@media screen and (max-width: 399px) {
  .on-services-page .gallery-item.medium {
    width: 82vw;
  }

  .on-services-page .gallery-item.long-landscape {
    width: 92vw;
  }

  .on-services-page .gallery-item .overlay {
    padding: 1rem 1.5rem;
  }
}
