/* ==========================================================
   godedu-crs: 강좌 캐러셀
   이미지 레퍼런스: 흰 카드, 16:9 썸네일, 카테고리 뱃지,
                   굵은 제목, 체크마크+일정 텍스트, 양쪽 화살표
   ========================================================== */

/* ── 외부 래퍼 (flexbox로 화살표 양쪽 배치) ──────────── */
.godedu-crs-outer {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* ── swiper 래퍼 ───────────────────────────────────────── */
.godedu-crs-wrap {
    flex: 1;
    min-width: 0;        /* flex child 가 shrink 되도록 */
    overflow: hidden;
    padding-bottom: 40px;
    box-sizing: border-box;
    position: relative;
}

/* ── 카드 ─────────────────────────────────────────────── */
.godedu-crs-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow .25s ease, transform .25s ease;
}
.godedu-crs-card:hover {
    transform: translateY(-3px);
}

/* flat: 테두리·그림자 없음 (기본값, 기존 Elementor 카드와 동일한 느낌) */
.godedu-crs-card--flat {
    box-shadow: none;
    border-radius: 6px;
}
.godedu-crs-card--flat:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, .10);
}

/* card: 뚜렷한 그림자 박스 */
.godedu-crs-card--card {
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .09);
}
.godedu-crs-card--card:hover {
    box-shadow: 0 6px 28px rgba(0, 0, 0, .15);
}

/* ── 썸네일 ────────────────────────────────────────────── */
.godedu-crs-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8edf2;
    flex-shrink: 0;
}
.godedu-crs-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.godedu-crs-card:hover .godedu-crs-thumb img {
    transform: scale(1.05);
}
.godedu-crs-thumb--empty {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dde4ec 0%, #c8d3df 100%);
}

/* ── 본문 ─────────────────────────────────────────────── */
.godedu-crs-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 카테고리 뱃지 */
.godedu-crs-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    background: #f0f2f5;
    border-radius: 4px;
    padding: 2px 8px;
    letter-spacing: .02em;
    align-self: flex-start;
}

/* 제목 */
.godedu-crs-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1a1a1a;
}
.godedu-crs-title a {
    color: inherit;
    text-decoration: none;
}
.godedu-crs-title a:hover {
    color: #3498db;
}

/* ── 하이라이트 목록 (check / bullet 공통) ─────────────── */
.godedu-crs-hl {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.godedu-crs-hl li {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}
.godedu-crs-hl li::before {
    flex-shrink: 0;
    margin-top: 1px;
}

/* check 스타일 (✓) */
.godedu-crs-hl--check li::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233498db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* bullet 스타일 (•) */
.godedu-crs-hl--bullet li::before {
    content: '•';
    color: #3498db;
    font-size: 14px;
    line-height: 1.3;
}

/* ── 하단 (진행률 + 버튼, show_progress=1 일 때만) ──── */
.godedu-crs-footer {
    padding: 10px 16px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 진행률 바 */
.godedu-crs-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.godedu-crs-bar {
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
}
.godedu-crs-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
    transition: width .5s ease;
    will-change: width;
}
.godedu-crs-pct {
    font-size: 11px;
    color: #888;
    text-align: right;
}

/* ── 버튼 ─────────────────────────────────────────────── */
.godedu-crs-btn { display: block; }

.godedu-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s, box-shadow .2s;
    box-sizing: border-box;
    line-height: 1.4;
}
.godedu-btn:hover {
    opacity: .86;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}
.godedu-btn--view      { background: #f1f3f5; color: #444; }
.godedu-btn--enroll    { background: #3498db; color: #fff; }
.godedu-btn--continue  { background: #2ecc71; color: #fff; }
.godedu-btn--completed { background: #95a5a6; color: #fff; }

/* ── 외부 화살표 버튼 (flex item) ─────────────────────── */
.godedu-crs-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
    cursor: pointer;
    padding: 0;
    transition: box-shadow .2s, transform .2s;
    /* 카드 썸네일 상단 기준으로 수직 위치 조정 */
    align-self: flex-start;
    margin-top: calc((100vw - 80px) / var(--crs-spv, 3) * 9/16 / 2 - 20px);
}
.godedu-crs-arrow:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, .22);
    transform: scale(1.08);
}
.godedu-crs-arrow svg {
    width: 20px;
    height: 20px;
    color: #555;
    display: block;
}

/* Swiper disabled */
.godedu-crs-arrow.swiper-button-disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
}

.godedu-crs-wrap .swiper-pagination {
    bottom: 6px;
}
.godedu-crs-wrap .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
}
.godedu-crs-wrap .swiper-pagination-bullet-active {
    background: #3498db;
}

/* ── 모바일 ────────────────────────────────────────────── */
@media (max-width: 639px) {
    .godedu-crs-outer {
        gap: 0;
    }
    .godedu-crs-arrow {
        display: none;
    }
    .godedu-crs-title { font-size: 14px; }
    .godedu-crs-body  { padding: 12px 12px 14px; }
}
