/**
 * 소개(게시판) 페이지 스타일
 */

/* 영상자료 갤러리 스타일 */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.video-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.video-item:hover .video-play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

.video-subject {
    color: #1b2a4e;
    font-weight: 600;
}

.video-meta-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.video-author {
    color: #999;
}

.video-date {
    color: #999;
}

.video-views {
    color: #999;
}

/* 태블릿 세로 (768px ~ 1023px) */
@media (max-width: 1023px) {
    .video-gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }

    .video-thumbnail {
        height: 160px;
    }
}

/* 모바일 중형 (480px ~ 767px) */
@media (max-width: 767px) {
    .video-gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem;
    }

    .video-thumbnail {
        height: 140px;
    }
}

/* 모바일 소형 (320px ~ 479px) */
@media (max-width: 479px) {
    .video-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .video-thumbnail {
        height: 200px;
    }
}

.board-container {
    max-width: 1200px;
    margin: 100px auto;
    padding: 0 2rem;
}

/* 페이지 헤더 */
.board-page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.board-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    letter-spacing: -0.02em;
}

.board-content-wrapper {
    background: #f4f4f4;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* 섹션 스타일 */
.board-section {
    margin-bottom: 0;
    margin-top: 0;
}

.board-section:first-child {
    margin-top: 0;
}

.board-section-inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    padding: 3rem 0;
    align-items: start;
}

/* 구분선 */
.board-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0;
    width: 100%;
    border: none;
}

/* 제목 영역 */
.board-title-area {
    flex-shrink: 0;
}

.board-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1b2a4e;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.board-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 컨텐츠 영역 */
.board-content-area {
    min-width: 0;
}

.board-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #333;
    margin: 0;
    text-align: left;
    letter-spacing: 0.3px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 게시판 목록 스타일 */
.board-list-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
}

/* board/list.php 페이지에서만 배경 흰색으로 오버라이드 */
body.menu-board .board-list-container {
    background-color: #ffffff;
}

/* board/list.php 페이지의 user-content 배경도 흰색으로 */
body.menu-board:has(.board-list-container) .user-content {
    background-color: #ffffff;
}

/* 영상강의 페이지 - 배경색과 텍스트 반대 */
.lecture-page {
    background-color: #0f0f0f !important;
}

.lecture-page .board-list-content-wrapper {
    background-color: #0f0f0f !important;
}

.lecture-page .board-list-main-title {
    color: #ffffff !important;
}

.lecture-page .board-list-header-section {
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

.lecture-page .board-cards-grid {
    background-color: #0f0f0f !important;
}

.lecture-page .board-card {
    background: transparent !important;
}

.lecture-page .board-card-title {
    color: #ffffff !important;
}

.lecture-page .board-card-desc {
    color: rgba(255, 255, 255, 0.85) !important;
}

.lecture-page .board-card-info {
    color: #ffffff !important;
}

.lecture-page .board-card-thumbnail {
    background: #1a1a1a !important;
}

.lecture-page .board-card-thumbnail.no-image {
    background: #1a1a1a !important;
}

.lecture-page .board-card-author {
    color: rgba(255, 255, 255, 0.75) !important;
    border-top-color: rgba(255, 255, 255, 0.15) !important;
}

.lecture-page .board-card-meta {
    color: rgba(255, 255, 255, 0.75) !important;
}

.lecture-page .board-card-date {
    color: rgba(255, 255, 255, 0.75) !important;
}

.lecture-page .board-card-subject {
    color: #ffffff !important;
}

.lecture-page .board-empty {
    background: #0f0f0f !important;
    color: rgba(255, 255, 255, 0.85) !important;
    box-shadow: none !important;
}

.lecture-page .board-pagination {
    border-top-color: rgba(255, 255, 255, 0.15) !important;
}

.lecture-page .pagination-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.lecture-page .pagination-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

.lecture-page .pagination-btn.active {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #0f0f0f !important;
}

.lecture-page .board-filter-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.lecture-page .board-filter-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

.lecture-page .board-filter-btn.active {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #0f0f0f !important;
}

/* 영상강의 페이지 카테고리 탭 스타일 */
.lecture-page .board-category-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

.lecture-page .board-category-tab {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.lecture-page .board-category-tab:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

.lecture-page .board-category-tab.active {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #0f0f0f !important;
}

body.menu-board:has(.lecture-page) .user-content {
    background-color: #0f0f0f !important;
}

/* board/view.php에서 lecture 타입일 때 배경색 변경 */
body.menu-board:has(.board-view-container.lecture-view) .user-content,
body.menu-board:has(.board-view-container:has(.lecture-layout)) .user-content {
    background-color: #0f0f0f !important;
}

/* list.php에서 들어온 경우 배경색을 흰색으로 유지 */
body.menu-board:has(.board-view-container.from-list-page) .user-content {
    background-color: #ffffff !important;
}

.board-list-header {
    margin-bottom: 3rem;
    text-align: center;
}

.board-list-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    letter-spacing: -0.02em;
}

.board-list-content-wrapper {
    background: #fff;
    padding: 4rem 0;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* 헤더 섹션 (RECENT + 필터) */
.board-list-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 0 2rem 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
}

/* 데스크탑에서 더 넓은 패딩 */
@media (min-width: 1200px) {
    .board-list-header-section {
        padding: 0 4rem 1.5rem 4rem;
    }
    
    .lecture-page .board-list-header-section {
        padding: 0 4rem 1.5rem 4rem;
    }
}

@media (min-width: 1800px) {
    .board-list-header-section {
        padding: 0 6rem 1.5rem 6rem;
    }
    
    .lecture-page .board-list-header-section {
        padding: 0 6rem 1.5rem 6rem;
    }
}

.board-list-main-title {
    font-size: 3rem;
    font-weight: 900;
    color: #111;
    margin: 0;
    letter-spacing: 0.3rem;
    line-height: 1;
}

.board-list-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.board-filter-group {
    position: relative;
}

.board-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.board-filter-btn:hover {
    background: #f8f9fa;
    border-color: #1b2a4e;
    color: #1b2a4e;
}

.board-filter-btn.active {
    background: #1b2a4e;
    border-color: #1b2a4e;
    color: #fff;
}

.filter-chevron {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.board-filter-btn:hover .filter-chevron {
    transform: translateY(2px);
}

/* 카테고리 레이아웃 */
.board-category-layout {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.board-category-title-area {
    flex-shrink: 0;
    width: 280px;
    position: sticky;
    top: 100px;
}

.board-category-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 1rem 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.board-category-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.board-category-content-area {
    flex: 1;
    min-width: 0;
}

/* 카테고리 탭 */
.board-category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 3rem;
    padding: 0 2rem;
    flex-wrap: wrap;
}

/* 데스크탑에서 더 넓은 패딩 */
@media (min-width: 1200px) {
    .board-category-tabs {
        padding: 0 4rem;
    }
    
    .lecture-page .board-category-tabs {
        padding: 0 4rem;
    }
}

@media (min-width: 1800px) {
    .board-category-tabs {
        padding: 0 6rem;
    }
    
    .lecture-page .board-category-tabs {
        padding: 0 6rem;
    }
}

.board-category-tab {
    padding: 0.75rem 1.5rem;
    border: 1px solid #e9ecef;
    background: #fff;
    color: #666;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.board-category-tab:hover {
    background: #f8f9fa;
    border-color: #1b2a4e;
    color: #1b2a4e;
}

.board-category-tab.active {
    background: #1b2a4e;
    border-color: #1b2a4e;
    color: #fff;
}

/* 카드 그리드 */
.board-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.2rem;
    margin-bottom: 3rem;
}

.board-card {
    background: transparent;
    overflow: visible;
    transition: transform 0.3s ease;
}

.board-card:hover {
    transform: translateY(-2px);
}

.board-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.board-card-thumbnail-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 비율 */
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    border-radius: 0;
}

.board-card-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.board-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.board-card:hover .board-card-thumbnail img {
    transform: scale(1.08);
}

.board-card-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.board-logo-placeholder {
    width: 60%;
    height: auto;
    object-fit: contain;
    opacity: 0.6;
}

.board-card-info {
    padding: 0 1.5rem;
}

.board-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-card-desc {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.board-card-subject {
    color: #1b2a4e;
    font-weight: 600;
}

.board-card-date {
    color: #999;
}

.board-card-author {
    font-size: 0.85rem;
    color: #999;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.board-list-content {
    margin-top: 2rem;
}

.board-empty {
    text-align: center;
    padding: 0;
    color: #999;
    min-height: 331px;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.board-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.board-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.15s ease;
}

.board-item:hover {
    background-color: #f8f9fa;
}

.board-item:last-child {
    border-bottom: none;
}

.board-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.board-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.board-item-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.15s ease;
}

.board-item-title a:hover {
    color: #1b2a4e;
}

.board-item-date {
    font-size: 0.9rem;
    color: #999;
    white-space: nowrap;
}

.board-item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.board-item-author {
    color: #666;
}

.board-item-views {
    color: #999;
}

/* 페이지네이션 */
.board-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 2rem 2rem 0 2rem;
    border-top: 1px solid #e9ecef;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 1rem;
    border: 1px solid #e9ecef;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.15s ease;
}

.pagination-btn:hover {
    background: #f8f9fa;
    border-color: #1b2a4e;
    color: #1b2a4e;
}

.pagination-btn.active {
    background: #1b2a4e;
    border-color: #1b2a4e;
    color: #fff;
}

/* 디바이스별 반응형 디자인 */
/* 태블릿 가로 (1024px ~ 1199px) */
@media (max-width: 1199px) {
    .board-container {
        padding: 0 1.5rem;
    }

    .board-content-wrapper {
        padding: 2.5rem;
    }
}

/* 태블릿 세로 (768px ~ 1023px) */
@media (max-width: 1023px) {
    .board-list-header-section {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .board-list-main-title {
        font-size: 2.5rem;
    }

    .board-list-filters {
        width: 100%;
        justify-content: flex-start;
    }

    .board-category-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .board-category-title-area {
        width: 100%;
        position: static;
    }

    .board-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .board-container {
        padding: 0 1.5rem;
    }

    .board-content-wrapper {
        padding: 2.5rem 2rem;
    }
}

/* 모바일 중형 (480px ~ 767px) */
@media (max-width: 767px) {
    .board-container {
        margin: 50px auto;
        padding: 0 1rem;
    }

    .board-page-header {
        margin-bottom: 2rem;
    }

    .board-page-title {
        font-size: 2rem;
    }

    .board-content-wrapper {
        padding: 2rem 1.5rem;
    }

    .board-list-container {
        margin: 50px auto;
        padding: 0 1rem;
    }

    .board-list-header {
        margin-bottom: 2rem;
    }

    .board-list-title {
        font-size: 2rem;
    }

    .board-list-content-wrapper {
        padding: 2rem 1.5rem;
    }

    .board-category-title {
        font-size: 1.75rem;
    }

    .board-category-description {
        font-size: 1rem;
    }

    .board-category-tabs {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .board-category-tab {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .board-list-header-section {
        flex-direction: column;
        gap: 1rem;
    }

    .board-list-main-title {
        font-size: 2rem;
    }

    .board-list-filters {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .board-filter-btn {
        font-size: 0.875rem;
        padding: 0.4rem 0.875rem;
    }

    .board-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .board-section-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .board-title-area {
        width: 100%;
    }

    .board-title {
        font-size: 1.5rem;
    }

    .board-title br {
        display: none;
    }

    .board-subtitle {
        font-size: 0.95rem;
    }

    .board-text {
        font-size: 1rem;
        line-height: 1.8;
    }

    .board-list-container {
        margin: 50px auto;
        padding: 2rem 1.5rem;
    }

    .board-list-title {
        font-size: 1.5rem;
    }

    .board-item {
        padding: 1rem 0;
    }

    .board-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .board-item-title {
        font-size: 1rem;
    }

    .board-item-date {
        align-self: flex-start;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 0.75rem;
        font-size: 0.9rem;
    }
}

/* 모바일 소형 (320px ~ 479px) */
@media (max-width: 479px) {
    .board-container {
        margin: 40px auto;
        padding: 0 0.75rem;
    }

    .board-page-title {
        font-size: 1.75rem;
    }

    .board-content-wrapper {
        padding: 1.5rem 1rem;
    }

    .board-list-container {
        padding: 0 0.75rem;
    }

    .board-list-title {
        font-size: 1.75rem;
    }

    .board-list-content-wrapper {
        padding: 1.5rem 1rem;
    }

    .board-category-title {
        font-size: 1.5rem;
    }

    .board-category-description {
        font-size: 0.95rem;
    }

    .board-category-tabs {
        gap: 0.4rem;
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
    }

    .board-category-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .board-list-header-section {
        flex-direction: column;
        gap: 1rem;
    }

    .board-list-main-title {
        font-size: 1.75rem;
    }

    .board-list-filters {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .board-filter-group {
        width: 100%;
    }

    .board-filter-btn {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border: 1px solid #e9ecef;
        border-radius: 4px;
    }

    .board-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .board-title,
    .board-subtitle {
        font-size: 1.1rem;
    }

    .board-text {
        font-size: 0.9rem;
    }

    .board-item {
        padding: 0.875rem 0;
    }

    .board-item-title {
        font-size: 0.95rem;
    }

    .board-item-date {
        font-size: 0.8rem;
    }

    .pagination-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 0.5rem;
        font-size: 0.85rem;
    }
}

/* 게시판 상세 페이지 스타일 */
.board-view-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem;
    background: #f8f9fa;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* list.php에서 들어온 경우 배경색만 list.php와 동일하게 (레이아웃은 기존 유지) */
.board-view-container.from-list-page {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    min-height: calc(100vh); /* 헤더와 푸터 높이를 고려한 최소 높이 */
}

/* 영상강의 타입일 때 다크 테마 적용 */
.board-view-container.lecture-view,
.board-view-container:has(.lecture-layout) {
    max-width: 100%;
    margin: 0 !important;
    padding: 2rem 4rem;
    background: #0f0f0f !important;
    box-shadow: none !important;
}

.board-view-container.lecture-view .board-view-header,
.board-view-container:has(.lecture-layout) .board-view-header {
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

.board-view-container.lecture-view .board-back-btn,
.board-view-container:has(.lecture-layout) .board-back-btn {
    color: rgba(255, 255, 255, 0.85) !important;
}

.board-view-container.lecture-view .board-back-btn:hover,
.board-view-container:has(.lecture-layout) .board-back-btn:hover {
    color: #ffffff !important;
}

.board-view-container.lecture-view .board-view-title,
.board-view-container:has(.lecture-layout) .board-view-title {
    color: #ffffff !important;
}

.board-view-container.lecture-view .board-view-meta,
.board-view-container:has(.lecture-layout) .board-view-meta {
    color: rgba(255, 255, 255, 0.75) !important;
}

.board-view-container.lecture-view .board-view-type,
.board-view-container:has(.lecture-layout) .board-view-type {
    color: #ffffff !important;
}

.board-view-container.lecture-view .board-view-subject,
.board-view-container:has(.lecture-layout) .board-view-subject {
    color: rgba(255, 255, 255, 0.85) !important;
}

.board-view-exam {
    color: #1b2a4e;
    font-weight: 600;
}

.board-view-container.lecture-view .board-view-exam,
.board-view-container:has(.lecture-layout) .board-view-exam {
    color: rgba(255, 255, 255, 0.85) !important;
}

.board-view-container.lecture-view .board-view-author,
.board-view-container:has(.lecture-layout) .board-view-author {
    color: rgba(255, 255, 255, 0.75) !important;
}

.board-view-container.lecture-view .board-view-date,
.board-view-container:has(.lecture-layout) .board-view-date {
    color: rgba(255, 255, 255, 0.75) !important;
}

.board-view-container.lecture-view .board-view-views,
.board-view-container:has(.lecture-layout) .board-view-views {
    color: rgba(255, 255, 255, 0.75) !important;
}

.board-view-container.lecture-view .board-view-footer,
.board-view-container:has(.lecture-layout) .board-view-footer {
    border-top-color: rgba(255, 255, 255, 0.15) !important;
}

.board-view-container.lecture-view .board-list-btn,
.board-view-container:has(.lecture-layout) .board-list-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.board-view-container.lecture-view .board-list-btn:hover,
.board-view-container:has(.lecture-layout) .board-list-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

.board-view-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}


.board-back-btn {
    display: inline-block;
    margin-bottom: 1rem;
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

.board-back-btn:hover {
    color: #1b2a4e;
}

.board-view-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.board-view-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
}

.board-view-type {
    color: #1b2a4e;
    font-weight: 600;
}

.board-view-content {
    margin-bottom: 2rem;
}

/* 영상강의 레이아웃 (유튜브 스타일) */
.lecture-layout {
    margin-bottom: 2rem;
}

.lecture-main {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.lecture-video-section {
    min-width: 0;
    /* flexbox/grid 오버플로우 방지 */
}

.lecture-video-player {
    margin-bottom: 2rem;
}

/* 비디오 확장 애니메이션 - 초기 상태 (좁게) */
[data-video-expand] {
    transform: scaleX(0.7);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.6s ease;
}

/* 비디오 확장 애니메이션 - 활성화 상태 (넓게) */
[data-video-expand].is-visible {
    transform: scaleX(1);
    opacity: 1;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 비율 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 스크롤 시 iframe이 휠 이벤트를 가로채지 않도록 오버레이 */
.video-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

/* 활성화 상태에서는 오버레이 제거하여 영상 조작 가능 */
.video-wrapper.is-active::after {
    display: none;
}

.youtube-iframe,
.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-player {
    object-fit: contain;
}

.lecture-video-placeholder {
    padding: 4rem 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.board-view-container.lecture-view .lecture-video-placeholder,
.board-view-container:has(.lecture-layout) .lecture-video-placeholder {
    background: #1a1a1a !important;
    color: rgba(255, 255, 255, 0.75) !important;
}

/* 해설 목차 섹션 */
.lecture-outline-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
}

/* CKEditor의 미완성 media 태그 숨기기 */
.lecture-outline-content figure.media,
.lecture-outline-content .media {
    display: none !important;
}

.board-view-container.lecture-view .lecture-outline-section,
.board-view-container:has(.lecture-layout) .lecture-outline-section {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.lecture-outline-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.board-view-container.lecture-view .lecture-outline-title,
.board-view-container:has(.lecture-layout) .lecture-outline-title {
    color: #ffffff !important;
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

.lecture-outline-content {
    line-height: 1.8;
    color: #333;
}

.board-view-container.lecture-view .lecture-outline-content,
.board-view-container:has(.lecture-layout) .lecture-outline-content {
    color: rgba(255, 255, 255, 0.85) !important;
}

.board-view-container.lecture-view .lecture-outline-content p,
.board-view-container:has(.lecture-layout) .lecture-outline-content p {
    color: rgba(255, 255, 255, 0.85) !important;
}

.board-view-container.lecture-view .lecture-outline-content h1,
.board-view-container.lecture-view .lecture-outline-content h2,
.board-view-container.lecture-view .lecture-outline-content h3,
.board-view-container.lecture-view .lecture-outline-content h4,
.board-view-container.lecture-view .lecture-outline-content h5,
.board-view-container.lecture-view .lecture-outline-content h6,
.board-view-container:has(.lecture-layout) .lecture-outline-content h1,
.board-view-container:has(.lecture-layout) .lecture-outline-content h2,
.board-view-container:has(.lecture-layout) .lecture-outline-content h3,
.board-view-container:has(.lecture-layout) .lecture-outline-content h4,
.board-view-container:has(.lecture-layout) .lecture-outline-content h5,
.board-view-container:has(.lecture-layout) .lecture-outline-content h6 {
    color: #ffffff !important;
}

/* 강사 프로필 사이드바 */
.lecture-sidebar {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* 스크롤바 숨기기 */
.lecture-sidebar::-webkit-scrollbar {
    display: none;
}

.lecture-sidebar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.lecture-teacher-profile {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    flex-shrink: 0;
}

.board-view-container.lecture-view .lecture-teacher-profile,
.board-view-container:has(.lecture-layout) .lecture-teacher-profile {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.lecture-sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.board-view-container.lecture-view .lecture-sidebar-title,
.board-view-container:has(.lecture-layout) .lecture-sidebar-title {
    color: #ffffff !important;
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

.teacher-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.teacher-name {
    font-size: 1.125rem;
    color: #333;
}

.board-view-container.lecture-view .teacher-name,
.board-view-container:has(.lecture-layout) .teacher-name {
    color: #ffffff !important;
}

.board-view-container.lecture-view .teacher-name strong,
.board-view-container:has(.lecture-layout) .teacher-name strong {
    color: #ffffff !important;
}

.teacher-description {
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.6;
}

.board-view-container.lecture-view .teacher-description,
.board-view-container:has(.lecture-layout) .teacher-description {
    color: rgba(255, 255, 255, 0.75) !important;
}

.board-view-container.lecture-view .teacher-description p,
.board-view-container:has(.lecture-layout) .teacher-description p {
    color: rgba(255, 255, 255, 0.75) !important;
}

.teacher-contact {
    margin-top: 0.5rem;
}

.btn-kakao {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #FEE500;
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.btn-kakao:hover {
    background: #FDD835;
    color: #000;
}

.btn-kakao svg {
    width: 20px;
    height: 20px;
}

/* 같은 시험 게시글 리스트 */
.lecture-exam-list {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.board-view-container.lecture-view .lecture-exam-list,
.board-view-container:has(.lecture-layout) .lecture-exam-list {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.lecture-exam-board-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: visible;
}

/* 스크롤바 스타일링 */
.lecture-exam-board-list::-webkit-scrollbar {
    width: 6px;
}

.lecture-exam-board-list::-webkit-scrollbar-track {
    background: transparent;
}

.lecture-exam-board-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.lecture-exam-board-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.board-view-container.lecture-view .lecture-exam-board-list::-webkit-scrollbar-thumb,
.board-view-container:has(.lecture-layout) .lecture-exam-board-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.board-view-container.lecture-view .lecture-exam-board-list::-webkit-scrollbar-thumb:hover,
.board-view-container:has(.lecture-layout) .lecture-exam-board-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.lecture-exam-board-item {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

.lecture-exam-board-item:last-child {
    border-bottom: none;
}

.board-view-container.lecture-view .lecture-exam-board-item,
.board-view-container:has(.lecture-layout) .lecture-exam-board-item {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.lecture-exam-board-link {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    text-decoration: none;
    color: #333;
    transition: opacity 0.15s ease;
    border-radius: 4px;
}

.lecture-exam-board-link:hover {
    opacity: 0.8;
}

.board-view-container.lecture-view .lecture-exam-board-link,
.board-view-container:has(.lecture-layout) .lecture-exam-board-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.board-view-container.lecture-view .lecture-exam-board-link:hover,
.board-view-container:has(.lecture-layout) .lecture-exam-board-link:hover {
    opacity: 0.9;
}

.lecture-exam-board-item.active .lecture-exam-board-link {
    opacity: 1;
}

.board-view-container.lecture-view .lecture-exam-board-item.active .lecture-exam-board-link,
.board-view-container:has(.lecture-layout) .lecture-exam-board-item.active .lecture-exam-board-link {
    opacity: 1;
}

/* 썸네일 영역 */
.lecture-exam-board-thumbnail-wrapper {
    flex-shrink: 0;
    width: 150px;
    height: 100px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
}

.board-view-container.lecture-view .lecture-exam-board-thumbnail-wrapper,
.board-view-container:has(.lecture-layout) .lecture-exam-board-thumbnail-wrapper {
    background: #2a2a2a !important;
}

.lecture-exam-board-thumbnail {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.lecture-exam-board-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.lecture-exam-board-link:hover .lecture-exam-board-thumbnail img {
    transform: scale(1.05);
}

.lecture-exam-board-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #999;
}

.board-view-container.lecture-view .lecture-exam-board-thumbnail.no-image,
.board-view-container:has(.lecture-layout) .lecture-exam-board-thumbnail.no-image {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* 정보 영역 */
.lecture-exam-board-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.lecture-exam-board-type {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #1b2a4e;
    background: #e3f2fd;
    padding: 0.1875rem 0.375rem;
    border-radius: 3px;
    margin: 0;
    width: fit-content;
}

.board-view-container.lecture-view .lecture-exam-board-type,
.board-view-container:has(.lecture-layout) .lecture-exam-board-type {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

.lecture-exam-board-title {
    display: -webkit-box;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin: 0;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.board-view-container.lecture-view .lecture-exam-board-title,
.board-view-container:has(.lecture-layout) .lecture-exam-board-title {
    color: rgba(255, 255, 255, 0.9) !important;
}

.lecture-exam-board-date {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-top: auto;
}

.board-view-container.lecture-view .lecture-exam-board-date,
.board-view-container:has(.lecture-layout) .lecture-exam-board-date {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .lecture-main {
        grid-template-columns: 1fr;
    }

    .lecture-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .lecture-exam-list {
        max-height: none;
    }

    .board-view-container.lecture-view,
    .board-view-container:has(.lecture-layout) {
        padding: 2.5rem 3rem;
    }
}

.board-view-body {
    min-height: 300px;
    padding: 2rem 0;
    line-height: 1.8;
    color: #333;
    font-size: 1rem;
}

.board-view-footer {
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.board-list-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: 1px solid #1b2a4e;
    background: #fff;
    color: #1b2a4e;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.board-list-btn:hover {
    background: #1b2a4e;
    color: #fff;
}

/* 모바일 중형 (480px ~ 767px) - board-view */
@media (max-width: 767px) {
    .board-view-container {
        margin: 50px auto;
        padding: 1.5rem 1rem;
    }

    .board-view-title {
        font-size: 1.5rem;
    }

    .board-view-meta {
        font-size: 0.85rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .board-view-body {
        padding: 1.5rem 0;
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .board-view-body img {
        max-width: 100%;
        height: auto;
    }

    .board-list-btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
    }

    .video-wrapper {
        border-radius: 4px;
    }
}

/* 모바일 소형 (320px ~ 479px) */
@media (max-width: 479px) {
    .board-view-container {
        padding: 1.25rem 0.75rem;
    }

    .board-view-title {
        font-size: 1.25rem;
    }

    .board-view-meta {
        font-size: 0.8rem;
        gap: 0.5rem;
    }

    .board-view-body {
        padding: 1.25rem 0;
        font-size: 0.9rem;
    }

    .board-list-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
}
