
/* ========================================
   코리아인포 포토뉴스
======================================== */

/* 포토뉴스 본문 */
.photo_gallery {
    padding: 30px 0 5% 0;
}

/* 페이지 제목 */
.photo_gallery h1 {
    font-size: 24px;
    font-weight: 800;
    color: #222;
}

/* ========================================
   사진 그리드
======================================== */

.photo_grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px 20px;
}

/* 사진 항목 */
.photo_item {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

/* 썸네일 */
.photo_item figure {
    margin: 0;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #f5f5f5;
}

.photo_item figure img {
    display: block;
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
    transition: none;
}


/* 행사 제목 */
.photo_item h3 {
    margin: 12px 0 6px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    color: #222;
    word-break: keep-all;
}

/* 촬영 장소 및 날짜 */
.photo_item .photo_meta {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #888;
}

/* ========================================
   행사별 갤러리 정보
======================================== */

/* 포토뉴스 목록 제목 */
.photo_gallery:not(.photo_detail) h1 {
    margin: 8px 0 25px 0;
}

/* 개별 갤러리 제목 */
.photo_gallery.photo_detail h1 {
    margin: 8px 0 10px 0;
}

/* 촬영 장소 및 날짜 */
.photo_gallery .wrap_width > .photo_meta {
    margin: 0 0px 26px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #888;
}

/* 행사 설명 */
.photo_gallery .photo_description {
    margin: 0 0 30px;
    font-size: 15px;
    line-height: 1.8;
    color: #666;
}

/* ========================================
   등록된 사진이 없을 때
======================================== */

.photo_empty {
    padding: 80px 0;
    text-align: center;
    font-size: 15px;
    color: #888;
}

/* ========================================
   페이지 번호
======================================== */

.photo_paging {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 50px 0 20px;
}

.photo_paging a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
}

.photo_paging a:hover {
    background: #f5f5f5;
}

.photo_paging a.active {
    background: #333;
    border-color: #333;
    color: #fff;
}

/* ========================================
   포토뉴스 목록으로 돌아가기
======================================== */

.photo_back {
    margin: 40px 0 60px;
    text-align: center;
}

.photo_back a {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
}

.photo_back a:hover {
    background: #f5f5f5;
}

/* ========================================
   태블릿
======================================== */

@media (max-width: 1024px) {

    .photo_gallery {
        padding: 30px 0 50px;
    }

    .photo_grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px 16px;
    }

    .photo_gallery h1 {
        font-size: 25px;
    }

}

/* ========================================
   모바일
======================================== */

@media (max-width: 640px) {

    .photo_gallery {
        padding: 25px 0 40px;
    }

    .photo_gallery h1 {
        font-size: 22px;
    }

    .photo_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 12px;
    }

    .photo_item h3 {
        margin: 8px 0 4px;
        font-size: 15px;
    }

    .photo_item .photo_meta {
        font-size: 12px;
    }

    .photo_gallery .photo_description {
        margin-bottom: 24px;
        font-size: 14px;
    }

    .photo_paging {
        margin-top: 35px;
    }

    .photo_back {
        margin-top: 30px;
    }

}



/* ========================================
   포토뉴스 라이트박스 뷰어
======================================== */

.photo_lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.94);
}

.photo_lightbox.active {
    display: flex;
}

/* 사진 영역 */
.photo_lightbox .photo_lb_content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc(100% - 140px);
    height: 100%;
    margin: 0 auto;
}

/* 상세 사진 */
.photo_lightbox .photo_lb_content img {
    display: block;
    position: static;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh;
    margin: 0 auto;
    object-fit: contain;
    transform: none;
    transition: none;
}

/* 사진 번호 */
.photo_lightbox .photo_lb_counter {
    margin-top: 18px;
    color: #ccc;
    font-size: 14px;
    text-align: center;
}

/* 공통 버튼 */
.photo_lightbox button {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
}

/* 닫기 버튼 */
.photo_lightbox .photo_lb_close {
    top: 20px;
    right: 30px;
    width: 44px;
    height: 44px;
    font-size: 38px;
}

/* 이전 사진 */
.photo_lightbox .photo_lb_prev {
    top: 50%;
    left: 20px;
    width: 50px;
    height: 60px;
    transform: translateY(-50%);
    font-size: 36px;
}

/* 다음 사진 */
.photo_lightbox .photo_lb_next {
    top: 50%;
    right: 20px;
    width: 50px;
    height: 60px;
    transform: translateY(-50%);
    font-size: 36px;
}

/* 버튼 반응 */
.photo_lightbox button:hover {
    opacity: 0.7;
}

/* 모바일 */
@media (max-width: 640px) {

    .photo_lightbox .photo_lb_content {
        width: calc(100% - 70px);
    }

    .photo_lightbox .photo_lb_content img {
        max-height: 80vh;
    }

    .photo_lightbox .photo_lb_close {
        top: 12px;
        right: 12px;
    }

    .photo_lightbox .photo_lb_prev {
        left: 0;
        width: 35px;
        font-size: 26px;
    }

    .photo_lightbox .photo_lb_next {
        right: 0;
        width: 35px;
        font-size: 26px;
    }

}


/* 포토뉴스 썸네일 확대 효과 */
.photo_item figure {
    position: relative;
    overflow: hidden;
}

.photo_item figure img {
    display: block;
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none !important;
    transition: transform 0.3s ease-in-out !important;
}

.photo_item:hover figure img {
    transform: scale(1.04) !important;
}

