/* Gallery Section Styles */
.gallery-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-container {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.gallery-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item {
    position: absolute;
    width: 400px;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Positioning for different slides */
.gallery-item.active {
    transform: translateX(0) translateZ(100px) scale(1.1);
    z-index: 5;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.gallery-item.prev {
    transform: translateX(-200px) translateZ(0) scale(0.9) rotateY(25deg);
    z-index: 3;
    opacity: 0.8;
}

.gallery-item.next {
    transform: translateX(200px) translateZ(0) scale(0.9) rotateY(-25deg);
    z-index: 3;
    opacity: 0.8;
}

.gallery-item.hidden-left {
    transform: translateX(-400px) translateZ(-100px) scale(0.7) rotateY(45deg);
    z-index: 1;
    opacity: 0.6;
}

.gallery-item.hidden-right {
    transform: translateX(400px) translateZ(-100px) scale(0.7) rotateY(-45deg);
    z-index: 1;
    opacity: 0.6;
}

.gallery-item.far-hidden {
    transform: translateX(0) translateZ(-200px) scale(0.5);
    z-index: 0;
    opacity: 0.3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot.active {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.dot:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-container {
    height: auto;
    overflow-x: auto;
    padding: 20px 0;
  }

  .gallery-track {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 0 16px;
    height: auto;
    justify-content: flex-start;
    align-items: center;
    transform: none !important;
    transition: none !important;
  }

  .gallery-item {
    position: relative;
    flex: 0 0 auto;
    width: 85%;
    max-width: 300px;
    height: 200px;
    scroll-snap-align: start;
    transform: none !important;
    opacity: 1 !important;
    z-index: 1 !important;
  }

  .gallery-item img {
    height: 100%;
    object-fit: cover;
  }

  .gallery-item.active,
  .gallery-item.prev,
  .gallery-item.next,
  .gallery-item.hidden-left,
  .gallery-item.hidden-right,
  .gallery-item.far-hidden {
    all: unset;
    flex: 0 0 auto;
    width: 85%;
    max-width: 300px;
    height: 200px;
    scroll-snap-align: start;
    position: relative;
    display: block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 480px) {
  .gallery-item {
    width: 90%;
    height: 160px;
  }

  .gallery-item.active,
  .gallery-item.prev,
  .gallery-item.next,
  .gallery-item.hidden-left,
  .gallery-item.hidden-right,
  .gallery-item.far-hidden {
    width: 90%;
    height: 160px;
  }

  .gallery-container {
    height: auto;
  }
}
