
/* ===============================
   CARD COMUNITA
================================ */

.card-comunita {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 12px rgba(0,0,0,0.08);
}

.card-img img {
    width: 100%;
    display: block;
}

.card-content {
    padding: 15px;
}

.card-title {
    margin: 0 0 10px;
    font-size: 20px;
}

.card-title a {
    text-decoration: none;
}

.card-excerpt {
    font-size: 14px;
}

/* ===============================
   RIVE GRID LAYOUT
================================ */

.rive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
    gap: 30px;
    margin-top: 40px;
}

.rive-comunita {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rive-view-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.rive-view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    padding: 12px 22px;
    background: #f8fafc;
    border: 1px solid #dbe2ea;
    border-radius: 999px;
    color: #1f2937;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all .2s ease;
}

.rive-view-button:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.rive-view-button.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.rive-view-panel[hidden] {
    display: none !important;
}

.rive-results {
    position: relative;
}

.rive-results.is-loading {
    opacity: .6;
}

.rive-map {
    min-height: 520px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
}

.rive-empty-state {
    margin: 24px 0 0;
    color: #4b5563;
}

/* ===============================
   RIVE FILTERS UI (clean version)
================================ */

body.pagelayer-body .rive-filters {

    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;

    padding:15px;
    margin-bottom:25px;

    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:12px;

    box-shadow:0 2px 8px rgba(0,0,0,0.04);

}

body.pagelayer-body .rive-filters-wrap {
    margin-bottom: 4px;
}

/* ===============================
   INPUT SEARCH
================================ */

body.pagelayer-body .rive-filters input[type="text"] {

    padding:10px 14px;
    border:1px solid #ddd;
    border-radius:8px;
    min-width:220px;

}

body.pagelayer-body .rive-filters #rive-live-search {
    flex: 1 1 260px;
    min-height: 54px;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 16px;
}

/* ===============================
   CHIP FILTRI
================================ */

body.pagelayer-body .rive-filters a.rive-chip {

    display:inline-flex;
    align-items:center;

    padding:8px 14px;

    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:999px;

    font-size:14px;
    text-decoration:none !important;

    transition:all .2s ease;

}

body.pagelayer-body .rive-filters .rive-chip {
    min-height: 54px;
    padding: 12px 24px;
    font-size: 16px;
}

/* hover */

body.pagelayer-body .rive-filters a.rive-chip:hover {

    background:#eef2ff;
    border-color:#c7d2fe;

}

/* stato attivo */

body.pagelayer-body .rive-filters a.rive-chip.active {

    background:#2563eb;
    color:#fff !important;
    border-color:#2563eb;

}

/* FORCE STYLE RIVE FILTERS */

body.pagelayer-body div.rive-filters {

    display:flex !important;
    flex-wrap:wrap !important;
    gap:12px !important;
    align-items:center !important;

    padding:15px !important;
    margin-bottom:25px !important;

    background:#fff !important;
    border:1px solid #e5e7eb !important;
    border-radius:12px !important;

}

body.pagelayer-body div.rive-filters a.rive-chip {

    display:inline-flex !important;
    padding:8px 14px !important;

    border:1px solid #e5e7eb !important;
    border-radius:999px !important;

    background:#f8fafc !important;

}

body.pagelayer-body div.rive-filters a.rive-chip.active {

    background:#2563eb !important;
    color:#fff !important;
    border-color:#2563eb !important;

}

@media (max-width: 767px) {
    .rive-view-button {
        min-width: 0;
        flex: 1 1 0;
    }

    .rive-map {
        min-height: 420px;
    }

    body.pagelayer-body .rive-filters #rive-live-search {
        width: 100%;
    }
}
