/* 상단 타이틀 */
.commu-center .commu-common .common-title {
    background: #383838;

    &::before {
        background: #1D1D1D;
    }
}

/* vc-category */
.vc-category {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: sticky;
    top: 50px;
    z-index: 10;
    margin-bottom: 10px;
    padding: 20px 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    background-color: #fff;

    &::-webkit-scrollbar { display: none; }

    &.is-dragging {
        cursor: grabbing;
        user-select: none;
    }

    > button {
        flex-shrink: 0;
        padding: 6px 10px;
        border-radius: 40px;
        border: 1px solid #E6E6E6;
        background-color: #F8F8F8;
        border-radius: 999px;
        font-size: 14px;
        white-space: nowrap;

        &.on {
            background: #242424;
            color: #fff;
        }
    }
}

/* vc-grid-wrap */
.vc-grid-wrap {
    padding: 30px 0;
    border-bottom: 1px solid #F0F0F0;
    container-type: inline-size;
    container-name: vc-grid;
    
    &:first-of-type { padding-top: 0; }
    &:last-of-type {
        padding-bottom: 0;
        border-bottom: 0;
    }
}

.vc-head-title {
    margin-bottom: 8px;
    color: #000;
    font-family: "Esamanru", sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 22px;
    scroll-margin-top: 60px; /* 상단 고정 헤더(52px) + 여백 */
}

.vc-grid-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    font-family: 'Pretendard', helvetica, "Apple SD Gothic Neo", sans-serif;
    letter-spacing: -0.6px;
}

.vc-grid-item {
    padding: 10px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
}

.vc-item {
    flex: 1 1 0;
    min-width: 0;
    border-radius: 8px;
    overflow: hidden;
}

.vc-thumb {
    position: relative;
    width: 100%;
    padding-top: 57.27%;
    background: #f0f0f0;
    overflow: hidden;

    img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.vc-caption {
    padding: 10px 0 0;
}

.vc-title {
    margin-bottom: 4px;
    color: #707070;
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;

}

.vc-desc {
    overflow: hidden;
    min-height: 40px;
    color: #242424;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 20px;
}

/* vc-modal */
.vc-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.50);

    &.is-open {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.vc-modal {
    width: 100%;
    max-width: 860px;
}

.vc-modal-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background-color: #f0f0f0;
    border: 2px solid #D6D6D6;

    > iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }
}

.vc-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -38px;
    right: -2px;
    width: 32px;
    height: 32px;
    background-color: #fff;
    border-radius: 3px;
    border: 0;

    &::after {
        content: "";
        display: block;
        width: 20px;
        height: 20px;
        background-color: #1C1C1E;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21' fill='none' viewBox='0 0 21 21'%3E%3Cpath fill='%231c1c1e' d='m10.435 11.652-4.261 4.261a.83.83 0 0 1-.609.24.83.83 0 0 1-.609-.24.83.83 0 0 1-.239-.609q0-.37.24-.608l4.26-4.261-4.26-4.261a.83.83 0 0 1-.24-.609q0-.37.24-.608.239-.24.608-.24.37 0 .609.24l4.26 4.26 4.262-4.26q.239-.24.608-.24.37 0 .609.24.24.239.24.608 0 .37-.24.609l-4.26 4.26 4.26 4.262q.24.24.24.608 0 .37-.24.61a.83.83 0 0 1-.609.238.83.83 0 0 1-.609-.239z'/%3E%3C/svg%3E");
        mask-repeat: no-repeat;
        mask-position: center;
    }
}

/* vc-top-btn */
.vc-top-btn {
    position: fixed;
    left: 700px;
    right: 0;
    bottom: 40px;
    margin: 0 auto;
    width: 40px;
    height: 40px;
    background-color: #000;
    color: #fff;

    button {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 2px;
        width: 100%;
        height: 100%;
        background-color: inherit;
        border: 0;
        color: inherit;
        font-family: "Pretendard", sans-serif;
        font-size: 9px;
        cursor: pointer;

        &::before {
            content: "";
            display: block;
            width: 16px;
            height: 16px;
            background-color: #fff;
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='m7 3.825-5.6 5.6L0 8l8-8 8 8-1.4 1.425-5.6-5.6V16H7z'/%3E%3C/svg%3E");
            mask-repeat: no-repeat;
            mask-position: center;
        }
    }
}

/* 반응형 */
#mobileWrap {
    overflow: clip;

    .blind {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .commu-common {
        padding: 15px 12px 78px;
    }
    .common-title { display: none; }

    .vc-category {
        top: 0px;
        margin-top: -10px;
        padding: 10px 0 15px;
    }

    .vc-grid-wrap:not(:first-of-type, :last-of-type) {
        padding: 30px 0;
    }

    .vc-head-title {
        font-size: 16px;
    }

    .vc-grid-list {
        grid-template-columns: repeat(1, 1fr);

        @container vc-grid (min-width: 500px) {
            grid-template-columns: repeat(2, 1fr);
        }

        @container vc-grid (min-width: 640px) {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    .vc-modal-close {
        top: -26px;
        width: 20px;
        height: 20px;

        &::after {
            width: 8px;
            height: 8px;
        }
    }

    .vc-top-btn {
        left: auto;
        right: 12px;
        bottom: 120px;
    }
}

/* 모바일 메인 */
.topslide #mobileWrap #nteMHome .vc-category {
    top: 100px;
}