/* Gallery Styles */
#gallery {
    padding: 0 0 100px 0;
    background-color: var(--primary);
    overflow: hidden;
}


/* Slider container and track */
.gallery-container {
    position: relative;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.gallery-track-wrapper {
    overflow: hidden;
    padding: 20px 0;
    cursor: grab;
    position: relative;
}

/* Fade effect at edges */
.gallery-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5%;
    z-index: 10;
    pointer-events: none;
}

.gallery-fade-left {
    left: 0;
    background: linear-gradient(to right, #000000 0%, rgba(255, 255, 255, 0) 100%);
}

.gallery-fade-right {
    right: 0;
    background: linear-gradient(to right,  rgba(255, 255, 255, 0), #000000 100%);
}

.gallery-track {
    display: flex;
    will-change: transform;
}

/* Center slide emphasis */
.gallery-track {
    padding: 20px 0;
}

/* Slides */
.gallery-slide {
    flex: 0 0 300px;
    min-width: 400px;
    padding: 0 15px;
    
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-slide:hover {
    opacity: 1;
    transform: scale(1.03);
    z-index: 5;
}

.gallery-img-container {
    position: relative;
    height: 420px;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--text-light);
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.gallery-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* Hover effects */
.gallery-img-container:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-img-container:hover .gallery-overlay {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .gallery-slide {
        flex: 0 0 280px;
        min-width: 280px;
    }
    
    .gallery-fade {
        width: 12%;
    }
}

@media (max-width: 768px) {
    .gallery-slide {
        flex: 0 0 260px;
        min-width: 260px;
    }
    
    .gallery-img-container {
        height: 280px;
    }
    
    .gallery-header h2 {
        font-size: 32px;
    }
    
    .gallery-header p {
        font-size: 16px;
    }
    
    .gallery-fade {
        width: 10%;
    }
}

@media (max-width: 480px) {
    .gallery-slide {
        flex: 0 0 220px;
        min-width: 220px;
    }
    
    .gallery-img-container {
        height: 240px;
    }
    
    .gallery-fade {
        width: 8%;
    }
}