/* ===================== 수강생 결과물 (works) ===================== */
.works-page .banner-pc { display: block !important; }
.works-page .banner-mobile { display: none !important; }

@media (max-width: 768px) {
    .works-page .banner-pc { display: none !important; }
    .works-page .banner-mobile { display: block !important; }
    .works-header h1 { font-size: 20px !important; }
    .works-header p { font-size: 13px !important; }
}

/* 기본 배너 (관리자 배너 미업로드 시): S3 배너 이미지 + 좌측 하단 텍스트 오버레이 */
.works-hero {
    position: relative;
    margin-bottom: 32px;
    border-radius: 16px;
    overflow: hidden;
    /* background: linear-gradient(120deg, #1e6bff 0%, #2f86ff 55%, #3aa0ff 100%); */
}

.works-hero-bg {
    display: block;
    width: 100%;
    height: auto;
}

.works-hero-bg-pc { display: block; }
.works-hero-bg-mobile { display: none; }

.works-hero-text {
    position: absolute;
    left: 40px;
    bottom: 28px;
    z-index: 1;
    max-width: 60%;
}

.works-hero-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 8px;
    color: #1a2b4a;
}

.works-hero-desc {
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    color: #4a5a72;
}

@media (max-width: 768px) {
    .works-hero-bg-pc { display: none; }
    .works-hero-bg-mobile { display: block; }
    .works-hero-text {
        left: 20px;
        bottom: 16px;
        max-width: 80%;
    }
    .works-hero-title {
        font-size: 18px;
        margin-bottom: 4px;
    }
    .works-hero-desc {
        font-size: 12px;
    }
}

.works-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 992px) {
    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .works-gallery {
        grid-template-columns: 1fr;
    }
}

.works-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.works-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.works-card.notice {
    border-color: #ffc107;
    background: #fffbf0;
}

.works-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f3f4f6;
    overflow: hidden;
    position: relative;
}

.works-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.works-card-thumb-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
}

.works-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.works-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.works-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: auto;
}

.works-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0 24px;
}

.works-header-title {
    flex: 0 1 auto;
    min-width: 0;
}

.works-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    margin: 0;
    margin-right: auto;
}

.works-search input {
    width: 240px;
    max-width: 100%;
    flex: 0 1 auto;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
}

.works-search button,
.works-search .btn {
    padding: 10px 20px;
    border-radius: 6px;
    white-space: nowrap;
}

.works-header-actions {
    flex: 0 0 auto;
}

.works-search-result {
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #f8f9fa;
    border-left: 3px solid var(--color-primary);
    border-radius: 4px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .works-header {
        flex-wrap: wrap;
    }
    .works-header-title {
        flex: 1 1 100%;
    }
    .works-search {
        flex: 1 1 auto;
        margin-right: 0;
    }
    .works-search input {
        width: 180px;
    }
    .works-header-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

@media (max-width: 576px) {
    .works-header {
        flex-direction: column;
        align-items: stretch;
    }
    .works-search {
        width: 100%;
    }
    .works-search input {
        width: auto;
        flex: 1 1 auto;
    }
    .works-header-actions {
        width: 100%;
        margin-left: 0;
    }
    .works-header-actions .btn {
        width: 100%;
    }
}
