/* 14. ANIMATIONS & SCROLL INTERACTIONS */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   15. GALLERY SECTION
   ========================================================================== */

/* ── Gallery Section ── */
.gallery {
  background: linear-gradient(160deg, #071520 0%, #0d2236 40%, #0a1c2e 100%);
  padding-bottom: 64px;
  overflow: hidden;
  position: relative;
}

.gallery .section-label {
  color: rgba(130, 210, 210, 0.85);
}

.gallery .section-title {
  color: #ffffff;
}

.gallery .section-title em {
  color: var(--teal);
  font-style: normal;
}

.gallery .text-muted {
  color: rgba(200, 220, 230, 0.6);
}

/* Marquee wrapper */
.marquee-outer {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 40px;
}

/* Left and right gradient fade masks */
.marquee-mask {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 160px;
  z-index: 2;
  pointer-events: none;
}

.marquee-mask-left {
  left: 0;
  background: linear-gradient(to right, #071520 0%, transparent 100%);
}

.marquee-mask-right {
  right: 0;
  background: linear-gradient(to left, #071520 0%, transparent 100%);
}

/* The scrolling track — two groups side by side */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 38s linear infinite;
  will-change: transform;
}

/* Pause on hover */
.marquee-outer:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Each group of images */
.marquee-group {
  display: flex;
  flex-shrink: 0;
  gap: 20px;
  padding-right: 20px;
}

/* Each image card */
.marquee-item {
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.45),
    0 1px 4px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #0e1e2e;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.marquee-item:hover {
  box-shadow:
    0 12px 48px rgba(0, 150, 170, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.4);
  transform: translateY(-6px) scale(1.03);
}

.marquee-item img {
  display: block;
  height: 380px;
  width: auto;
  max-width: 580px;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.marquee-item:hover img {
  transform: scale(1.08);
}

/* Lightbox Modal Specific Styling */
#lightbox-modal {
  background-color: rgba(9, 21, 30, 0.95);
}

#lightbox-modal .lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  position: relative;
}

#lightbox-modal.open .lightbox-content {
  transform: scale(1);
}

#lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.lightbox-nav {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  z-index: 10;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0;
}

.lightbox-nav:hover {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 20px rgba(42, 127, 143, 0.4);
}

.lightbox-nav.prev {
  position: absolute;
  left: 40px;
}

.lightbox-nav.next {
  position: absolute;
  right: 40px;
}

@media (max-width: 768px) {
  .carousel-nav-btn {
    width: 40px;
    height: 40px;
  }
  .prev-btn { left: 10px; }
  .next-btn { right: 10px; }
  
  .lightbox-nav {
    width: 48px;
    height: 48px;
  }
  .lightbox-nav.prev {
    left: 15px;
  }
  .lightbox-nav.next {
    right: 15px;
  }
}

/* Videos section styling */
.videos {
  background-color: var(--cream);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  perspective: 1200px;
}

.video-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
  border: 1px solid rgba(42, 127, 143, 0.05);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.video-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(42, 127, 143, 0.15);
}

.video-thumb-wrapper {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform-style: preserve-3d;
}

.v-bg-1 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.v-bg-2 { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
.v-bg-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

.play-btn {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background-color: var(--white);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transform: translateZ(45px);
  box-shadow: 0 8px 24px rgba(26, 58, 74, 0.15);
  transition: all var(--transition-normal);
  position: relative;
}

/* Glow ring pulsation around play button */
.play-btn::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.4);
  opacity: 1;
  animation: playPulse 2s infinite;
  pointer-events: none;
}

@keyframes playPulse {
  0% {
    transform: scale(0.95);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.video-card:hover .play-btn {
  background-color: var(--mint);
  color: var(--deep);
  transform: translateZ(60px) scale(1.1);
  box-shadow: 0 12px 30px rgba(111, 207, 176, 0.35);
}

.play-icon {
  margin-left: 4px; /* Center triangular play icon visually */
}

.video-duration {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background-color: rgba(9, 21, 30, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--white);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  transform: translateZ(25px);
}

.video-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--deep);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transform: translateZ(25px);
}

.video-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  transform: translateZ(20px);
}

.video-content h3 {
  font-size: 1.15rem;
  color: var(--deep);
  margin-bottom: 10px;
}

.video-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Responsive grid layout adaptations */
@media (max-width: 960px) {
  .gallery-grid, .videos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .gallery-grid, .videos-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}


/* ==========================================================================
   16. SIMULATED VIDEO MODAL & MEDIA PLAYER
   ========================================================================== */

.video-modal-content {
  background-color: var(--deep-dark);
  width: 95%;
  max-width: 820px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 24px 64px rgba(9, 21, 30, 0.4);
  position: relative;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-backdrop.open .video-modal-content {
  transform: scale(1);
}

#video-modal-close {
  color: rgba(255, 255, 255, 0.6);
  z-index: 10;
}

#video-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.video-player-container {
  background-color: #050d12;
  position: relative;
  width: 100%;
}

.mock-video-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: radial-gradient(circle at center, #16364a 0%, #07121b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Audio visualizer animations representing standard sound */
.mock-waveforms {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 60px;
  opacity: 0.3;
  transition: opacity var(--transition-normal);
}

.playing .mock-waveforms {
  opacity: 0.85;
}

.bar-wf {
  width: 6px;
  background: linear-gradient(to top, var(--teal), var(--mint));
  border-radius: var(--radius-full);
  height: 10px;
}

/* Staggered anim triggers on visualizer bars */
.playing .bar-wf {
  animation: jumpWF 1.2s ease-in-out infinite alternate;
}

.playing .bar-1 { animation-delay: 0.1s; animation-duration: 0.8s; }
.playing .bar-2 { animation-delay: 0.3s; animation-duration: 1.1s; }
.playing .bar-3 { animation-delay: 0.0s; animation-duration: 0.9s; }
.playing .bar-4 { animation-delay: 0.4s; animation-duration: 1.2s; }
.playing .bar-5 { animation-delay: 0.2s; animation-duration: 0.7s; }

@keyframes jumpWF {
  0% { height: 10px; }
  100% { height: 60px; }
}

.mock-video-overlay-text {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  text-align: center;
  background: rgba(9, 21, 30, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 500;
  transition: opacity var(--transition-normal);
}

.play-pause-big-overlay {
  position: absolute;
  width: 80px;
  height: 80px;
  background-color: rgba(111, 207, 176, 0.9);
  color: var(--deep);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-glow);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-normal);
  pointer-events: none;
}

.mock-video-screen:hover .play-pause-big-overlay.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.play-pause-big-overlay.visible {
  opacity: 0.9;
  transform: scale(0.9);
  pointer-events: auto;
}

/* Control bar layouts */
.video-controls {
  background-color: #0b1a26;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Scrub progress timeline slider */
.scrub-container {
  position: relative;
  width: 100%;
  height: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.scrub-bar-bg {
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  position: relative;
  transition: height var(--transition-fast);
}

.scrub-container:hover .scrub-bar-bg {
  height: 6px;
}

.scrub-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--mint));
  border-radius: var(--radius-full);
  width: 0%;
}

.scrub-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background-color: var(--white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%) scale(0);
  transition: transform var(--transition-fast);
}

.scrub-container:hover .scrub-handle {
  transform: translate(-50%, -50%) scale(1);
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.left-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.ctrl-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
  transform: scale(1.05);
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* volume range input element custom styling */
.vol-range {
  width: 70px;
  height: 4px;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.vol-range::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background-color: var(--white);
  cursor: pointer;
}

.time-display {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  font-weight: 500;
  user-select: none;
}

.video-info-panel {
  padding: 24px;
  color: var(--white);
}

.video-info-panel h3 {
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 8px;
}

.video-info-panel p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* 3D SCROLL ACTIVE ANIMATION CLASSES */
.scroll-card {
  /* Initial state for active scroll effect */
  opacity: 0;
  transform: translateY(80px) rotateX(15deg) rotateY(-8deg) scale(0.9);
  transition: transform 0.1s ease-out, opacity 0.8s ease-out; /* Smooth transition for rotation */
  backface-visibility: hidden;
  transform-origin: center bottom;
}

.scroll-card.scroll-visible {
  opacity: 1;
  /* Active values calculated in JavaScript */
}
