/*
 * HSI Site Control 1.2.4 — migrazione fedele del CSS footer ColorMag.
 * Questo foglio viene caricato SOLO quando il modulo footer_style e' abilitato
 * (Prova per l'amministratore / Attiva per tutti). Durante la transizione,
 * conservare il CSS originale nel Customizer fino al collaudo sul sito.
 * Il blocco seguente e' copiato INVARIATO dal CSS approvato al 06/11/2026.
 */

/*
 * HELPSYSTEM INFORMATICA
 * HSI FOOTER NAVIGATION - FULL WIDTH
 * ColorMag Pro | Responsive
 */

/* =========================================
   1. ESPANSIONE DEL CONTENITORE
========================================= */

/*
 * Espande i contenitori intermedi
 * che ospitano la navigazione footer.
 * Preserva il contenitore generale
 * del tema e la sua larghezza massima.
 */

#cm-footer :is(div, section):not(.cm-container)
:not(.cm-row):has(> nav.cm-footer-menu),

#cm-footer :is(div, section):not(.cm-container)
:not(.cm-row):has(> nav.cm-footer-nav) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
}

/* Contenitore effettivo del menu */
#cm-footer nav.cm-footer-menu,
#cm-footer nav.cm-footer-nav {
    display: block !important;

    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    flex: 1 1 100% !important;

    margin: 4px 0 8px !important;
    padding: 5px !important;

    background: linear-gradient(
        180deg,
        #354656 0%,
        #283541 100%
    ) !important;

    border: 1px solid #526a7e !important;
    border-top: 2px solid #2789c8 !important;
    border-radius: 10px !important;

    box-shadow:
        0 4px 12px rgba(0,0,0,.17),
        inset 0 1px 0 rgba(255,255,255,.09)
        !important;
}

/* =========================================
   2. DISPOSIZIONE A QUATTRO COLONNE
========================================= */

#cm-footer nav.cm-footer-menu > ul,
#cm-footer nav.cm-footer-nav > ul,
#cm-footer ul#cm-footer-menu {
    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;

    list-style: none !important;
}

/* =========================================
   3. CELLE DEL MENU
========================================= */

#cm-footer nav.cm-footer-menu > ul > li,
#cm-footer nav.cm-footer-nav > ul > li,
#cm-footer ul#cm-footer-menu > li {
    display: flex !important;
    align-items: stretch !important;

    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-left: 1px solid
        rgba(190,215,235,.23) !important;
}

#cm-footer nav.cm-footer-menu > ul > li:first-child,
#cm-footer nav.cm-footer-nav > ul > li:first-child,
#cm-footer ul#cm-footer-menu > li:first-child {
    border-left: 0 !important;
}

/* =========================================
   4. COLLEGAMENTI
========================================= */

#cm-footer nav.cm-footer-menu > ul > li > a,
#cm-footer nav.cm-footer-nav > ul > li > a,
#cm-footer ul#cm-footer-menu > li > a {
    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-height: 54px !important;

    padding: 12px 14px !important;

    color: #f4f8fc !important;
    background: transparent !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;

    text-align: center !important;
    text-decoration: none !important;

    border: 0 !important;
    border-radius: 6px !important;

    transition:
        background-color .2s ease,
        color .2s ease,
        box-shadow .2s ease !important;
}

/* =========================================
   5. HOVER
========================================= */

@media (hover: hover) {
    #cm-footer nav.cm-footer-menu > ul > li > a:hover,
    #cm-footer nav.cm-footer-nav > ul > li > a:hover,
    #cm-footer ul#cm-footer-menu > li > a:hover {
        background: #205779 !important;
        color: #ffffff !important;

        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.12)
            !important;
    }
}

/* =========================================
   6. ACCESSIBILITA'
========================================= */

#cm-footer nav.cm-footer-menu a:focus-visible,
#cm-footer nav.cm-footer-nav a:focus-visible,
#cm-footer ul#cm-footer-menu a:focus-visible {
    outline: 3px solid #f0bb48 !important;
    outline-offset: -3px !important;
    background: #205779 !important;
}

/* =========================================
   7. SPAZIATURA DELLA RIGA FOOTER
========================================= */

#cm-footer :is(
    .cm-footer-top-row,
    .cm-footer-main-row,
    .cm-footer-bottom-row
):has(nav.cm-footer-menu),
#cm-footer :is(
    .cm-footer-top-row,
    .cm-footer-main-row,
    .cm-footer-bottom-row
):has(nav.cm-footer-nav) {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

/* =========================================
   8. TABLET
========================================= */

@media (min-width: 641px) and (max-width: 900px) {
    #cm-footer nav.cm-footer-menu > ul > li > a,
    #cm-footer nav.cm-footer-nav > ul > li > a,
    #cm-footer ul#cm-footer-menu > li > a {
        font-size: 14px !important;
        padding: 12px 7px !important;
    }
}

/* =========================================
   9. SMARTPHONE
========================================= */

@media (max-width: 640px) {
    #cm-footer nav.cm-footer-menu > ul,
    #cm-footer nav.cm-footer-nav > ul,
    #cm-footer ul#cm-footer-menu {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
    }

    #cm-footer nav.cm-footer-menu > ul > li,
    #cm-footer nav.cm-footer-nav > ul > li,
    #cm-footer ul#cm-footer-menu > li {
        border-left: 0 !important;
    }

    #cm-footer nav.cm-footer-menu > ul > li:nth-child(even),
    #cm-footer nav.cm-footer-nav > ul > li:nth-child(even),
    #cm-footer ul#cm-footer-menu > li:nth-child(even) {
        border-left: 1px solid
            rgba(190,215,235,.23) !important;
    }

    #cm-footer nav.cm-footer-menu > ul > li:nth-child(n+3),
    #cm-footer nav.cm-footer-nav > ul > li:nth-child(n+3),
    #cm-footer ul#cm-footer-menu > li:nth-child(n+3) {
        border-top: 1px solid
            rgba(190,215,235,.23) !important;
    }

    #cm-footer nav.cm-footer-menu > ul > li > a,
    #cm-footer nav.cm-footer-nav > ul > li > a,
    #cm-footer ul#cm-footer-menu > li > a {
        min-height: 52px !important;
        padding: 11px 6px !important;
        font-size: 14px !important;
    }
}

/* =========================================
   10. MOVIMENTO RIDOTTO
========================================= */

@media (prefers-reduced-motion: reduce) {
    #cm-footer nav.cm-footer-menu a,
    #cm-footer nav.cm-footer-nav a,
    #cm-footer ul#cm-footer-menu a {
        transition: none !important;
    }
}


/*
 * Stile aggiuntivo del footer nativo facoltativo via shortcode.
 * Il footer ColorMag effettivo NON viene sostituito e mantiene i suoi link.
 */
body.hsi-sc-footer-style .hsi-sc-footer-native {
  box-sizing:border-box; width:100%; padding:5px; margin:4px 0 8px;
  background:linear-gradient(180deg,#354656 0%,#283541 100%);
  border:1px solid #526a7e; border-top:2px solid #2789c8; border-radius:10px;
}
body.hsi-sc-footer-style .hsi-sc-footer-native .hsi-sc-footer-list {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0;
  list-style:none; padding:0; margin:0; width:100%;
}
body.hsi-sc-footer-style .hsi-sc-footer-native .hsi-sc-footer-list > li {
  min-width:0; list-style:none; margin:0; border-left:1px solid rgba(190,215,235,.23);
}
body.hsi-sc-footer-style .hsi-sc-footer-native .hsi-sc-footer-list > li:first-child {border-left:0;}
body.hsi-sc-footer-style .hsi-sc-footer-native .hsi-sc-footer-list > li > a {
  display:flex; box-sizing:border-box; align-items:center; justify-content:center;
  text-align:center; min-height:54px; padding:12px 14px;
  font-size:15px; font-weight:600; line-height:1.4; font-family:inherit; color:#f4f8fc; text-decoration:none; border-radius:6px;
}
body.hsi-sc-footer-style .hsi-sc-footer-native a:hover {background:#205779;color:#fff;}
body.hsi-sc-footer-style .hsi-sc-footer-native a:focus-visible {outline:3px solid #f0bb48;outline-offset:-3px;}
@media(max-width:640px){
  body.hsi-sc-footer-style .hsi-sc-footer-native .hsi-sc-footer-list {grid-template-columns:repeat(2,minmax(0,1fr));}
  body.hsi-sc-footer-style .hsi-sc-footer-native .hsi-sc-footer-list > li:nth-child(odd){border-left:0;}
  body.hsi-sc-footer-style .hsi-sc-footer-native .hsi-sc-footer-list > li:nth-child(n+3){border-top:1px solid rgba(190,215,235,.23);}
  body.hsi-sc-footer-style .hsi-sc-footer-native .hsi-sc-footer-list > li > a {min-height:52px;padding:11px 6px;font-size:14px;}
}
