@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;700&display=swap');

/* Fallback con metriche simili a Exo 2: il testo non "salta" quando il font
   vero arriva (riduce il CLS da font-swap). */
@font-face {
    font-family: 'Exo 2 Fallback';
    src: local('Arial');
    size-adjust: 102%;
    ascent-override: 96%;
    descent-override: 30%;
    line-gap-override: 0%;
}

/* --- ANTI-CLS: spazio riservato prima del caricamento --- */
img[src="/resources/logo"],
img[src="/resources/logosmall"] {
    aspect-ratio: auto 370 / 110;
}

img[src="/resources/footerlogo"] {
    aspect-ratio: auto 377 / 112;
}

/* Il widget Trustpilot è alto esattamente 52px (data-style-height):
   altezza fissa = nessuno spostamento quando l'iframe viene iniettato */
.trustpilot-widget {
    height: 52px;
    min-height: 52px;
    overflow: hidden;
}

/* --- Hover lift per card --- */
.mk-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mk-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 .3rem 1.525rem -0.375rem rgba(0,0,0,.1);
}

/* --- Hover zoom immagine --- */
.mk-cat-img {
    transition: transform 0.5s ease;
}
.mk-cat-img:hover {
    transform: scale(1.03);
}

/* --- Immagini normalizzate --- */
.mk-img-16-9 { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.mk-img-4-3  { width: 100%; aspect-ratio: 4/3;  object-fit: cover; display: block; }
.mk-img-1-1  { width: 100%; aspect-ratio: 1/1;  object-fit: cover; display: block; }

/* --- Divisore decorativo --- */
.mk-divider {
    width: 60px;
    height: 3px;
    background: var(--bs-danger);
    margin: 10px auto 20px auto;
    border: none;
}
.mk-divider-left {
    width: 60px;
    height: 3px;
    background: var(--bs-danger);
    margin: 10px 0 20px 0;
    border: none;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.mkp-hero-title-new {
    font-family: 'Exo 2', 'Exo 2 Fallback', sans-serif !important;
    font-size: 58px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.1 !important;
    text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.8) !important;
    margin: 0 !important;
    text-align: left !important;
}

.mkp-hero-sub-new {
    font-family: 'Exo 2', 'Exo 2 Fallback', sans-serif !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.9) !important;
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    text-align: left !important;
}

/* Desktop: hero in alta risoluzione (l'inline nell'HTML è la versione
   mobile da 57 KB, che fa anche da preload automatico nel head) */
@media (min-width: 769px) {
    .mkp-hero-bg {
        background-image: url('https://cdn-it02.markeplay.com/media/images/fd562eca142ce755b4f7c6066bb9b4f4b9a346c0/hero.jpg?v=1&w=1920') !important;
    }
}

@media (max-width: 768px) {

    .mkp-hero-title-new {
        font-size: 42px !important;
        text-align: center !important;
    }

    .mkp-hero-sub-new {
        font-size: 16px !important;
        text-align: center !important;
    }

    .mkp-mobile-center {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
}

/* ==========================================================================
   STILI HOME
   ========================================================================== */

/* --- BLINDATURA TIPOGRAFICA CONTRO TEMA GLOBALE --- */
.mkp-protect,
.mkp-protect div,
.mkp-protect span,
.mkp-protect a,
.mkp-protect h2,
.mkp-protect h3 {
    font-family: 'Exo 2', 'Exo 2 Fallback', sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
}

/* I titoli sono h2/h3: azzera i margini di default dei tag heading così il
   layout resta identico. Niente !important, così le classi con margini
   propri (es. .mkp-card-title) continuano a vincere. */
.mkp-protect h2,
.mkp-protect h3 {
    margin: 0;
}

.mkp-section-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #111111 !important;
    line-height: 1.2 !important;
}

.mkp-subsection-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0199d0 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-bottom: 2px solid #0199d0 !important;
    display: inline-block !important;
    padding-bottom: 5px !important;
    margin-bottom: 0px !important;
}

.mkp-card-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #333333 !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
}

/* Grigio #767676: visivamente uguale a #888 ma supera il contrasto WCAG AA */
.mkp-card-price {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #767676 !important;
}

.mkp-card-price strong {
    font-weight: 700 !important;
    color: #111111 !important;
}

/* --- DESIGN SQUADRATO (ZERO CURVE) E ALLINEAMENTO SINISTRA --- */
.mkp-card {
    background-color: #ffffff !important;
    border-radius: 0px !important;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #f2f2f2 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    text-decoration: none !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    overflow: hidden !important;
    position: relative !important;
}

.mkp-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.mkp-img {
    width: 100% !important;
    aspect-ratio: 1/1 !important;
    object-fit: cover !important;
    margin: 0 !important;
    display: block !important;
    border: none !important;
    border-radius: 0px !important;
    height: auto !important;
}

.mkp-card-body {
    padding: 20px 15px !important;
    text-align: center !important;
    background-color: #ffffff !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.mkp-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    padding: 5px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    z-index: 2 !important;
    border-radius: 0px !important;
}

/* --- TRUST CARDS SEPARATE (PUNTI DI FORZA) --- */
.mkp-trust-wrapper {
    margin-top: -60px !important;
    position: relative !important;
    z-index: 10 !important;
}

.mkp-trust-card {
    background-color: #ffffff !important;
    border-radius: 0px !important;
    box-shadow: 0px 5px 25px rgba(0, 0, 0, 0.05) !important;
    border: 2px solid #eaeaea !important;
    padding: 25px 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
    height: 100% !important;
    width: 100% !important;
}

.mkp-trust-card:hover {
    transform: translateY(-5px) !important;
    border-color: #0199d0 !important;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.08) !important;
}

.mkp-trust-icon {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain !important;
    margin-bottom: 12px !important;
}

.mkp-trust-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111111 !important;
    margin-bottom: 5px !important;
    line-height: 1.2 !important;
}

.mkp-trust-sub {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #767676 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

/* --- IN EVIDENZA "POSTER STYLE" SQUADRATO --- */
.mkp-poster-box {
    padding: 40px 30px !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: left !important;
    text-decoration: none !important;
    border-radius: 0px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.05) !important;
}

.mkp-poster-box:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.mkp-poster-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 15px !important;
    line-height: 1.2 !important;
}

.mkp-poster-desc {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #ffffff !important;
    line-height: 1.5 !important;
    margin-bottom: 25px !important;
    opacity: 0.95 !important;
}

.mkp-btn-outline {
    display: inline-block !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    background-color: transparent !important;
    padding: 10px 24px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    align-self: flex-start !important;
    transition: all 0.3s ease !important;
    border-radius: 0px !important;
}

.mkp-poster-box.bg-blue:hover .mkp-btn-outline {
    background-color: #ffffff !important;
    color: #0199d0 !important;
}

.mkp-poster-box.bg-dark:hover .mkp-btn-outline {
    background-color: #ffffff !important;
    color: #111111 !important;
}

/* --- CHI SIAMO COMPACT CARD --- */
.mkp-about-card {
    background-color: #ffffff !important;
    border: 1px solid #eaeaea !important;
    padding: 30px 20px !important;
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    height: 100% !important;
    border-radius: 0px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.mkp-about-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.05) !important;
}

.mkp-about-icon {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    margin-right: 20px !important;
    flex-shrink: 0 !important;
    border-radius: 0px !important;
}

/* --- INJECTION CSS MOBILE-FIRST FORZATA E ALLINEAMENTO A SINISTRA --- */
.mobile-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

.mkp-row-center {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
}

.mobile-grid>div[class*="col-"],
.mkp-row-center>div[class*="col-"] {
    display: flex !important;
    flex-direction: column !important;
}

@media (max-width: 768px) {

    .mobile-grid,
    .mkp-row-center {
        margin-left: -5px !important;
        margin-right: -5px !important;
    }

    .mobile-col-50 {
        width: 50% !important;
        flex: 0 0 50% !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }

    .mobile-col-100 {
        width: 100% !important;
        flex: 0 0 100% !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }

    /* Gestione Griglia 2x2 Trust Cards su Mobile */
    .mkp-trust-wrapper {
        margin-top: -30px !important;
    }

    .mkp-trust-card {
        padding: 15px 10px !important;
    }

    .mkp-trust-icon {
        width: 26px !important;
        height: 26px !important;
        margin-bottom: 8px !important;
    }

    .mkp-trust-title {
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }

    .mkp-trust-sub {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    .mkp-poster-box {
        align-items: center !important;
        text-align: center !important;
        padding: 40px 20px !important;
    }

    .mkp-btn-outline {
        align-self: center !important;
    }

    .mkp-about-card {
        flex-direction: column !important;
        text-align: center !important;
    }

    .mkp-about-icon {
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }
}