/* Reset and basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Helvetica Neue', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

.gallery-title {
  text-align: center;
  margin: 40px 0;
  font-size: 2.5rem;
  color: #222;
}

/* Gallery */
.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 7px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  background-color: #fff;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 70%;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  transition: all 0.6s ease;
}

.animate-next {
  animation: animateNext 0.6s forwards;
}

.animate-prev {
  animation: animatePrev 0.6s forwards;
}

@keyframes animateNext {
  0% {
    opacity: 0;
    transform: translateX(100px) scale(0.8) rotateY(20deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1) rotateY(0);
  }
}

@keyframes animatePrev {
  0% {
    opacity: 0;
    transform: translateX(-100px) scale(0.8) rotateY(-20deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1) rotateY(0);
  }
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 1001;
  transition: transform 0.3s ease;
}

.close-btn:hover {
  transform: rotate(90deg);
  color: #f00;
}

/* Modern Navigation Buttons */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-size: 40px;
  color: #fff;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 1001;
  transition: all 0.4s ease;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  color: #000;
  transform: translateY(-50%) scale(1.2);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.7);
}

.prev {
  left: 5%;
}

.next {
  right: 5%;
}

/* Preview Thumbnails */
.preview-strip {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  overflow-x: auto;
  padding: 10px 0;
  width: 90%;
}

.preview-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 5px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
}

.preview-thumb:hover {
  opacity: 1;
  transform: scale(1.1);
}

.preview-thumb.active {
  opacity: 1;
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

@media (max-width: 600px) {
  .nav-btn {
    font-size: 30px;
    padding: 12px;
  }

  .preview-thumb {
    width: 60px;
    height: 45px;
  }
}
