/* Premium Image Gallery Popup */

/* Overlay */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay.active {
    display: flex;
    opacity: 1;
}

/* Gallery Container */
.gallery-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.gallery-overlay.active .gallery-container {
    transform: scale(1);
}

/* Images Wrapper - Horizontal Scroll */
.gallery-images {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 2rem;
    max-width: 100%;
    height: 100%;
    align-items: center;

    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 23, 68, 0.5) rgba(255, 255, 255, 0.1);
}

.gallery-images::-webkit-scrollbar {
    height: 8px;
}

.gallery-images::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.gallery-images::-webkit-scrollbar-thumb {
    background: rgba(255, 23, 68, 0.5);
    border-radius: 10px;
}

.gallery-images::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 23, 68, 0.8);
}

/* Individual Image */
.gallery-image {
    flex-shrink: 0;
    max-height: 70vh;
    max-width: 80vw;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(255, 23, 68, 0.3);
}

/* Close Button */
.gallery-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.gallery-close:hover {
    background: rgba(255, 23, 68, 0.8);
    border-color: rgba(255, 23, 68, 1);
    transform: rotate(90deg);
}

.gallery-close svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke: white;
    stroke-width: 2;
}

/* Navigation Arrows (Optional) */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.gallery-arrow:hover {
    background: rgba(255, 23, 68, 0.8);
    border-color: rgba(255, 23, 68, 1);
}

.gallery-arrow.left {
    left: 2rem;
}

.gallery-arrow.right {
    right: 2rem;
}

.gallery-arrow svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke: white;
    stroke-width: 2;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gallery-container {
        width: 95%;
        height: 70vh;
    }

    .gallery-images {
        gap: 1rem;
        padding: 1rem;
    }

    .gallery-image {
        max-height: 60vh;
        max-width: 90vw;
    }

    .gallery-close,
    .gallery-arrow {
        width: 2.5rem;
        height: 2.5rem;
    }

    .gallery-close {
        top: 1rem;
        right: 1rem;
    }

    .gallery-arrow.left {
        left: 1rem;
    }

    .gallery-arrow.right {
        right: 1rem;
    }
}