#gallery {
    padding: 2rem 0;
}

#gallery h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--sa-blue);
}

#gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

#event-filter,
#tag-filter {
    padding: 0.5rem;
    border: 1px solid var(--sa-blue);
    border-radius: 4px;
    background-color: white;
    color: var(--sa-blue);
    font-size: 1rem;
    cursor: pointer;
}

#event-filter:focus,
#tag-filter:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 35, 149, 0.2);
	color: var(--sa-green);
}

#gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 16 / 9;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .caption {
    opacity: 1;
}

@media (max-width: 768px) {
    #gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}