/**
 * 최근 사진 위젯 스타일
 *
 * 파일: css/recent-photos.css
 * 사용: widgets/main/recent-photos.php
 *
 * 메인 페이지에서 최근 사진(이미지가 있는 게시글)을 가로 스크롤로 표시하는 위젯의 스타일입니다.
 */

/* 게시글 그리드 - 가로 스크롤 레이아웃 */
[data-widget-id="main-recent-photos"] .category-posts-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}

/* 웹킷 브라우저 스크롤바 스타일 */
[data-widget-id="main-recent-photos"] .category-posts-grid::-webkit-scrollbar {
    height: 6px;
}

[data-widget-id="main-recent-photos"] .category-posts-grid::-webkit-scrollbar-track {
    background: transparent;
}

[data-widget-id="main-recent-photos"] .category-posts-grid::-webkit-scrollbar-thumb {
    background-color: #dee2e6;
    border-radius: 3px;
}

/* 개별 게시글 아이템 */
[data-widget-id="main-recent-photos"] .category-post-item {
    flex: 0 0 auto;
    width: 180px;
    text-align: center;
    transition: transform 0.2s ease;
}

[data-widget-id="main-recent-photos"] .category-post-item:hover {
    transform: translateY(-3px);
}

/* 썸네일 이미지 컨테이너 */
[data-widget-id="main-recent-photos"] .category-post-thumbnail {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
    margin-bottom: 0.5rem;
}

[data-widget-id="main-recent-photos"] .category-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 이미지 없을 때 플레이스홀더 */
[data-widget-id="main-recent-photos"] .category-post-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* 게시글 제목 */
[data-widget-id="main-recent-photos"] .category-post-title {
    font-size: 0.85rem;
    color: #333;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    height: 2.6em;
}

[data-widget-id="main-recent-photos"] .category-post-item:hover .category-post-title {
    color: #0d6efd;
}

/* 반응형: 작은 화면에서 아이템 너비 조정 */
@media (max-width: 576px) {
    [data-widget-id="main-recent-photos"] .category-post-item {
        width: 140px;
    }

    [data-widget-id="main-recent-photos"] .category-post-thumbnail {
        height: 100px;
    }
}
