/* --- VARIABILI E COLORI ISTITUTO EUROPA --- */
:root {
    --primary-color: #0b1d51;
    --accent-color: #ffcc00;
    --bg-color: #f7fafc;
    --text-color: #2d3748;
}

body.push-body {
    background-color: var(--bg-color) !important;
    color: var(--text-color);
    font-family: 'Titillium Web', sans-serif;
}

/* --- 1. HEADER PRINCIPALE: BLU ISTITUZIONALE --- */
#main-wrapper header, 
.push_container header,
.head-wrapper, 
div[class*="header"] {
    background-color: #0b1d51 !important;
}

#main-header.bg-white, 
#main-header {
    background-color: #0b1d51 !important;
}

/* --- 2. BARRA SUPERIORE MINISTERO (FORZATURA PURA VIA ID) --- */
#pre-header {
    background-color: #334155 !important;
    color: #ffffff !important;
    border: none !important;
}

#pre-header * {
    color: #ffffff !important;
    background-color: transparent !important;
}

/* --- 3. TESTI E LINK NELL'HEADER PRINCIPALE --- */
#main-wrapper header h1,
#main-wrapper header h2,
#main-wrapper header h3,
#main-wrapper header p,
#main-wrapper header span,
#main-wrapper header a,
.head-wrapper h1, .head-wrapper p, .head-wrapper span, .head-wrapper a {
    color: #ffffff !important;
}

/* Effetto Hover Link Istituzionale */
#main-wrapper header a:hover,
.head-wrapper a:hover {
    color: #ffcc00 !important;
    text-decoration: underline;
}

/* --- 4. GESTIONE PULITA DI LOGHI E ICONE NELL'HEADER --- */
#main-wrapper header img,
#main-wrapper header svg,
.head-wrapper img,
.head-wrapper svg {
    filter: brightness(0) invert(1) !important;
    opacity: 1 !important;
}

.header-user-icon svg, 
#main-wrapper .utility-bar .icon-user svg {
    color: #e0e0e0 !important;
    filter: none !important;
}

/* --- ACCENTO OCRA PER IL NOME DELLA SCUOLA NELL'HEADER (FORZATURA) --- */
#main-wrapper header h1 strong,
#main-wrapper header .h1 strong,
.head-wrapper h1 strong,
.head-wrapper .h1 strong {
    color: var(--accent-color) !important;
}

/* --- 5. TIPOGRAFIA GENERALE DELLA PAGINA --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Titillium Web', sans-serif;
    color: var(--primary-color);
}

p {
    font-family: 'Lora', serif;
    color: var(--text-color);
}

/* --- CORPO CENTRALE: PERSONALIZZAZIONE INDEX --- */

/* 1. Jumbotron di Benvenuto */
main .p-5.bg-light {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

main .p-5.bg-light h1 {
    color: var(--primary-color) !important;
    font-weight: 700;
}

/* 2. Bottoni Principali (Registro e PDP) */
main .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    transition: all 0.2s ease-in-out;
}

main .btn-primary:hover {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* 3. Box Affiancati (Offerta Formativa e Notizie) */
main .bg-white.border {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

main .bg-white.border:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(11, 29, 81, 0.1);
    border-color: var(--primary-color) !important;
}

main .bg-white.border h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Bottoni interni ai box */
main .btn-outline-dark {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

main .btn-outline-dark:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* --- TIPOGRAFIA COERENTE CORPO CENTRALE --- */

/* Tutti i titoli usano Titillium Web (San-Serif) */
main h1, main h2, main h3, main h4, main h5, main h6 {
    font-family: 'Titillium Web', sans-serif !important;
}

/* Tutti i paragrafi e i testi descrittivi usano Lora (Serif) */
main p, main span.fs-4, main .col-md-8 {
    font-family: 'Lora', serif !important;
}

/* I bottoni e i link di navigazione mantengono Titillium per chiarezza */
main .btn {
    font-family: 'Titillium Web', sans-serif !important;
}

/* --- BLINDATURA DEFINITIVA STATI BOTTONI (HOVER OTRA & FOCUS COERENTE) --- */

/* Bottone Primario (pieno): parte blu, al passaggio del mouse diventa ocra */
main .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    transition: all 0.2s ease-in-out !important;
}

main .btn-primary:hover,
main .btn-primary:focus {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--primary-color) !important;
}

/* Bottone Outline (secondario/bianco): parte bianco/trasparente con bordo, al passaggio del mouse diventa ocra */
main .btn-outline-secondary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent !important;
    transition: all 0.2s ease-in-out !important;
}

main .btn-outline-secondary:hover,
main .btn-outline-secondary:focus {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--primary-color) !important;
}

/* --- BLINDATURA BOX AFFIANCATI E BOTTONI INTERNI --- */

/* Struttura dei box principali */
main .row.align-items-md-stretch .bg-white.border {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

/* Effetto al passaggio del mouse sui box */
main .row.align-items-md-stretch .bg-white.border:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(11, 29, 81, 0.1) !important;
    border-color: var(--primary-color) !important;
}

/* Tipografia interna ai box */
main .row.align-items-md-stretch .bg-white.border h2 {
    font-family: 'Titillium Web', sans-serif !important;
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

main .row.align-items-md-stretch .bg-white.border p {
    font-family: 'Lora', serif !important;
    color: var(--text-color) !important;
}

/* Uniformiamo anche i bottoni all'interno dei box con la regola dell'ocra al passaggio del mouse */
main .row.align-items-md-stretch .btn-outline-dark {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent !important;
    transition: all 0.2s ease-in-out !important;
}

main .row.align-items-md-stretch .btn-outline-dark:hover,
main .row.align-items-md-stretch .btn-outline-dark:focus {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--primary-color) !important;
}

/* --- BLINDATURA FOOTER ISTITUZIONALE --- */

footer, 
.footer-wrapper,
#main-footer {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-family: 'Titillium Web', sans-serif !important;
    border-top: 4px solid var(--accent-color) !important;
    padding: 2.5rem 0;
    margin-top: 3rem;
}

footer h5, footer h6, footer strong {
    font-family: 'Titillium Web', sans-serif !important;
    color: var(--accent-color) !important;
    font-weight: 600;
}

footer p, footer span, footer li {
    font-family: 'Lora', serif !important;
    color: #e2e8f0 !important;
    font-size: 0.95rem;
}

footer a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.2s ease-in-out;
}

footer a:hover {
    color: var(--accent-color) !important;
    text-decoration: underline !important;
}


/* --- RESistenZA ZERO: SOVRASCRITTURA VARIABILI NATIVE DEL DROPDOWN --- */
.dropdown-menu {
    --bs-dropdown-link-color: var(--primary-color) !important;
    --bs-dropdown-link-hover-color: var(--accent-color) !important;
    --bs-dropdown-link-hover-bg: rgba(11, 29, 81, 0.04) !important;
}

/* Forzatura estrema su qualsiasi testo o link nel sottomenu */
.dropdown-menu a,
.dropdown-menu .list-item,
.dropdown-menu span,
.dropdown-menu div {
    color: var(--primary-color) !important;
}

.dropdown-menu a:hover,
.dropdown-menu .list-item:hover {
    color: var(--accent-color) !important;
}