/* =====================================================================
   MCS & C. - Ottimizzazione mobile + correzioni desktop (home)
   Versione 1.0 - 2026-10-29
   Caricato per ultimo: non modifica i file del tema, li corregge.
   ===================================================================== */

:root {
    --mcs-navy: #08294f;
    --mcs-navy-deep: #061b34;
    --mcs-teal: #087a7c;
    --mcs-teal-2: #0c9691;
    --mcs-orange: #e88708;
    --mcs-ink: #17263a;
    --mcs-muted: #4a5a6e;
    --mcs-line: #d8e3ee;
    --mcs-soft: #f3f8fc;
    --mcs-header-h: 100px;
    --mcs-bar-h: 64px;
}
@media (max-width: 991px) {
    :root { --mcs-header-h: 64px; }
}

/* ---------------------------------------------------------------------
   1. HEADER
   --------------------------------------------------------------------- */
#header { height: auto !important; }

/* Spazio sotto l'header fisso: un solo valore, niente doppi margini */
body.one-page .main#home { padding-top: var(--mcs-header-h); }
body.one-page .mcs-home-slider-viewport,
body.one-page .forcefullwidth_wrapper_tp_banner {
    margin-top: 0 !important;
}
/* Lo slider prende l'altezza reale dell'immagine (niente bande vuote) */
body.one-page .mcs-home-slider-viewport {
    height: auto !important;
    min-height: 0 !important;
}

/* Desktop stretto (992-1199): le 8 voci di menu stanno su una riga */
@media (min-width: 992px) and (max-width: 1199px) {
    #header .header-nav-main nav > ul > li > a {
        font-size: 11px !important;
        padding-left: 7px !important;
        padding-right: 7px !important;
        letter-spacing: 0 !important;
    }
    #header .header-logo img { max-height: 46px !important; }
}

@media (max-width: 991px) {
    #header .header-container,
    #header .header-row { min-height: 64px !important; height: 64px; }
    #header .header-body { min-height: 0 !important; }
    #header .header-logo img { max-height: 38px !important; height: 38px; }

    /* Pulsante menu: area di tocco 44x44 */
    #header .header-btn-collapse-nav {
        width: 44px;
        height: 44px;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 10px !important;
        background: var(--mcs-teal) !important;
        color: #fff !important;
        font-size: 18px !important;
        line-height: 44px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Menu aperto: pannello scorrevole, voci grandi e leggibili */
    #header .header-nav-main nav {
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #header .header-nav-main nav > ul {
        padding: 8px 0 14px !important;
        background: var(--mcs-navy-deep) !important;
    }
    #header .header-nav-main nav > ul li { border-bottom: 1px solid rgba(255,255,255,.08) !important; }
    #header .header-nav-main nav > ul li:last-child { border-bottom: 0 !important; }
    #header .header-nav-main nav > ul li a {
        font-size: 15px !important;
        font-weight: 600 !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        padding: 14px 20px !important;
        line-height: 1.3 !important;
        color: #fff !important;
        background: transparent !important;
    }
    #header .header-nav-main nav > ul li a.active { color: #7fd6d3 !important; }
    /* Sottomenu sempre visibile su mobile (prima "Infrastructure Care" era irraggiungibile) */
    #header .header-nav-main nav > ul li.dropdown .dropdown-menu {
        display: block !important;
        position: static !important;
        float: none !important;
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
        margin: 0 !important;
        padding: 0 0 6px !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    #header .header-nav-main nav > ul li.dropdown .dropdown-menu li { border: 0 !important; }
    #header .header-nav-main nav > ul li.dropdown .dropdown-menu li a {
        padding: 10px 20px 10px 36px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        opacity: .85;
    }
    #header .header-nav-main nav > ul li.dropdown > a:after,
    #header .header-nav-main nav > ul li .dropdown-mobile-toggle { display: none !important; }
}

/* ---------------------------------------------------------------------
   2. HERO MOBILE (sostituisce lo slider sotto i 992px)
   --------------------------------------------------------------------- */
.mcs-m-hero { display: none; }

@media (max-width: 991px) {
    body.one-page .mcs-home-slider-viewport,
    body.one-page .forcefullwidth_wrapper_tp_banner { display: none !important; }

    .mcs-m-hero {
        display: block;
        padding: 28px 0 30px;
        background:
            radial-gradient(circle at 90% 0%, rgba(8,122,124,.35), transparent 45%),
            linear-gradient(160deg, var(--mcs-navy-deep) 0%, var(--mcs-navy) 60%, #0b4a6b 100%);
        color: #fff;
    }
    .mcs-m-hero .container { padding-left: 18px; padding-right: 18px; }
    .mcs-m-eyebrow {
        margin: 0 0 10px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #f6b45c;
    }
    .mcs-m-hero h2 {
        margin: 0 0 12px;
        color: #fff;
        font-size: 27px;
        line-height: 1.18;
        font-weight: 800;
        letter-spacing: -.01em;
    }
    .mcs-m-hero h2 span { color: #7fd6d3; }
    .mcs-m-lead {
        margin: 0 0 20px;
        font-size: 16px;
        line-height: 1.55;
        color: rgba(255,255,255,.86);
    }
    .mcs-m-actions { display: grid; gap: 10px; }
    @media (min-width: 576px) {
        .mcs-m-actions { grid-template-columns: 1fr 1fr; }
    }

    .mcs-m-services {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 26px;
    }
    @media (min-width: 680px) {
        .mcs-m-services { grid-template-columns: repeat(3, 1fr); }
    }
    .mcs-m-tile {
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-height: 112px;
        padding: 14px 13px 13px;
        border-radius: 14px;
        background: rgba(255,255,255,.08);
        border: 1px solid rgba(255,255,255,.16);
        color: #fff !important;
        text-decoration: none !important;
        transition: background .15s ease;
    }
    .mcs-m-tile:active,
    .mcs-m-tile:hover { background: rgba(255,255,255,.15); }
    .mcs-m-tile i {
        font-size: 20px;
        line-height: 1;
        color: #7fd6d3;
    }
    .mcs-m-tile strong {
        font-size: 14.5px;
        line-height: 1.25;
        font-weight: 700;
    }
    .mcs-m-tile span {
        font-size: 12.5px;
        line-height: 1.4;
        color: rgba(255,255,255,.75);
    }
    .mcs-m-tile.is-primary {
        background: var(--mcs-teal);
        border-color: var(--mcs-teal);
    }
    .mcs-m-tile.is-primary i,
    .mcs-m-tile.is-primary span { color: rgba(255,255,255,.92); }
}

/* Pulsanti condivisi dai nuovi blocchi */
.mcs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    border: 2px solid transparent;
    transition: transform .1s ease, background .15s ease;
}
.mcs-btn:active { transform: translateY(1px); }
.mcs-btn-primary { background: var(--mcs-teal); color: #fff !important; box-shadow: 0 10px 24px rgba(8,122,124,.28); }
.mcs-btn-primary:hover { background: var(--mcs-teal-2); }
.mcs-btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.55); }
.mcs-btn-outline { background: #fff; color: var(--mcs-navy) !important; border-color: var(--mcs-navy); }

/* ---------------------------------------------------------------------
   3. SEZIONI PANDA / FIREWALL: versione HTML leggibile su mobile
   --------------------------------------------------------------------- */
.mcs-m-feature { display: none; }

@media (max-width: 991px) {
    .mcs-panda-image-wrap,
    .mcs-firewall-image-wrap { display: none !important; }

    .mcs-panda-image-final,
    .mcs-firewall-image-final { padding: 0 !important; background: #fff; }
    .mcs-firewall-image-final { background: var(--mcs-soft) !important; }

    .mcs-m-feature {
        display: block;
        padding: 40px 0 38px;
        text-align: left;
        line-height: 1.5;
    }
    .mcs-m-feature .container { padding-left: 18px; padding-right: 18px; text-align: left; }
    .mcs-m-feature .mcs-m-eyebrow { color: var(--mcs-teal); }
    .mcs-m-feature h2 {
        margin: 0 0 6px;
        font-size: 28px;
        line-height: 1.12;
        font-weight: 800;
        color: var(--mcs-navy);
        letter-spacing: -.01em;
    }
    .mcs-m-feature .mcs-m-sub {
        margin: 0 0 12px;
        font-size: 17px;
        line-height: 1.35;
        font-weight: 700;
        color: var(--mcs-teal);
    }
    .mcs-m-feature p { font-size: 15.5px; line-height: 1.6; color: var(--mcs-muted); margin: 0 0 16px; }
    .mcs-m-visual {
        display: block;
        width: 100%;
        height: auto !important;
        aspect-ratio: 21 / 20;
        object-fit: cover;
        object-position: 100% 50%;
        border-radius: 14px;
        margin: 4px 0 18px;
        background: #eef5fb;
        box-shadow: 0 12px 30px rgba(6,27,52,.10);
    }
    .mcs-m-points { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
    .mcs-m-points li {
        display: grid;
        grid-template-columns: 40px 1fr;
        gap: 12px;
        align-items: center;
        padding: 12px;
        border-radius: 12px;
        background: #eaf3fa;
        font-size: 14.5px;
        line-height: 1.45;
        color: var(--mcs-ink);
    }
    .mcs-firewall-image-final .mcs-m-points li { background: #fff; border: 1px solid var(--mcs-line); }
    .mcs-m-points li i {
        width: 40px; height: 40px;
        border-radius: 10px;
        display: inline-flex; align-items: center; justify-content: center;
        background: var(--mcs-navy); color: #fff; font-size: 17px;
    }
    .mcs-m-points li:nth-child(2) i { background: var(--mcs-teal); }
    .mcs-m-points strong { color: var(--mcs-navy); }
    .mcs-m-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
    .mcs-m-chips li {
        font-size: 12.5px;
        font-weight: 600;
        padding: 6px 10px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid var(--mcs-line);
        color: var(--mcs-navy);
    }
    .mcs-m-feature .mcs-m-actions { display: grid; gap: 10px; }
    @media (min-width: 576px) {
        .mcs-m-feature .mcs-m-actions { grid-template-columns: 1fr 1fr; }
    }
}

/* ---------------------------------------------------------------------
   4. SEZIONE MCS-CERBERUS / MONITORAGGIO
   --------------------------------------------------------------------- */
@media (max-width: 991px) {
    #monitoring > .row:first-child { padding-top: 36px !important; margin-top: 0 !important; margin-bottom: 8px !important; }
    #monitoring > .row:first-child p br { display: none; }
    #monitoring h2 { font-size: 26px; line-height: 1.2; }
    #monitoring p,
    #monitoring .thumb-info-caption-text,
    #monitoring .feature-box-info p,
    #monitoring .mcs-why { font-size: 15px !important; line-height: 1.6 !important; }
    #monitoring > .row.pb-5 { padding-bottom: 16px !important; margin-bottom: 16px !important; }
    #monitoring .thumb-info-caption br { display: none; }
    #monitoring hr.solid { margin: 24px 0 !important; }
    #monitoring .call-to-action-btn .btn { margin-top: 20px !important; }
    #monitoring .accordion .card-body { font-size: 14.5px !important; }
}
/* Telefono: card orizzontale (immagine piccola + testo) invece di 4 foto a tutto schermo */
@media (max-width: 575px) {
    #monitoring .thumb-info {
        display: grid !important;
        grid-template-columns: 92px 1fr;
        gap: 14px;
        align-items: start;
        background: transparent;
    }
    #monitoring .thumb-info-wrapper { margin: 0 !important; border-radius: 12px; overflow: hidden; }
    #monitoring .thumb-info-wrapper img { width: 92px; height: 92px; object-fit: cover; }
    #monitoring .thumb-info-caption { padding: 0 !important; }
    #monitoring .thumb-info-caption h3 { margin-top: 2px !important; font-size: 16px !important; line-height: 1.25 !important; }
    #monitoring .thumb-info-caption-text { padding: 4px 0 0 !important; display: block; }
    #monitoring .col-sm-6.col-lg-3 { margin-bottom: 18px !important; }
}

/* ---------------------------------------------------------------------
   5. SEZIONE SERVIZI
   --------------------------------------------------------------------- */
@media (max-width: 991px) {
    #services.section { padding: 44px 0 40px !important; }
    #services .container { padding-left: 18px; padding-right: 18px; }
    #services .row.mb-5 { margin-bottom: 26px !important; }
    #services .feature-box { margin-bottom: 20px; }
    #services .feature-box-info p { font-size: 15px; line-height: 1.6; margin-bottom: 0; }
    #services .mcs-check-it-card { padding: 22px 18px !important; border-radius: 14px; }
    #services .mcs-check-it-card h3 { font-size: 21px; line-height: 1.2; }
    #services .mcs-check-it-card p { font-size: 15px; line-height: 1.55; }
    #services .row.mt-5,
    #services .row.mt-4 { margin-top: 16px !important; }
    .mcs-check-it-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 50px;
        white-space: normal;
        font-size: 14px !important;
        border-radius: 12px !important;
    }
}

/* ---------------------------------------------------------------------
   6. CONTATTI E MAPPA
   --------------------------------------------------------------------- */
.mcs-map-fallback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid var(--mcs-line);
    font-size: 14px;
    color: var(--mcs-muted);
    text-align: center;
}
.mcs-map-fallback a { font-weight: 700; color: var(--mcs-teal); }
#contact .google-ma { display: block; background: #e9eef3; }
@media (max-width: 991px) {
    #contact .google-ma { min-height: 260px !important; height: 260px !important; }
    #contact .container-fluid > .row > [class*="col-"] { padding-left: 0; padding-right: 0; }
}

.mcs-contact-strip .feature-box-info a { color: #fff !important; }
@media (max-width: 991px) {
    .mcs-contact-strip .row { text-align: left !important; }
    .mcs-contact-strip .feature-box {
        display: flex !important;
        align-items: center;
        gap: 14px;
        margin: 0 0 14px !important;
        padding: 0 !important;
    }
    .mcs-contact-strip .feature-box-icon { margin: 0 !important; flex: 0 0 auto; }
    .mcs-contact-strip .feature-box-info { padding: 0 !important; }
    .mcs-contact-strip .feature-box-info p,
    .mcs-contact-strip .feature-box-info a { font-size: 16px; }
}
/* 2026-10-29: fascia contatti con 4 voci (aggiunti ORARI).
   PC >= 1200 px: 4 voci su una riga; 992-1199 px: griglia 2x2. */
@media (min-width: 992px) {
    .mcs-contact-strip .row { flex-wrap: wrap; }
    .mcs-contact-strip .feature-box { margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .mcs-contact-strip .row > .col-lg-auto { flex: 0 0 50%; max-width: 50%; padding: 8px 15px; }
}
@media (min-width: 1200px) {
    .mcs-contact-strip .row { flex-wrap: nowrap; justify-content: space-between !important; }
    .mcs-contact-strip .row > .col-lg-auto { padding-left: 12px; padding-right: 12px; }
}
/* /2026-10-29 */

/* ---------------------------------------------------------------------
   7. FOOTER + link servizi
   --------------------------------------------------------------------- */
.mcs-seo-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    padding: 22px 16px 4px;
    margin: 0 auto;
    max-width: 1100px;
    font-size: 13.5px;
    line-height: 1.4;
}
.mcs-seo-footer-links a { color: rgba(255,255,255,.82) !important; text-decoration: none; }
.mcs-seo-footer-links a:hover { color: #fff !important; text-decoration: underline; }
#footer .footer-copyright p { line-height: 1.8; }
@media (max-width: 767px) {
    .mcs-seo-footer-links { flex-direction: column; align-items: center; gap: 12px; }
    #footer .footer-copyright p { font-size: 13px; }
    #footer .footer-copyright a { display: inline-block; padding: 4px 0; }
}

/* Popup Privacy / Cookie leggibili su telefono */
@media (max-width: 575px) {
    .modal-dialog { margin: 8px; }
    .modal-body { font-size: 14.5px; }
    .modal-body h3 { font-size: 19px; }
}

/* ---------------------------------------------------------------------
   8. BARRA AZIONI FISSA (solo telefono)
   --------------------------------------------------------------------- */
.mcs-action-bar { display: none; }
@media (max-width: 767px) {
    body.has-mcs-action-bar #footer .footer-copyright { padding-bottom: calc(var(--mcs-bar-h) + env(safe-area-inset-bottom, 0px)); }
    .mcs-action-bar {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 10040;
        display: grid;
        grid-template-columns: 1fr 1fr 1.6fr;
        gap: 8px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(6,27,52,.97);
        box-shadow: 0 -8px 24px rgba(0,0,0,.18);
        font-family: inherit;
    }
    .mcs-action-bar a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 48px;
        border-radius: 11px;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.1;
        color: #fff !important;
        text-decoration: none !important;
        background: rgba(255,255,255,.10);
    }
    .mcs-action-bar a.is-primary { background: var(--mcs-teal); }
    .mcs-action-bar svg { width: 18px; height: 18px; flex: 0 0 auto; }
    /* il pulsante "torna su" del tema non deve coprire la barra */
    .scroll-to-top { bottom: calc(var(--mcs-bar-h) + 12px) !important; }
}

/* ---------------------------------------------------------------------
   9. CORREZIONI GENERALI
   --------------------------------------------------------------------- */
img { max-width: 100%; }
@media (max-width: 991px) {
    html { scroll-padding-top: 76px !important; }
    #home, #monitoring, #services, #firewall, #panda, #contact,
    .mcs-firewall-image-final, .mcs-panda-image-final { scroll-margin-top: 76px !important; }
}
a:focus-visible, button:focus-visible { outline: 3px solid var(--mcs-orange); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    *, *:before, *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (max-width: 991px) {
    #monitoring .row.pb-3 > .col-lg-4 { margin-top: 36px; }
    #monitoring .row.pb-3 > .col-lg-4 h2 { font-size: 22px; }
}
@media (max-width: 991px) {
    #header .header-nav-main nav > ul li.dropdown > a > i,
    #header .header-nav-main nav > ul li.dropdown > a .fa-chevron-down { display: none !important; }
}

/* ---------------------------------------------------------------------
   10. INFRASTRUCTURE CARE IN HOME (sostituisce "Offerta" 2026-10-29)
   --------------------------------------------------------------------- */
.mcs-why { font-size: 15.5px; line-height: 1.7; color: #4a5a6e; margin-bottom: 14px; }
.mcs-why strong { color: var(--mcs-navy); }
.mcs-why-list { list-style: none; padding: 0; margin: 0 0 4px; }
.mcs-why-list li {
    position: relative;
    padding: 0 0 0 28px;
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.6;
    color: #4a5a6e;
}
.mcs-why-list li:before {
    content: "";
    position: absolute;
    left: 2px; top: 6px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--mcs-teal);
    box-shadow: inset 0 0 0 4px #d5efee;
}
.mcs-why-list strong { color: var(--mcs-navy); }
.mcs-why-link {
    display: inline-block;
    vertical-align: top;
    margin: 39px 0 0 18px;
    font-weight: 600;
    color: var(--mcs-teal) !important;
}

.mcs-ic-offer {
    position: relative;
    padding: 28px 26px 24px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0%, rgba(8,122,124,.35), transparent 50%),
        linear-gradient(160deg, var(--mcs-navy-deep), var(--mcs-navy));
    color: #fff;
    box-shadow: 0 20px 45px rgba(6,27,52,.20);
}
.mcs-ic-offer-label {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #f6b45c;
}
.mcs-ic-offer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
}
.mcs-ic-offer-example { margin: 0 0 6px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.75); }
.mcs-ic-offer-price { margin: 0; font-size: 18px; color: rgba(255,255,255,.85); line-height: 1.2; }
.mcs-ic-offer-price strong { font-size: 40px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.mcs-ic-offer-setup { margin: 4px 0 16px; font-size: 14px; color: rgba(255,255,255,.85); }
.mcs-ic-offer-list {
    list-style: none;
    padding: 16px 0 0;
    margin: 0 0 20px;
    border-top: 1px solid rgba(255,255,255,.16);
}
.mcs-ic-offer-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 9px;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255,255,255,.9);
}
.mcs-ic-offer-list li:before {
    content: "";
    position: absolute;
    left: 2px; top: 4px;
    width: 7px; height: 12px;
    border: solid #7fd6d3;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.mcs-ic-offer-btn { width: 100%; }
.mcs-ic-offer-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.62); }

@media (max-width: 991px) {
    .mcs-ic-offer { padding: 24px 20px 20px; }
    .mcs-why-link { display: block; margin: 14px 0 0; }
    #monitoring .call-to-action-btn .btn { width: 100%; }
}
