/* 강좌 상세 페이지 스타일 (scratch_1.html 기반) */

/* Header */
.view-header {
    text-align: center;
    margin-bottom: 3rem;
}

.view-category {
    color: #192f55;
    margin-bottom: 0.5rem;
    font-size: 18px;
}

.view-main-title {
    font-size: 2.25rem;
    font-weight: bold;
    color: #111827;
}

/* Main Grid */
.view-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (min-width: 1024px) {
    .view-main-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Left Column */
.view-image-section {
    position: relative;
    margin-bottom: 1rem;
}

.view-course-image {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.view-no-image {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    color: #999;
    border-radius: 0.5rem;
}

.view-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 0.5rem 1rem;
    border: 5px solid #fff;
    border-radius: 0.7rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* 상태별 배지 색상 (index.php와 동일) */
.view-badge.scheduled {
    background-color: #5c6bc0;
}

.view-badge.open {
    background-color: #2e7d32;
}

.view-badge.extra {
    background-color: #0277bd;
}

/* 신청마감 배지 강조 */
.view-badge.closed {
    background-color: #d32f2f;
    padding: 0.75rem 1.5rem;
    border: 6px solid #fff;
    animation: pulse-closed 2s ease-in-out infinite;
}

@keyframes pulse-closed {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 6px -1px rgba(211, 47, 47, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 12px -2px rgba(211, 47, 47, 0.5);
    }
}

.view-badge.canceled {
    background-color: #795548;
}

.view-badge.blue {
    background-color: #5c6bc0;
}

.view-badge p {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* closed 배지의 텍스트는 더 크게 */
.view-badge.closed p {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.view-button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.view-btn {
    height: 3.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.view-btn-outline {
    background-color: white;
    color: #111827;
    border: 2px solid #d1d5db;
}

.view-btn-outline:hover {
    background-color: #1a2f4e;
    color: white;
    border-color: #1a2f4e;
}

.view-btn-primary {
    background-color: #192f55;
    color: white;
}

.view-btn-primary:hover {
    background-color: #1a2f4e;
}

/* 신청 불가 버튼 (마감, 정원초과 등) */
.view-btn-disabled {
    background-color: #dc3545;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: not-allowed;
    opacity: 1;
    border: 3px solid #b71c1c;
}

.view-btn-disabled:hover {
    background-color: #c82333;
    border-color: #a71d2a;
}

/* 이미 신청한 경우 버튼 */
.view-btn-secondary {
    background-color: #6c757d;
    color: white;
    font-weight: 600;
    cursor: not-allowed;
}

.view-arrow-icon {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.view-btn-primary:hover .view-arrow-icon {
    opacity: 1;
}

/* Right Column - Table */
.view-course-details {
    background-color: white;
}

.view-details-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid black;
}

.view-details-table tr {
    border-bottom: 1px solid #e5e7eb;
}

.view-details-table td {
    padding: 1rem 1.5rem;
}

.view-details-table td:first-child {
    background-color: #f7f7f7;
    font-weight: 500;
    color: #000;
    width: 33.333%;
    text-align: center;
}

/* Tabs Section */
.view-tabs-section {
    background-color: white;
    margin-bottom: 4rem;
}

.view-tab-list {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.view-tab-button {
    flex: 1;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 1rem;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -1px;
}

.view-tab-button:focus {
    outline: none;
}

.view-tab-button.active {
    border-bottom-color: black;
    color: black;
}

.view-tab-content {
    display: none;
    padding: 2rem;
}

.view-tab-content.active {
    display: block;
}

.view-tab-content p {
    color: #374151;
    line-height: 1.8;
}

/* 목록으로 버튼 */
.view-bottom-button-wrapper {
    display: flex;
    justify-content: center;
    padding-bottom: 2rem;
}

.view-btn-back {
    height: 3.5rem;
    padding: 0 3rem;
    font-size: 1rem;
    font-weight: 500;
    background-color: white;
    color: #111827;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn-back:hover {
    background-color: #1a2f4e;
    color: white;
    border-color: #1a2f4e;
}

/* 신청 불가 안내 메시지 박스 */
.view-notice-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border-left: 5px solid;
}

.view-notice-closed {
    background-color: #ffebee;
    border-left-color: #d32f2f;
}

.view-notice-closed p {
    margin: 0;
    color: #c62828;
}

.view-notice-closed strong {
    font-size: 16px;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .view-main-title {
        font-size: 1.75rem;
    }

    .view-tab-button {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }

    .view-tab-content {
        padding: 1rem 0;
    }

    .view-details-table td {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .view-button-group {
        grid-template-columns: 1fr;
    }
}

