/* ===============================
   BASE
================================ */

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-window {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  align-items: center;
  will-change: transform;
}

.carousel-track > * {
  flex-shrink: 0;
}

.slide img {
  border-radius: 16px;
}

/* ===============================
   ARROWS
================================ */

.carousel-arrows {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: 1200px;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 5;
}

.carousel .arrow {
  pointer-events: auto;
  background: rgba(62, 96, 123, 0.55);
  border-radius: 50%;
  padding: 5px;
  border: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  /* фиксируем минимальный размер, но масштабируем */
  width: 10%;
  max-width: 80px; /* максимум для больших экранов */
  aspect-ratio: 1 / 1; /* сохраняем форму круга */
}

.carousel .arrow:hover {
  background: rgba(62, 96, 123, 0.75);
}

.carousel .arrow svg {
  width: 70%;  /* 70% от контейнера кнопки */
  height: 70%;
  display: block;
  transform-origin: center;
}

.carousel .arrow.left svg {
  transform: rotate(180deg);
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  .carousel .arrow {
    width: 12%;
    max-width: 50px;  /* меньше для мобильных */
  }

  .carousel .arrow svg {
    width: 70%;
    height: 70%;
  }
}


@media (max-width: 1200px) {
  .carousel-arrows {
    left: 0;
    transform: translateY(-50%);
    max-width: 100%;
    padding: 0 30px;
  }
}

/* ===============================
   DOTS WRAPPER (UNDER CAROUSEL)
================================ */

.carousel-dots-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-end;
}

/* ===============================
   DOTS PANEL
================================ */

.carousel-dots-wrapper .dots {
  display: flex;
  gap: 14px;
}

.carousel-dots-wrapper .dots button {
  position: relative;
  width: 10px;
  height: 10px;
  border: 1px solid #000;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.carousel-dots-wrapper .dots button.active {
  background: #000;
}

/* hover ring */
.carousel-dots-wrapper .dots button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;               /* 10 + 7*2 */
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(241, 78, 71, 1);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.carousel-dots-wrapper .dots button:hover::after {
  opacity: 1;
}

/* ===============================
   MOBILE
================================ */

@media (max-width: 768px) {
  .carousel .carousel-arrows {
    display: none;
  }
}
