/* ===================== */
/* media 게시판 (영상 콘텐츠) */
/* ===================== */

/* --- Hero Section --- */
.media-hero {
    position: relative;
    width: 100%;
    height: 800px;
    overflow: hidden;
}
.media-hero-bg {
    position: absolute;
    inset: 0;
}
.media-hero-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.media-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(34, 30, 31, 0.6);
}
.media-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.media-hero-title {
    position: absolute;
    top: 340px;
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: 60px;
    color: #fff;
    text-align: center;
    margin: 0;
}
.media-hero-sub {
    position: absolute;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    max-width: 720px;
    text-align: center;
}
.media-hero-subtitle {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: 32px;
    color: #fff;
    margin: 0;
}
.media-hero-desc {
    font-family: 'Noto Serif KR', serif;
    font-weight: 400;
    font-size: 20px;
    color: #fff;
    margin: 0;
    width: max-content;
}

/* --- Highlight Section --- */
.media-highlight {
    max-width: 1920px;
    margin: 160px auto 0;
    padding: 0 200px;
    display: flex;
    align-items: center;
    gap: 60px;
    box-sizing: border-box;
}
.media-highlight-text {
    flex-shrink: 0;
    width: 514px;
    display: flex;
    flex-direction: column;
    gap: 52px;
}
.media-highlight-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.media-highlight-label {
    font-family: 'Noto Serif KR', serif;
    font-weight: 400;
    font-size: 20px;
    color: #840028;
    margin: 0;
}
.media-highlight-heading {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: 60px;
    color: #221e1f;
    margin: 0;
    line-height: 1;
}
.media-highlight-desc {
    font-family: 'Pretendard', sans-serif;
    font-size: 24px;
    color: #221e1f;
    line-height: 1.6;
    margin: 0;
}
.media-highlight-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 20px;
    border: 1px solid #840028;
    border-radius: 10px;
    font-family: 'Pretendard', sans-serif;
    font-size: 18px;
    color: #840028;
    text-decoration: none;
    width: fit-content;
    transition: background 0.2s, color 0.2s;
}
.media-highlight-more:hover {
    background: #840028;
    color: #fff;
}
.media-highlight-thumb {
    flex: 1;
    min-width: 0;
    border-radius: 30px;
    overflow: hidden;
    display: block;
    position: relative;
}
.media-highlight-thumb::before {
    content: '';
    display: block;
    padding-top: 56.16%; /* 565/1006 */
}
.media-highlight-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Divider --- */
.media-divider {
    max-width: 1520px;
    margin: 60px auto;
    padding: 0 200px;
    box-sizing: content-box;
}
.media-divider::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(34, 30, 31, 0.15);
}

/* --- Grid Section --- */
.media-section {
    max-width: 1520px;
    margin: 0 auto 120px;
    padding: 0 200px;
    box-sizing: content-box;
}
.media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 47px 21px;
}
.media-card {
    width: calc((100% - 42px) / 3);
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.media-card-thumb {
    width: 100%;
    aspect-ratio: 493 / 278;
    border-radius: 30px;
    overflow: hidden;
    background: #5f6369;
}
.media-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-thumb-empty {
    width: 100%;
    height: 100%;
    background: #5f6369;
}
.media-card-title {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: 24px;
    color: #221e1f;
    text-align: center;
    margin: 0;
    width: 100%;
    white-space: nowrap;
    overflow-x: clip;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.media-empty {
    width: 100%;
    text-align: center;
    padding: 80px 0;
    color: #8c9091;
    font-size: 18px;
}

/* --- Pagination --- */
.media-paging {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 60px;
    height: 40px;
}
.media-paging-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #221e1f;
    text-decoration: none;
    transition: opacity 0.2s;
}
.media-paging-arrow.prev {
    margin-right: 24px;
}
.media-paging-arrow.next {
    margin-left: 24px;
}
.media-paging-arrow:hover {
    opacity: 0.6;
}
.media-paging-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-family: 'Pretendard', sans-serif;
    font-size: 20px;
    color: #221e1f;
    text-decoration: none;
    transition: background 0.2s;
}
.media-paging-num + .media-paging-num {
    margin-left: 12px;
}
.media-paging-num.active {
    background: #840028;
    color: #fff;
}
.media-paging-num:hover:not(.active) {
    background: rgba(34, 30, 31, 0.08);
}

/* --- View Page --- */
.media-view {
    padding-top: 140px;
    padding-bottom: 120px;
}
.media-view-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}
.media-view-title {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: 32px;
    color: #221e1f;
    margin: 0 0 40px 0;
    text-align: center;
}
.media-view-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    background: #000;
}
.media-view-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.media-view-content {
    margin-bottom: 60px;
    line-height: 1.8;
    color: #221e1f;
    font-size: 16px;
}
.media-view-content iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 20px;
    border: none;
    margin-bottom: 20px;
}
.media-view-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}
.media-view-files {
    margin-bottom: 40px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 12px;
}
.media-view-file {
    display: block;
    color: #840028;
    text-decoration: none;
    padding: 4px 0;
}
.media-view-file:hover {
    text-decoration: underline;
}
.media-view-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}
.media-btn-list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 40px;
    border: 1px solid #221e1f;
    border-radius: 12px;
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    color: #221e1f;
    text-decoration: none;
}
.media-btn-list:hover {
    background: #221e1f;
    color: #fff;
}
.media-view-nav {
    border-top: 1px solid rgba(34, 30, 31, 0.1);
    display: flex;
    flex-direction: column;
}
.media-view-nav-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(34, 30, 31, 0.05);
    text-decoration: none;
    color: inherit;
}
.media-view-nav-item:hover {
    background: rgba(34, 30, 31, 0.02);
}
.media-view-nav-label {
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    color: #8c9091;
    width: 60px;
    flex-shrink: 0;
}
.media-view-nav-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    color: #221e1f;
}

/* --- Responsive --- */
@media (max-width: 1199px) {
    .media-hero { height: 500px; }
    .media-hero-title { font-size: 40px; top: 200px; }
    .media-hero-subtitle { font-size: 24px; }
    .media-hero-desc { font-size: 16px; }

    .media-highlight {
        padding: 0 40px;
        flex-direction: column;
        gap: 40px;
    }
    .media-highlight-text {
        width: 100%;
        gap: 32px;
    }
    .media-highlight-heading { font-size: 40px; }
    .media-highlight-desc { font-size: 18px; }
    .media-highlight-thumb { width: 100%; }

    .media-divider { padding: 0 40px; }
    .media-section { padding: 0 40px; }

    .media-card { width: calc((100% - 21px) / 2); }
}

@media (max-width: 767px) {
    /* Hero - 시안: 300px */
    .media-hero { height: 300px; }
    .media-hero-title { font-size: 26px; top: 80px; padding: 0 20px; }
    .media-hero-subtitle { font-size: 16px; }
    .media-hero-desc { font-size: 13px; padding: 0 20px; line-height: 1.6; }
    .media-hero-sub { bottom: 32px; gap: 12px; }

    /* Highlight - 시안: 제목 + 설명 + 대표영상(342x192) + More 버튼 중앙 */
    .media-highlight {
        padding: 0 24px;
        margin-top: 60px;
        gap: 24px;
        align-items: center;
        text-align: center;
    }
    .media-highlight-text {
        gap: 20px;
        align-items: center;
        width: 100%;
        order: 1;
    }
    .media-highlight-title-wrap {
        gap: 16px;
        align-items: center;
    }
    .media-highlight-label {
        font-size: 14px;
    }
    .media-highlight-heading {
        font-size: 20px;
        text-align: center;
    }
    .media-highlight-desc {
        font-size: 13px;
        text-align: center;
        line-height: 1.6;
    }
    .media-highlight-thumb {
        order: 2;
        width: 100%;
        height: 192px;
        border-radius: 16px;
    }
    .media-highlight-thumb::before {
        padding-top: 0;
    }
    .media-highlight-more {
        order: 3;
        height: 38px;
        padding: 0 16px;
        font-size: 13px;
        align-self: center;
    }

    /* Divider - 시안: 32px 여백 */
    .media-divider {
        padding: 0 24px;
        margin: 32px auto;
    }

    /* Grid - 시안: sub 영상 가로형 (썸네일 180x101 + 텍스트 오른쪽) */
    .media-section {
        padding: 0 24px;
        margin-bottom: 60px;
    }
    .media-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .media-card {
        width: 100%;
        flex-direction: row;
        gap: 20px;
        align-items: center;
    }
    .media-card-thumb {
        flex-shrink: 0;
        width: 180px;
        aspect-ratio: 180 / 101;
        height: auto;
        border-radius: 12px;
    }
    .media-card-title {
        font-size: 14px;
        text-align: left;
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        line-height: 1.5;
        flex: 1;
        min-width: 0;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Pagination */
    .media-paging {
        gap: 0;
        margin-top: 40px;
        height: 32px;
    }
    .media-paging-arrow.prev {
        margin-right: 16px;
    }
    .media-paging-arrow.next {
        margin-left: 16px;
    }
    .media-paging-num {
        width: 20px;
        height: 20px;
        font-size: 13px;
    }
    .media-paging-num + .media-paging-num {
        margin-left: 8px;
    }

    /* View */
    .media-view { padding-top: 80px; padding-bottom: 80px; }
    .media-view-title { font-size: 20px; }
}
