.gallery-section {
    max-width: min(95%, var(--content-max-wide));
    margin: 0 auto;
    padding: 1rem;
}

.gallery-cols {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-cols .col {
    flex: 1 1 calc(33.333% - 7px);
    padding: 0;
    margin: 0;
    min-width: 200px;
}

@media (max-width: 1024px) {
    .gallery-cols .col {
        flex: 1 1 calc(50% - 5px);
        min-width: 150px;
    }
}

@media (max-width: 640px) {
    .gallery-cols {
        gap: 8px;
    }

    .gallery-cols .col {
        flex: 1 1 calc(50% - 4px);
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .gallery-cols {
        gap: 6px;
    }

    .gallery-cols .col {
        flex: 1 1 100%;
        min-width: auto;
    }
}

.gallery-item {
    display: block;
    margin: 0;
    padding-bottom: 10px;
    border: none;
    background: none;
    box-shadow: none;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--hover-duration) var(--hover-ease), filter var(--hover-duration) var(--hover-ease);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: none;
    object-fit: contain;
    background: none;
}

.gallery-item:hover {
    transform: translateY(var(--hover-lift-card));
    filter: brightness(1.03);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.filter-bar::before {
    display: none !important;
}

.filter-btn {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--acc-card);
    background: var(--card);
    color: var(--fg);
    border-radius: 20px;
    cursor: pointer;
    transition: transform var(--hover-duration) var(--hover-ease), background var(--hover-duration) var(--hover-ease), color var(--hover-duration) var(--hover-ease), border-color var(--hover-duration) var(--hover-ease);
}

.filter-btn:hover {
    transform: translateY(var(--hover-lift-button));
    filter: brightness(1.03);
}

.filter-btn.active {
    background: var(--acc);
    color: var(--fg-dark);
    border-color: var(--acc);
}

.load-more-container {
    text-align: center;
    margin: 2rem 0;
}

@media (max-width: 640px) {
    .gallery-section {
        max-width: 100%;
        padding: 0.75rem;
    }

    .gallery-cols {
        gap: 8px;
    }

    .filter-bar {
        padding-inline: 0.75rem;
    }
}