.jmg-wrapper {
    margin: 2rem 0;
}

.jmg-filters {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.jmg-filter-btn {
    border: none;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 999px;
    background: #eee;
    transition: background 0.2s ease, transform 0.1s ease;
}

.jmg-filter-btn:hover {
    transform: translateY(-1px);
}

.jmg-filter-btn.active {
    background: #194311;
    color: #fff;
}

.jmg-grid {
    display: grid;
    grid-gap: 10px;
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
}

.jmg-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.jmg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.jmg-item:hover img {
    transform: scale(1.05);
}

.jmg-item.hidden {
    display: none;
}

/* Responsive columns */
@media (min-width: 768px) {
    .jmg-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 767px) {
    .jmg-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .jmg-filter-btn {
        font-size: 1.2rem;
}
}
/* Modal */
.jmg-modal {
    display: none;
    position: fixed;
    z-index: 9999999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: 40px;
    background-color: rgba(0,0,0,0.9);
}


.jmg-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
}

.jmg-close {
    position: absolute;
    top: 15px; right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.jmg-nav {
    color: #fff;
    position: absolute;
    top: 50%;
    font-size: 50px;
    padding: 10px;
    cursor: pointer;
    user-select: none;
}

.jmg-prev { left: 20px; }
.jmg-next { right: 20px; }

.jmg-counter {
    color: #fff;
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
}
