
/* ==========================================
   MA.PE. HERO V5
   CSS UNICO - DESKTOP E MOBILE
   ========================================== */

.mape-showcase {
    position: relative;
    isolation: isolate;
    min-height: 760px;
    min-height: 100svh;
    overflow: hidden;
    background: #06162f;
    color: #fff;
}

.mape-showcase-stage {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.mape-showcase-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/*
.mape-showcase-dirty {
    z-index: 1;
    background-image: url('../images/mape-pavimento-sporco.jpg');
}

.mape-showcase-clean {
    z-index: 2;
    background-image: url('../images/mape-pavimento-pulito.jpg');
    clip-path: polygon(100% 46%,100% 100%,100% 100%);
    will-change: clip-path;
}
*/
.mape-showcase-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
        linear-gradient(
            90deg,
            rgba(2,14,35,.96),
            rgba(3,19,45,.82) 27%,
            rgba(4,26,55,.38) 49%,
            transparent 76%
        ),
        linear-gradient(
            0deg,
            rgba(2,14,35,.8),
            transparent 28%
        );
    pointer-events: none;
}

.mape-showcase-effects {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    overflow: visible;
}

.mape-showcase-brush-light {
    position: absolute;
    z-index: 5;
    width: clamp(160px,20vw,330px);
    height: 30px;
    border-radius: 50%;
    transform: translate(-50%,-50%);
    background: #b5f7ff;
    filter: blur(13px);
    box-shadow:
        0 0 30px 14px #15d5ff,
        0 0 70px 24px #0866d8;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

.mape-showcase-worker {
    position: absolute;
    left: 0;
    bottom: -4%;
    width: clamp(590px,55vw,930px);
    z-index: 7;
    opacity: 0;
    transform-origin: 50% 100%;
    filter: drop-shadow(
        0 24px 22px rgba(0,0,0,.4)
    );
    pointer-events: none;
    will-change: transform;
}

.mape-showcase-worker img {
    display: block;
    width: 100%;
    height: auto;
}

.mape-showcase-particles {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
}

.mape-showcase-particle {
    position: absolute;
    width: var(--sz,4px);
    height: var(--sz,4px);
    border-radius: 50%;
    background: white;
    box-shadow:
        0 0 6px 2px #fff,
        0 0 18px 6px #55d7f5;
    opacity: 0;
    transform: translate(-50%,-50%);
}

.mape-showcase-particle::before,
.mape-showcase-particle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    background: #d5fbff;
    transform: translate(-50%,-50%);
}

.mape-showcase-particle::before {
    width: 1px;
    height: 12px;
}

.mape-showcase-particle::after {
    width: 12px;
    height: 1px;
}

/* TESTI */

.mape-showcase-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 760px;
    min-height: 100svh;
    padding-top: 145px;
    padding-bottom: 165px;
    pointer-events: none;
}

.mape-showcase-copy {
    width: min(100%,740px);
    opacity: 0;
    visibility: hidden;
}

.mape-showcase .mape-showcase-title {
    color: #fff;
    font-size: clamp(76px,7.9vw,128px);
    font-weight: 800;
    line-height: .98;
    letter-spacing: -.055em;
    margin: 0 0 25px;
}

.mape-showcase-brand {
    display: block;
}

.mape-showcase-tagline {
    display: block;
    margin-top: 12px;
    font-size: .60em;
    line-height: 1.12;
    font-style: italic;
    letter-spacing: -.04em;
}

.mape-showcase-tagline em {
    position: relative;
    color: #e32991;
    font-style: italic;
    white-space: nowrap;
}

.mape-showcase-tagline em::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 4px;
    background: #e32991;
    border-radius: 100%;
    transform: rotate(-2deg);
}

.mape-showcase-description {
    max-width: 560px;
    margin: 42px 0 30px;
    color: #fff;
    font-size: clamp(17px,1.5vw,21px);
    line-height: 1.5;
}

.mape-showcase-button {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    min-height: 61px;
    padding: 16px 29px;
    border-radius: 40px;
    background: #e32991;
    color: #fff;
    font-weight: 750;
    font-size: 16px;
    line-height: 1.3;
    text-decoration: none;
    pointer-events: auto;
    box-shadow:
        0 12px 35px rgba(227,41,145,.28);
    transition:
        transform .25s,
        background .25s;
}

.mape-showcase-button:hover {
    background: #c91d7c;
    color: #fff;
    transform: translateY(-2px);
}

.mape-showcase-button span {
    font-size: 25px;
}

/* QUATTRO CARATTERISTICHE */

.mape-showcase-features {
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 43px;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    max-width: 960px;
    opacity: 0;
    visibility: hidden;
}

.mape-showcase-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 17px;
    border-right: 1px solid rgba(255,255,255,.28);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.mape-showcase-feature:first-child {
    padding-left: 0;
}

.mape-showcase-feature:last-child {
    border-right: 0;
}

.mape-showcase-feature-icon {
    flex: 0 0 37px;
    font-size: 30px;
    color: #55d7f5;
    filter: drop-shadow(0 0 8px #168ee9);
}

/* REPLAY */

.mape-showcase-replay {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 15;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 30px;
    padding: 10px 14px;
    background: rgba(6,22,47,.76);
    color: white;
    cursor: pointer;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

/* LAPTOP */

@media (min-width: 768px) and (max-width: 1289px) {
    .mape-showcase-worker {
        width: clamp(600px, 78vw, 800px);
    }
}


@media (max-width:1199px) {
    .mape-showcase-worker {
        width: clamp(470px,58vw,750px);
    }

    .mape-showcase .mape-showcase-title {
        font-size: clamp(64px,7.5vw,105px);
    }

    .mape-showcase-copy {
        width: min(100%,610px);
    }

    .mape-showcase-feature {
        font-size: 13px;
        gap: 8px;
        padding: 0 10px;
    }
}

/* SMARTPHONE */

@media (max-width:767px) {
    .mape-showcase {
        min-height: 760px;
        min-height: 100svh;
    }

    .mape-showcase-photo {
        background-position: 56% center;
    }

    .mape-showcase-overlay {
        background: linear-gradient(
            180deg,
            rgba(3,16,39,.88) 0%,
            rgba(3,16,39,.68) 36%,
            rgba(3,16,39,.12) 59%,
            rgba(3,16,39,.14) 76%,
            rgba(3,16,39,.90) 100%
        );
    }

    .mape-showcase-container {
        min-height: 760px;
        min-height: 100svh;
        justify-content: flex-start;
        padding-top: 140px;
        padding-bottom: 185px;
    }

    .mape-showcase .mape-showcase-title {
        font-size: clamp(50px,11.7vw,76px);
        letter-spacing: -.04em;
        margin-bottom: 15px;
    }

    .mape-showcase-tagline {
        font-size: .58em;
    }

    .mape-showcase-description {
        font-size: 16px;
        line-height: 1.55;
        max-width: 390px;
        margin: 25px 0 22px;
    }

    .mape-showcase-button {
        font-size: 14px;
        min-height: 54px;
        padding: 13px 18px;
        gap: 9px;
    }

    .mape-showcase-worker {
        width: min(103vw,520px);
        bottom: 9%;
    }

    .mape-showcase-brush-light {
        width: 155px;
        height: 22px;
    }

    .mape-showcase-features {
        left: 15px;
        right: 15px;
        bottom: 25px;
        grid-template-columns:
            repeat(2,minmax(0,1fr));
        gap: 17px 10px;
    }

    .mape-showcase-feature {
        border: 0;
        padding: 0;
        font-size: 12px;
        gap: 9px;
    }

    .mape-showcase-feature-icon {
        flex-basis: 28px;
        font-size: 25px;
    }

    .mape-showcase-replay {
        right: 12px;
        bottom: 128px;
        font-size: 10px;
        padding: 8px 10px;
    }
}

@media (max-width:380px) {
    .mape-showcase-container {
        padding-top: 122px;
    }

    .mape-showcase .mape-showcase-title {
        font-size: 49px;
    }

    .mape-showcase-worker {
        width: 101vw;
    }
}

@media (prefers-reduced-motion:reduce) {
    .mape-showcase-button {
        transition: none;
    }
}

/* FINE MA.PE. HERO V5 */


/* ==========================================
   MA.PE. - CARATTERISTICHE HERO PIÙ LEGGIBILI
   ========================================== */

@media (min-width: 768px) {

    .mape-showcase-features {
        max-width: 100%;
        bottom: 26px;
        padding: 17px 20px;
        border: 1px solid rgba(255,255,255,.13);
        border-radius: 18px;
        background: rgba(3,19,45,.20);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 35px rgba(0,0,0,.60);
    }

    .mape-showcase-feature {
        gap: 13px;
        padding: 0 18px;
        color: #ffffff;
        font-size: 17px;
        font-weight: 700;
        line-height: 1.35;
        text-shadow: 0 2px 6px rgba(0,0,0,.65);
    }

    .mape-showcase-feature-icon {
        flex: 0 0 42px;
        font-size: 34px;
        color: #55d7f5;
        filter: drop-shadow(
            0 0 7px rgba(85,215,245,.65)
        );
    }
}



/* ==========================================
   MA.PE. HERO - CARATTERISTICHE MOBILE
   A TUTTA LARGHEZZA
   ========================================== */

@media (max-width: 767px) {

    .mape-showcase-features {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;

        width: 100%;
        max-width: none;

        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;

        padding: 16px 14px 20px;
        margin: 0;

        background: linear-gradient(
    		180deg,
    		rgba(4, 20, 43, .08) 0%,
    		rgba(4, 20, 43, .32) 45%,
    		rgba(3, 15, 35, .72) 100%
		);

        border-top: 1px solid rgba(85, 215, 245, .28);

        -webkit-backdrop-filter: none;
		backdrop-filter: none;

        box-sizing: border-box;
        z-index: 12;
    }

    .mape-showcase-feature {
        display: flex;
        align-items: center;
        justify-content: flex-start;

        width: 100%;
        min-width: 0;

        gap: 12px;
        padding: 12px 8px;

        border: 0;

        color: #ffffff;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.3;

        text-shadow: 0 2px 6px rgba(0,0,0,.75);
        box-sizing: border-box;
    }

    .mape-showcase-feature:first-child {
        padding-left: 8px;
    }

    .mape-showcase-feature-icon {
        display: flex;
        align-items: center;
        justify-content: center;

        flex: 0 0 34px;
        width: 34px;
        height: 38px;

        color: #55d7f5;
        font-size: 29px;

        filter: drop-shadow(
            0 0 8px rgba(85, 215, 245, .65)
        );
    }

    /* Linea verticale tra le due colonne */
    .mape-showcase-feature:nth-child(odd) {
        border-right: 1px solid rgba(255,255,255,.20);
    }

    /* Linea orizzontale tra le due righe */
    .mape-showcase-feature:nth-child(-n+2) {
        border-bottom: 1px solid rgba(255,255,255,.13);
    }

    /* Spostiamo il replay sopra la fascia */
    .mape-showcase-replay {
        bottom: 160px;
        right: 12px;
        z-index: 15;
    }
}

/* Smartphone particolarmente stretti */
@media (max-width: 380px) {

    .mape-showcase-feature {
        font-size: 13px;
        gap: 8px;
    }

    .mape-showcase-feature-icon {
        flex-basis: 30px;
        width: 30px;
        font-size: 26px;
    }
}





/* =====================================================
   MA.PE. - EFFETTI AMBIENTALI CONSOLIDATI V5
   Da aggiungere a hero-section.css
   NON sostituisce il CSS principale della Hero
   ===================================================== */

/* 1. BOLLICINE DISTRIBUITE SULLA SPAZZOLA */

.mape-ambient-bubbles {
    position: absolute;
    left: 0;
    top: 0;
    width: 300px;
    height: 155px;
    z-index: 8;
    pointer-events: none;
    overflow: visible;
    transform: translate(-50%, -75%);
    opacity: 0;
    transition: opacity .8s ease;
}

.mape-ambient-bubbles.is-active {
    opacity: 1;
}

.mape-ambient-bubble {
    position: absolute;
    left: var(--bubble-x, 50%);
    top: 78%;
    width: var(--bubble-size, 10px);
    height: var(--bubble-size, 10px);
    border-radius: 50%;
    border: 1.5px solid rgba(230,252,255,.95);

    background:
        radial-gradient(
            circle at 28% 23%,
            rgba(255,255,255,.95),
            rgba(255,255,255,.16) 23%,
            transparent 46%
        ),
        radial-gradient(
            circle at 75% 75%,
            rgba(227,41,145,.24),
            transparent 52%
        ),
        radial-gradient(
            circle at 70% 30%,
            rgba(85,215,245,.34),
            transparent 68%
        );

    box-shadow:
        inset -2px -2px 5px rgba(85,215,245,.40),
        0 0 12px rgba(85,215,245,.55),
        0 0 4px rgba(255,255,255,.35);

    opacity: 0;
    will-change: transform, opacity;

    animation:
        mapeBubbleFloatV4
        var(--bubble-time, 4s)
        linear infinite;

    animation-delay: var(--bubble-delay, 0s);
}

@keyframes mapeBubbleFloatV4 {
    0% {
        opacity: 0;
        transform: translate3d(0,12px,0) scale(.4);
    }

    15% {
        opacity: .8;
    }

    45% {
        opacity: .95;
        transform:
            translate3d(
                var(--bubble-drift, 12px),
                -38px,
                0
            )
            scale(1);
    }

    75% {
        opacity: .7;
    }

    100% {
        opacity: 0;
        transform:
            translate3d(
                var(--bubble-return, -10px),
                -115px,
                0
            )
            scale(.65);
    }
}

/* 2. BAGLIORE DELLA SPAZZOLA */

.mape-ambient-brush-glow {
    position: absolute;
    left: 0;
    top: 0;
    width: 300px;
    height: 45px;
    border-radius: 50%;
    z-index: 5;
    pointer-events: none;
    transform: translate(-50%, -50%);

    background: radial-gradient(
        ellipse,
        rgba(185,250,255,.48) 0%,
        rgba(40,195,255,.29) 38%,
        rgba(8,102,216,.10) 67%,
        transparent 80%
    );

    filter: blur(8px);
    opacity: 0;
    animation: mapeBrushPulseV4 3s ease-in-out infinite;
}

.mape-ambient-brush-glow.is-active {
    opacity: 1;
}

@keyframes mapeBrushPulseV4 {
    0%, 100% {
        opacity: .35;
        filter: blur(11px);
    }

    50% {
        opacity: .75;
        filter: blur(6px);
    }
}

/* 3. AREA LUCI - SOLO PAVIMENTO DESTRO */

.mape-ambient-floor {
    position: absolute;

    left: 54%;
    right: 0;
    top: 36%;
    bottom: 0;

    width: 46%;
    height: 64%;

    z-index: 3;
    pointer-events: none;
    overflow: hidden;

    opacity: 0;
    transition: opacity 1.2s ease;

    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 18%,
        #000 100%
    );

    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 18%,
        #000 100%
    );
}

.mape-ambient-floor.is-active {
    opacity: 1;
}

/* 4. RIFLESSI DIAGONALI
   ALTO A DESTRA -> BASSO A SINISTRA */

.mape-ambient-sweep {
    position: absolute;
    left: 0;
    top: 0;

    width: 70%;
    height: 46%;
    border-radius: 50%;

    background: radial-gradient(
        ellipse at center,
        rgba(245,255,255,.85) 0%,
        rgba(190,245,255,.68) 18%,
        rgba(75,195,255,.38) 42%,
        rgba(15,115,235,.14) 65%,
        transparent 82%
    );

    filter: blur(14px);
    mix-blend-mode: screen;
    opacity: 0;

    animation:
        mapeCleanFloorLightV4
        9s ease-in-out infinite;

    will-change: transform, opacity;
}

.mape-ambient-sweep:nth-child(2) {
    width: 48% !important;
    height: 34% !important;

    background: radial-gradient(
        ellipse at center,
        rgba(245,255,255,.75) 0%,
        rgba(145,230,255,.50) 28%,
        rgba(35,155,255,.22) 55%,
        transparent 82%
    ) !important;

    filter: blur(19px) !important;
    animation-duration: 11s !important;
    animation-delay: -5s !important;
}

@keyframes mapeCleanFloorLightV4 {
    0% {
        opacity: 0;
        transform:
            translate3d(85%,-25%,0)
            rotate(-24deg);
    }

    15% {
        opacity: .65;
    }

    40% {
        opacity: 1;
        transform:
            translate3d(38%,30%,0)
            rotate(-24deg);
    }

    70% {
        opacity: .85;
    }

    100% {
        opacity: 0;
        transform:
            translate3d(-12%,100%,0)
            rotate(-24deg);
    }
}

/* 5. SCINTILLE SUL PAVIMENTO PULITO */

.mape-ambient-glint {
    position: absolute;
    width: var(--glint-size, 15px);
    height: var(--glint-size, 15px);
    transform: translate(-50%, -50%);
    opacity: 0;
    mix-blend-mode: screen;
    filter: blur(.4px);

    animation:
        mapeGlintV4
        var(--glint-time, 7s)
        ease-in-out infinite;

    animation-delay: var(--glint-delay, 0s);
}

.mape-ambient-glint::before,
.mape-ambient-glint::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #dffbff;
    border-radius: 50%;

    box-shadow:
        0 0 12px rgba(210,250,255,1),
        0 0 25px rgba(85,215,245,.85),
        0 0 40px rgba(45,150,255,.40);
}

.mape-ambient-glint::before {
    width: 2px;
    height: 100%;
}

.mape-ambient-glint::after {
    width: 100%;
    height: 2px;
}

@keyframes mapeGlintV4 {
    0%, 12%, 32%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(.2);
    }

    19% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.25);
    }

    26% {
        opacity: .55;
        transform: translate(-50%, -50%) scale(.65);
    }
}

/* 7. SMARTPHONE */

@media (max-width: 767px) {
    .mape-ambient-bubbles {
        height: 115px;
    }

    .mape-ambient-brush-glow {
        height: 35px;
    }

    .mape-ambient-floor {
        left: 42%;
        width: 58%;
        top: 37%;
        height: 63%;
    }

    .mape-ambient-sweep {
        width: 95%;
        height: 34%;
        filter: blur(13px);
    }

    .mape-ambient-sweep:nth-child(2) {
        width: 70%;
        height: 27%;
    }

    .mape-ambient-glint {
        max-width: 18px;
        max-height: 18px;
    }
}

/* 8. ACCESSIBILITÀ */

@media (prefers-reduced-motion: reduce) {
    .mape-ambient-bubble,
    .mape-ambient-sweep,
    .mape-ambient-glint,
    .mape-ambient-brush-glow {
        animation: none !important;
    }

    .mape-ambient-bubbles,
    .mape-ambient-floor,
    .mape-ambient-brush-glow {
        opacity: 0 !important;
    }
}

/* FINE EFFETTI AMBIENTALI MA.PE. CONSOLIDATI V5 */
