/* =============================================
   course-detail.css - 과정 상세
   ============================================= */


/* ----- 상단 헤더 영역 ----- */

.course-header {
    background: white;
    border-bottom: 1px solid #f1f5f9;
    padding: 2.5rem 1.5rem 2rem;
}

.course-header-inner {
    max-width: 70rem;
    margin: 0 auto;
}

.course-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
}

.type-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.type-badge.ai {
    background: #ede9fe;
    color: #5b21b6;
}

.type-badge.general {
    background: #dbeafe;
    color: #1e40af;
}

.type-badge.industry {
    background: #fef3c7;
    color: #92400e;
}

.type-badge.region {
    background: #d1fae5;
    color: #065f46;
}

.course-title-row h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}


/* ----- 썸네일 + 정보 ----- */

.course-info-row {
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

.course-thumb {
    flex: 1;
    min-width: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f1f5f9;
}

.course-info-detail {
    flex: 0.8;
}

.course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    font-size: 0.88rem;
    line-height: 1.5;
}

.info-row .label {
    color: var(--text-muted);
    font-weight: 700;
    min-width: 5rem;
    flex-shrink: 0;
}

.info-row .value {
    color: var(--text-main);
}

.info-row .value .highlight {
    color: var(--primary);
    font-weight: 700;
}

.info-row .value .sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.price-row {
    margin-top: 0.25rem;
}

.price-row .value {
    font-weight: 600;
}

.contact-row .value {
    font-size: 0.82rem;
    line-height: 1.5;
}


/* ----- 버튼 영역 ----- */

.course-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-guide {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: white;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-guide:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-apply-main {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 0.75rem;
    background: var(--primary);
    color: white;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-apply-main:hover {
    opacity: 0.9;
}

.btn-apply-main:disabled,
.btn-apply-main.disabled {
    background: #94a3b8;
    cursor: not-allowed;
}


/* ----- 구분선 ----- */

.header-divider {
    max-width: 70rem;
    margin: 0 auto;
    border: none;
    border-top: 1px solid #f1f5f9;
}


/* ----- 하단 콘텐츠 영역 ----- */

.detail-container {
    max-width: 70rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.detail-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 1.5rem;
}

.detail-tab {
    padding: 0.85rem 2rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: #64748b;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.detail-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.detail-tab:hover {
    color: var(--primary);
}

.detail-panel {
    display: none;
}

.detail-panel.active {
    display: block;
}

.content-body {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-main);
}

.content-body img {
    max-width: 100%;
    border-radius: 0.5rem;
    margin: 1rem 0;
}


/* ----- 수강후기 ----- */

.review-item {
    padding: 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
}

.review-item.pinned {
    border-color: var(--primary);
    background: rgba(74, 68, 164, 0.02);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-author {
    font-weight: 600;
    font-size: 0.85rem;
}

.review-stars {
    color: #f59e0b;
    font-size: 0.8rem;
}

.review-content {
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.5;
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.review-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}


/* ----- 교육 안내문 모달 ----- */

.guide-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.guide-modal-box {
    background: white;
    width: 100%;
    max-width: 48rem;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
}

.guide-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.guide-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.guide-modal-close {
    background: none;
    border: 1px solid var(--border);
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-modal-close:hover {
    background: #f1f5f9;
}


/* ----- 반응형 ----- */

@media (max-width: 768px) {
    .course-info-row {
        flex-direction: column;
    }

    .course-thumb {
        width: 100%;
        height: 12rem;
    }

    .course-actions {
        flex-direction: column;
    }
}
