/* macdent slider : 메인 슬라이더 */

.macdent-slider {
  position: relative;
}

/* swiper-container 클래스를 쓰지 않으므로 (다른 스크립트/스타일과의 충돌 방지)
   Swiper 컨테이너 기본 스타일을 직접 정의한다 */
.macdent-slider .msl-swiper {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* 큐브/플립 효과는 슬라이드가 컨테이너 밖으로 회전하므로 overflow 예외 */
.macdent-slider .msl-swiper.swiper-container-cube,
.macdent-slider .msl-swiper.swiper-container-flip {
  overflow: visible;
}

/* PC : 기본(데스크탑 1024px~) — 세로 높이(px) 고정, 가로 넘침은 좌우 숨김 */
.macdent-slider-pc {
  overflow: hidden;
}

.macdent-slider-pc .msl-swiper {
  background-image: url("../img/slide/pc_slide_bg.jpg");
  background-size: cover;
  background-position: center;
  height: var(--msl-height, 600px);
  overflow: hidden;
  position: relative;
}

.macdent-slider-pc .swiper-wrapper {
  height: 100%;
}

.macdent-slider-pc .swiper-slide {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.macdent-slider-pc .swiper-slide a {
  display: block;
  height: var(--msl-height, 600px);
  flex-shrink: 0;
}

.macdent-slider-pc .swiper-slide img {
  display: block;
  height: var(--msl-height, 600px);
  width: auto;
  max-width: none; /* 테마 img{max-width:100%} 무시 — 높이 px 고정 유지 */
  flex-shrink: 0;
}

/* fixed 헤더 구간(769~1024px) : PC 슬라이더도 헤더 아래 시작 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .macdent-slider-pc {
    padding-top: var(--msl-header-offset, 60px);
  }
}

/* PC 슬라이더 : 타블릿(769~1023px) — 가로 100% 채움 */
@media screen and (min-width: 769px) and (max-width: 1023px) {
  .macdent-slider-pc .msl-swiper {
    height: auto;
  }

  .macdent-slider-pc .swiper-wrapper,
  .macdent-slider-pc .swiper-slide {
    height: auto;
  }

  .macdent-slider-pc .swiper-slide {
    display: block;
  }

  .macdent-slider-pc .swiper-slide a {
    width: 100%;
    height: auto;
  }

  .macdent-slider-pc .swiper-slide img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }
}

/* PC 슬라이더 : 데스크탑(1024px~) — 세로 px 고정, 가로 넘침 숨김 */
@media screen and (min-width: 1024px) {
  .macdent-slider-pc .msl-swiper {
    height: var(--msl-height, 600px);
  }

  .macdent-slider-pc .swiper-wrapper,
  .macdent-slider-pc .swiper-slide {
    height: 100%;
  }

  .macdent-slider-pc .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .macdent-slider-pc .swiper-slide a {
    width: auto;
    height: var(--msl-height, 600px);
  }

  .macdent-slider-pc .swiper-slide img {
    width: auto;
    height: var(--msl-height, 600px);
    max-width: none;
  }
}

/* 모바일(~768px) : 가로 100%, 세로는 이미지 원본 비율(자동) */
@media screen and (max-width: 768px) {
  .macdent-slider-mo {
    /* fixed 헤더(#header) 아래부터 시작 — JS가 실제 높이로 갱신, fallback 60px */
    padding-top: var(--msl-header-offset, 60px);
  }

  .macdent-slider-mo .msl-swiper {
    background: none;
    height: auto !important;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .macdent-slider-mo .swiper-wrapper {
    height: auto !important;
    align-items: flex-start;
  }

  .macdent-slider-mo .swiper-slide {
    margin: 0;
    width: 100%;
    height: auto !important;
    display: block;
    padding: 0;
  }

  .macdent-slider-mo .swiper-slide a {
    display: block;
    width: 100%;
  }

  .macdent-slider-mo .swiper-slide img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto !important;
  }
}

/* 컨트롤 : 이전 1 2 3 다음 */
.macdent-slider .msl-controls {
  position: absolute;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.macdent-slider .msl-prev,
.macdent-slider .msl-next {
  position: relative;
  width: 26px;
  height: 26px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  opacity: .75;
  transition: opacity .2s ease;
}

.macdent-slider .msl-prev:hover,
.macdent-slider .msl-next:hover {
  opacity: 1;
}

.macdent-slider .msl-prev::before,
.macdent-slider .msl-next::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--msl-arrow-color, #0d1647);
  border-right: 2px solid var(--msl-arrow-color, #0d1647);
}

.macdent-slider .msl-prev::before {
  transform: translate(-30%, -50%) rotate(-135deg);
}

.macdent-slider .msl-next::before {
  transform: translate(-70%, -50%) rotate(45deg);
}

.macdent-slider .msl-page {
  position: static;
  width: auto;
  display: flex;
  gap: 6px;
}

.macdent-slider .msl-page .swiper-pagination-bullet {
  width: 26px;
  height: 26px;
  line-height: 26px;
  border-radius: 50%;
  background: var(--msl-bullet-bg, rgba(13, 22, 71, .12));
  color: var(--msl-bullet-color, #0d1647);
  font-size: 13px;
  text-align: center;
  opacity: 1;
  margin: 0;
}

.macdent-slider .msl-page .swiper-pagination-bullet-active {
  background: var(--msl-bullet-active-bg, #0d1647);
  color: var(--msl-bullet-active-color, #fff);
}
