/* =========================================
   Main Visual Swiper (fix)
   - loop/slide 계산 안 꼬이게 Swiper 기본 레이아웃을 "메인만" 강제
   - RW/RTB/RMB display:none 방식은 제거(권장: picture + media srcset로)
========================================= */

/* 0) 메인 비주얼 전체 배경(풀폭) */
.mainVisual{
  position: relative;
  width: 100%;
  overflow: hidden;
  background: url("/assets/img/ui/main_background.png") center / cover no-repeat;
}

/* 1) 스와이퍼 컨테이너(가운데 1300) */
.mainVisual .main-swiper{
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
  z-index: 2;          /* fade 위로 */
  overflow: hidden;    /* Swiper 필수 */
}

/* 2) ✅ Swiper 기본 레이아웃 강제(메인만) */
.mainVisual .main-swiper .swiper-wrapper{
  display: flex;                 /* 핵심 */
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  transform: translate3d(0,0,0); /* 렌더 안정 */
}

.mainVisual .main-swiper .swiper-slide{
  flex: 0 0 100%;    /* 핵심: 한 장 = 한 화면 */
  width: 100%;
  height: auto;
}

/* 3) 내부 요소 폭 안정화 */
.mainVisual .item,
.mainVisual picture{
  width: 100%;
  display: block;
}

.mainVisual img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* 4) 네비게이션 */
.mainVisual .swiper-button-next,
.mainVisual .swiper-button-prev{
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

@media (max-width: 767px){
  .mainVisual .swiper-button-next,
  .mainVisual .swiper-button-prev{
    display: none;
  }
}

/* 5) 하단 컨트롤(중앙) */
.mainVisual .swiper-control{
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mainVisual .swiper-pagination{
  position: static;
  --swiper-pagination-bullet-horizontal-gap: 8px;
}

.mainVisual .swiper-button-pause,
.mainVisual .swiper-button-play{
  display: none;
}

/* 6) pagination bullet */
.mainVisual .swiper-pagination-bullet{
  width: 15px;
  height: 15px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

.mainVisual .swiper-pagination-bullet-active{
  background: #007cbc;
}

@media (max-width: 767px){
  .mainVisual .swiper-pagination-bullet{
    width: 10px;
    height: 10px;
  }
}

/* 7) ✅ RW/RTB/RMB 방식은 "삭제 권장"
   - 이 display 토글이 Swiper 계산을 망가뜨리는 주범이 될 수 있음
   - HTML을 picture + source media로 바꾸면 이 블록 자체가 필요 없음
*/
/*
.mainVisual .RW,
.mainVisual .RTB,
.mainVisual .RMB{ display:none; }
@media (min-width:1200px){ .mainVisual .RW{ display:block; } }
@media (min-width:768px) and (max-width:1199px){ .mainVisual .RTB{ display:block; } }
@media (max-width:767px){ .mainVisual .RMB{ display:block; } }
*/

/* 8) 가장자리 페이드(white) */
.mainVisual::before{
  content:"";
  position:absolute;
  inset:0;
  z-index: 1;
  pointer-events:none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.80) 6%,
    rgba(255, 255, 255, 0.45) 12%,
    rgba(255, 255, 255, 0.10) 20%,
    rgba(255, 255, 255, 0.00) 30%,
    rgba(255, 255, 255, 0.00) 70%,
    rgba(255, 255, 255, 0.10) 80%,
    rgba(255, 255, 255, 0.45) 88%,
    rgba(255, 255, 255, 0.80) 94%,
    rgba(255, 255, 255, 0.92) 100%
  );
}
