/* ==========================================================================
   IMMERSIVE 3D GALLERY CAROUSEL & LIGHTBOX STYLING
   ========================================================================== */

.gallery-showcase {
  padding: var(--spacing-16) 0 var(--spacing-20) 0;
  background-color: #fafbfc;
  overflow: hidden;
  text-align: center;
}

/* Category Filter Tabs Styling */
.gallery-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--spacing-3);
  margin-bottom: var(--spacing-10);
  padding: 0 var(--spacing-4);
}

.gallery-tab {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background-color: #ffffff;
  border: 1px solid rgba(15, 46, 35, 0.1);
  padding: var(--spacing-3) var(--spacing-6);
  border-radius: 30px; /* Fully rounded modern pill shape */
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.gallery-tab:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.gallery-tab:active {
  transform: translateY(0) scale(0.97);
}

.gallery-tab--active {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.gallery-tab--active:hover {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border-color: var(--color-primary);
  transform: none;
}

/* 3D Cover Flow Layout Container */
.coverflow-container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--spacing-10) 0;
  perspective: 1200px; /* Crucial for 3D depth tilt */
}

.coverflow-track {
  position: relative;
  width: 100%;
  height: 440px;
  transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .coverflow-track {
    height: 320px;
  }
}

/* Base Slide Element */
.coverflow-slide {
  position: absolute;
  width: 320px;
  height: 400px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
              opacity 0.6s ease, 
              filter 0.6s ease, 
              z-index 0.6s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

@media (max-width: 768px) {
  .coverflow-slide {
    width: 220px;
    height: 280px;
  }
}

.coverflow-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
}

.coverflow-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-6) var(--spacing-4) var(--spacing-4) var(--spacing-4);
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
  color: var(--color-text-light);
  font-family: var(--font-family-serif);
  font-size: var(--font-size-base);
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

/* 3D Cover Flow Slide States (Dynamic JavaScript Classes) */

/* 1. Center Active Slide */
.coverflow-slide--active {
  transform: translateX(0) scale(1) rotateY(0deg) translateZ(50px);
  opacity: 1;
  z-index: 10;
  filter: brightness(1);
}

.coverflow-slide--active .coverflow-caption {
  opacity: 1;
  transform: translateY(0);
}

/* 2. Left and Right Tilts */
.coverflow-slide--left {
  transform: translateX(-140px) scale(0.85) rotateY(35deg) translateZ(-50px);
  opacity: 0.65;
  z-index: 5;
  filter: brightness(0.6) blur(0.5px);
}

.coverflow-slide--right {
  transform: translateX(140px) scale(0.85) rotateY(-35deg) translateZ(-50px);
  opacity: 0.65;
  z-index: 5;
  filter: brightness(0.6) blur(0.5px);
}

@media (max-width: 768px) {
  .coverflow-slide--left {
    transform: translateX(-90px) scale(0.8) rotateY(25deg) translateZ(-40px);
  }
  .coverflow-slide--right {
    transform: translateX(90px) scale(0.8) rotateY(-25deg) translateZ(-40px);
  }
}

/* 3. Far Left and Far Right Tilts */
.coverflow-slide--far-left {
  transform: translateX(-240px) scale(0.7) rotateY(45deg) translateZ(-100px);
  opacity: 0.25;
  z-index: 2;
  filter: brightness(0.4) blur(1px);
}

.coverflow-slide--far-right {
  transform: translateX(240px) scale(0.7) rotateY(-45deg) translateZ(-100px);
  opacity: 0.25;
  z-index: 2;
  filter: brightness(0.4) blur(1px);
}

@media (max-width: 768px) {
  .coverflow-slide--far-left {
    transform: translateX(-150px) scale(0.65) rotateY(30deg) translateZ(-80px);
    opacity: 0.15;
  }
  .coverflow-slide--far-right {
    transform: translateX(150px) scale(0.65) rotateY(-30deg) translateZ(-80px);
    opacity: 0.15;
  }
}

/* Hidden Slides (rest of queue) */
.coverflow-slide--hidden {
  transform: translateX(0) scale(0.5);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

/* Controls Styles */
.coverflow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  font-size: 1.3rem;
  padding-bottom: 2px;
}

.coverflow-arrow:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

.coverflow-arrow--prev {
  left: var(--spacing-6);
}

.coverflow-arrow--next {
  right: var(--spacing-6);
}

@media (max-width: 768px) {
  .coverflow-arrow {
    display: none !important;
  }
}

/* Indicators Styles */
.coverflow-indicators {
  display: flex;
  justify-content: center;
  gap: var(--spacing-2);
  margin-top: var(--spacing-8);
}

.coverflow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(15, 46, 35, 0.2);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  padding: 0;
}

.coverflow-dot--active {
  background-color: var(--color-primary);
  width: 18px;
  border-radius: 4px;
}

.coverflow-tip {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--spacing-6);
}

/* ==========================================================================
   ZOOMABLE LIGHTBOX MODAL
   ========================================================================== */

.lightbox {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 25, 20, 0.96); /* Dark backing */
  z-index: 2000;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

.lightbox--open {
  display: flex;
}

/* Close Control Button */
.lightbox__close {
  position: absolute;
  top: var(--spacing-6);
  right: var(--spacing-6);
  color: rgba(255, 255, 255, 0.7);
  font-size: 2.2rem;
  cursor: pointer;
  z-index: 2010;
  transition: color var(--transition-fast);
  user-select: none;
}

.lightbox__close:hover {
  color: var(--color-accent);
}

/* Zoom Controls Button Group */
.lightbox__zoom-ctrls {
  position: absolute;
  top: var(--spacing-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--spacing-2);
  z-index: 2010;
}

.lightbox__zoom-btn {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  user-select: none;
}

.lightbox__zoom-btn:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

/* Center Image Viewport Container */
.lightbox__container {
  width: 90%;
  height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox__img-wrapper {
  position: relative;
  display: inline-block;
  overflow: visible;
  cursor: grab; /* Shows dragging cursor when zoom is active */
  transition: transform 0.05s ease; /* Fluid mouse drag tracking */
}

.lightbox__img-wrapper:active {
  cursor: grabbing;
}

.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  transform-origin: center center;
}

/* Caption Footer */
.lightbox__caption {
  position: absolute;
  bottom: var(--spacing-8);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-family-serif);
  font-size: var(--font-size-base);
  text-align: center;
  z-index: 2010;
  width: 80%;
  pointer-events: none;
}

/* ==========================================================================
   VIDEO TOUR & VIDEO LIGHTBOX STYLING
   ========================================================================== */

.video-tour {
  padding: var(--spacing-16) 0 var(--spacing-20) 0;
  background-color: #ffffff;
  border-top: 1px solid rgba(15, 46, 35, 0.05);
}

.video-tour__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-6);
  margin-top: var(--spacing-8);
}

@media (min-width: 600px) {
  .video-tour__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .video-tour__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.video-tour__card {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 46, 35, 0.05);
  border: 4px solid #ffffff;
  cursor: pointer;
}

@media (max-width: 768px) {
  .video-tour__card {
    height: 200px;
  }
}

.video-tour__backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.video-tour__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(15, 46, 35, 0.2) 0%, rgba(15, 46, 35, 0.6) 100%);
  transition: background var(--transition-normal);
  z-index: 1;
}

.video-tour__card:hover .video-tour__backdrop {
  transform: scale(1.06);
}

.video-tour__card:hover .video-tour__overlay {
  background: rgba(15, 46, 35, 0.65);
}

/* Card details/info text alignment */
.video-tour__info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-4);
  z-index: 2;
  text-align: left;
}

.video-tour__card-title {
  font-family: var(--font-family-serif);
  font-size: var(--font-size-base);
  color: var(--color-text-light);
  margin-bottom: var(--spacing-1);
  font-weight: 600;
}

.video-tour__card-desc {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  margin: 0;
}

/* Pulsating Play Button overlay */
.video-tour__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: var(--color-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: 0 0 0 0 rgba(220, 165, 30, 0.6);
  animation: playPulse 2s infinite;
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.video-tour__card:hover .video-tour__play-btn {
  transform: translate(-50%, -50%) scale(1.08);
  background-color: #e0b438;
}

.video-tour__play-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  margin-left: 3px; /* Center-offset play triangle */
}

/* Wave pulsating keyframe animation */
@keyframes playPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 165, 30, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(220, 165, 30, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 165, 30, 0);
  }
}

/* Lightbox video specific extensions */
.lightbox__container--video {
  width: 90%;
  max-width: 880px;
  aspect-ratio: 16/9;
  height: auto;
}

.lightbox__video {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  background-color: #000;
  display: block;
}

