.about-carousel {
  position: relative;
  max-width: 600px;
  width: 100%;
  margin: 0 auto 2rem;
  border-radius: 12px;
  overflow: visible;  /* Для dynamic height */
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  align-items: center;  /* Вертикальное центрирование */
}

.carousel-slide {
  width: 100%;
  flex-shrink: 0;
  display: none;  /* Скрываем неактивные */
}

.carousel-slide.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 70vh;  /* Динамическая высота */
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

/* Кнопки */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s;
  z-index: 10;
}

.carousel-btn:hover { 
  background: rgba(0,0,0,0.8); 
  transform: translateY(-50%) scale(1.1); 
}

.prev { left: -60px; }
.next { right: -60px; }

/* Мобильная адаптация */
@media (max-width: 768px) {
  .carousel-slide img {
    max-height: 60vh;
  }
  .prev { left: 5px; }
  .next { right: 5px; }
}


/* Подпись изображения */
.slide-caption {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-slide.active .slide-caption {
  opacity: 1;
}

/* Hover эффект для подписи */
.carousel-slide:hover .slide-caption {
  opacity: 1;
}

/* Подпись СНИЗУ ПО ЦЕНТРУ — ПРИНУДИТЕЛЬНО */
.about-carousel .slide-caption {
  position: absolute !important;
  bottom: 12px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0,0,0,0.85) !important;
  color: white !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  font-size: 14px !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
  z-index: 15 !important;
}

/* Скрываем подписи НЕактивных слайдов карусели */
.about-carousel .carousel-slide:not(.active) .slide-caption {
  display: none !important;
}