/* 한장씩 변경되는 배너류의 슬라이더 */
.slider {
  position: relative;
  /* width: 800px; */
  /* height: 400px; */
  overflow: hidden;
  margin: 0 auto;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.slider:active {
  cursor: grabbing;
}

.slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.slide {
  min-width: 100%;
  /* height: 400px; */
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 버튼 */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  font-size: 30px;
  padding: 10px;
  cursor: pointer;
}

.prev { left: 10px; }
.next { right: 10px; }

/* 도트 */
.dots {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #ccc;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
}

.dot.active {
  background: #333;
}


  /* 옆으로 한칸씩 움직이는 슬라이더 */
  /* 슬라이더 */
.slider-viewport {
  overflow: hidden;
  width: 100%;
}

.slider-track {
  display: flex;
  /* 4개 카드(351px * 4 = 1404px)를 제외한 남은 공간을 3개 gap으로 분배하여 정확히 맞춤 */
  gap: calc((1540px - 1404px) / 3);
  /* 기본값: 45.33px (1540px 컨테이너 기준) */
/*   transition: transform 0.4s ease; */
}

/* 컨테이너가 1540px보다 작을 때 */
@media (max-width: 1540px) {
  .slider-track {
    gap: calc((100% - 1404px) / 3);
  }
}