/* Photo Gallery Styles */
.photo-gallery {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.photo-gallery h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 32px;
  color: #333;
}

/* Main carousel container */
.gallery-carousel {
  position: relative;
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0 60px;
}

.gallery-carousel-track {
  display: flex;
  overflow: hidden;
  gap: 20px;
  transition: transform 0.5s ease;
}

.gallery-carousel-item {
  flex: 0 0 calc(33.333% - 14px);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  aspect-ratio: 3/4;
  opacity: 1;
}

.gallery-carousel-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

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

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 191, 208, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.gallery-item-overlay i {
  font-size: 48px;
  color: white;
}

/* Carousel navigation arrows */
.gallery-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.3s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-nav-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

.gallery-nav-arrow.prev {
  left: 10px;
}

.gallery-nav-arrow.next {
  right: 10px;
}

/* Thumbnail ribbon */
.gallery-thumbnails {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #00bfd0 #f0f0f0;
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 8px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
  background: #00bfd0;
  border-radius: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
  background: #009bb0;
}

.gallery-thumbnails-track {
  display: flex;
  gap: 10px;
  padding: 10px 0;
}

.gallery-thumbnail {
  flex: 0 0 120px;
  height: 160px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.gallery-thumbnail:hover {
  transform: scale(1.05);
  border-color: #00bfd0;
}

.gallery-thumbnail.active {
  border-color: #00bfd0;
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .photo-gallery h2 {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .gallery-carousel {
    padding: 0 50px;
  }

  .gallery-carousel-track {
    gap: 0;
  }

  .gallery-carousel-item {
    flex: 0 0 100%;
    pointer-events: none;
    cursor: default;
  }

  .gallery-carousel-item:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .gallery-item-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .gallery-carousel-item:hover .gallery-item-overlay,
  .gallery-carousel-item:active .gallery-item-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .gallery-thumbnail {
    flex: 0 0 80px;
    height: 110px;
  }

  .gallery-nav-arrow {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}
