/* =====================================================
   ARCHIVIO STORICO
   MISERICORDIA DI STAGGIA SENESE ODV
===================================================== */


/* =====================================================
   VARIABILI
===================================================== */

:root {

    --rosso: #7d2027;
    --rosso-scuro: #5d171d;
    --rosso-chiaro: #a33b42;

    --oro: #b59a5b;
    --oro-chiaro: #d2bd83;

    --avorio: #f4f0e5;
    --carta: #faf8f2;
    --carta-scura: #ebe5d7;

    --inchiostro: #292622;
    --inchiostro-chiaro: #625d55;

    --bordo: #d7cfbe;

    --verde: #263b32;

    --giallo-stemma: #fffa00;

    --ombra:
        0 8px 25px rgba(45, 35, 25, .08);
}


/* =====================================================
   RESET
===================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    margin: 0;

    color: var(--inchiostro);

    background:
        linear-gradient(
            rgba(244,240,229,.96),
            rgba(244,240,229,.96)
        );

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    line-height: 1.6;
}


/* =====================================================
   TESTATA ISTITUZIONALE
===================================================== */

.testata {

    background: var(--verde);

    color: white;

    border-bottom:
        3px solid #e6d300;

    padding: 0 30px;
}


.testata-inner {

    max-width: 1400px;

    margin: 0 auto;

    height: 150px;

    display: flex;

    align-items: center;

    gap: 28px;
}


/* =====================================================
   STEMMA TESTATA
===================================================== */

.stemma {

    width: 150px;
    height: 150px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: transparent;
}


.stemma img {

    display: block;

    width: 150px;
    height: 150px;

    object-fit: contain;

    background: transparent;

    border: none;
    outline: none;
    box-shadow: none;

    padding: 0;
    margin: 0;
}


/* =====================================================
   TESTO TESTATA
===================================================== */

.testata-testo {

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding-left: 4px;
}


.titolo-archivio {

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 14px;

    letter-spacing: 3px;

    text-transform: uppercase;

    color: #e8e1cf;

    margin-bottom: 7px;
}


.testata h1 {

    margin: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 29px;

    font-weight: normal;

    line-height: 1.2;

    color: var(--giallo-stemma);

    background: transparent;
}


.sottotitolo {

    margin-top: 9px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 13px;

    color: #c8d0ca;

    letter-spacing: 1.2px;
}


/* =====================================================
   TITOLI
===================================================== */

.titoli {
    padding-top: 5px;
}


.ente {

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 12px;

    letter-spacing: 3px;

    opacity: .9;

    margin-bottom: 3px;
}


.titoli h1 {

    margin: 0;

    font-size: 34px;

    font-weight: normal;

    letter-spacing: 2px;

    line-height: 1.15;
}


.linea-oro {

    width: 80px;

    height: 2px;

    background: var(--oro-chiaro);

    margin: 15px 0 10px;
}


.archivio {

    font-size: 18px;

    letter-spacing: 4px;

    font-weight: normal;
}


/* =====================================================
   NAVIGAZIONE
===================================================== */

.navigazione {

    background: #fffdf8;

    border-bottom:
        1px solid var(--bordo);
}


.navigazione-interna {

    max-width: 1400px;

    margin: auto;

    min-height: 48px;

    padding: 0 40px;

    display: flex;

    align-items: center;

    gap: 35px;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: 1px;

    color: #686259;
}


.navigazione-interna span {

    padding: 15px 0;
}


.navigazione-interna .nav-attiva {

    color: var(--rosso);

    border-bottom:
        2px solid var(--rosso);

    font-weight: bold;
}


/* =====================================================
   HERO
===================================================== */

.hero {

    background:
        linear-gradient(
            to bottom,
            #faf8f2,
            #f1ecdf
        );

    border-bottom:
        1px solid var(--bordo);
}


.hero-interna {

    max-width: 1100px;

    margin: auto;

    padding: 55px 30px 48px;

    text-align: center;
}


.sovratitolo {

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 15px;

    letter-spacing: 3px;

    color: var(--rosso);

    font-weight: bold;

    margin-bottom: 8px;
}


.hero h2 {

    margin: 0 0 10px;

    font-size: 35px;

    font-weight: normal;

    color: #342c26;
}


.hero p {

    max-width: 720px;

    margin: 0 auto 28px;

    color: var(--inchiostro-chiaro);

    font-size: 17px;
}


/* =====================================================
   RICERCA
===================================================== */

.ricerca-grande {

    max-width: 760px;

    height: 60px;

    margin: auto;

    display: flex;

    align-items: center;

    background: white;

    border:
        1px solid #cfc6b5;

    box-shadow:
        0 4px 15px rgba(50,40,30,.08);
}


.icona-ricerca {

    width: 55px;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 28px;

    color: var(--rosso);

    line-height: 1;
}


.ricerca-grande input {

    flex: 1;

    height: 100%;

    border: none;

    outline: none;

    background: transparent;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 17px;

    color: var(--inchiostro);
}


.ricerca-grande input::placeholder {

    color: #9a948a;
}


.scorciatoia {

    margin-right: 18px;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;

    letter-spacing: 1.5px;

    color: #928b80;
}


/* =====================================================
   LAYOUT
===================================================== */

.layout {

    max-width: 1400px;

    margin: auto;

    display: grid;

    grid-template-columns:
        370px
        minmax(0, 1fr);

    min-height: 600px;
}


/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {

    background:
        linear-gradient(
            to bottom,
            #ece6d9,
            #e8e1d2
        );

    border-right:
        1px solid var(--bordo);

    padding:
        35px 25px;

    overflow-y: auto;
}


.sidebar-intestazione {

    border-bottom:
        1px solid #cfc5b3;

    padding-bottom: 18px;

    margin-bottom: 15px;
}


.etichetta {

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;

    font-weight: bold;

    letter-spacing: 2px;

    color: var(--rosso);
}


.sidebar h2 {

    margin: 5px 0 0;

    font-size: 22px;

    font-weight: normal;

    color: #382f29;
}


.stato {

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 11px;

    color: #81796e;

    margin-bottom: 15px;
}


/* =====================================================
   ALBERO
===================================================== */

.tree,
.tree ul {

    list-style: none;

    margin: 0;

    padding: 0;
}


.tree ul {

    padding-left: 19px;

    border-left:
        1px solid #cfc5b3;

    margin-left: 9px;
}


.tree li {

    margin: 2px 0;
}


.tree button {

    width: 100%;

    border: none;

    background: transparent;

    cursor: pointer;

    text-align: left;

    padding: 8px 7px;

    border-radius: 3px;

    color: #39342e;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 14px;

    transition:
        background .15s,
        color .15s;
}


.tree button:hover {

    background:
        rgba(125,32,39,.07);

    color: var(--rosso);
}


.tree button.active {

    background:
        rgba(125,32,39,.12);

    color: var(--rosso);

    box-shadow:
        inset 3px 0 0 var(--rosso);

    font-weight: bold;
}


.tree .freccia {

    display: inline-block;

    width: 20px;

    color: var(--rosso);

    font-family: Arial, sans-serif;
}


.tree .icona {

    display: inline-block;

    width: 23px;

    color: var(--rosso);

    font-family: Arial, sans-serif;
}


.tree small {

    display: inline-block;

    margin-left: 43px;

    margin-top: 2px;

    color: #8c857b;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;
}


.tree .children {

    display: block;
}


.tree .children.collapsed {

    display: none;
}


/* =====================================================
   CONTENUTO
===================================================== */

.contenuto-principale {

    padding: 45px;

    background: var(--carta);
}


.scheda {

    max-width: 900px;

    min-height: 400px;

    margin: auto;

    background: white;

    border:
        1px solid var(--bordo);

    box-shadow:
        var(--ombra);

    padding:
        45px 50px;
}


/* =====================================================
   PAGINA INTRODUTTIVA
===================================================== */

.scheda-introduzione {

    text-align: center;

    padding:
        25px 20px;
}


.ornamento {

    color: var(--oro);

    font-size: 22px;

    margin-bottom: 10px;
}


.scheda-introduzione h2 {

    max-width: 650px;

    margin:
        8px auto 20px;

    color: #382f29;

    font-size: 30px;

    font-weight: normal;

    line-height: 1.3;
}


.separatore {

    width: 70px;

    height: 2px;

    margin:
        0 auto 25px;

    background: var(--oro);
}


.benvenuto {

    max-width: 650px;

    margin:
        auto auto 10px;

    font-size: 18px;

    color: #514b44;
}


.istruzioni {

    color: #817a71;

    font-size: 15px;
}


/* =====================================================
   SCHEDA ARCHIVISTICA
===================================================== */

.scheda h2 {

    color: #382f29;

    font-size: 30px;

    font-weight: normal;

    line-height: 1.3;

    margin:
        0 0 10px;
}


.tipo {

    display: inline-block;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;

    letter-spacing: 1.5px;

    text-transform: uppercase;

    color: var(--rosso);

    border:
        1px solid #d8c2c3;

    background:
        #fbf2f2;

    padding:
        5px 9px;

    margin-bottom: 25px;
}


.campo {

    border-top:
        1px solid #e6e0d5;

    padding:
        17px 0;

    font-size: 16px;

    color: #504a43;

    line-height: 1.7;
}


.campo strong {

    display: block;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;

    letter-spacing: 1.5px;

    text-transform: uppercase;

    color: #81796f;

    margin-bottom: 4px;
}


.ident {

    font-family:
        "Courier New",
        monospace;

    color: var(--rosso);

    font-size: 14px;
}


/* =====================================================
   DATE
===================================================== */

.data-archivio {

    display: inline-block;

    color: #5f574d;

    font-size: 18px;
}


/* =====================================================
   PDF
===================================================== */

.pdf {

    display: inline-flex;

    align-items: center;

    gap: 9px;

    margin-top: 10px;

    padding:
        11px 17px;

    color: white;

    background:
        var(--rosso);

    text-decoration: none;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 12px;

    letter-spacing: .5px;

    transition:
        background .15s,
        transform .15s;
}


.pdf:hover {

    background:
        var(--rosso-scuro);

    transform:
        translateY(-1px);
}


.percorso-pdf {
    display: none;
}



/* =====================================================
   ERRORE
===================================================== */

.errore {

    padding: 18px;

    color: #7c2020;

    background: #f8e8e8;

    border:
        1px solid #e1bcbc;
}


/* =====================================================
   FOOTER
===================================================== */

.footer {

    background: #302924;

    color: #ded7ca;

    border-top:
        3px solid var(--oro);
}


.footer-interna {

    max-width: 1400px;

    margin: auto;

    padding:
        14px 40px;

    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 58px;
}


/* =====================================================
   LOGO FOOTER
===================================================== */

.footer-logo {

    width: 38px;

    height: 42px;

    object-fit: contain;

    display: block;

    background: transparent;

    padding: 0;

    margin: 0;

    border: none;

    outline: none;

    box-shadow: none;

    mix-blend-mode: normal;

    flex-shrink: 0;
}


.footer strong {

    display: block;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 12px;

    line-height: 1.3;

    letter-spacing: .5px;

    color: white;
}


.footer span {

    display: block;

    font-size: 11px;

    line-height: 1.3;

    color: #aaa196;
}


/* =====================================================
   SCROLLBAR
===================================================== */

.sidebar::-webkit-scrollbar {

    width: 8px;
}


.sidebar::-webkit-scrollbar-track {

    background: #e4ddcf;
}


.sidebar::-webkit-scrollbar-thumb {

    background: #c2b8a7;

    border-radius: 4px;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 900px) {

    .testata-inner {

        padding: 20px;

        min-height: 160px;

        height: auto;
    }


    .stemma {

        width: 100px;

        height: 115px;
    }


    .stemma img {

        width: 100px;

        height: 115px;

        max-height: 115px;
    }


    .titoli h1 {

        font-size: 27px;
    }


    .layout {

        grid-template-columns:
            300px
            1fr;
    }


    .contenuto-principale {

        padding: 25px;
    }


    .scheda {

        padding: 30px;
    }
}


@media (max-width: 700px) {

    .testata {

        padding: 0 15px;
    }


    .testata-inner {

        flex-direction: column;

        text-align: center;

        padding: 20px 0 25px;

        min-height: 0;

        height: auto;

        gap: 12px;
    }


    .stemma {

        width: 90px;

        height: 100px;
    }


    .stemma img {

        width: 90px;

        height: 100px;

        max-height: 100px;
    }


    .testata-testo {

        padding-left: 0;
    }


    .testata h1 {

        font-size: 24px;
    }


    .titolo-archivio {

        letter-spacing: 2px;
    }


    .ente {

        letter-spacing: 2px;
    }


    .linea-oro {

        margin-left: auto;

        margin-right: auto;
    }


    .navigazione-interna {

        padding: 0 15px;

        justify-content: center;

        gap: 15px;
    }


    .navigazione-interna span:not(.nav-attiva) {

        display: none;
    }


    .hero-interna {

        padding:
            35px 15px;
    }


    .hero h2 {

        font-size: 28px;
    }


    .ricerca-grande {

        height: 54px;
    }


    .layout {

        display: flex;

        flex-direction: column;
    }


    .sidebar {

        border-right: none;

        border-bottom:
            1px solid var(--bordo);

        max-height: 430px;
    }


    .contenuto-principale {

        padding: 15px;
    }


    .scheda {

        padding: 25px 20px;
    }


    .scheda h2,
    .scheda-introduzione h2 {

        font-size: 25px;
    }


  .footer-interna {

    padding:
        10px 20px;

    min-height: 52px;
}


.footer-logo {

    width: 34px;

    height: 38px;
}

}
/* =====================================================
   MIGLIORAMENTI ESTETICI
   AREA ARCHIVIO — TESTATA ESCLUSA
===================================================== */


/* =====================================================
   NAVIGAZIONE
===================================================== */

.navigazione {
    background: #fffdf8;
    box-shadow:
        0 2px 8px rgba(45, 35, 25, .04);
}

.navigazione-interna {
    min-height: 50px;
}

.navigazione-interna span {
    transition:
        color .15s ease,
        border-color .15s ease;
}

.navigazione-interna span:hover {
    color: var(--rosso);
}


/* =====================================================
   HERO
===================================================== */

.hero {
    position: relative;
}

.hero-interna {
    padding-top: 58px;
    padding-bottom: 52px;
}

.hero h2 {
    letter-spacing: .3px;
}

.hero p {
    line-height: 1.75;
}


/* =====================================================
   RICERCA
===================================================== */

.ricerca-grande {
    border-radius: 4px;
    overflow: hidden;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.ricerca-grande:focus-within {
    border-color: var(--rosso);

    box-shadow:
        0 5px 20px rgba(50,40,30,.10),
        0 0 0 3px rgba(125,32,39,.06);
}

.ricerca-grande input {
    padding-right: 10px;
}

.icona-ricerca {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
}


/* =====================================================
   LAYOUT ARCHIVIO
===================================================== */

.layout {
    background: var(--carta);
}


/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {
    padding-top: 32px;
    background:
        linear-gradient(
            to bottom,
            #eee8dc,
            #e9e2d4
        );
}

.sidebar-intestazione {
    padding-bottom: 20px;
}

.stato {
    padding-bottom: 5px;
}


/* =====================================================
   STATISTICHE
===================================================== */

.statistiche {
    display: flex;
    align-items: baseline;
    gap: 7px;

    margin-bottom: 5px;
}

.statistiche strong {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 21px;

    color: var(--rosso);
}

.statistiche span {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 11px;

    color: #756e64;
}

.statistiche-dettaglio {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;

    line-height: 1.6;

    color: #8b8378;
}


/* =====================================================
   ALBERO
===================================================== */

.tree button {
    position: relative;

    transition:
        background .15s ease,
        color .15s ease,
        padding-left .15s ease;
}

.tree button:hover {
    padding-left: 10px;
}

.tree button.active {
    padding-left: 10px;
}

.tree .titolo-albero {
    line-height: 1.35;
}

.tree small {
    opacity: .85;
}


/* =====================================================
   MESSAGGIO RICERCA
===================================================== */

.messaggio-ricerca {
    margin:
        12px 0 18px;

    padding:
        12px 13px;

    background:
        rgba(255,255,255,.55);

    border:
        1px solid #d7cdbd;

    border-left:
        3px solid var(--rosso);

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

.messaggio-ricerca strong {
    display: block;

    font-size: 11px;

    color: var(--rosso);

    margin-bottom: 3px;
}

.messaggio-ricerca span {
    display: block;

    font-size: 10px;

    color: #7c7469;

    line-height: 1.5;
}


/* =====================================================
   CONTENUTO
===================================================== */

.contenuto-principale {
    padding: 48px;
}

.scheda {
    border-radius: 3px;

    box-shadow:
        0 5px 20px rgba(45, 35, 25, .07);

    transition:
        box-shadow .2s ease;
}


/* =====================================================
   BREADCRUMB
===================================================== */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 7px;

    margin-bottom: 20px;
    padding-bottom: 14px;

    border-bottom:
        1px solid #e6e0d5;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;

    line-height: 1.5;

    color: #91897d;
}

.breadcrumb span {
    display: inline-block;
}

.breadcrumb-separatore {
    color: var(--oro);
    font-size: 14px;
}


/* =====================================================
   ETICHETTE SCHEDA
===================================================== */

.scheda > .etichetta {
    margin-bottom: 7px;
}

.tipo {
    border-radius: 2px;

    letter-spacing: 1.3px;
}


/* =====================================================
   CAMPI
===================================================== */

.campo {
    transition:
        background .15s ease;
}

.campo:hover {
    background:
        rgba(244,240,229,.28);
}

.campo strong {
    letter-spacing: 1.4px;
}


/* =====================================================
   IDENTIFICATIVO
===================================================== */

.ident {
    display: inline-block;

    padding:
        3px 7px;

    background:
        #f6f1e7;

    border:
        1px solid #e5dccb;

    border-radius: 2px;

    letter-spacing: .3px;
}


/* =====================================================
   DOCUMENTO PDF
===================================================== */

.campo-documento {
    padding-top: 20px;
    padding-bottom: 20px;
}

.pdf {
    border-radius: 3px;

    box-shadow:
        0 2px 7px rgba(80,30,30,.12);
}

.pdf:hover {
    box-shadow:
        0 4px 12px rgba(80,30,30,.16);
}


/*
 * Il percorso tecnico del PDF non viene
 * mostrato nell'interfaccia.
 */

.percorso-pdf {
    display: none !important;
}


/* =====================================================
   CONTENUTI SUBORDINATI
===================================================== */

.campo-figli {
    background:
        #faf7ef;

    padding-left: 14px;
    padding-right: 14px;

    border-left:
        3px solid var(--oro);
}


/* =====================================================
   PAGINA INTRODUTTIVA
===================================================== */

.scheda-introduzione {
    padding-top: 35px;
    padding-bottom: 35px;
}

.scheda-introduzione .ornamento {
    opacity: .85;
}

.benvenuto {
    line-height: 1.8;
}


/* =====================================================
   FOOTER
===================================================== */

.footer-interna {
    min-height: 82px;
}

.footer-logo {
    opacity: .92;
}

.footer strong {
    line-height: 1.4;
}

.footer span {
    margin-top: 2px;
}


/* =====================================================
   FOCUS ACCESSIBILE
===================================================== */

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline:
        2px solid var(--oro);

    outline-offset: 3px;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 700px) {

    .hero-interna {
        padding-top: 38px;
        padding-bottom: 35px;
    }

    .hero p {
        font-size: 16px;
    }

    .contenuto-principale {
        padding: 18px;
    }

    .scheda {
        box-shadow:
            0 3px 12px rgba(45,35,25,.06);
    }

    .breadcrumb {
        margin-bottom: 17px;
    }

    .campo:hover {
        background: transparent;
    }

}

/* =====================================================
   ALBERO - FRECCIA A SINISTRA
===================================================== */

.tree-riga {
    display: flex;
    align-items: center;
    width: 100%;
}

.tree-toggle {
    flex: 0 0 28px !important;

    width: 28px !important;
    height: 32px;

    padding: 0 !important;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
    line-height: 1;

    color: var(--rosso) !important;

    cursor: pointer;

    background: transparent !important;
}

.tree-toggle:hover {
    padding-left: 0 !important;
    background: rgba(125,32,39,.07) !important;
}

.tree-toggle-spazio {
    flex: 0 0 28px;

    width: 28px;
    height: 32px;
}

.tree-link {
    flex: 1;

    width: auto !important;

    padding: 8px 7px !important;
    margin: 0;

    min-width: 0;
}

.tree-children {
    display: none;
}

.tree-item.aperto > .tree-children {
    display: block;
}
html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;

    margin: 0;

    display: flex;
    flex-direction: column;
}

.layout {
    flex: 1 1 auto;
    min-height: 0;
}

.footer {
    position: static;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
}
