/*
 * Sezione Risorse. Il grosso lo fanno i componenti del tema (section-title,
 * statistic, fbox-11, comp-table, accordion, banner-1): qui solo quello che
 * il tema non ha. Si carica con CUSTOM_CSS "risorse.css".
 */

.risorse-percorso a {
    color: #5f7d1f;
}

/* Spazio tra le righe di schede */
.risorse-schede > .col {
    margin-bottom: 40px;
}

/* Le schede della pagina indice sono card cliccabili per intero */
.risorse-scheda-link {
    position: relative;
    height: 100%;
    padding: 32px 28px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.risorse-scheda-link:hover {
    transform: translateY(-4px);
}
.risorse-scheda-link h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

/* Testo lungo dentro le sezioni */
.risorse-testo p,
.risorse-testo li {
    font-size: 1.1rem;
    line-height: 1.7;
}
.risorse-testo a:not(.btn) {
    color: #5f7d1f;
    text-decoration: underline;
}

.risorse-conteggio {
    margin-left: 10px;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
}

/* Tabelle: quelle del tema (comp-table), allineate a sinistra */
.risorse-tabella tbody tr {
    scroll-margin-top: 110px;
}
.risorse-tabella table {
    text-align: left;
}
.risorse-tabella th[scope="row"],
.risorse-tabella td.risorse-codice {
    font-weight: 700;
    white-space: nowrap;
}
.risorse-tabella tr:target td,
.risorse-tabella tr:target th {
    background: #eef4df;
}
.risorse-etichetta {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #eef1f4;
    color: #353f4f;
    white-space: nowrap;
}
.risorse-etichetta--avviso {
    background: #fdf3d8;
    color: #7a5a00;
}
.risorse-etichetta--dop {
    background: #eef4df;
    color: #4a6318;
}

.risorse-fonte {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

/* Sul telefono ogni riga della tabella diventa una scheda */
@media (max-width: 767px) {
    .risorse-tabella thead {
        display: none;
    }
    .risorse-tabella table,
    .risorse-tabella tbody,
    .risorse-tabella tr,
    .risorse-tabella th,
    .risorse-tabella td {
        display: block;
        width: 100% !important;
    }
    .risorse-tabella tr {
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        margin-bottom: 12px;
        padding: 6px 0;
        background: #fff;
    }
    .risorse-tabella th,
    .risorse-tabella td {
        border: 0 !important;
        padding: 6px 16px !important;
        white-space: normal !important;
    }
    .risorse-tabella.comp-table .table-responsive tbody th,
    .risorse-tabella.comp-table .table-responsive tbody td {
        border-bottom: 0 !important;
    }
    .risorse-tabella [data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: #9ca3af;
    }
}

/* Le domande della tabella sono frasi: vanno a capo */
.risorse-tabella th.risorse-domanda {
    white-space: normal;
}

/* Il tema dà alla prima colonna un bordo di 1px (con !important) e alle
   altre di 2px: nelle nostre tabelle la linea deve essere una sola, quindi
   si portano le altre a 1px invece di combattere l'!important */
.risorse-tabella.comp-table .table tbody tr td {
    border-bottom-width: 1px;
}
