/* risorse-ai.css — stili locali per la pagina risorse AI */

/* ── Allarga il box contenitore solo per questa pagina ── */
main {
    max-width: 1200px !important;
}

/* ── Wrapper con scroll orizzontale di sicurezza ── */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Tabella base ── */
.resource-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    line-height: 1.35;
    margin-bottom: 1.5rem;
    table-layout: fixed;
}

/* Larghezze colonne fisse per controllare l'overflow */
.resource-table colgroup col:nth-child(1) { width: 14%; }  /* Sito */
.resource-table colgroup col:nth-child(2) { width: 10%; }  /* Link */
.resource-table colgroup col:nth-child(3) { width: 22%; }  /* Bambini */
.resource-table colgroup col:nth-child(4) { width: 14%; }  /* Gratis/Comm */
.resource-table colgroup col:nth-child(5) { width: 40%; }  /* Commenti */

.resource-table th,
.resource-table td {
    padding: 0.4rem 0.55rem;
    text-align: left;
    vertical-align: top;
    border: 1px solid #ddd;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Intestazioni colonne */
.resource-table tr.col-header th {
    background-color: #2c3e50;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Righe di sezione */
.resource-table tr.section-header td {
    background-color: #3498db;
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.55rem;
}

/* Righe alternate */
.resource-table tbody tr:not(.section-header):not(.col-header):nth-child(even) td {
    background-color: #f4f8fb;
}

.resource-table tbody tr:not(.section-header):not(.col-header):hover td {
    background-color: #eaf3fb;
}

/* Link colonna 2: compatta */
.resource-table td:nth-child(2) {
    font-size: 0.78rem;
    word-break: break-all;
}

@media (max-width: 900px) {
    main { max-width: 100% !important; }
    .resource-table { font-size: 0.75rem; table-layout: auto; }
    .resource-table colgroup col { width: auto !important; }
}
