/* style.css - Versione con Testo Nero Forzato e Miglioramenti */
body {
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.7; /* Aumentata per migliore leggibilità dei paragrafi */
    margin: 0;
    padding: 0;
    background-color: #f0f0f0; /* Sfondo pagina grigio chiaro */
    color: #000000 !important; /* TESTO PRINCIPALE NERO FORZATO */
    font-size: 14pt;
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;  
}

.container {
    width: 85%; 
    max-width: 1100px; 
    margin: 30px auto; 
    overflow: hidden;
    padding: 25px 35px; 
    background-color: #e9e9e9; 
    box-shadow: 0 3px 18px rgba(0,0,0,0.12); 
    border-radius: 4px; 
}

header {
    background: #2c3e50; 
    color: #ffffff;
    padding: 20px 0; 
    min-height: 60px;
    border-bottom: #3498db 4px solid; 
}

header .container { 
    background-color: transparent;
    box-shadow: none;
    padding-left: 0; 
    padding-right: 0;
    margin-top: 0;
    margin-bottom: 0;
}

header a {
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.95em;
    padding: 5px 0;
    transition: color 0.3s ease; 
}

header ul {
    padding: 0;
    margin: 0;
    list-style: none;
    text-align: center; 
}

header #branding {
    float: left;
    margin-top: 0; 
}

header #branding h1 {
    margin: 0;
    font-size: 2.4em; 
    color: #ffffff; 
    font-weight: bold;
    line-height: 1.1; 
}

header #branding h1 .haquaris-term { 
    color: #ffffff; 
}


header nav {
    float: right;
    margin-top: 10px; 
}

header nav li {
    float: left;
    display: inline;
    padding: 0 18px; 
}

header nav a.current, 
header nav a:hover {
    color: #5dade2; 
    border-bottom: 3px solid #5dade2; 
    padding-bottom: 5px; 
}

/* Titoli nel corpo del testo */
.main-content h1 {
    color: #2980b9 !important; 
    font-size: 2em; 
    border-bottom: 2px solid #bdc3c7; 
    padding-bottom: 12px;
    margin-top: 10px; 
    margin-bottom: 30px; 
}

.main-content h2 {
    color: #3498db !important; 
    font-size: 1.6em;
    margin-top: 35px;
    margin-bottom: 18px;
    border-bottom: 1px dashed #ccc; 
    padding-bottom: 8px;
}

.main-content h3 {
    color: #2c3e50 !important; 
    font-size: 1.3em;
    margin-top: 30px;
    margin-bottom: 12px;
}

.main-content p, .main-content li {
    margin-bottom: 1.2em; 
    text-align: justify; 
    color: #000000 !important; /* Testo dei paragrafi e liste NERO FORZATO */
    font-size: 1em; 
}

.main-content ul {
    list-style-type: square; 
    padding-left: 30px; 
    margin-bottom: 1.2em;
}
.main-content ul li {
    margin-bottom: 0.7em;
}


.box { 
    background-color: #e4f1fe; 
    border-left: 6px solid #3498db; 
    padding: 18px 25px;
    margin: 30px 0;
    font-style: italic;
    border-radius: 3px;
    color: #1c2833 !important; /* Testo scuro FORZATO nel box per leggibilità */
}

.box-formula { 
    background-color: #e8f8f5; 
    border: 1px solid #a3e4d7; 
    padding: 20px;
    margin: 30px 0;
    text-align: center;
    overflow-x: auto; 
    border-radius: 3px;
    color: #000000 !important; /* Formule nere */
}

/* Forza il colore delle formule MathJax se necessario */
mjx-container {
    color: #000000 !important;
    fill: #000000 !important; /* Per SVG output */
}
mjx-container svg path {
    stroke: #000000 !important; /* Per alcuni elementi SVG */
}


footer {
    padding: 25px;
    margin-top: 40px;
    color: #bdc3c7; 
    background-color: #2c3e50; 
    text-align: center;
    border-top: #3498db 5px solid; 
    font-size: 0.9em;
}

footer p {
    margin: 8px 0;
    color: #bdc3c7; 
}

.lettrine {
    float: left;
    font-size: 4.8em; 
    line-height: 0.75em; 
    margin-top: 0.1em; 
    margin-right: 0.1em;
    margin-bottom: 0.05em; 
    color: #2980b9 !important; 
    font-weight: bold;
}

.haquaris-term { 
    font-weight: bold;
    color: #1a5276 !important; 
}
.haquaris-term-italic { 
    font-style: italic;
    font-weight: bold;
    color: #1a5276 !important; 
}

.main-content a {
    color: #2980b9 !important; 
    text-decoration: none;
    font-weight: bold; 
    transition: color 0.3s ease;
}

.main-content a:hover {
    color: #5dade2 !important; 
    text-decoration: underline;
}

@media(max-width: 768px){
    header #branding,
    header nav,
    header nav li {
        float: none;
        text-align: center;
        width: 100%;
    }

    header #branding h1 {
        font-size: 1.8em; 
        margin-bottom: 10px; 
    }

    header nav ul {
        margin-top:10px;
    }
    header nav li {
        padding: 8px 0; 
        display: block; 
        border-bottom: 1px solid #34495e; 
    }
    header nav li:last-child {
        border-bottom: none;
    }
    header nav a.current, 
    header nav a:hover {
        border-bottom: none; 
        background-color: #34495e; 
        display: block;
        padding-top: 8px; 
        padding-bottom: 8px;
    }

    .container {
        width: 95%;
        padding: 15px;
    }
    
    .lettrine {
        font-size: 3.8em; 
    }

    .main-content h1 { font-size: 1.7em; } 
    .main-content h2 { font-size: 1.45em; }
    .main-content h3 { font-size: 1.2em; }
    .main-content p, .main-content ul li {
        text-align: left; 
    }
}