/* classe per il contenitore dei filtri */
.filter-container {
    display: flex; /* 1. Attiva la modalità Flexbox per allineare gli elementi */
    align-items: center; /* 2. Allinea verticalmente l'icona e i menu al centro */
    gap: 1em; /* 3. Aggiunge uno spazio uniforme tra ogni elemento */
    flex-wrap: wrap; /* 4. Permette agli elementi di andare a capo su schermi piccoli */
}

/* Classe per i DropDownList */
.DDLCatGallery {
    flex: 1; /* 5. Dice a ogni menu di occupare una parte uguale dello spazio disponibile */
    min-width: 180px; /* 6. Imposta una larghezza minima per evitare che diventino troppo piccoli */
}

/* Stile per i Pager */
.pager-container {
    text-align: center;
    margin: 1em 0 1em 0;
}

    .pager-container a, .pager-container span {
        display: inline-block;
        padding: 8px 16px;
        margin: 5px 4px;
        border: 1px solid #ddd;
        border-radius: 4px;
        text-decoration: none;
        transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    }

        .pager-container a:hover {
            background-color: #f0f0f0;
        }

        .pager-container span.current-page {
            border: 1px solid #ddd;
            background-color: #333;
            color: white;
            font-weight: bold;
        }

/* Stile per Post Preview */
.Featured_Image {
    float: right;
    max-width: 200px;
    max-height: 200px;
    margin-left: 20px;
    margin-bottom: 10px
}
/* Quando la larghezza dello schermo è 480px o meno */
@media screen and (max-width: 1280px) {
    .Featured_Image {
        max-width: 180px;
    }
}

@media screen and (max-width: 980px) {
    .Featured_Image {
        max-width: 150px;
    }
}

@media screen and (max-width: 480px) {
    .Featured_Image {
        max-width: 120px;
    }
}

/* Stile per il contenitore dei tag */
.tags-container {
    margin-top: 2em;
    padding-top: 1em;
    border-top: solid 1px rgba(255, 255, 255, 0.3);
    clear: both;
}

/* Stile per ogni singolo tag */
.tag-item {
    margin-bottom: 5px;
}

/* Stile per l'intera sezione commenti */
.comments-section {
    margin-top: 2em;
    padding-top: 1em;
    border-top: solid 1px rgba(255, 255, 255, 0.3);
}

/* Stile per un singolo commento */
.comment-item {
    background-color: #ffdeded4;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 1em;
    /* Aggiungiamo transition per un look più pulito */
    transition: background-color 0.3s ease;
}

/* Stile per l'header del commento (autore e data) */
.comment-header {
    font-size: 0.9em;
    color: #e24d66;
    margin-bottom: 0.5em;
    border-bottom: 1px dotted #e24d66;
    padding-bottom: 5px;
    font-weight: 600;
}

    .comment-header strong {
        color: #333;
        font-weight: 600;
    }

/* Stile per il corpo del commento */
.comment-body {
    margin-top: 10px;
    color: #000000;
    font-weight: 300;
}

/* === Stile per un commento-risposta === */
.comment-reply {
    margin-left: 40px; /* Indentazione */
    margin-top: 1em;
    margin-bottom: 0;
    background-color: #f7f7f7; /* Sfondo leggermente diverso */
    border-left: 3px solid #e1e1e1;
}

/* === Stile per il commento di un Admin/Autore === */
.comment-item.author-reply {
    background-color: #e6f7ff; /* Sfondo blu chiaro per Admin */
    border-color: #bce8f1;
}

.comment-reply.author-reply {
    background-color: #f0faff; /* Sfondo blu ancora più chiaro per risposte admin */
    border-left-color: #bce8f1;
}

.author-reply .comment-header strong {
    color: #0056b3; /* Colore autore admin */
}

/* === Stile per il pulsante "Rispondi" === */
.comment-reply-action {
    text-align: right;
    margin-top: 10px;
}

/* === Stile per il modulo di risposta === */
.reply-form {
    margin-top: 15px;
    padding: 15px;
    background: rgba(39, 39, 50, 0.64);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    box-shadow: 0 0 5px 3px rgba(108, 117, 125, 0.35);
}

    .reply-form h5 {
        margin-bottom: 0.5em;
    }

    .reply-form textarea {
        background-color: rgba(255, 255, 255, 0.9) !important;
        color: #000 !important;
    }

/* Stile per il contenitore della NEBULOSA dei Tag */
.tag-cloud-container {
    text-align: center;
    line-height: 2.5; /* Aumenta lo spazio verticale tra le righe di tag */
    color: rgba(255, 255, 255, 0.85);
    background: rgba(39, 40, 51, 0.965);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 1em 0;
}

/* Stile per ogni singolo tag nella nuvola */
.tag-cloud-item {
    display: inline-block;
    vertical-align: middle;
    margin: 0 5px;
    padding: 3px 8px;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    border: none !important;
    background-color: transparent !important;
    transition: color 0.2s ease, transform 0.2s ease;
}

    .tag-cloud-item:hover {
        color: #e44c65 !important; /* Colore rosa al passaggio del mouse */
        transform: scale(1.1);
    }

/* Stili per il pannello dei filtri attivi */
.active-filter-container {
    display: flex; /* Usa flex per allineare */
    align-items: center;
    flex-wrap: wrap; /* Permette ai tag di andare a capo */
    gap: 0.5em; /* Spazio tra "Filtri attivi:" e i tag */
    margin-top: 2em;
    margin-bottom: 2em;
    padding: 8px 15px;
    background-color: rgba(228, 76, 101, 0.1);
    border: 1px solid rgba(228, 76, 101, 0.3);
    border-radius: 6px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

.pnlFilters-container {
    margin-bottom: 2em;
}

/* Stile per OGNI tag nel repeater */
.active-tag-item {
    display: inline-block;
    padding: 4px 4px 4px 8px; /* Meno padding a destra, gestito dal link */
    background-color: rgba(228, 76, 101, 0.2);
    border: 1px solid rgba(228, 76, 101, 0.4);
    border-radius: 4px;
    white-space: nowrap;
}

    .active-tag-item .active-tag-name {
        color: #e44c65;
        font-weight: 600;
        margin-right: 5px; /* Spazio tra nome e "x" */
    }

    /* Stile per il pulsante di rimozione (la 'x') */
    .active-tag-item .remove-filter-link {
        display: inline-block;
        margin-left: 10px;
        padding: 2px 13px;
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%; /* Lo rende un cerchio */
        color: rgba(255, 255, 255, 0.7) !important;
        text-decoration: none !important;
        font-weight: bold;
        /*line-height: 1;*/
        transition: background-color 0.2s ease, color 0.2s ease;
    }

.remove-filter-link:hover {
    background-color: #e44c65;
    color: #fff !important;
}

/* ================================================ */
/* == Stili per i pulsanti di condivisione  == */
/* ================================================ */

.share-buttons-container {
    margin-top: 2em;
    margin-bottom: 2em;
    padding-top: 1em;
    border-top: solid 1px rgba(255, 255, 255, 0.3);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em; /* Spazio tra i pulsanti */
}

    .share-buttons-container strong {
        margin-right: 0.5em; /* Spazio dopo "Condividi:" */
    }
/* Assicura che le icone nei bottoni small siano allineate */
.button.very-small.icon:before {
    margin-right: 0.5em;
}
/* Feedback per il pulsante Copia Link */
.share-buttons-container a.copied {
    background-color: #28a745 !important; /* Verde successo */
    color: #fff !important;
    border-color: #28a745 !important;
}

/* ================================================ */
/* == Stili di Reset per il TreeView di ASP.NET  == */
/* ================================================ */

/* Isoliamo il TreeView dal reset globale */
.treeview-reset, .treeview-reset * {
    all: revert;
    box-sizing: border-box;
    pointer-events: auto !important; /* garantisce che i click passino */
}

/* Contenitore base */
#tvArchive {
    font-family: "Roboto", Helvetica, sans-serif;
    /*
            font-size: 14px;
            font-weight: 300;
        */
    color: rgba(255, 255, 255, 0.85);
    background: rgba(39, 40, 51, 0.965);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 1em 0 2em 0;
    overflow-x: hidden;
    overflow-y: auto;
}

    /* Tabella base del TreeView */
    #tvArchive table {
        border-collapse: collapse;
        /*width: 100%;*/
    }

/* Root */
.TreeviewRootNode {
    box-sizing: border-box;
    width: 100%;
    padding-right: 11px !important;
}

.TreeView_Show_Hide_Node {
    box-sizing: border-box;
    width: 100%;
    padding-right: 11px !important;
}

.TreeView_Post_Node {
    box-sizing: border-box;
    width: 100%;
    padding-left: 2px;
    padding-right: 11px !important;
}

#tvArchive > table {
    background-color: rgba(255, 255, 255, 0.075);
}

/* Righe e celle */
#tvArchive tr {
    transition: background-color 0.2s ease;
}

#tvArchive td {
    /*padding: 3px 6px;*/
    /*vertical-align: middle;*/
    /*color: rgba(255, 255, 255, 0.85);*/
}

/* Link dei nodi */
#tvArchive a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    /*padding: 0px 2px;*/
    transition: background-color 0.2s ease, color 0.2s ease;
}

    #tvArchive a:hover {
        background-color: rgba(228, 76, 101, 0.2);
        color: #e44c65;
    }

/* Nodo selezionato */
#tvArchive .TreeViewSelectedNode {
}

.TreeViewSelectedNode a {
    background-color: rgb(226, 77, 102);
    color: #fff !important;
    font-weight: 400;
    border-radius: 4px;
}

/* Icone di espansione/collasso */
#tvArchive img {
    filter: brightness(0) invert(1); /* adatta le frecce al tema scuro */
    width: 14px;
    height: 14px;
    margin-right: 4px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

    #tvArchive img:hover {
        transform: scale(1.15);
    }

/* Linea di separazione visiva tra gruppi */
#tvArchive tr + tr td:first-child {
    /*border-top: 1px solid rgba(255, 255, 255, 0.05);*/
}

/* Scrollbar personalizzata */
#tvArchive::-webkit-scrollbar {
    width: 8px;
}

#tvArchive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

    #tvArchive::-webkit-scrollbar-thumb:hover {
        background: rgba(228, 76, 101, 0.3);
    }

/* Animazione di apertura */
#tvArchive tr {
    animation: fadeInTreeRow 1.0s ease;
}

@keyframes fadeInTreeRow {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animazione di chiusura per il DIV contenitore dei figli */
#tvArchive div.fade-out {
    animation: fadeOutTreeRow 0.5s ease forwards;
    pointer-events: none; /* Disabilita i click durante l'animazione di uscita */
}

/* Le @keyframes rimangono invariate */
@keyframes fadeOutTreeRow {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-5px);
    }
}

/* ================================================ */
/* == Stili per POPTROX nella pagina BLOG  == */
/* ================================================ */

/* Stili per l'effetto BLUR dello sfondo */
body.modal-active #page-wrapper {
    -moz-filter: blur(8px);
    -webkit-filter: blur(8px);
    -ms-filter: blur(8px);
    filter: blur(8px);
}

    body.modal-active #page-wrapper:after {
        pointer-events: auto;
        opacity: 1;
        visibility: visible;
        z-index: 10003;
    }

/*
    Questa classe di base per #page-wrapper:after è
    necessaria affinché la transizione di modal-active funzioni.
*/
#page-wrapper:after {
    pointer-events: none;
    -moz-transition: opacity 0.5s ease, visibility 0.5s;
    -webkit-transition: opacity 0.5s ease, visibility 0.5s;
    -ms-transition: opacity 0.5s ease, visibility 0.5s;
    transition: opacity 0.5s ease, visibility 0.5s;
    background: rgba(36, 38, 41, 0.5);
    content: '';
    display: block;
    height: 100%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    visibility: hidden;
    width: 100%;
    z-index: 1;
}

/* Stili per Poptrox Popup */
.poptrox-overlay {
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}

.poptrox-popup {
    background: rgba(31, 34, 36, 0.925);
    box-shadow: 0 1em 3em 0.5em rgba(0, 0, 0, 0.25);
    cursor: default;
}

    .poptrox-popup::before {
        -moz-transition: opacity 0.2s ease-in-out;
        -webkit-transition: opacity 0.2s ease-in-out;
        -ms-transition: opacity 0.2s ease-in-out;
        transition: opacity 0.2s ease-in-out;
        background-image: -moz-linear-gradient(to left, rgba(31,34,36,0.35), rgba(31,34,36,0) 10em, rgba(31,34,36,0)), -moz-linear-gradient(to right, rgba(31,34,36,0.35), rgba(31,34,36,0) 10em, rgba(31,34,36,0));
        background-image: -webkit-linear-gradient(to left, rgba(31,34,36,0.35), rgba(31,34,36,0) 10em, rgba(31,34,36,0)), -webkit-linear-gradient(to right, rgba(31,34,36,0.35), rgba(31,34,36,0) 10em, rgba(31,34,36,0));
        background-image: -ms-linear-gradient(to left, rgba(31,34,36,0.35), rgba(31,34,36,0) 10em, rgba(31,34,36,0)), -ms-linear-gradient(to right, rgba(31,34,36,0.35), rgba(31,34,36,0) 10em, rgba(31,34,36,0));
        background-image: linear-gradient(to left, rgba(31,34,36,0.35), rgba(31,34,36,0) 10em, rgba(31,34,36,0)), linear-gradient(to right, rgba(31,34,36,0.35), rgba(31,34,36,0) 10em, rgba(31,34,36,0));
        content: '';
        display: block;
        height: 100%;
        left: 0;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: 1;
        opacity: 1;
    }

    .poptrox-popup .closer {
        -moz-transition: opacity 0.2s ease-in-out;
        -webkit-transition: opacity 0.2s ease-in-out;
        -ms-transition: opacity 0.2s ease-in-out;
        transition: opacity 0.2s ease-in-out;
        background-image: url("images/close.svg");
        background-position: center;
        background-repeat: no-repeat;
        background-size: 3em;
        height: 5em;
        opacity: 0;
        position: absolute;
        right: 0;
        top: 0;
        width: 5em;
        z-index: 2;
    }

    .poptrox-popup .nav-previous,
    .poptrox-popup .nav-next {
        -moz-transition: opacity 0.2s ease-in-out;
        -webkit-transition: opacity 0.2s ease-in-out;
        -ms-transition: opacity 0.2s ease-in-out;
        transition: opacity 0.2s ease-in-out;
        background-image: url("images/arrow.svg");
        background-position: center;
        background-repeat: no-repeat;
        background-size: 5em;
        cursor: pointer;
        height: 8em;
        margin-top: -4em;
        opacity: 0;
        position: absolute;
        top: 50%;
        width: 6em;
        z-index: 2;
    }

    .poptrox-popup .nav-previous {
        -moz-transform: scaleX(-1);
        -webkit-transform: scaleX(-1);
        -ms-transform: scaleX(-1);
        transform: scaleX(-1);
        left: 0;
    }

    .poptrox-popup .nav-next {
        right: 0;
    }

    .poptrox-popup .caption {
        padding: 0.1em 2em 0.1em 2em;
        background-image: -moz-linear-gradient(to top, rgba(16,16,16,0.45) 25%, rgba(16,16,16,0) 100%);
        background-image: -webkit-linear-gradient(to top, rgba(16,16,16,0.45) 25%, rgba(16,16,16,0) 100%);
        background-image: -ms-linear-gradient(to top, rgba(16,16,16,0.45) 25%, rgba(16,16,16,0) 100%);
        background-image: linear-gradient(to top, rgba(16,16,16,0.45) 25%, rgba(16,16,16,0) 100%);
        bottom: 0;
        cursor: default;
        left: 0;
        position: absolute;
        text-align: left;
        width: 100%;
        z-index: 2;
    }

        .poptrox-popup .caption h2, .poptrox-popup .caption h3, .poptrox-popup .caption h4, .poptrox-popup .caption h5, .poptrox-popup .caption h6 {
            margin: 0 6.5em 0.1em 0;
        }

        .poptrox-popup .caption p {
            color: #ffffff;
        }

        .poptrox-popup .caption .button {
            height: 2em !important;
            line-height: 2em !important;
            padding: 0 2.5em;
            margin: 0.1em auto 0.1em auto;
            float: right;
        }

    .poptrox-popup .loader {
        -moz-animation: spinner 1s infinite linear !important;
        -webkit-animation: spinner 1s infinite linear !important;
        -ms-animation: spinner 1s infinite linear !important;
        animation: spinner 1s infinite linear !important;
        background-image: url("images/spinner.svg");
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        display: block;
        font-size: 2em;
        height: 2em;
        left: 50%;
        line-height: 2em;
        margin: -1em 0 0 -1em;
        opacity: 0.25;
        position: absolute;
        text-align: center;
        top: 50%;
        width: 2em;
    }

    .poptrox-popup:hover .closer,
    .poptrox-popup:hover .nav-previous,
    .poptrox-popup:hover .nav-next {
        opacity: 0.5;
    }

        .poptrox-popup:hover .closer:hover,
        .poptrox-popup:hover .nav-previous:hover,
        .poptrox-popup:hover .nav-next:hover {
            opacity: 1.0;
        }

    .poptrox-popup.loading::before {
        opacity: 0;
    }

body.touch .poptrox-popup .closer,
body.touch .poptrox-popup .nav-previous,
body.touch .poptrox-popup .nav-next {
    opacity: 1.0 !important;
}

@media screen and (max-width: 980px) {

    .poptrox-popup .closer {
        background-size: 3em;
    }

    .poptrox-popup .nav-previous,
    .poptrox-popup .nav-next {
        background-size: 4em;
    }
}

@media screen and (max-width: 736px) {

    .poptrox-popup::before {
        display: none;
    }

    .poptrox-popup .caption {
        /*display: none !important;*/
    }

    .poptrox-popup .closer,
    .poptrox-popup .nav-previous,
    .poptrox-popup .nav-next {
        opacity: 0.5 !important;
        /*display: none !important;*/
    }
}
