/* ============================================================
   Barra Pubblicazioni e Archivio - CSS (versione 1.2.1)
   - Rimossa la parte relativa alla barra di navigazione
     e alla modale di registrazione (gestite altrove)
   - Resta solo: archivio + modale dettaglio
   - Larghezza 700px, centrato, font Inter
   ============================================================ */

/* ============================================================
   ARCHIVIO PUBBLICAZIONI
   ============================================================ */
#bpa-archivio.bpa-archivio,
.bpa-archivio {
    max-width: 700px !important;
    width: 100%;
    margin: 20px auto !important;
    padding: 0 20px !important;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
    box-sizing: border-box;
}

#bpa-archivio * { box-sizing: border-box; }

.bpa-archivio-ricerca { margin-bottom: 24px; }

#bpa-archivio .bpa-input-ricerca,
.bpa-input-ricerca {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
}
#bpa-archivio .bpa-input-ricerca:focus,
.bpa-input-ricerca:focus {
    outline: none !important;
    border-color: #f30202 !important;
    box-shadow: none !important;
}

.bpa-archivio-elenco {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#bpa-archivio .bpa-card,
.bpa-card {
    border-bottom: 1px solid #e5e5e5 !important;
    padding: 20px 0 !important;
    transition: background 0.15s;
}
#bpa-archivio .bpa-card:hover,
.bpa-card:hover { background: #fafafa; }

#bpa-archivio .bpa-card-titolo,
.bpa-card-titolo {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin: 0 0 8px 0 !important;
    text-transform: none !important;
    line-height: 1.3 !important;
    cursor: pointer !important;
    transition: color 0.15s;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
}
#bpa-archivio .bpa-card-titolo:hover,
.bpa-card-titolo:hover { color: #f30202 !important; }

#bpa-archivio .bpa-card-meta,
.bpa-card-meta {
    font-size: 11.5px !important;
    color: #888 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 10px !important;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
}
.bpa-card-meta .bpa-categoria { color: #f30202 !important; margin-right: 8px; }
.bpa-card-meta .bpa-provincia { color: #111 !important; margin-right: 8px; }
.bpa-card-meta .bpa-data { color: #888 !important; }

#bpa-archivio .bpa-card-estratto,
.bpa-card-estratto {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #555 !important;
    margin: 0 !important;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
    font-weight: 400 !important;
}

.bpa-archivio-caricamento {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 13px;
    font-style: italic;
    font-weight: 400;
}

.bpa-archivio-nessun-risultato {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 14px;
    font-style: italic;
    font-weight: 400;
}

.bpa-archivio-paginazione {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.bpa-pag-btn {
    min-width: 42px !important;
    height: 42px !important;
    padding: 0 12px !important;
    border: 2px solid #ddd !important;
    background: #fff !important;
    color: #111 !important;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: all 0.15s;
    text-transform: none !important;
    box-shadow: none !important;
}
.bpa-pag-btn:hover { border-color: #f30202 !important; color: #f30202 !important; }
.bpa-pag-btn.bpa-attivo {
    background: #f30202 !important;
    color: #fff !important;
    border-color: #f30202 !important;
}
.bpa-pag-btn:disabled { opacity: 0.4 !important; cursor: not-allowed !important; }

/* ============ MODALE DETTAGLIO ============ */
.bpa-sfondo-modale {
    display: none;
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.bpa-sfondo-modale.bpa-attivo { display: flex; }

#bpa-modale-dettaglio .bpa-riquadro-modale,
.bpa-riquadro-modale {
    background: #fff;
    border: 3px solid #111;
    border-radius: 6px;
    width: 700px !important;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.bpa-dettaglio-contenuto { padding: 24px 28px; }

.bpa-dettaglio-titolo {
    font-size: 19px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    line-height: 1.3 !important;
    color: #111 !important;
    margin: 0 0 14px 0 !important;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
}

.bpa-dettaglio-etichette {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.bpa-dettaglio-badge {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.bpa-dettaglio-badge.bpa-cat { color: #fff; }
.bpa-dettaglio-badge.bpa-prov { background: #eee; color: #111; }
.bpa-dettaglio-badge.bpa-dat { background: #111; color: #f3bd02; }

.bpa-dettaglio-autore {
    font-size: 11.5px;
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 28px;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.bpa-dettaglio-autore strong { color: #111; }

.bpa-dettaglio-testo {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-left: 4px solid #f30202;
    padding-left: 18px;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-weight: 400;
}

.bpa-dettaglio-allegato {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.bpa-dettaglio-allegato-titolo {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    color: #111;
}
.bpa-dettaglio-allegato img {
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    display: block;
}
.bpa-dettaglio-allegato a {
    display: inline-block;
    padding: 10px 18px;
    background: #111;
    color: #f3bd02;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.bpa-dettaglio-allegato a:hover { background: #f30202; color: #fff; }

.bpa-dettaglio-chiudi {
    padding: 0 28px 24px 28px;
    display: flex;
    justify-content: flex-end;
}

.bpa-bottone-annulla {
    background: #eee !important;
    color: #111 !important;
    border: 2px solid transparent !important;
    padding: 10px 22px !important;
    border-radius: 4px;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: none !important;
}
.bpa-bottone-annulla:hover { background: #ddd !important; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    #bpa-archivio.bpa-archivio,
    .bpa-archivio {
        padding: 0 14px !important;
    }
    #bpa-modale-dettaglio .bpa-riquadro-modale,
    .bpa-riquadro-modale {
        width: 100% !important;
    }
    .bpa-card-titolo { font-size: 15px !important; }
    .bpa-card-estratto { font-size: 13px !important; }
}

@media (max-width: 600px) {
    .bpa-riquadro-modale { border-width: 2px !important; }
    .bpa-dettaglio-contenuto { padding: 20px 20px; }
    .bpa-dettaglio-titolo { font-size: 16px !important; }
    .bpa-dettaglio-testo { font-size: 13px; padding-left: 14px; }
    .bpa-pag-btn { min-width: 36px !important; height: 36px !important; font-size: 13px !important; }
}