/* ************************************************************* */
/* 공통 유튜브 그리드 레이아웃 스타일 */
/* ************************************************************* */

.youtube_grid_bbx {
    width: 100%;
}

.youtube_grid_container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.youtube_grid_item {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.youtube_grid_item.show {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.youtube_item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.youtube_item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.youtube_thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    overflow: hidden;
    background: #f0f0f0;
}

.youtube_thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.youtube_item:hover .youtube_thumbnail img {
    transform: scale(1.05);
}

.youtube_play_icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1;
}

.youtube_item:hover .youtube_play_icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube_info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.youtube_title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
}

.youtube_date {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ************************************************************* */
/* 더보기 버튼 */
/* ************************************************************* */

.youtube_load_more_bbx {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.youtube_load_more_btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    border: 2px solid #2d916d;
    border-radius: 50px;
    color: #2d916d;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.youtube_load_more_btn:hover {
    background: #2d916d;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 145, 109, 0.3);
}

.youtube_load_more_btn:active {
    transform: translateY(0);
}

.youtube_load_more_btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.youtube_load_more_btn:hover svg {
    transform: translateY(2px);
}

.youtube_load_more_btn.hidden {
    display: none;
}

/* ************************************************************* */
/* 에러 메시지 */
/* ************************************************************* */

.youtube_error_message {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    min-height: 300px;
}

.youtube_error_title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.youtube_error_desc {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* ************************************************************* */
/* 페이지 제목 공통 스타일 */
/* ************************************************************* */

.page_title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    padding: 60px 20px 0;
}

.page_title .tit {
    font-family: 'YeogiOttaeJalnan', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 36px;
    font-weight: 600;
    color: #2d916d;
    line-height: 1.3;
    word-break: keep-all;
    margin: 0;
}

.page_title .desc {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    word-break: keep-all;
    max-width: 800px;
    margin: 0;
}

/* ************************************************************* */
/* 모바일 반응형 */
/* ************************************************************* */

@media (max-width: 1024px) {
    .page_title {
        padding: 40px 20px 30px;
        margin-bottom: 30px;
        gap: 12px;
    }

    .page_title .tit {
        font-size: 28px;
    }

    .page_title .desc {
        font-size: 14px;
        line-height: 1.6;
    }

    .youtube_grid_container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }

    .youtube_info {
        padding: 14px;
    }

    .youtube_title {
        font-size: 14px;
        min-height: 40px;
    }

    .youtube_date {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .youtube_grid_container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .page_title .tit {
        font-size: 24px;
    }

    .page_title .desc {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .youtube_grid_container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

