/* =====================================================================
   MCS & C. - pagine servizio (Firewall, Panda, Monitoraggio, Contatti,
   Infrastructure Care): ottimizzazione mobile + coerenza colori desktop
   Versione 1.0 - 2026-10-29. Va incluso DOPO lo <style> della pagina.
   ===================================================================== */

:root {
    --mcs-accent: #087a7c;      /* prima: blu Bootstrap #0d6efd, ora colore del marchio */
    --mcs-bg: #061b34;
    --mcs-navy: #08294f;
    --mcs-teal: #087a7c;
    --mcs-bar-h: 64px;
}
.btn-primary, .button { box-shadow: 0 10px 24px rgba(8,122,124,.22); }
.btn-primary:hover, .button:hover { background: #0c9691; border-color: #0c9691; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 3px solid #e88708; outline-offset: 3px; }

/* --- Header --------------------------------------------------------- */
.topbar, .top { position: sticky; top: 0; z-index: 50; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.navlinks a, .top nav a { white-space: nowrap; }

@media (max-width: 900px) {
    .topbar, .top { padding: 10px 0 !important; }
    .topbar-inner, .top .wrap {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 0 !important;
    }
    .brand { padding: 0 16px; }
    .brand img { max-height: 34px !important; }
    .brand span { display: none; }   /* il logo riporta gia' "MCS & C." */

    /* menu su una riga, scorrevole col dito: niente piu' 3 righe di link */
    .navlinks, .top nav {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px !important;
        padding: 2px 16px 4px;
        font-size: 14px !important;
        -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
        mask-image: linear-gradient(90deg, #000 85%, transparent);
    }
    .navlinks::-webkit-scrollbar, .top nav::-webkit-scrollbar { display: none; }
    .navlinks a, .top nav a {
        flex: 0 0 auto;
        padding: 8px 13px;
        border-radius: 999px;
        background: rgba(255,255,255,.09);
        opacity: 1 !important;
        text-decoration: none !important;
    }
    .navlinks a:last-child, .top nav a:last-child { margin-right: 24px; }
}

/* --- Contenuti ------------------------------------------------------ */
@media (max-width: 900px) {
    .hero { padding: 26px 16px 30px !important; }
    .wrap { padding-left: 16px !important; padding-right: 16px !important; }
    .section { padding: 38px 16px !important; }
    .section > .wrap, .hero > .wrap { padding-left: 0 !important; padding-right: 0 !important; }
    .breadcrumb { margin-bottom: 14px !important; font-size: 13px !important; }
    h1 { font-size: 31px !important; line-height: 1.12 !important; }
    .section h2, h2 { font-size: 25px !important; line-height: 1.22 !important; }
    .lead { font-size: 17px !important; margin-bottom: 18px !important; }
    .card { padding: 20px !important; }
    .card h3 { font-size: 18px !important; }

    /* pulsanti a tutta larghezza, comodi da toccare */
    .cta-row { flex-direction: column; gap: 10px !important; margin-top: 18px !important; }
    .cta-row .btn, .hero .button, .contact .button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 50px;
        width: 100%;
        text-align: center;
        margin: 0 0 10px !important;
        border-radius: 12px !important;
    }

    /* immagine hero: si mostra la parte grafica, non il testo minuscolo dentro l'immagine */
    .hero-img {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        aspect-ratio: 21 / 20;
        object-fit: cover !important;
        object-position: 100% 50%;
        border-radius: 14px !important;
        box-shadow: 0 12px 30px rgba(16,32,51,.12) !important;
    }
    .banner {
        height: auto !important;
        aspect-ratio: 21 / 20;
        object-fit: cover;
        object-position: 100% 50%;
        margin-top: 22px !important;
    }
    .hero-grid { gap: 22px !important; }

    .faq details, details { padding: 14px 16px !important; }
    .faq summary, summary { line-height: 1.4; }
    table { font-size: 14px; }
    .price { padding: 20px !important; }
}

/* --- Barra azioni fissa (telefono) ---------------------------------- */
.mcs-action-bar { display: none; }
@media (max-width: 767px) {
    body.has-mcs-action-bar footer { padding-bottom: calc(var(--mcs-bar-h) + 32px + env(safe-area-inset-bottom, 0px)) !important; }
    .mcs-action-bar {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 100;
        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);
    }
    .mcs-action-bar a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 48px;
        border-radius: 11px;
        font: 700 14px/1.1 Arial, Helvetica, sans-serif;
        color: #fff !important;
        text-decoration: none !important;
        background: rgba(255,255,255,.10);
    }
    .mcs-action-bar a.is-primary { background: #087a7c; }
    .mcs-action-bar svg { width: 18px; height: 18px; flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* MCS-CERBERUS: la grafica ha testo anche a destra, si mostra intera */
@media (max-width: 900px) {
    .hero-img[src*="mcs-cerberus"] { aspect-ratio: auto; object-fit: contain !important; }
}
