/* Gallery Section */
.gallery {
    padding: var(--space-8) 0;
}

.gallery-filter {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-2);
}

.filter-btn {
    padding: var(--space-2) var(--space-4);
    background-color: var(--gray-200);
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background-color: var(--gray-300);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-4);
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-lg);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    height: 0;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
}

.gallery-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-4);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    text-align: center;
    color: var(--white);
    margin-bottom: var(--space-3);
}

.gallery-info h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-2);
}

.gallery-info p {
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

.gallery-btn {
    background-color: var(--primary-color);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-btn:hover {
    background-color: var(--primary-dark);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1001;
    padding: var(--space-4);
}

.lightbox-content {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.close-lightbox {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: var(--font-size-3xl);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.close-lightbox:hover {
    color: var(--gray-300);
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.lightbox-caption {
    text-align: center;
    color: var(--white);
    margin-top: var(--space-4);
}

.lightbox-caption h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-2);
}

.lightbox-caption p {
    font-size: var(--font-size-base);
    opacity: 0.9;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.prev-btn {
    left: -70px;
}

.next-btn {
    right: -70px;
}

.lightbox-nav-btn:hover {
    background-color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--space-3);
    }
    
    .prev-btn {
        left: -30px;
    }
    
    .next-btn {
        right: -30px;
    }
}

@media (max-width: 992px) {
    .gallery-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: var(--space-2);
        scrollbar-width: thin;
    }
    
    .gallery-filter::-webkit-scrollbar {
        height: 4px;
    }
    
    .gallery-filter::-webkit-scrollbar-thumb {
        background-color: var(--gray-400);
        border-radius: 2px;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .lightbox-content {
        max-width: 90%;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
    
    .gallery-image {
        padding-bottom: 100%; /* Square aspect ratio for mobile */
    }
    
    .gallery-info h3 {
        font-size: var(--font-size-base);
    }
    
    .gallery-info p {
        font-size: var(--font-size-sm);
    }
    
    #lightbox-image {
        max-height: 70vh;
    }
    
    .lightbox-caption h3 {
        font-size: var(--font-size-lg);
    }
    
    .lightbox-caption p {
        font-size: var(--font-size-sm);
    }
    
    .close-lightbox {
        top: -30px;
        font-size: var(--font-size-2xl);
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    
    .gallery-image {
        padding-bottom: 75%; /* Return to 4:3 aspect ratio */
    }
    
    .filter-btn {
        padding: var(--space-2) var(--space-3);
        font-size: var(--font-size-sm);
    }
    
    .gallery-overlay {
        padding: var(--space-3);
    }
    
    .gallery-btn {
        width: 35px;
        height: 35px;
    }
    
    .lightbox {
        padding: var(--space-2);
    }
    
    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-caption {
        margin-top: var(--space-3);
    }
}

@media (max-width: 480px) {
    .gallery-filter {
        margin-bottom: var(--space-4);
    }
    
    .gallery-item {
        margin: 0 var(--space-1);
    }
    
    .gallery-info h3 {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-1);
    }
    
    .gallery-info p {
        font-size: var(--font-size-sm);
    }
    
    #lightbox-image {
        max-height: 60vh;
    }
}