/* ===== Lightbox Styles ===== */

/* Lightbox Container */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Lightbox Content */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { 
        transform: scale(0.8);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Navigation Arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Caption */
.lightbox-caption {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

/* Counter */
.lightbox-counter {
    position: absolute;
    top: -50px;
    left: 0;
    color: white;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

/* Loading Spinner */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Zoom Controls */
.lightbox-zoom {
    position: absolute;
    bottom: -60px;
    right: 0;
    display: flex;
    gap: 10px;
}

.lightbox-zoom button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-zoom button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-caption {
        bottom: 10px;
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    .lightbox-counter {
        top: 10px;
        left: 10px;
        font-size: 0.85rem;
        padding: 8px 15px;
    }
    
    .lightbox-zoom {
        display: none;
    }
}

/* Clickable Image Cursor */
.lightbox-trigger {
    cursor: zoom-in !important;
    transition: all 0.3s ease;
}

.lightbox-trigger:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Content Images Enhancement */
.news-detail-content img.lightbox-trigger,
.page-text img.lightbox-trigger,
.page-content img.lightbox-trigger {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.news-detail-content img.lightbox-trigger:hover,
.page-text img.lightbox-trigger:hover,
.page-content img.lightbox-trigger:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
