/* Stili specifici pagina Cookie Policy */

/* 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 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;
}

/* 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 {
    margin-left: 30px;
    margin-bottom: 15px;
}

/* Cookie Category Boxes */
.cookie-category {
    background: #e7f3ff;
    border-left: 4px solid #3d4a9e;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.cookie-category h3 {
    margin-top: 0;
    color: #3d4a9e; /* Fix contrasto: da #5565c0 — migliorato su #e7f3ff */
}

.cookie-category p:last-of-type {
    margin-bottom: 15px;
}

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

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

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

.cookie-table tr:nth-child(even) {
    background: #f8f9fa;
}

.cookie-table tbody tr:hover {
    background: #e7f3ff;
}

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

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

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

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

/* 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;
}

/* Evidenziazione sezione da anchor link */
.anchor-highlight {
    background-color: #fff3cd;
}

/* 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 */
    .cookie-table {
        border: 0;
        table-layout: auto;
    }
    
    .cookie-table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    
    .cookie-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);
    }
    
    .cookie-table td {
        display: block;
        text-align: left;
        border: none;
        border-bottom: 1px dotted #dee2e6;
        padding: 10px 12px;
    }
    
    .cookie-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: #3d4a9e;
        margin-bottom: 4px;
        font-size: 0.85rem;
    }
    
    .cookie-table td:last-child {
        border-bottom: 0;
    }
    
    .cookie-category,
    .info-box {
        padding: 15px;
    }
    
    ul {
        margin-left: 20px;
    }
}
