.image-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.gallery-filters {
    text-align: center;
    margin-bottom: 40px;
}

.filter-btn {
    background: var(--primary);
    border: 2px solid var(--primaryalt);
    color: white;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--cta);
    color: white;
    border-color: var(--ctaalt);
}

.image-button {
    text-align: center;
    background: var(--cta);
    padding: 8px;
}

.image-button button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    width: 100%;
}

.image-button button:hover {
    opacity: 0.8;
}

/* Selected items styling */
#selected-items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.selected-item {
    position: relative;
    border: 2px solid var(--cta);
    border-radius: 5px;
    overflow: hidden;
}

.selected-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.selected-item .remove-item {
    position: absolute;
    top: 5px;
    right: 5px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-item .remove-item:hover {
    background: darkred;
}

.btn-secondary {
    background: #666;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #444;
}

/* Item already added indicator */
.gallery-item-isotope.item-added .image-button {
    background: #4CAF50;
}

.gallery-item-isotope.item-added .btn-add-to-form:after {
    content: ' ✓';
}

@media only screen and (max-width: 1400px) {
    .gallery .gallery-wrap {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    }
}

@media only screen and (max-width: 850px) {
    .gallery .gallery-wrap {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media only screen and (max-width: 550px) {
    .gallery .gallery-wrap {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)) !important;
    }
}

/* ---- isotope ---- */

/* clear fix */
.grid:after {
    content: '';
    display: block;
    clear: both;
}

/* ---- .element-item ---- */

.element-item {
    position: relative;
    float: left;
    width: 250px;
    height: 250px;
    margin: 5px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}

.element-item > .icon {
    width: 100%;
    text-align: right;
    fill: #ffffff;
}

.element-item > .image-button {
    width: 100%;
    text-align: center;
}