/* Lightbox Styles */
.lightbox-trigger {
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-trigger:hover {
    transform: scale(1.05);
    /* box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); */
}

.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-overlay.closing {
    opacity: 0;
}

.lightbox-content {
    position: relative;
    max-width: 80%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content.closing {
    animation: fadeOutScale 0.3s ease forwards;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.lightbox-content img.slide-out-left {
    animation: slideOutLeft 0.4s ease forwards;
}

.lightbox-content img.slide-out-right {
    animation: slideOutRight 0.4s ease forwards;
}

.lightbox-content img.slide-in-left {
    animation: slideInLeft 0.4s ease forwards;
}

.lightbox-content img.slide-in-right {
    animation: slideInRight 0.4s ease forwards;
}

.lightbox-content img.slide-out-left {
    animation: slideOutLeft 0.4s ease forwards;
}

.lightbox-content img.slide-out-right {
    animation: slideOutRight 0.4s ease forwards;
}

.lightbox-content img.slide-in-left {
    animation: slideInLeft 0.4s ease forwards;
}

.lightbox-content img.slide-in-right {
    animation: slideInRight 0.4s ease forwards;
}

.lightbox-close {
    position: fixed;
    top: 20px !important;
    right: 30px !important;
    color: #fff;
    font-size: 45px;
    font-weight: 200;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10000;
    background: none;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 30px;
    font-weight: 200;
    width: auto;
    height: auto;
    cursor: pointer;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), text-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    padding: 10px;
    will-change: transform;
}

.lightbox-nav:hover {
    color: #f1f1f1;
    transform: translateY(-50%) scale(1.3);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 40px !important;
}

.lightbox-next {
    right: 40px !important;
}

.lightbox-caption {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    padding: 15px;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 1px;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutScale {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.8);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lightbox-close {
        top: -40px;
        right: 0;
        font-size: 38px;
        width: 45px;
        height: 45px;
    }

    .lightbox-caption {
        font-size: 16px;
        padding: 10px;
        bottom: -40px;
    }

    .lightbox-content {
        max-width: 90%;
    }

    .lightbox-nav {
        font-size: 40px;
    }

    .lightbox-prev {
        left: 15px !important;
    }

    .lightbox-next {
        right: 15px !important;
    }
}