/* ========================================
   KC TRAVEL - GALLERY SECTION STYLES
   ======================================== */

/* Gallery Section */
.gallery-section {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

/* Gallery Item Container */
.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  height: 350px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2);
}

/* Gallery Image */
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Gallery Overlay */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.9) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

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

/* Gallery Content */
.gallery-content {
  width: 100%;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-content {
  transform: translateY(0);
}

.gallery-title {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.gallery-desc {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin-bottom: 15px;
  font-weight: 400;
}

/* Gallery Zoom Button */
.gallery-zoom-btn {
  background: #6366f1;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.gallery-zoom-btn:hover {
  background: #4f46e5;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.6);
}

.gallery-zoom-btn i {
  line-height: 1;
}

/* ========================================
   LIGHTBOX MODAL STYLES
   ======================================== */

.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
  display: flex;
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Lightbox Content */
.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#lightboxImage {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Lightbox Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 28px;
  transition: all 0.3s ease;
  z-index: 10001;
}

.lightbox-close {
  top: 30px;
  right: 30px;
}

.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.9);
  border-color: rgba(239, 68, 68, 1);
  transform: rotate(90deg);
}

.lightbox-prev {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  background: rgba(99, 102, 241, 0.9);
  border-color: rgba(99, 102, 241, 1);
  transform: translateY(-50%) translateX(-5px);
}

.lightbox-next {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next:hover {
  background: rgba(99, 102, 241, 0.9);
  border-color: rgba(99, 102, 241, 1);
  transform: translateY(-50%) translateX(5px);
}

.lightbox-close i,
.lightbox-prev i,
.lightbox-next i {
  line-height: 1;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 992px) {
  .gallery-item {
    height: 300px;
  }

  .gallery-title {
    font-size: 20px;
  }

  .gallery-desc {
    font-size: 13px;
  }

  .gallery-zoom-btn {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .gallery-item {
    height: 280px;
  }

  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .lightbox-close {
    top: 20px;
    right: 20px;
  }

  .lightbox-prev {
    left: 20px;
  }

  .lightbox-next {
    right: 20px;
  }

  .lightbox-content {
    max-width: 95%;
  }
}

@media (max-width: 576px) {
  .gallery-item {
    height: 250px;
  }

  .gallery-overlay {
    padding: 20px;
  }

  .gallery-title {
    font-size: 18px;
  }

  .gallery-desc {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .gallery-zoom-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  .lightbox-close {
    top: 15px;
    right: 15px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

/* ========================================
   ACCESSIBILITY & FOCUS STATES
   ======================================== */

.gallery-zoom-btn:focus,
.lightbox-close:focus,
.lightbox-prev:focus,
.lightbox-next:focus {
  outline: 3px solid rgba(99, 102, 241, 0.6);
  outline-offset: 3px;
}

/* Loading Animation for Images */
.gallery-img {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.gallery-img[src] {
  animation: none;
  background: none;
}
