/* Gallery Section Styles */
.gallery-section {
    padding: 80px 0;
    background: var(--light-bg);
    position: relative;
}

.gallery-section .container {
    position: relative;
}

.gallery-slider-container {
    position: relative;
    margin: 40px 0;
    padding: 0 50px;
}

.gallery-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 30px;
    padding: 20px 0;
}

.gallery-slider::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 calc(33.333% - 20px);
    scroll-snap-align: start;
    min-width: 300px;
}

.gallery-item {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    height: 350px;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-content {
    transform: translateY(0);
}

.gallery-title {
    font-size: 18px;
    margin-bottom: 8px;
    color: white;
    font-weight: 600;
}

.gallery-excerpt {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
    line-height: 1.4;
}

.view-gallery {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.gallery-item:hover .view-gallery {
    opacity: 1;
}

.gallery-slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.gallery-prev,
.gallery-next {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: absolute;
}

.gallery-prev {
    left: -25px;
}

.gallery-next {
    right: -25px;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

/* Gallery Grid for Archive Page */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.gallery-thumbnail {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-thumbnail:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-thumbnail:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    text-align: center;
}

/* Responsive */
@media (max-width: 1200px) {
    .gallery-slide {
        flex: 0 0 calc(50% - 15px);
        min-width: 280px;
    }
}

@media (max-width: 1024px) {
    .gallery-slider-container {
        padding: 0 40px;
    }
    
    .gallery-slide {
        flex: 0 0 calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 0;
    }
    
    .gallery-slider-container {
        padding: 0 30px;
        margin: 30px 0;
    }
    
    .gallery-slide {
        flex: 0 0 calc(100% - 20px);
        min-width: 250px;
    }
    
    .gallery-item {
        height: 300px;
    }
    
    .gallery-prev,
    .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .gallery-prev {
        left: -20px;
    }
    
    .gallery-next {
        right: -20px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-slider-container {
        padding: 0 20px;
    }
    
    .gallery-slider {
        gap: 20px;
    }
    
    .gallery-slide {
        min-width: 220px;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .gallery-content {
        padding: 20px 15px 15px;
    }
    
    .gallery-title {
        font-size: 16px;
    }
    
    .gallery-excerpt {
        font-size: 13px;
    }
    
    .gallery-prev,
    .gallery-next {
        display: none;
    }
}