/* Post Image Lightbox CSS */
.post-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.post-lightbox-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.post-lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-lightbox-content {
    position: relative;
    text-align: center;
}

.post-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transition: opacity 0.3s ease;
}

/* 닫기 버튼 */
.post-lightbox-close {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 24px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    line-height: 1;
}

.post-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* 네비게이션 버튼 */
.post-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 28px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    line-height: 1;
}

.post-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.post-lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.post-lightbox-prev {
    left: 30px;
}

.post-lightbox-next {
    right: 30px;
}

/* 카운터 */
.post-lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    z-index: 1000000;
}

/* 캡션 */
.post-lightbox-caption {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 13px;
    max-width: 600px;
    line-height: 1.4;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    z-index: 1000000;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.post-lightbox-overlay.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* 이미지 전환 효과 */
.post-lightbox-content img.fade-out {
    opacity: 0;
}

.post-lightbox-content img.fade-in {
    opacity: 1;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .post-lightbox-container {
        max-width: 95vw;
        max-height: 85vh;
    }

    .post-lightbox-content img {
        max-height: 70vh;
    }

    .post-lightbox-close {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .post-lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .post-lightbox-prev {
        left: 20px;
    }

    .post-lightbox-next {
        right: 20px;
    }

    .post-lightbox-counter {
        bottom: 40px;
        font-size: 14px;
        padding: 6px 16px;
    }

    .post-lightbox-caption {
        bottom: 80px;
        font-size: 14px;
        max-width: 90%;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .post-lightbox-prev {
        left: 15px;
    }

    .post-lightbox-next {
        right: 15px;
    }

    .post-lightbox-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .post-lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .post-lightbox-counter {
        bottom: 30px;
        font-size: 12px;
    }

    .post-lightbox-caption {
        bottom: 70px;
        font-size: 12px;
        max-width: 95%;
    }
}

/* 포스트 이미지에 호버 효과 (선택사항) */
.post-content img,
.entry-content img,
article img {
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.post-content img:hover,
.entry-content img:hover,
article img:hover {
    opacity: 0.9;
    transform: scale(1.02);
}