/* ==========================================================================
   수강안내 페이지 스타일 (Course Info Page)
   ========================================================================== */

/* 메인 영역 */
.course-info-main {
    width: 100%;
    background-color: transparent;
}

/* 히어로 섹션 */
.course-info-hero {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.course-info-hero__container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px 30px;
    text-align: center;
}

.course-info-hero__title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    color: #333;
}

.course-info-title__text {
    font-family: var(--font-display);
    font-size: 40px;
    color: var(--black, #121212);
    text-align: center;
    margin: 0;
}

/* 메인 콘텐츠 - es-container */
.course-info-main > .es-container {
    position: relative;
    z-index: 1;
    padding-bottom: 20px;
}

/* 대상자 선택 섹션 */
.course-info-select {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 16px 20px;
}

.course-info-select__intro {
    text-align: center;
}

.course-info-select__text {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--black, #121212);
    line-height: 1.4;
    margin: 0;
}

/* 이미지 + 탭 묶음 (gap 없이 붙어있는 구조) */
.course-info-nav-box {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.course-info-nav-box__image {
    width: 100%;
    max-width: 400px;
}

.course-info-nav-box__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 대상자 선택 탭 */
.course-info-tabs {
    display: flex;
    width: 100%;
    background: rgba(129, 5, 237, 0.1);
    border-radius: 20px;
    overflow: hidden;
}

.course-info-tabs__btn {
    flex: 1;
    padding: 16px 10px;
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--black, #121212);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.course-info-tabs__btn:not(:last-child) {
    border-right: none;
}

.course-info-tabs__btn.active {
    background: var(--purple, #8105ed);
    color: white;
    border-radius: 20px;
}

.course-info-tabs__btn:hover:not(.active) {
    background: rgba(129, 5, 237, 0.2);
}

/* 대상자 안내 박스 */
.course-info-target-box {
    width: 100%;
    background: white;
    border: 1px solid var(--line-color, #d9d9d9);
    border-radius: 20px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.course-info-target-box__title {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--black, #121212);
    margin: 0;
}

.course-info-target-box__desc {
    font-family: var(--font-primary);
    font-size: 18px;
    color: var(--purple, #8105ed);
    margin: 0;
}

/* 일반학생 전체할인 안내 행 */
.course-info-target-box__general-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.course-info-target-box__general-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-primary);
    font-size: 16px;
    flex-wrap: wrap;
}

.course-info-target-box__general-row .row-name {
    font-family: var(--font-display);
    color: var(--purple, #8105ed);
    white-space: nowrap;
}

.course-info-target-box__general-row .row-sep {
    color: var(--purple, #8105ed);
    opacity: 0.5;
}

.course-info-target-box__general-row .row-desc {
    color: var(--gray-dark, #555);
}

.course-info-target-box__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--purple, #8105ed);
    border-radius: 50px;
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--purple, #8105ed);
    text-decoration: none;
    max-width: 300px;
    justify-content: center;
    transition: all 0.3s ease;
}

.course-info-target-box__link:hover {
    background: var(--purple, #8105ed);
    color: white;
}

/* 수강료 카드 섹션 */
.course-info-pricing {
    display: flex;
    gap: 20px;
    padding: 0 16px 20px;
    flex-wrap: wrap;
    width: 100%;
}

/* 수강료 카드 */
.pricing-card {
    flex: 0 0 100%;  /* 모바일 기본: 1개/줄 */
    background: white;
    border: 1px solid var(--line-color, #d9d9d9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

/* 카드가 1개만 있을 때 max-width 적용 */
.pricing-card:only-child {
    max-width: 400px;
}

.pricing-card__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pricing-card__badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pricing-card__badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.pricing-card__badge--purple {
    background: var(--purple, #8105ed);
}

.pricing-card__badge--blue {
    background: var(--sky, #0484ff);
}

.pricing-card__badge--orange {
    background: #f97316;
}

/* 추가 수강신청 모드 안내 배너 */
.additional-mode-banner {
    width: 100%;
    background: #fff7ed;
    border: 1px solid #f97316;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #9a3412;
    margin-bottom: 8px;
}

.additional-mode-banner i {
    color: #f97316;
    font-size: 16px;
    flex-shrink: 0;
}

.pricing-card__title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pricing-card__class-type {
    font-family: var(--font-primary);
    font-size: 40px;
    font-weight: 700;
    color: var(--black, #121212);
    white-space: nowrap;
}

.pricing-card__class-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.pricing-card__class-time {
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--black, #121212);
}

.pricing-card__subtitle {
    font-family: var(--font-primary);
    font-size: 12px;
    color: var(--black50, #808080);
}

/* 수업시간 정보 */
.pricing-card__time-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.pricing-card__time-label {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    color: var(--black, #121212);
    white-space: nowrap;
    flex-shrink: 0;
}

.pricing-card__time-value {
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--black, #121212);
}

/* 가격 박스 */
.pricing-card__price-box {
    background: var(--gray, #f3f3f3);
    border: 1px solid var(--line-color, #d9d9d9);
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pricing-card__price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pricing-card__price-label {
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--black, #121212);
}

.pricing-card__price-period {
    font-size: 12px;
    color: var(--black, #121212);
}

.pricing-card__price-value {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    color: var(--black, #121212);
}

.pricing-card__price-discount {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    color: #ef6250;
}

.pricing-card__price-discount--closed {
    color: var(--black30, #b3b3b3);
}

.pricing-card__discount-badge {
    padding: 3px 6px;
    background: #ef6250;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

.pricing-card__discount-badge--gray {
    background: var(--black50, #808080);
}

.quota-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background: #ef6250;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.quota-badge--closed {
    background: #ffebee;
    color: #c62828;
}

.quota-badge--active {
    background: #e8f5e9;
    color: #2e7d32;
}

/* 총 결제금액 */
.pricing-card__total {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
}

.pricing-card__total-label {
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--black, #121212);
}

.pricing-card__total-value {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.pricing-card__total-period {
    font-family: var(--font-primary);
    font-size: 10px;
    color: var(--purple, #8105ed);
}

.pricing-card__total-price {
    font-family: var(--font-primary);
    font-size: 30px;
    font-weight: 700;
    color: var(--purple, #8105ed);
}

/* 신청 버튼 */
.pricing-card__btn {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pricing-card__btn--primary {
    background: var(--purple, #8105ed);
}

.pricing-card__btn--primary:hover {
    background: #6a04c7;
}

.pricing-card__btn--disabled {
    background: var(--black30, #b3b3b3);
    cursor: not-allowed;
}

/* 그룹수업 및 보강 안내 */
.course-info-notice {
    background: rgba(243, 143, 177, 0.1);
    border: none;
    border-radius: 20px;
    padding: 16px 20px;
    margin: 0 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.course-info-notice__section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-info-notice__title {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 700;
    color: var(--black, #121212);
    margin: 0;
}

.course-info-notice__list {
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--black, #121212);
    margin: 0;
    padding-left: 21px;
}

.course-info-notice__list li {
    margin-bottom: 4px;
}

.course-info-notice__list li:last-child {
    margin-bottom: 0;
}

/* 환불 안내 섹션 */
.course-info-refund {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.course-info-refund__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.course-info-refund__number {
    width: 48px;
    height: 40px;
    background: var(--purple, #8105ed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 16px;
    color: white;
}

.course-info-refund__title {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--black, #121212);
    margin: 0;
}

/* 환불 테이블 */
.course-info-refund__table {
    width: 100%;
    max-width: 900px;
    border: 1px solid var(--line-color, #d9d9d9);
    border-radius: 20px;
    overflow: hidden;
}

.course-info-refund__table table {
    width: 100%;
    border-collapse: collapse;
}

.course-info-refund__table thead th {
    background: var(--pink, #f38fb1);
    color: white;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    padding: 16px 8px;
    text-align: center;
    border-right: 1px solid white;
}

.course-info-refund__table thead th:last-child {
    border-right: none;
}

.course-info-refund__table tbody td {
    background: white;
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--black, #121212);
    padding: 16px 8px;
    text-align: center;
    border: 1px solid var(--line-color, #d9d9d9);
}

/* 환불 안내 노트 */
.course-info-refund__notice {
    width: 100%;
    max-width: 900px;
    background: rgba(243, 143, 177, 0.1);
    border: 1px solid var(--line-color, #d9d9d9);
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.course-info-refund__notice ul {
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--black, #121212);
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.course-info-refund__notice ul li {
    margin-bottom: 4px;
}

.course-info-refund__notice ul li::before {
    content: "※ ";
}

.course-info-refund__notice ul li:last-child {
    margin-bottom: 0;
}

/* 캐릭터 이미지 영역 */
.course-info-characters {
    padding: 20px 16px;
}

.course-info-characters__images {
    text-align: center;
}

.course-info-characters__images img {
    max-width: 100%;
    height: auto;
}

/* 유틸리티 클래스 */
.text-purple {
    color: var(--purple, #8105ed) !important;
}

.text-gray {
    color: var(--black30, #b3b3b3) !important;
}

.text-bold {
    font-weight: 700 !important;
}

/* ==========================================================================
   반응형 스타일
   ========================================================================== */

/* 태블릿 (768px ~ 1023px): 2개/줄 */
@media (min-width: 768px) {
    .course-info-title__text {
        font-size: 40px;
    }

    .course-info-select__text {
        font-size: 30px;
    }

    .course-info-tabs__btn {
        font-size: 18px;
    }

    .course-info-pricing {
        flex-wrap: wrap;  /* 항상 wrap 유지 */
    }

    .pricing-card {
        flex: 0 0 calc(50% - 10px);  /* 2개/줄 (gap 20px의 절반) */
        max-width: calc(50% - 10px);
    }

    .course-info-refund__title {
        font-size: 30px;
    }
}

/* 데스크톱 (1024px 이상): 3개/줄 */
@media (min-width: 1024px) {
    .pricing-card {
        flex: 0 0 calc(33.333% - 14px);  /* 3개/줄 (gap 20px × 2 / 3) */
        max-width: calc(33.333% - 14px);
    }
}

/* 모바일 (768px 미만) */
@media (max-width: 767px) {
    .course-info-hero__container {
        padding: 30px 16px 20px;
    }

    .course-info-hero__title {
        font-size: 28px;
    }

    .course-info-select__text {
        font-size: 18px;
    }

    .course-info-tabs {
        flex-direction: column;
        border-radius: 15px;
    }

    .course-info-tabs__btn {
        font-size: 16px;
        padding: 12px 10px;
    }

    .course-info-tabs__btn:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--line-color, #d9d9d9);
    }

    .course-info-tabs__btn.active {
        border-radius: 15px;
    }

    /* .pricing-card는 기본값(flex: 0 0 100%) 사용으로 1개/줄 */

    .pricing-card__class-type {
        font-size: 32px;
    }

    .pricing-card__total-price {
        font-size: 24px;
    }

    .course-info-notice {
        margin: 0 16px 20px;
        padding: 12px 16px;
    }

    .course-info-refund__table {
        border-radius: 15px;
    }

    .course-info-refund__table thead th,
    .course-info-refund__table tbody td {
        font-size: 12px;
        padding: 12px 6px;
    }
}

/* ==========================================================================
   수업상품 빈 상태 카드 (Empty State)
   ========================================================================== */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: var(--color-bg-secondary, #f8f9fa);
    border: 2px dashed var(--color-border, #dee2e6);
    border-radius: 12px;
    text-align: center;
    width: 100%;
}

.empty-state-card__icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state-card__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary, #333);
    margin-bottom: 8px;
}

.empty-state-card__desc {
    font-size: 14px;
    color: var(--color-text-secondary, #666);
    line-height: 1.6;
}

/* === 수강신청 상태 배너 (regular/additional/closed 통합) === */
.enrollment-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid;
}
.enrollment-status-banner--regular    { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }
.enrollment-status-banner--additional { background: #fff7ed; border-color: #f97316; color: #9a3412; }
.enrollment-status-banner--closed     { background: #fef2f2; border-color: #ef4444; color: #991b1b; }

.enrollment-status-banner__icon { font-size: 1.3rem; flex-shrink: 0; }
.enrollment-status-banner__content { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.enrollment-status-banner__countdown { font-family: var(--font-display, monospace); font-weight: 700; margin-left: 8px; }

/* 마감 버튼 */
.pricing-card__btn--closed { background: #9ca3af !important; cursor: not-allowed; pointer-events: none; }

/* 수강신청 마감 안내 (course-apply용) */
.enrollment-closed-notice {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
    margin-bottom: 24px;
}
.enrollment-closed-notice__icon { font-size: 2rem; flex-shrink: 0; }
.enrollment-closed-notice__text strong { display: block; margin-bottom: 4px; }
.enrollment-closed-notice__text p { margin: 2px 0; font-size: 14px; }

/* 반응형 */
@media (max-width: 767px) {
    .enrollment-status-banner { flex-direction: column; text-align: center; padding: 12px; }
    .enrollment-status-banner__countdown { margin-left: 0; display: block; }
    .enrollment-closed-notice { flex-direction: column; text-align: center; }
}
