/* ═══════════════════════════════════════════
   MS 배너 슬라이더 — 메인 스타일
═══════════════════════════════════════════ */

.msbs-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
}

/* ── 슬라이더 ── */
.msbs-swiper {
    width: 100%;
    overflow: hidden;
    /* FOUC 방지: Swiper 초기화 완료 전까지 숨김 */
    opacity: 0;
    transition: opacity 0.35s ease;
}

.msbs-swiper.msbs-ready {
    opacity: 1;
}

/* 초기화 전: 슬라이드 크기 고정 (width 미확정 시 이미지 뭉개짐 방지) */
.msbs-swiper:not(.swiper-initialized) .swiper-slide {
    width: 100% !important;
    flex-shrink: 0;
}

/* 초기화 전: scale/opacity 효과 비활성화 (init 후 튐 방지) */
.msbs-swiper:not(.swiper-initialized) .swiper-slide {
    opacity: 1 !important;
    transform: none !important;
}

/* ── 슬라이드 내부 (배경 이미지 컨테이너) ── */
.msbs-slide-inner {
    display: block;
    width: 100%;
    overflow: hidden;
    text-decoration: none;
    background: #1a1a2e;
    border-radius: 12px;
    /* padding-top 은 인라인으로 비율 제어 */
}

/* 커스텀 높이 모드에서는 padding-top 무시 */
.msbs-slide-inner[style*="height:"] {
    position: relative !important;
    padding-top: 0 !important;
}

/* ── 배경 이미지 ── */
.msbs-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.msbs-slide:hover .msbs-image {
    transform: scale(1.04);
}

/* ── 오버레이 ── */
.msbs-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 100%);
    pointer-events: none;
}

/* ── 콘텐츠 ── */
.msbs-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 22px;
    gap: 6px;
}

/* ── 뱃지 ── */
.msbs-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255,255,255,0.22);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    width: fit-content;
    margin-bottom: 4px;
}

/* ── 제목 ── */
.msbs-title {
    margin: 0;
    color: #fff;
    font-size: clamp(15px, 1.8vw, 22px);
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ── 설명 ── */
.msbs-desc {
    margin: 0;
    color: rgba(255,255,255,0.85);
    font-size: clamp(12px, 1.2vw, 14px);
    line-height: 1.5;
}

/* ── 버튼 ── */
.msbs-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 7px 16px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.msbs-btn:hover {
    background: rgba(255,255,255,0.32);
}

/* ═══════════════════════════════════════════
   중앙 슬라이드 강조 (centeredSlides)
═══════════════════════════════════════════ */
.msbs-swiper .swiper-slide {
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.65;
    transform: scale(0.94);
}

.msbs-swiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

/* 표시 1개일 때는 강조 효과 제거 */
.msbs-swiper[data-spv="1"] .swiper-slide {
    opacity: 1;
    transform: none;
}

/* ═══════════════════════════════════════════
   화살표 — 공통
═══════════════════════════════════════════ */
.msbs-btn-prev,
.msbs-btn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #333;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    transition: background 0.2s, transform 0.2s;
}

.msbs-btn-prev:hover,
.msbs-btn-next:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.msbs-btn-prev.swiper-button-disabled,
.msbs-btn-next.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* ── 화살표 위치: outside (슬라이드 밖) ── */
.msbs-arrow-outside .msbs-btn-prev { left: -22px; }
.msbs-arrow-outside .msbs-btn-next { right: -22px; }
.msbs-arrow-outside { padding: 0 26px; }

/* ── 화살표 위치: inside (슬라이드 안) ── */
.msbs-arrow-inside .msbs-btn-prev { left: 12px; }
.msbs-arrow-inside .msbs-btn-next { right: 12px; }

/* ── 화살표 위치: bottom (하단) ── */
.msbs-arrow-bottom .msbs-btn-prev,
.msbs-arrow-bottom .msbs-btn-next {
    top: auto;
    transform: none;
    bottom: -56px;
    position: absolute;
}
.msbs-arrow-bottom .msbs-btn-prev { left: calc(50% - 52px); }
.msbs-arrow-bottom .msbs-btn-next { left: calc(50% + 8px); }
.msbs-arrow-bottom { padding-bottom: 68px; }

/* ═══════════════════════════════════════════
   페이지네이션
═══════════════════════════════════════════ */
.msbs-pagination {
    position: relative;
    margin-top: 14px;
    text-align: center;
}

/* 진행바 타입일 때 위치 조정 */
.swiper-pagination-progressbar.msbs-pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
}

.msbs-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    opacity: 1;
    transition: background 0.25s, width 0.25s;
    border-radius: 4px;
}

.msbs-pagination .swiper-pagination-bullet-active {
    background: #4f46e5;
    width: 22px;
}

.msbs-pagination.swiper-pagination-fraction {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

/* ═══════════════════════════════════════════
   반응형
═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .msbs-arrow-outside { padding: 0 16px; }
    .msbs-arrow-outside .msbs-btn-prev { left: -14px; }
    .msbs-arrow-outside .msbs-btn-next { right: -14px; }
    .msbs-btn-prev, .msbs-btn-next { width: 36px; height: 36px; }
    .msbs-content { padding: 16px 14px; }
    .msbs-title { font-size: 15px; }
}

@media (max-width: 480px) {
    .msbs-arrow-outside .msbs-btn-prev,
    .msbs-arrow-outside .msbs-btn-next {
        display: none;
    }
}
