/* Simple Modern Gallery Carousel */
.gallery-carousel {
  position: relative;
  width: 100%;
  height: 450px;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
  position: relative;
  /* width и width слайдов устанавливаются динамически через JavaScript */
}

/* Carousel slide styles moved to line 179 to avoid conflicts */

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Navigation Arrows */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  user-select: none;
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav.prev {
  left: 20px;
}

.carousel-nav.next {
  right: 20px;
}

/* Dots Navigation */
.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 100;
}

.carousel-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  backdrop-filter: blur(5px);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.4);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  border-color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-carousel {
    height: 300px;
    border-radius: 12px;
  }
  
  .carousel-nav {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .carousel-nav.prev {
    left: 15px;
  }
  
  .carousel-nav.next {
    right: 15px;
  }
  
  .carousel-dots {
    bottom: 15px;
    gap: 8px;
  }
  
  .carousel-dot {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .gallery-carousel {
    height: 250px;
    border-radius: 8px;
  }
  
  .carousel-nav {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
  
  .carousel-nav.prev {
    left: 10px;
  }
  
  .carousel-nav.next {
    right: 10px;
  }
  
  .carousel-dots {
    bottom: 10px;
    gap: 6px;
  }
  
  .carousel-dot {
    width: 8px;
    height: 8px;
  }
}

/* Additional styles for horizontal images */
.carousel-slide {
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
  overflow: hidden;
  padding: 8px;
}

/* Improved loading state */
.carousel-slide img {
  transition: opacity 0.3s ease;
}

.carousel-slide img:not([src]) {
  opacity: 0;
}

/* Better aspect ratio handling for horizontal images */
@media (min-width: 1200px) {
  .gallery-carousel {
    height: 500px;
  }
}

/* Hover effects for slides */
.carousel-slide:hover img {
  transform: scale(1.02);
}

/* Loading animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.carousel-slide img {
  animation: fadeIn 0.5s ease-in-out;
}

/* Additional visual enhancements */
.gallery-carousel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
  z-index: 1;
}

.carousel-container {
  position: relative;
  z-index: 2;
}

/* Smooth transitions */
.carousel-slides {
  will-change: transform;
}

/* Focus styles for accessibility */
.carousel-nav:focus,
.carousel-dot:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}
