/* ========== ANIMATIONS & KEYFRAMES ========== */

/* Reveal Animations (Triggered by Intersection Observer) */
.reveal {
  opacity: 0;
  visibility: hidden;
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0) scale(1);
}

/* Fade Up */
.fade-up {
  transform: translateY(50px);
}

/* Fade Left */
.fade-left {
  transform: translateX(-50px);
}

/* Fade Right */
.fade-right {
  transform: translateX(50px);
}

/* Zoom In */
.zoom-in {
  transform: scale(0.9);
}

/* Staggered Delay for Lists/Cards */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* Background Zoom Animation (Hero) */
@keyframes bgZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

/* Bounce (Scroll Indicator) */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

/* Page Transition Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--black);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 156, 222, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hover Ripple Effect on Buttons */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  background-color: rgba(255, 255, 255, 0.4);
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ========== GALLERY & LIGHTBOX ANIMATIONS ========== */
.fade-in-item {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fade-in-item.show {
  opacity: 1;
  transform: scale(1);
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1;
}

.lightbox-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.lightbox-toolbar {
  position: absolute;
  top: 20px;
  right: 30px;
  z-index: 3;
}

.lightbox-close {
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: none;
}

.lightbox-btn {
  pointer-events: auto;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255,255,255,0.1);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-btn:hover {
  background: var(--primary);
  transform: scale(1.1);
}

#lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s ease;
}

#lightbox-img.zoom-in-active {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 768px) {
  .lightbox-nav {
    padding: 0 10px;
  }
  .lightbox-btn {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  .lightbox-close {
    font-size: 2rem;
    top: 15px;
    right: 15px;
  }
}

