/* =====================================
   MAIN.CSS - UNIFICATO E COMPLETO
   ===================================== */

/* === RESET === */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === VARIABILI TEMA === */
body.tema-light {
    --bg: #fef9f3;
    --text: #222;
    --accent: #9b5de5;
    --bg-box: rgba(255, 255, 255, 0.85);
    --text-box: #222;
    --border-box: rgba(0, 0, 0, 0.08);
    background: radial-gradient(circle at center, #d3a771 0%, #f4e7ff 50%, #5debf5 100%);
}

body.tema-dark {
    --bg: #020126;
    --text: #e0e0e0;
    --accent: #4630D9;
    --bg-box: rgba(21, 2, 89, 0.85);
    --text-box: #e0e0e0;
    --border-box: rgba(104, 99, 242, 0.2);
    background: radial-gradient(circle at center, #020126 0%, #150259 50%, #6863F2 100%);
}

body.tema-glitch {
    --bg: #1a1a1a;
    --text: #dbdbdb;
    --accent: #ff00cc;
    --bg-box: rgba(26, 26, 26, 0.9);
    --text-box: #dbdbdb;
    --border-box: rgba(255, 0, 204, 0.2);
    background: linear-gradient(135deg, #5e6b5c 0%, #292929 25%, #410303 50%, #292929 75%, #1a1a1a 100%);
}

/* === LAYOUT BASE === */
html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: Cambria, 'Liberation Serif', 'DejaVu Serif', Times, serif;
    line-height: 1.7;
    font-size: 17px;
    overflow-x: hidden;
}

/* === HEADER === */
header {
    background-color: var(--bg-box);
    color: var(--text-box);
    padding: 1.5em;
    text-align: left;
}

header h1 {
    font-size: 2em;
    letter-spacing: 2px;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-box);
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
    margin: 0.3rem 0 0 0;
}

nav {
    margin-top: 10px;
}

nav a {
    color: var(--text);
    margin: 0 12px;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    opacity: 0.7;
}

nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* === LAYOUT GENERICI === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* === WRAPPER ALLINEATO A SINISTRA (COMUNE A TUTTE LE PAGINE) === */
.citofono,
.deriva-wrapper,
.resistenza-wrapper,
.contatti-wrapper,
.categoria-wrapper,
.articolo-wrapper {
    max-width: 100%;
    margin: 2rem 0 2rem 2rem;
    padding: 0 1rem;
}

.articolo-wrapper {
    max-width: 700px;
    /* Leggermente più largo per la lettura */
    line-height: 1.7;
}

/* === INTESTAZIONE COMUNE === */
.intestazione {
    margin-bottom: 3rem;
    font-family: 'Courier New', monospace;
}

.intestazione-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.intestazione h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.sottotitolo {
    font-size: 1rem;
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.stats {
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
}

/* === PULSANTIERA COMUNE === */
.pulsantiera {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.pulsante {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-box);
    color: var(--text-box);
    border: 1px solid var(--border-box);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pulsante:hover {
    transform: translateY(-2px);
    background: var(--bg-box);
    filter: brightness(1.1);
}

.pulsante .icona {
    font-size: 1.2rem;
    width: 2rem;
    flex-shrink: 0;
}

.pulsante .nome {
    flex: 1;
    margin-left: 1rem;
}

.pulsante .nome strong {
    display: block;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.pulsante .nome small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: normal;
    line-height: 1.3;
}

.pulsante .numero {
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
}

/* Varianti pulsanti */
.pulsante.sezione-dedicata::after {
    content: "★";
    position: absolute;
    right: 4rem;
    opacity: 0.5;
}

.pulsante.categoria-deriva,
.pulsante.zona-resistenza {
    border-left: 3px solid var(--accent);
}

.pulsante.tutti-scritti {
    background: var(--accent);
    color: white;
    font-weight: 600;
}

.pulsante.articolo .nome small,
.pulsante.articolo-deriva .nome small,
.pulsante.articolo-resistenza .nome small {
    font-style: italic;
}

/* === SEPARATORE COMUNE === */
.separatore {
    margin: 3rem 0 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-box);
}

.separatore h2 {
    font-size: 1.5rem;
    opacity: 0.8;
    font-weight: 400;
}

/* === BREADCRUMB === */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.5rem;
    opacity: 0.6;
}

/* === COMPONENTI BASE === */
.card {
    background: var(--bg-box);
    color: var(--text-box);
    border: 0.5px solid var(--border-box);
    border-radius: 12px;
    padding: 2rem;
    font-family: 'Courier New', monospace;
}

.card.full-width {
    grid-column: 1 / -1;
    max-width: 600px;
    margin: 0 auto;
}

.card-center {
    text-align: center;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.card p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondario {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-box);
}

.btn-secondario:hover {
    background: var(--bg-box);
}

/* === CTA FINALE COMUNE === */
.cta-finale {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-box);
    border-radius: 8px;
    border: 1px solid var(--border-box);
}

.cta-finale h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 400;
}

.cta-finale p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* === ARTICOLI COMUNI === */
.articolo-item,
.correlato {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-box);
}

.articolo-item:last-child,
.correlato:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.articolo-titolo {
    color: inherit;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 500;
}

.articolo-titolo:hover {
    text-decoration: underline;
}

.articolo-meta {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0.5rem 0 1rem 0;
    font-family: 'Courier New', monospace;
}

.articolo-estratto {
    margin-bottom: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* === FORM COMUNI === */
.form-semplice {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.campo {
    display: flex;
    flex-direction: column;
}

.campo label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.campo input,
.campo textarea {
    padding: 1rem;
    border: 1px solid var(--border-box);
    border-radius: 6px;
    background: var(--bg-box);
    color: var(--text-box);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
}

.campo input:focus,
.campo textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(155, 93, 229, 0.2);
}

.campo small {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
    line-height: 1.4;
}

.campo textarea {
    resize: vertical;
    min-height: 120px;
}

/* === MESSAGGI DI STATO === */
.messaggio-successo,
.messaggio-errore {
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.messaggio-successo {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: rgb(34, 197, 94);
}

.messaggio-errore {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgb(239, 68, 68);
}

.successo-icon,
.errore-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* === NESSUN ARTICOLO === */
.nessun-articolo,
.categoria-non-trovata,
.articolo-non-trovato {
    text-align: center;
    padding: 3rem 0;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.nessun-articolo h3,
.categoria-non-trovata h1,
.articolo-non-trovato h1 {
    margin-bottom: 1rem;
}

.nessun-articolo p,
.categoria-non-trovata p,
.articolo-non-trovato p {
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* === CATEGORIE E TAG === */
.categoria,
.categoria-tag {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    font-family: 'Courier New', monospace;
}

.categoria:hover,
.categoria-tag:hover {
    opacity: 0.8;
}

/* === STILI SPECIFICI PAGINE === */

/* Homepage */
.homepage-intro {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.homepage-intro h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.homepage-intro p {
    font-size: 1.2rem;
    color: var(--text);
    opacity: 0.8;
    font-style: italic;
}

.photo-profile {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-box);
    margin-bottom: 1.5rem;
}

/* Box manifesto */
.box-manifesto {
    aspect-ratio: 9 / 16;
    overflow: hidden;
    position: relative;
    background: var(--bg-box);
    border-radius: 12px;
}

.manifesto-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    color: white;
    text-align: center;
    font-size: 1.3rem;
    line-height: 1.8;
}

.bg-manifesto,
.box-manifesto video,
.box-manifesto img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.7;
}

/* Dettaglio articolo */
.titolo {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 2rem;
    font-weight: 400;
}

.testo {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.testo img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 4px;
    display: block;
}

.immagine-principale {
    margin-bottom: 2rem;
}

.immagine-principale img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Navigazione */
.navigazione,
.navigazione-footer {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-box);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.categorie-footer {
    font-size: 0.9rem;
    opacity: 0.8;
    font-family: 'Courier New', monospace;
}

.categoria-link {
    color: var(--accent);
    text-decoration: none;
}

.categoria-link:hover {
    text-decoration: underline;
}

/* Lista correlati */
.lista-correlati {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.correlato {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: var(--bg-box);
    border: 1px solid var(--border-box);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-box);
}

.correlato:hover {
    transform: translateY(-1px);
    background: var(--bg-box);
    filter: brightness(1.05);
}

.correlato-titolo {
    flex: 1;
    font-weight: 500;
}

.correlato-data {
    font-size: 0.8rem;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
    margin-left: 1rem;
}

/* Header categorie */
.categoria-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-box);
}

.categoria-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.categoria-desc {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.categoria-stats {
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
}

/* Altre categorie nav */
.altre-categorie-nav {
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-box);
}

.altre-categorie-nav h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.categorie-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.categoria-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-box);
    border: 1px solid var(--border-box);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.categoria-link:hover {
    transform: translateY(-1px);
    background: var(--bg-box);
    filter: brightness(1.1);
}

/* Link generici */
.leggi-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.leggi-link:hover {
    text-decoration: underline;
}

/* Stili specifici contatti */
.motivazione {
    padding: 1rem;
    background: var(--bg-box);
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.motivazione p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    opacity: 0.9;
}

.motivazione p:last-child {
    margin-bottom: 0;
}

.azioni-post-invio {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.info-contatti {
    padding: 0.5rem 1rem;
    background: var(--bg-box);
    border-radius: 8px;
    border: 1px solid var(--border-box);
}

.info-contatti h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 400;
}

.info-item {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item strong {
    color: var(--accent);
    font-weight: 500;
}

/* === UTILITY === */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 1rem;
}

.p-2 {
    padding: 2rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Wrapper mobile */
    .citofono,
    .deriva-wrapper,
    .resistenza-wrapper,
    .contatti-wrapper,
    .categoria-wrapper,
    .articolo-wrapper {
        margin: 1rem 0 1rem 0.5rem;
        padding: 0 0.5rem;
    }

    /* Header */
    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    /* Intestazione */
    .intestazione-icon {
        font-size: 2.5rem;
    }

    .intestazione h1 {
        font-size: 1.8rem;
    }

    /* Pulsanti */
    .pulsante {
        padding: 0.8rem 1rem;
    }

    .pulsante .icona {
        font-size: 1rem;
        width: 1.5rem;
    }

    .pulsante .nome {
        margin-left: 0.8rem;
    }

    .pulsante .nome strong {
        font-size: 0.95rem;
    }

    .pulsante .nome small {
        font-size: 0.75rem;
    }

    .pulsante.sezione-dedicata::after {
        right: 3rem;
    }

    /* Homepage */
    .homepage-intro {
        padding: 2rem 1rem;
    }

    .homepage-intro h1 {
        font-size: 2rem;
    }

    /* Titoli */
    .titolo {
        font-size: 1.8rem;
    }

    /* Form */
    .campo input,
    .campo textarea {
        padding: 0.8rem;
    }

    .btn-invia {
        width: 100%;
        text-align: center;
    }

    /* Navigazione */
    .navigazione,
    .navigazione-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Correlati */
    .correlato {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .correlato-data {
        margin-left: 0;
    }

    /* Categorie links */
    .categorie-links {
        flex-direction: column;
    }

    .categoria-link {
        text-align: center;
    }

    /* Azioni post invio */
    .azioni-post-invio {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {

    .citofono,
    .deriva-wrapper,
    .resistenza-wrapper,
    .contatti-wrapper,
    .categoria-wrapper,
    .articolo-wrapper {
        margin: 0.5rem 0 0.5rem 0.5rem;
        padding: 0 0.3rem;
    }
}

/* === AGGIUNGI QUESTE REGOLE ALLA FINE DI main.css === */

/* === FONT FIX CON TEMI === */
/* Sostituisci il CSS che hai aggiunto con questo: */

/* Font per tutti i temi */
body.tema-light,
body.tema-dark,
body.tema-glitch {
    font-family: Cambria, 'Liberation Serif', 'DejaVu Serif', Times, serif !important;
}

/* Titoli per tutti i temi */
body.tema-light .titolo,
body.tema-dark .titolo,
body.tema-glitch .titolo {
    font-family: Cambria, 'Liberation Serif', 'DejaVu Serif', Times, serif !important;
    font-weight: 600 !important;
}

/* Contenuto per tutti i temi */
body.tema-light .testo,
body.tema-dark .testo,
body.tema-glitch .testo,
body.tema-light .testo p,
body.tema-dark .testo p,
body.tema-glitch .testo p {
    font-family: Cambria, 'Liberation Serif', 'DejaVu Serif', Times, serif !important;
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
}

/* Cookie banner per tutti i temi */
body.tema-light .cookie-banner,
body.tema-dark .cookie-banner,
body.tema-glitch .cookie-banner {
    font-family: 'Courier New', monospace !important;
}

body.tema-light .cookie-banner h3,
body.tema-dark .cookie-banner h3,
body.tema-glitch .cookie-banner h3 {
    font-family: Cambria, 'Liberation Serif', 'DejaVu Serif', Times, serif !important;
}

/* Fix contenuto articoli - usa EB Garamond come il resto del body */
.testo,
.articolo-contenuto,
.post-content,
.article-content,
main .testo,
article p {
    font-family: Cambria, 'Liberation Serif', 'DejaVu Serif', Times, serif;
    font-size: 1.0625rem;
    /* Come body: 17px */
    line-height: 1.7;
    /* Come body */
}

/* === COOKIE BANNER STYLES === */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(17, 17, 17, 0.98);
    border-top: 2px solid var(--accent, #9b5de5);
    color: var(--text, #e0e0e0);
    padding: 1.5rem;
    z-index: 9999;
    backdrop-filter: blur(10px);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
    /* Come nav e card */
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.cookie-text {
    flex: 1;
}

.cookie-text h3 {
    margin: 0 0 0.5rem 0;
    color: var(--accent, #9b5de5);
    font-size: 1.2rem;
    font-family: Cambria, 'Liberation Serif', 'DejaVu Serif', Times, serif;
    /* Come titoli */
    font-weight: 600;
}

.cookie-text p {
    margin: 0.5rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
    font-family: Cambria, 'Liberation Serif', 'DejaVu Serif', Times, serif;
    /* Come body per leggibilità */
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 200px;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    /* Come pulsanti esistenti */
    transition: all 0.3s;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: var(--accent, #9b5de5);
    color: white;
}

.cookie-btn-accept:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cookie-btn-minimal {
    background: var(--bg-box, rgba(255, 255, 255, 0.05));
    color: var(--text, #e0e0e0);
    border: 1px solid var(--border-box, rgba(255, 255, 255, 0.1));
}

.cookie-btn-minimal:hover {
    background: var(--bg-box, rgba(255, 255, 255, 0.1));
}

.cookie-btn-settings {
    background: transparent;
    color: var(--text, #e0e0e0);
    border: 1px solid var(--border-box, rgba(255, 255, 255, 0.1));
}

.cookie-btn-settings:hover {
    border-color: var(--accent, #9b5de5);
}

.cookie-details {
    margin-top: 1rem;
}

.cookie-details-toggle {
    background: none;
    border: 1px solid var(--border-box, rgba(255, 255, 255, 0.1));
    color: var(--text, #e0e0e0);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
}

.cookie-details-toggle:hover {
    border-color: var(--accent, #9b5de5);
    color: white;
}

.cookie-details-content {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-box, rgba(255, 255, 255, 0.05));
    border-radius: 4px;
    border-left: 3px solid var(--accent, #9b5de5);
    display: none;
}

.cookie-details-content ul {
    margin: 0;
    padding-left: 1.5rem;
}

.cookie-details-content li {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.cookie-modal-content {
    background: var(--bg, #020126);
    border: 2px solid var(--accent, #9b5de5);
    border-radius: 8px;
    max-width: 800px;
    max-height: 80vh;
    width: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Courier New', monospace;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-box, rgba(255, 255, 255, 0.1));
    background: var(--bg-box, rgba(255, 255, 255, 0.05));
}

.cookie-modal-header h3 {
    margin: 0;
    color: var(--accent, #9b5de5);
    font-family: Cambria, 'Liberation Serif', 'DejaVu Serif', Times, serif;
    font-weight: 600;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: var(--text, #e0e0e0);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
}

.cookie-modal-close:hover {
    background: var(--bg-box, rgba(255, 255, 255, 0.1));
    color: white;
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-category {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-box, rgba(255, 255, 255, 0.02));
    border-radius: 6px;
    border: 1px solid var(--border-box, rgba(255, 255, 255, 0.1));
}

.cookie-category h4 {
    margin: 0 0 1rem 0;
    color: white;
    font-family: Cambria, 'Liberation Serif', 'DejaVu Serif', Times, serif;
    font-weight: 600;
}

.cookie-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.cookie-list li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text, #e0e0e0);
}

.cookie-list code {
    background: var(--bg-box, rgba(255, 255, 255, 0.1));
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: var(--accent, #9b5de5);
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 1rem;
    }

    .cookie-actions {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: auto;
    }

    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* Animazioni */
.cookie-banner {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === FINE AGGIUNTE COOKIE === */

/* =====================================
   RESISTENZA DIGITALE - CSS AGGIUNTIVO
   ===================================== */

/* === FILTRI ATTIVI === */
.filtri-attivi {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-box);
    border-radius: 8px;
    border: 1px solid var(--border-box);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.filtri-label {
    font-weight: 500;
    opacity: 0.8;
    margin-right: 0.5rem;
}

.filtro-attivo {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    background: var(--accent);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.filtro-attivo.categoria {
    background: var(--accent);
}

.filtro-attivo.tag {
    background: rgba(155, 93, 229, 0.8);
}

.rimuovi-filtro {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    margin-left: 0.3rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.rimuovi-filtro:hover {
    opacity: 1;
}

.reset-filtri {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.reset-filtri:hover {
    background: var(--accent);
    color: white;
}

/* === TAG CLOUD === */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: var(--bg-box);
    border: 2px solid var(--border-box);
    border-radius: 25px;
    color: var(--text-box);
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    position: relative;
}

.tag-item:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    border-width: 2px;
}

.tag-item.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    font-weight: 500;
}

.tag-nome {
    font-weight: 500;
}

.tag-count {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: normal;
}

.tag-item.active .tag-count {
    opacity: 0.9;
}

/* === BREADCRUMB DINAMICO === */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.breadcrumb a:hover {
    text-decoration: underline;
    opacity: 1;
}

.breadcrumb span {
    margin: 0 0.5rem;
    opacity: 0.6;
}

.breadcrumb span:last-child {
    color: var(--accent);
    opacity: 1;
    font-weight: 500;
}

/* === PULSANTE ZONA-RESISTENZA AGGIORNATO === */
.pulsante.zona-resistenza {
    position: relative;
}

.pulsante.zona-resistenza::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.pulsante.zona-resistenza:hover::after {
    right: 0.5rem;
    opacity: 1;
}

/* === ARTICOLI CON TAG === */
.pulsante.articolo-resistenza .nome small {
    font-style: normal;
    line-height: 1.3;
}

/* Evidenzia hashtag nei metadati */
.pulsante.articolo-resistenza .nome small {
    color: var(--text-box);
    opacity: 0.8;
}

.pulsante.articolo-resistenza .nome small:contains('#') {
    color: var(--accent);
}

/* === RESPONSIVE TAG CLOUD === */
@media (max-width: 768px) {
    .filtri-attivi {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .filtri-label {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .tag-cloud {
        gap: 0.6rem;
    }

    .tag-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .tag-nome {
        font-size: 0.8rem;
    }

    .tag-count {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .filtri-attivi {
        font-size: 0.8rem;
    }

    .filtro-attivo {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .tag-cloud {
        gap: 0.4rem;
    }

    .tag-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* === STATI HOVER MIGLIORATI === */
.pulsante.zona-resistenza,
.pulsante.articolo-resistenza {
    transition: all 0.2s ease;
}

.pulsante.zona-resistenza:hover,
.pulsante.articolo-resistenza:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* === NESSUN ARTICOLO AGGIORNATO === */
.nessun-articolo a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.nessun-articolo a:hover {
    text-decoration: underline;
}

/* === LAYOUT COMPATTO - SEZIONI UNIFICATE === */

/* Intestazione compatta */
.intestazione-compatta {
    margin-bottom: 2rem;
    /* invece di 3rem */
}

.intestazione-compatta .intestazione-icon {
    font-size: 2rem;
    /* invece di 3rem */
    margin-bottom: 0.5rem;
}

.intestazione-compatta h1 {
    font-size: 1.8rem;
    /* invece di 2.2rem */
    margin-bottom: 0.5rem;
}

/* Stats inline */
.stats-inline {
    opacity: 0.7;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

/* Tag inline per pochi tag */
.tag-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-box);
    border-radius: 8px;
    border: 1px solid var(--border-box);
}

.tag-label {
    font-size: 0.9rem;
    opacity: 0.8;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.tag-pill {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag-pill:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Separatori ridotti */
.separatore-compatto {
    margin: 2rem 0 1rem 0;
    /* invece di 3rem 0 2rem 0 */
}

.separatore-compatto h2 {
    font-size: 1.3rem;
    /* invece di 1.5rem */
}

/* Tag cloud compatta per pochi elementi */
.tag-cloud.pochi-elementi {
    gap: 0.8rem;
}

.tag-cloud.pochi-elementi .tag-item {
    padding: 0.6rem 1rem;
    /* più compatto */
    font-size: 0.9rem;
}

/* Filtri attivi più compatti */
.filtri-attivi {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding: 0.8rem 1rem;
    background: var(--bg-box);
    border-radius: 6px;
    border: 1px solid var(--border-box);
    font-size: 0.9rem;
}

.filtri-label {
    opacity: 0.8;
    font-family: 'Courier New', monospace;
}

.filtro-attivo {
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.rimuovi-filtro {
    margin-left: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.rimuovi-filtro:hover {
    opacity: 0.8;
}

.reset-filtri {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
}

.reset-filtri:hover {
    text-decoration: underline;
}

/* === RESPONSIVE COMPATTO === */
@media (max-width: 768px) {
    .tag-inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .tag-pill {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }

    .stats-inline {
        display: block;
        margin-top: 0.3rem;
    }

    .filtri-attivi {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .intestazione-compatta h1 {
        font-size: 1.6rem;
    }
}