/* ═══════════════════════════════════════════════
   GALLERY.CSS — Карусель с бесшовным циклом
   3 видимых слайда: боковые заблюрены, центральный чёткий
   ═══════════════════════════════════════════════ */

.gallery-section {
  margin-bottom: 80px;
}

.gallery-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  height: 320px;
  overflow: hidden;
}

.gallery-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Каждый слайд позиционируется абсолютно, JS управляет позицией */
.gallery-slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: 45%;
  height: 100%;
  transform: translateX(-50%) scale(0.75);
  opacity: 0;
  filter: blur(4px);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              z-index 0s;
  pointer-events: none;
  z-index: 1;
}

/* Центральный (активный) */
.gallery-slide--center {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  filter: blur(0);
  z-index: 3;
  pointer-events: auto;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(200, 168, 75, 0.2);
}

/* Левый (предыдущий) */
.gallery-slide--left {
  transform: translateX(-150%) scale(0.82);
  opacity: 0.5;
  filter: blur(2px);
  z-index: 2;
  pointer-events: auto;
}

/* Правый (следующий) */
.gallery-slide--right {
  transform: translateX(50%) scale(0.82);
  opacity: 0.5;
  filter: blur(2px);
  z-index: 2;
  pointer-events: auto;
}

/* Скрытые слайды (за пределами видимости) */
.gallery-slide--hidden {
  transform: translateX(-50%) scale(0.6);
  opacity: 0;
  filter: blur(8px);
  z-index: 0;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-slide__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
  color: var(--cream-dim);
  opacity: 0;
  transition: opacity 0.4s;
}

.gallery-slide--center .gallery-slide__caption {
  opacity: 1;
}

/* Слоты-заглушки */
.gallery-slot {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.gallery-slot__icon {
  font-size: 48px;
  opacity: 0.6;
}

.gallery-slot__label {
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
}

/* Кнопки навигации */
.gallery-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(200, 168, 75, 0.3);
  background: rgba(0, 0, 0, 0.6);
  color: var(--gold-light);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.gallery-carousel__btn--prev {
  left: 8px;
}

.gallery-carousel__btn--next {
  right: 8px;
}

.gallery-carousel__btn:hover {
  background: rgba(200, 168, 75, 0.15);
  border-color: var(--gold);
  transform: translateY(-50%) scale(1.1);
}

.gallery-carousel__btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Dots */
.gallery-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(200, 168, 75, 0.4);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.gallery-dot--active {
  background: var(--gold);
  border-color: var(--gold-light);
  transform: scale(1.3);
}

.gallery-dot:hover {
  border-color: var(--gold-light);
}

/* ══════════════════════════════════════
   МОБИЛКА
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  .gallery-carousel {
    height: 240px;
  }

  .gallery-slide {
    width: 55%;
  }

  .gallery-carousel__btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .gallery-slide__caption {
    font-size: 12px;
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .gallery-carousel {
    height: 200px;
  }

  .gallery-slide {
    width: 65%;
  }

  .gallery-carousel__btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
}
