/* ── Filter tabs ── */
.mg-filters-a4f8e209 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.mg-filter-btn-a4f8e209 {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    border-radius: 100px;
    border: 1.5px solid #1a6b3c;
    background: transparent;
    color: #1a6b3c;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.mg-filter-btn-a4f8e209:hover {
    background-color: rgba(26, 107, 60, 0.08);
}

.mg-filter-btn-a4f8e209.is-active {
    background-color: #1a6b3c;
    border-color: #1a6b3c;
    color: #ffffff;
}

/* ── Masonry container ── */
.mg-masonry-a4f8e209 {
    columns: 4;
    column-gap: 20px;
}

/* ── Item wrapper (card + optional caption) ── */
.mg-item-a4f8e209 {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 20px;
}

/* Hidden state (filter) */
.mg-item-a4f8e209.mg-hidden-a4f8e209 {
    display: none;
}

/* ── Card base ── */
.mg-card-a4f8e209 {
    background-color: #d0f0e0;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ── Caption (text outside the card) ── */
.mg-caption-a4f8e209 {
    margin: 10px 0 0;
    padding: 0 4px;
    color: #333333;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

/* ── Title ── */
.mg-title-a4f8e209 {
    margin: 0;
    color: #1a6b3c;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
}

/* ── Icon card ── */
.mg-card-icon-a4f8e209 {
    padding: 24px;
    min-height: 220px;
}

.mg-icon-area-a4f8e209 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0 20px;
    flex: 1;
}

.mg-icon-circle-a4f8e209 {
    /* Default size: 65% of card width — overridden by Elementor controls */
    width: 65%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: #1a6b3c;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mg-icon-circle-a4f8e209 i,
.mg-icon-circle-a4f8e209 svg {
    font-size: 48px;
    width: 48px;
    height: 48px;
    display: block;
}

/* ── Decorative dot ── */
.mg-dot-a4f8e209 {
    position: absolute;
    bottom: 20px;
    left: 24px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #5cad82;
}

/* ── Image card ── */
.mg-card-image-a4f8e209 {
    padding: 0;
}

.mg-card-image-a4f8e209 .mg-title-a4f8e209 {
    padding: 20px 20px 12px;
    flex-shrink: 0;
}

.mg-card-image-a4f8e209 .mg-title-bottom-a4f8e209 {
    padding: 12px 20px 20px;
}

.mg-image-area-a4f8e209 {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.mg-image-area-a4f8e209 img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    /* Ensure a minimum visible height for image cards with no title */
    min-height: 180px;
}

/* When image card has no title, let the image determine height naturally */
.mg-card-image-a4f8e209:not(:has(.mg-title-a4f8e209)) .mg-image-area-a4f8e209 img {
    height: auto;
    min-height: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .mg-masonry-a4f8e209 {
        columns: 2;
    }
}

@media (max-width: 600px) {
    .mg-masonry-a4f8e209 {
        columns: 1;
    }

    .mg-filters-a4f8e209 {
        justify-content: flex-start;
    }
}
