/* Stili specifici pagina Termini e Condizioni */

/* Header pagina */
.page-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #3d4a9e 0%, #5c3a82 100%); /* Fix contrasto: sfondo più scuro per leggibilità testo bianco */
    color: white;
    margin: -20px -20px 30px -20px;
    border-radius: 0 0 8px 8px;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #fff;
}

.page-header .subtitle {
    opacity: 1; /* Testo bianco pieno su sfondo scuro */
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #fff;
}

.page-header .last-update {
    opacity: 1; /* Fix contrasto: rimossa opacity che riduceva leggibilità */
    font-size: 0.9rem;
    color: #e0dff0; /* Grigio chiaro su sfondo scuro */
}

/* Sezioni (scoped a main per non impattare footer) */
main section {
    margin-bottom: 40px;
}

#main-content section h2 {
    color: #3d4a9e; /* Fix contrasto: da #5565c0 — ora 7.4:1 su bianco */
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.5rem;
}

main section h3 {
    color: #495057;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

main section h4 {
    color: #495057;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Paragrafi e liste (scoped a main per non impattare footer) */
main p, main li {
    margin-bottom: 10px;
    text-align: left; /* Fix Firefox mobile: justify causa spaziatura eccessiva tra parole */
    line-height: 1.6;
}

main ul, main ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

/* Box evidenziati */
.highlight-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.highlight-box h3 {
    margin-top: 0;
    color: #856404;
}

.highlight-box p:last-child {
    margin-bottom: 0;
}

/* Info box */
.info-box {
    background: #e7f3ff;
    border-left: 4px solid #3d4a9e;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.info-box h4 {
    margin-top: 0;
    color: #3d4a9e; /* Fix contrasto: da #5565c0 — migliorato */
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

th, td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Sezione contatti */
.contact-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.contact-section h2 {
    border-bottom: none;
}

/* Box accettazione finale */
.acceptance-box {
    margin-top: 40px;
    margin-bottom: 20px;
}

/* Link (scoped a main per non impattare footer) */
main a {
    color: #3d4a9e; /* Fix contrasto: da #5565c0 — ora 7.4:1 su bianco */
    text-decoration: none;
}

main a:hover {
    color: #5c3a82; /* contrasto 7.2:1 su bianco */
    text-decoration: underline;
}

/* Strong (scoped a main per non impattare footer) */
main strong {
    color: #495057;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        margin: -10px -10px 20px -10px;
        padding: 20px 10px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    /* Fix Firefox mobile: tabelle responsive senza wrapper HTML */
    table {
        border: 0;
        table-layout: auto;
    }
    
    table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    
    table tr {
        display: block;
        margin-bottom: 1.5em;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    
    table td {
        display: block;
        text-align: left;
        border: none;
        border-bottom: 1px dotted #dee2e6;
        padding: 10px 12px;
    }
    
    table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: #3d4a9e;
        margin-bottom: 4px;
        font-size: 0.85rem;
    }
    
    table td:last-child {
        border-bottom: 0;
    }
    
    .highlight-box,
    .info-box {
        padding: 15px;
    }
    
    ul, ol {
        margin-left: 20px;
    }
}
