/* ==========================================
   FILTRO AJAX POST v3 — Stile editoriale
   ========================================== */

/* SIDEBAR */
#fap-sidebar {
    font-family: inherit;
    color: #333;
}

.fap-sezione {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e5e5;
}

.fap-sezione:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.fap-titolo-sezione {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 14px 0;
}

/* Campo cerca */
.fap-campo-cerca {
    display: flex;
    gap: 0;
}

#fap-search {
    flex: 1;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 3px 0 0 3px;
    outline: none;
    color: #333;
    background: #fff;
}

#fap-search:focus {
    border-color: #aaa;
}

#fap-btn-cerca {
    padding: 9px 14px;
    font-size: 13px;
    background: #333;
    color: #fff;
    border: 1px solid #333;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    transition: background 0.2s;
}

#fap-btn-cerca:hover {
    background: #555;
    border-color: #555;
}

/* Select anno */
#fap-anno {
    width: 100%;
    padding: 9px 32px 9px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #333;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

#fap-anno:focus {
    border-color: #aaa;
}

/* Lista categorie */
.fap-lista-filtro {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fap-voce {
    padding: 7px 0;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.15s;
}

.fap-voce:last-child {
    border-bottom: none;
}

.fap-voce:hover {
    color: #111;
}

.fap-voce.attiva {
    color: #111;
    font-weight: 600;
}

.fap-voce.attiva::before {
    content: "— ";
    color: #111;
}

.fap-count {
    font-size: 12px;
    color: #bbb;
    font-weight: 400;
}

/* Tag cloud */
.fap-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fap-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}

.fap-tag:hover {
    border-color: #999;
    color: #333;
}

.fap-tag.attivo {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Reset */
#fap-reset {
    width: 100%;
    padding: 9px;
    font-size: 13px;
    color: #999;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
}

#fap-reset:hover {
    border-color: #999;
    color: #555;
}

/* ==========================================
   AREA RISULTATI
   ========================================== */

#fap-risultati-wrapper {
    width: 100%;
}

.fap-info-num {
    font-size: 13px;
    color: #999;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

/* Singolo articolo */
.fap-item {
    padding: 24px 0;
    border-bottom: 1px solid #eee;
}

.fap-item:first-child {
    border-top: 1px solid #eee;
}

.fap-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.fap-item-cat {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: #333;
    padding: 3px 8px;
    border-radius: 2px;
}

.fap-item-data {
    font-size: 12px;
    color: #aaa;
}

.fap-item-esterno {
    font-size: 11px;
    color: #888;
    border: 1px solid #ddd;
    padding: 2px 7px;
    border-radius: 2px;
    margin-left: auto;
}

.fap-item-titolo {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.fap-item-titolo a {
    text-decoration: none;
    color: #111;
    transition: color 0.15s;
}

.fap-item-titolo a:hover {
    color: #555;
}

.fap-item-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin: 0 0 12px 0;
}

.fap-item-leggi {
    font-size: 13px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1px;
    transition: border-color 0.15s;
}

.fap-item-leggi:hover {
    border-color: #333;
}

/* Stati */
.fap-vuoto {
    font-size: 14px;
    color: #aaa;
    padding: 40px 0;
    text-align: center;
}

/* Animazione caricamento */
.fap-caricamento {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 60px 0;
}

.fap-caricamento span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    animation: fap-pulse 1.2s infinite ease-in-out;
}

.fap-caricamento span:nth-child(2) { animation-delay: 0.2s; }
.fap-caricamento span:nth-child(3) { animation-delay: 0.4s; }

@keyframes fap-pulse {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40%            { transform: scale(1);   opacity: 1; }
}

/* Paginazione */
.fap-pag-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 0;
    margin-top: 8px;
    border-top: 1px solid #eee;
}

.fap-pag-btn {
    padding: 8px 16px;
    font-size: 13px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
}

.fap-pag-btn:hover {
    border-color: #999;
    color: #111;
}

.fap-pag-info {
    font-size: 13px;
    color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
    .fap-campo-cerca {
        flex-direction: column;
    }

    #fap-search {
        border-right: 1px solid #ddd;
        border-radius: 3px 3px 0 0;
    }

    #fap-btn-cerca {
        border-radius: 0 0 3px 3px;
        width: 100%;
    }

    .fap-item-titolo {
        font-size: 16px;
    }

    .fap-pag-wrapper {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
