/* ========== Слайдер ========== */
.slider {
  position: relative;
  max-width: 800px;
  margin: 30px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 400px; /* Фиксированная высота слайда */
  display: none;
  position: relative;
}

.slide.active {
  display: block;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔑 Ключевое свойство! */
  object-position: center;
  display: block;
}

/* Кнопки навигации */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s;
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.slider-btn.prev {
  left: 15px;
}

.slider-btn.next {
  right: 15px;
}

/* Индикаторы */
.slider-dots {
  text-align: center;
  padding: 20px 0 10px;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active {
  background-color: #e74c3c;
}