/* Gallery Popup Styles */
.gallery-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
}

.gallery-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.gallery-popup-content {
    position: relative;
    width: 80%;
    height: 80%;
    max-width: 1200px;
    margin: 5% auto;
    z-index: 10000;
    background-color: white;
    padding: 80px 120px 60px;
    border-radius: 20px;
}

.gallery-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 28px;
    color: black;
    cursor: pointer;
    z-index: 10001;
}

.gallery-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 90%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
}

.slider-slide.active {
    opacity: 1;
    z-index: 1;
}

.slider-image-container {
    position: relative;
    width: 100%;
    flex-grow: 1;
    height: 100%;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.slider-info {
    width: 100%;
    color: black;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: relative;
}

.slider-caption {
    font-size: 16px;
    font-family: 'inter';
}

.slider-counter {
    font-size: 16px;
    position: absolute;
    z-index: 9000;
    left: 0;
    top: 0;
}

/* Side Controls */
.slider-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allow clicks to pass through the container */
    z-index: 10;
}

.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    border-radius: 4px;
    pointer-events: auto; /* Re-enable clicks on buttons */
    background-color: transparent;
}

.slider-prev img, .slider-next img {
    transition: transform 0.3s ease-in-out;
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-prev:hover > img, .slider-next:hover > img {
    transform: scale(1.1, 1.1);
}

@media (max-width: 768px) {

    .gallery-popup-content {
        padding: unset;
        height: 60%;
    }

    .slider-info {
        margin: 10px auto 0 auto;
        width: 90%;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .slider-slide {
        height: 95%;
    }

    .slider-counter {
        position: relative;
    }

    .slider-controls {
        display: none;
    }
}