/* Lightbox Slider Styles - WITH OPEN/CLOSE ANIMATIONS */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.lightbox.active {
    display: flex;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-container {
    position: relative;
    height: 96vh;
    overflow: hidden; 
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: width 1.5s cubic-bezier(0.25, 0.1, 0.25, 1), 
                transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    margin: 0 auto;
    
    /* Initial state - hidden */
    transform: scale(0.8);
    opacity: 0;
}

.lightbox.active .lightbox-container {
    /* Active state - visible */
    transform: scale(1);
    opacity: 1;
}

/* Closing animation state */
.lightbox.closing {
    background: rgba(0, 0, 0, 0);
}

.lightbox.closing .lightbox-container {
    transform: scale(0.9);
    opacity: 0;
}

.lightbox-slider {
    position: relative;
    height: 100%;
    display: flex;
    transition: transform 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform: translateX(0);
    align-items: center;
}

.lightbox-image-container {
    position: relative;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: scaleX(1);
    transition: transform 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform-origin: center center;
}

/* Animation states for the images inside containers */
.lightbox-image.scaling-out {
    transform: scaleX(3);
}

.lightbox-image.scaling-in {
    transform: scaleX(3);
}

.lightbox-image.normal {
    transform: scaleX(1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);

    width: 50px;
    height: 50px;
    border-radius: 50% !important;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease, opacity 0.4s ease;
    z-index: 1001;
    opacity: 0;
    /* Override theme button styles */
    padding: 0 !important;
    font-family: inherit !important;
    text-transform: none !important;
}

.lightbox.active .lightbox-nav {
    opacity: 0.5;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
    color: #333;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    /* background: rgba(255, 255, 255, 0.9); */
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* border: none; */
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);;
    transition: all 0.3s ease, opacity 0.4s ease;
    z-index: 1001;
    opacity: 0;
    /* Override theme button styles */
    padding: 0 !important;
    font-family: inherit !important;
    text-transform: none !important;
}

.lightbox.active .lightbox-close {
    opacity: 0.5;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    opacity: 1;
    color: #333
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-family: "IBM Plex Sans", sans-serif;
    z-index: 1001;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.lightbox.active .lightbox-counter {
    opacity: 1;
}

/* Add cursor pointer to clickable photos */
.photo.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo.gallery-item:hover {
    /* transform: scale(1.02); */
}