/* Green Network – stili comuni (restyling fase 2, direzione A "istituzionale").
   Solo tema chiaro, font di sistema, nessuna risorsa esterna. */

:root {
    --gn-green: #0C4C3B;      /* verde istituzionale, 9,9:1 su bianco */
    --gn-green-dk: #083A2D;
    --gn-orange: #E84915;     /* arancio del logo: solo elementi grafici (3,9:1 su bianco) */
    --gn-orange-tx: #B8400F;  /* arancio scurito per il testo dei link, 5,6:1 su bianco */
    --gn-ink: #1B2420;
    --gn-soft: #55615C;       /* testo secondario, 6,4:1 su bianco */
    --gn-rule: #D9E1DD;
    --gn-tint: #F2F6F4;
    --gn-font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: var(--gn-ink);
    font-family: var(--gn-font);
    font-size: 1rem;
    line-height: 1.6;
}

img, svg {
    max-width: 100%;
}

a {
    color: var(--gn-green);
}

    a:focus-visible {
        outline: 3px solid var(--gn-orange-tx);
        outline-offset: 2px;
        border-radius: 2px;
    }

/* Larghezza comune a testata, contenuto e footer: tutto allineato sugli stessi margini. */
.wrap {
    width: 100%;
    max-width: 64rem;
    margin-inline: auto;
    padding-inline: 2rem;
}

@media (max-width: 40rem) {
    .wrap {
        padding-inline: 1rem;
    }
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Immagine di testata (solo home, a tutta larghezza) ---------- */

.hero img {
    display: block;
    width: 100%;
    height: clamp(6.5rem, 16vw, 13rem);
    object-fit: cover;
    object-position: center 55%;
}

/* ---------- Pagine ---------- */

.page-content {
    width: 100%;
    max-width: 64rem;
    margin-inline: auto;
    padding: 2rem 2rem 3rem;
}

@media (max-width: 40rem) {
    .page-content {
        padding: 1.5rem 1rem 2.25rem;
    }
}

.page-content h1 {
    margin: 0 0 1.5rem;
    color: var(--gn-ink);
    font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.4rem);
    line-height: 1.2;
    text-wrap: balance;
}

    .page-content h1::after {
        content: "";
        display: block;
        width: 3.5rem;
        height: 4px;
        margin-top: 0.75rem;
        background: var(--gn-orange);
    }

.page-content .subtitle {
    margin: -0.25rem 0 1.75rem;
    color: var(--gn-soft);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
}

.breadcrumb-gn {
    margin: 0 0 0.625rem;
    color: var(--gn-soft);
    font-size: 0.875rem;
}

    .breadcrumb-gn a {
        text-underline-offset: 3px;
    }

/* Testo giustificato su tutta la larghezza della pagina, con sillabazione italiana (html lang="it").
   Sotto i 40rem torna allineato a sinistra: su colonne strette la giustificazione crea spazi vistosi. */
.page-text {
    font-size: clamp(1rem, 0.94rem + 0.25vw, 1.125rem);
    line-height: 1.65;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}

@media (max-width: 40rem) {
    .page-text {
        text-align: left;
    }
}

    .page-text p,
    .page-text ul {
        margin: 0 0 1em;
    }

    .page-text h2 {
        margin: 2rem 0 0.75rem;
        color: var(--gn-green);
        font-size: 1.15rem;
        line-height: 1.35;
        text-align: left;
        hyphens: manual;
    }

        .page-text h2.sect {
            font-size: 0.9rem;
            letter-spacing: 0.08em;
        }

    .page-text h3 {
        margin: 1.5rem 0 0.5rem;
        color: var(--gn-ink);
        font-size: 1rem;
        text-align: left;
        hyphens: manual;
    }

    .page-text a {
        color: var(--gn-orange-tx);
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
    }

        .page-text a:hover {
            text-decoration-thickness: 2px;
        }

    /* L'URL lungo si spezza in qualsiasi punto: altrimenti nel testo giustificato la riga precedente si "stira". */
    .page-text .url {
        word-break: break-all;
        hyphens: none;
    }

    .page-text .signature {
        margin-top: 2.5rem;
    }

    .page-text .meta {
        color: var(--gn-soft);
        font-size: 0.875rem;
    }

/* ---------- Elenco documenti della procedura (card per nota di deposito) ---------- */

.documenti {
    display: grid;
    gap: 1rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

    .documenti > li {
        border: 1px solid var(--gn-rule);
        border-radius: 6px;
        overflow: hidden;
    }

    .documenti ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

.doc {
    display: grid;
    grid-template-columns: 26px 7.25rem minmax(0, 1fr) auto;
    grid-template-areas: "ico lab tit pes";
    gap: 0.25rem 1rem;
    align-items: center;
    padding: 0.875rem 1.125rem;
    color: var(--gn-ink);
    text-decoration: none;
}

    .doc:hover {
        background: #FAFCFB;
    }

    .doc img {
        grid-area: ico;
        width: 26px;
        height: 32px;
    }

    .doc .etichetta {
        grid-area: lab;
        font-variant-numeric: tabular-nums;
    }

    .doc .titolo {
        grid-area: tit;
        color: var(--gn-orange-tx);
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
    }

    .doc:hover .titolo {
        text-decoration-thickness: 2px;
    }

    .doc .peso {
        grid-area: pes;
        color: var(--gn-soft);
        font-size: 0.875rem;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }

    .doc.nota {
        background: var(--gn-tint);
    }

        .doc.nota .etichetta {
            color: var(--gn-green);
            font-weight: 700;
        }

        .doc.nota .titolo {
            font-weight: 600;
        }

    .doc.allegato {
        border-top: 1px solid var(--gn-rule);
    }

        .doc.allegato img {
            width: 20px;
            height: 25px;
            justify-self: center;
        }

        .doc.allegato .etichetta {
            color: var(--gn-soft);
            font-size: 0.875rem;
        }

@media (max-width: 40rem) {
    .doc {
        grid-template-columns: 26px minmax(0, 1fr);
        grid-template-areas: "ico lab" "ico tit" "ico pes";
        align-items: start;
        padding: 0.75rem 0.875rem;
    }

        .doc img {
            margin-top: 2px;
        }

        .doc .etichetta {
            font-size: 0.8125rem;
        }
}
