/* ============================================
   MasterStudy Course Carousel Pro - Styles
   ============================================ */

/* 캐러셀 컨테이너 */
.msc-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: visible;
    box-sizing: border-box;
}

.msc-carousel-wrapper[data-arrow-pos="outside"] {
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.msc-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* 카로셀 아이템 */
.msc-item {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 카드 링크 */
.msc-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Coming Soon 배너 (최하단) */
.msc-coming-soon-footer {
    margin-top: auto;
    padding: 12px 12px 12px 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background-color: transparent;
}

.msc-coming-soon-label {
    color: #FF6B6B;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.msc-coming-soon-label::before {
    content: '';
    font-size: 14px;
    margin-right: 0px;
}

.msc-coming-soon-date {
    background: #FFE8E8;
    color: #FF6B6B;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* 그림자 선택자 (Elementor 스타일 조정용) */
.msc-item.shadow-none,
.msc-item[data-shadow="none"] {
    box-shadow: none !important;
}

.msc-item.shadow-light,
.msc-item[data-shadow="light"] {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.msc-item.shadow-normal,
.msc-item[data-shadow="normal"] {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.msc-item.shadow-strong,
.msc-item[data-shadow="strong"] {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

.msc-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.msc-card-link:hover {
    opacity: 0.95;
}

/* 썸네일 */
.msc-item {
    position: relative;
}

.msc-thumb {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    overflow: hidden;
    background: #f5f5f5;
}

.msc-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.msc-item:hover .msc-thumb img {
    transform: scale(1.05);
}

/* 콘텐츠 */
.msc-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 8px;
}

/* 메타정보 (카테고리 & 별점) */
.msc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.msc-category {
    background: #f0f0f0;
    color: #666;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msc-rating {
    color: #f1c40f;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.msc-rating i {
    margin-right: 4px;
}

.msc-rating-none {
    color: #ccc;
    font-weight: 400;
    font-size: 12px;
}

/* 제목 */
.msc-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 요약문 */
.msc-excerpt {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 강사명 */
.msc-instructor {
    font-size: 13px;
    color: #999;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 레벨 배지 */
.msc-level {
    margin: 8px 0;
}

.msc-level-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #e8f1ff;
    color: #2B73E0;
    transition: all 0.3s ease;
}

.msc-level-badge:hover {
    background: #d0e3ff;
}

/* 날짜 */
.msc-dates {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 가격 박스 */
.msc-price-box {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.msc-discount {
    background: #ff4444;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.msc-sale {
    color: #2B73E0;
    font-weight: 700;
    font-size: 15px;
}

.msc-original {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
}

/* ============================================
   화살표 스타일
   ============================================ */

/* 기본 화살표 (내부 위치) */
.msc-carousel-wrapper[data-arrow-pos="inside"] .swiper-button-prev,
.msc-carousel-wrapper[data-arrow-pos="inside"] .swiper-button-next,
.msc-carousel .swiper-button-prev,
.msc-carousel .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--arrow-bg-size, 40px);
    height: var(--arrow-bg-size, 40px);
    background: rgba(255, 255, 255, var(--arrow-bg-opacity, 0.9));
    border-radius: 50%;
    color: #2B73E0;
    font-size: 24px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    padding: 0;
}

.msc-carousel-wrapper[data-arrow-pos="inside"] .swiper-button-prev,
.msc-carousel .swiper-button-prev {
    left: 10px !important;
}

.msc-carousel-wrapper[data-arrow-pos="inside"] .swiper-button-next,
.msc-carousel .swiper-button-next {
    right: 10px !important;
}

.msc-carousel-wrapper[data-arrow-pos="inside"] .swiper-button-prev:hover,
.msc-carousel-wrapper[data-arrow-pos="inside"] .swiper-button-next:hover,
.msc-carousel .swiper-button-prev:hover,
.msc-carousel .swiper-button-next:hover {
    background: #2B73E0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(43, 115, 224, 0.3);
}

/* 상단 화살표 */
.msc-arrows-top {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.msc-arrows-top .msc-nav-prev,
.msc-arrows-top .msc-nav-next {
    width: var(--arrow-bg-size, 36px);
    height: var(--arrow-bg-size, 36px);
    border: none;
    background: rgba(255, 255, 255, var(--arrow-bg-opacity, 0.9));
    border-radius: 50%;
    color: #2B73E0;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.msc-arrows-top .msc-nav-prev:hover,
.msc-arrows-top .msc-nav-next:hover {
    background: #2B73E0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(43, 115, 224, 0.3);
}

/* 하단 화살표 */
.msc-arrows-bottom {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding: 0 10px;
}

.msc-arrows-bottom .msc-nav-prev,
.msc-arrows-bottom .msc-nav-next {
    width: var(--arrow-bg-size, 36px);
    height: var(--arrow-bg-size, 36px);
    border: none;
    background: rgba(255, 255, 255, var(--arrow-bg-opacity, 0.9));
    border-radius: 50%;
    color: #2B73E0;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.msc-arrows-bottom .msc-nav-prev:hover,
.msc-arrows-bottom .msc-nav-next:hover {
    background: #2B73E0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(43, 115, 224, 0.3);
}

/* 외부 위치 화살표 */
.msc-arrows-outside {
    position: static;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    gap: 20px;
}

.msc-arrows-outside .msc-nav-prev,
.msc-arrows-outside .msc-nav-next {
    width: var(--arrow-bg-size, 40px);
    height: var(--arrow-bg-size, 40px);
    min-width: var(--arrow-bg-size, 40px);
    min-height: var(--arrow-bg-size, 40px);
    border: none;
    background: rgba(255, 255, 255, var(--arrow-bg-opacity, 0.9));
    border-radius: 50%;
    color: #2B73E0;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    padding: 0;
    flex-shrink: 0;
}

.msc-arrows-outside .msc-nav-prev:hover,
.msc-arrows-outside .msc-nav-next:hover {
    background: #2B73E0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(43, 115, 224, 0.3);
}

/* ============================================
   반응형 디자인
   ============================================ */

/* 1024px 이상 */
@media (min-width: 1025px) {
    .msc-content {
        padding: 20px;
    }

    .msc-title {
        font-size: 16px;
    }

    .msc-excerpt {
        font-size: 13px;
    }
}

/* 1024px ~ 769px */
@media (max-width: 1024px) {
    .msc-content {
        padding: 16px;
    }

    .msc-title {
        font-size: 15px;
    }

    .msc-excerpt {
        font-size: 12px;
    }

    .msc-price-box {
        font-size: 14px;
    }
}

/* 768px ~ 481px */
@media (max-width: 768px) {
    .msc-content {
        padding: 14px;
    }

    .msc-title {
        font-size: 14px;
    }

    .msc-excerpt {
        font-size: 11px;
        line-height: 1.4;
    }

    .msc-category {
        font-size: 11px;
        padding: 3px 8px;
    }

    .msc-rating {
        font-size: 12px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .msc-discount {
        font-size: 11px;
        padding: 3px 6px;
    }

    .msc-sale {
        font-size: 14px;
    }
}

/* 480px 이하 */
@media (max-width: 480px) {
    .msc-carousel {
        margin: 0 -5px;
    }

    .msc-item {
        border-radius: 12px;
    }

    .msc-content {
        padding: 12px;
        gap: 6px;
    }

    .msc-title {
        font-size: 13px;
        line-height: 1.3;
    }

    .msc-excerpt {
        font-size: 10px;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }

    .msc-meta {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .msc-category {
        font-size: 10px;
        padding: 2px 6px;
    }

    .msc-rating {
        font-size: 11px;
    }

    .msc-level-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    .msc-instructor {
        font-size: 12px;
        padding: 6px 0;
    }

    .msc-dates {
        font-size: 11px;
    }

    .msc-price-box {
        font-size: 12px;
        gap: 4px;
    }

    .msc-discount {
        font-size: 10px;
        padding: 2px 5px;
    }

    .msc-sale {
        font-size: 12px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 32px;
        height: 32px;
        font-size: 16px;
        left: 5px;
    }

    .swiper-button-next {
        right: 5px;
    }

    .msc-arrows-top,
    .msc-arrows-bottom {
        gap: 8px;
        margin: 10px 0;
        padding: 0;
    }

    .msc-arrows-top .msc-nav-prev,
    .msc-arrows-top .msc-nav-next,
    .msc-arrows-bottom .msc-nav-prev,
    .msc-arrows-bottom .msc-nav-next {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}
