:root {
    --ecard-bg-from: #5BB8DE;
    --ecard-bg-to: #8BC7F1;
    --ecard-star-color: #F2C94C;
    --ecard-intro-mark-color: #6dacc7;
    --ecard-bg-deg: -135deg;
}

body[data-theme="rosso"] {
    --ecard-bg-from: #FF9466;
    --ecard-bg-to: #D62109;
    --ecard-intro-mark-color: #22732c;
    --ecard-gift-hue-rotate: 280deg;
    --ecard-bg-deg: 45deg;
}

/* Testi e-card */
.ecard,
.ecard * {
    text-shadow: none !important;
}

/* Header e-card */

        .mt-header--force-black {
            top: 0px
        }

            .mt-header--force-black .mt-topMainMenu {
                background-color: #505050;
            }

            .mt-header--force-black .mt-topMenu {
                background-color: #2d2d2d;
            }

                .mt-header--force-black .mt-topMenu ul li:after {
                    color: #2d2d2d;
                }

        @media screen and (min-width: 1200px) {
            .mt-header--force-black .mt-topMainMenu:after {
                content: " ";
                background-color: #2d2d2d;
                position: absolute;
                width: 100%;
                top: 100px;
                left: 0;
                right: 0;
                height: 0px;
            }

            .mt-header--force-black .mt-topMenu {
                background-color: #f7f8f9;
            }

                .mt-header--force-black .mt-topMenu ul li a {
                    color: #2d2d2d;
                }

                .mt-header--force-black .mt-topMenu .black-device {
                    background-color: #f7f8f9;
                }

            .mt-header--force-black .mt-mainMenu ul li ul {
                margin-top: 1.26667rem;
            }
        }

/* Layout e-card */

        .ecard #nav {
            list-style: none;
            top: 50%;
            margin-top: -100px;
            position: fixed;
            z-index: 9999;
            right: 20px;
        }

            .ecard #nav li {
                margin: 0 0 15px 0;
            }

                .ecard #nav li img {
                    width: 10px
                }

                    .ecard #nav li img:hover {
                        opacity: 0.4
                    }

        .ecard .arrow-nav {
            position: absolute;
            left: 50%;
            top: 95%;
            transform: translate(-50%,0%);
            z-index: 999;
        }

        .ecard .slide_container {
            position: relative
        }

        .ecard .text-block h2 {
            font-family: 'Montserrat', sans-serif;
            margin-bottom: 26px;
            text-transform: uppercase;
            font-weight: 700;
            font-size: 44px;
            color: #FFFFFF;
            letter-spacing: 8.8px;
            text-align: center;
        }

        .ecard .text-block h3 {
            font-family: 'Montserrat', sans-serif;
            margin-bottom: 26px;
            font-weight: 700;
            font-size: 32px;
            color: #FFFFFF;
            letter-spacing: 6.4px;
            text-align: center;
        }

        .ecard .text-block span {
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            font-size: 32px;
            color: #FFFFFF;
            letter-spacing: 6.4px;
            line-height: 1.35;
            text-align: center;
        }

        .ecard .text-block p {
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            font-size: 32px;
            color: #FFFFFF;
            letter-spacing: 6.4px;
            line-height: 1.35;
            text-align: center;
        }

            .ecard .text-block p.messaggio {
                font-family: 'Montserrat', sans-serif;
                font-weight: 500;
                font-size: 24px;
                color: #FFFFFF;
                letter-spacing: 4.8px;
                line-height: 1.5;
                text-align: center;
            }

        .ecard .text-block.center-block {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            z-index: 10
        }

        .ecard #intro .slide_container .intro-mark {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            z-index: 1;
            width: 387px;
            aspect-ratio: 387 / 449;
            background-color: var(--ecard-intro-mark-color);
            -webkit-mask: url(../images/Risorsa-4.png) center / contain no-repeat;
            mask: url(../images/Risorsa-4.png) center / contain no-repeat;
        }

        .ecard #intro .text-block {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 100%;
            text-align: center;
            z-index: 10
        }

        .ecard #step_2 .text-block {
            position: absolute;
            top: 18%;
            width: 100%;
            text-align: center;
            z-index: 10
        }

        .ecard #step_3 .text-block {
            position: absolute;
            top: 35%;
            width: 100%;
            text-align: center;
            z-index: 10
        }

        .ecard #step_4 .text-block {
            position: absolute;
            top: 18%;
            width: 100%;
            text-align: center;
            z-index: 10
        }

        .ecard #step_3 p {
            width: 55%;
            margin: 0 auto;
        }

        .ecard #step_4 p {
            width: 55%;
            margin: 0 auto;
        }

        .ecard .quote {
            opacity: 0.21;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            font-size: 160px;
            color: #FFFFFF;
            letter-spacing: 32px;
            text-align: center;
        }

        .ecard .quote_up {
            position: absolute;
            left: 50%;
            margin-left: -450px;
            margin-top: -2%
        }

        .ecard .quote_down {
            position: absolute;
            left: 50%;
            margin-left: 450px;
            margin-top: -3%
        }

        .ecard .placeholder {
            background: #70192F;
            position: relative;
            height: 272px;
            display: block;
            margin: 0 auto;
            margin-bottom: 24px;
            width: 548px;
            box-shadow: 0 8px 30px 0 rgba(0,0,0,0.10);
            border-radius: 4px;
        }

            .ecard .placeholder .play {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%,-50%);
            }

        .ecard .book_container {
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 894px;
            height: auto;
            aspect-ratio: 616 / 481;
            transform: translateX(-50%);
            container-type: inline-size;
            z-index: 998;
        }

            .ecard .book_container .book {
                width: 100%;
                height: 100%;
                object-fit: contain;
                display: block;
            }

            .ecard .book_pages {
                position: absolute;
                top: 53%;
                width: 73%;
                left: 49%;
                height: 71.5%;
                transform: translate(-50%, -50%) rotate(15deg);
            }

        .ecard .book_text {
            height: 100%;
            column-count: 2;
            column-gap: 6%;
            column-fill: auto;
            overflow: hidden;
            font-family: 'Over the Rainbow', cursive;
            font-size: clamp(10px, 2.2cqw, 19px);
            line-height: 1.55;
            color: #702E36;
            letter-spacing: 0.12em;
            text-align: center;
        }

            .ecard .book_text p {
                margin: 0 0 0.8em;
            }

        .ecard .book_picture {
            margin: 0 0 1em;
            break-inside: avoid;
        }

            .ecard .book_picture img {
                width: 100%;
                max-height: 28cqw;
                object-fit: cover;
                display: block;
            }

        .ecard .background-asset {
            position: absolute;
            left: 0px;
            right: 0px;
            height: 100vh;
            bottom: 0px;
        }

            .ecard .background-asset img {
                position: absolute;
                left: 0px;
                right: 0px;
                bottom: 0px;
            }

                .ecard .background-asset img.grass {
                    width: 100%
                }

                .ecard .background-asset img.land {
                    width: 100%
                }

                .ecard .background-asset img.land2 {
                    width: 100%
                }

                .ecard .background-asset img.alberi {
                    bottom: 17%;
                    width: 100%
                }

                .ecard .background-asset img.drago {
                    top: 10%;
                    left: 5%;
                    width: 23%
                }

                .ecard .background-asset img.nuvole {
                    top: 10%;
                    width: 100%
                }

                .ecard .background-asset img.sole {
                    top: 20%;
                    right: 5%;
                    width: 20%;
                    left: auto;
                }

                .ecard .background-asset img.mountain {
                    bottom: 0%;
                    width: 100%
                }

                .ecard .background-asset img.unicorno {
                    top: 10%;
                    left: 3%;
                    width: 16%
                }

                .ecard .background-asset img.star {
                    top: 6%;
                    width: 70%;
                    bottom: 0px;
                    margin: 0 auto;
                }

                .ecard .background-asset img.confetti {
                    top: 0px;
                    margin: 0 auto;
                }

                .ecard .background-asset img.gift {
                    margin: 0 auto;
                    width: 45%
                }

                .ecard .background-asset img.castello {
                    right: 17%;
                    bottom: 19%;
                    width: 21%;
                    left: auto;
                }

                .ecard .background-asset img.uccellini {
                    right: 10%;
                    top: 25%;
                    width: 10%;
                    left: auto;
                }

        @media screen and (min-width : 320px) and (max-width : 568px) {
            .mt-logoMenuContainer {
                background-color: #fff;
            }

            .ecard #intro .slide_container .intro-mark {
                width: 60%
            }

            .ecard #intro .text-block h2 {
                font-size: 30px;
                letter-spacing: 0px;
            }

            .ecard .text-block span {
                letter-spacing: 0px;
                font-size: 20px;
                width: 82%;
                display: block;
                margin: 0 auto;
            }

            .ecard .arrow-nav {
                top: 80%;
            }

            .ecard #step_2 h3 {
                letter-spacing: 0px
            }

            .ecard #step_3 h3 {
                letter-spacing: 0px;
                font-size: 32px;
            }

            .ecard #step_3 .text-block {
                top: 23%
            }

            .ecard #step_3 p {
                letter-spacing: 0px;
                width: 78%;
                font-size: 19px;
                line-height: 28px
            }

            .ecard #step_4 h3 {
                letter-spacing: 0px;
                padding-left: 20px;
                padding-right: 20px;
                font-size: 22px;
            }

            .ecard #step_4 .text-block {
                top: 9%;
            }

            .ecard #step_5 h3 {
                letter-spacing: 0px;
                padding-left: 20px;
                padding-right: 20px;
                font-size: 32px;
            }

            .ecard .background-asset img.sole {
                top: 3%;
                width: 27%
            }

            .ecard .background-asset img.drago {
                top: 2%;
                left: 4%;
                width: 40%;
            }

            .ecard .background-asset img.unicorno {
                width: 28%;
                top: 3%
            }

            .ecard .background-asset img.alberi {
                bottom: 5.5%;
                width: 100%
            }

            .ecard .background-asset img.castello {
                right: 17%;
                bottom: 6%;
                width: 21%;
                left: auto;
            }

            .ecard .placeholder {
                height: 50vh;
                width: 90%;
            }

            .ecard .quote_up {
                margin-left: -180px;
            }

            .ecard .quote_down {
                margin-left: 90px;
                margin-top: -8%;
            }

            .ecard .text-block p.messaggio {
                font-size: 19px;
                line-height: 28px;
                letter-spacing: 0px;
            }
        }

        @media screen and (min-device-width : 320px) and (max-device-width : 568px) and (orientation : landscape) {
            .mt-logoMenuContainer {
                background-color: #fff;
            }

            .ecard #intro .slide_container .intro-mark {
                width: 28%;
                transform: translate(-50%,-25%);
            }

            .ecard #intro .text-block h2 {
                font-size: 35px;
                letter-spacing: 0px;
            }

            .ecard #intro .text-block {
                transform: translateY(-25%);
            }

            .ecard .text-block span {
                letter-spacing: 0px;
                font-size: 25px;
                width: 82%;
                display: block;
                margin: 0 auto;
            }

            .ecard .arrow-nav {
                top: 77%;
            }

            .ecard #step_2 h3 {
                letter-spacing: 0px
            }

            .ecard #step_3 h3 {
                letter-spacing: 0px;
                font-size: 32px;
            }

            .ecard #step_3 .text-block {
                top: 23%
            }

            .ecard #step_3 p {
                letter-spacing: 0px;
                width: 78%;
                font-size: 19px;
                line-height: 28px
            }

            .ecard #step_4 h3 {
                letter-spacing: 0px;
                padding-left: 20px;
                padding-right: 20px;
                font-size: 22px;
            }

            .ecard #step_4 .text-block {
                top: 9%;
            }

            .ecard #step_5 h3 {
                letter-spacing: 0px;
                padding-left: 20px;
                padding-right: 20px;
                font-size: 32px;
            }

            .ecard .background-asset img.sole {
                top: 3%;
                width: 27%
            }

            .ecard .background-asset img.drago {
                top: 2%;
                left: 4%;
                width: 40%;
            }

            .ecard .background-asset img.unicorno {
                width: 28%;
                top: 3%
            }

            .ecard .placeholder {
                height: 50vh;
                width: 90%;
            }

            .ecard .quote_up {
                margin-left: -180px;
            }

            .ecard .quote_down {
                margin-left: 90px;
                margin-top: -8%;
            }

            .ecard .text-block p.messaggio {
                font-size: 19px;
                line-height: 28px;
                letter-spacing: 0px;
            }
        }

        @media screen and (min-width : 768px) and (max-width : 1280px) {
            .mt-logoMenuContainer {
                background-color: #fff;
            }

            .ecard #intro .slide_container .intro-mark {
                width: 30%
            }

            .ecard #intro .text-block h2 {
                letter-spacing: 0px;
            }

            .ecard .text-block span {
                letter-spacing: 0px;
                width: 82%;
                display: block;
                margin: 0 auto;
            }

            .ecard .arrow-nav {
                top: 90%;
            }

            .ecard #step_2 .text-block {
                top: 15%
            }

            .ecard #step_2 h3 {
                letter-spacing: 0px
            }

            .ecard #step_3 .text-block {
                top: 25%
            }

            .ecard #step_3 h3 {
                letter-spacing: 0px;
                font-size: 32px;
            }

            .ecard #step_3 p {
                letter-spacing: 0px;
                width: 78%;
                line-height: 40px;
            }

            .ecard #step_4 h3 {
                letter-spacing: 0px;
            }

            .ecard #step_4 .text-block {
                top: 9%;
            }

            .ecard #step_5 h3 {
                letter-spacing: 0px;
                padding-left: 20px;
                padding-right: 20px;
                font-size: 32px;
            }

            .ecard .background-asset img.sole {
                top: 3%;
            }

            .ecard .background-asset img.drago {
                top: 1%;
                left: 0%;
            }

            .ecard .background-asset img.unicorno {
                width: 18% !important;
                top: 1%
            }

            .ecard #step_5 .background-asset img.unicorno {
                width: 30% !important;
                top: 3%
            }

            .ecard .placeholder {
                height: 50vh;
                width: 30%;
            }

            .ecard .quote_up {
                margin-left: -380px;
            }

            .ecard .quote_down {
                margin-left: 290px
            }

            .ecard .text-block p.messaggio {
                line-height: 28px;
                letter-spacing: 0px;
                line-height: 40px;
            }
        }

/* Variante Natale */

.natale .story {
    height: 100vh;
    background-image: linear-gradient(var(--ecard-bg-deg), var(--ecard-bg-from) 0%, var(--ecard-bg-to) 100%);
}

        .ecard .background-asset img.gift {
            width: auto !important;
        }

        .ecard .background-asset img.mountain {
            bottom: -12%;
            width: 30%;
            left: 60%;
        }
        /* .ecard .text-block.center-block { top: 78%; } */

        @media screen and (min-width : 320px) and (max-width : 568px) {
            .ecard .background-asset img.mountain {
                bottom: -7%;
                width: 67%;
                left: 0%;
            }

            .ecard .text-block.center-block {
                top: 30%;
            }
        }

/* Header e-card */
.mt-header--ecard .mt-topMainMenu {
    background-color: #F7F8F9;
}

.mt-header--ecard .mt-logoMenuContainer {
    margin-top: 0;
    height: 3.5rem;
    padding-top: 5px;
    padding-bottom: 5px;
}

.ecard .story--tall {
    min-height: 150vh !important;
    height: auto !important;
}

.ecard .background-asset--sondo {
    background: url(../images/SONDO.png) center center / cover no-repeat;
}

.ecard .placeholder {
    background-position: center center;
    background-size: cover;
}

/* Stelle e-card */
.ecard .background-asset .star--mask {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 6%;
    width: 70%;
    margin: 0 auto;
    aspect-ratio: 1087 / 623;
}

body[data-theme="rosso"] .ecard .background-asset img.star {
    display: none;
}

body[data-theme="rosso"] .ecard .background-asset .star--mask {
    display: block;
    background-color: var(--ecard-star-color);
    -webkit-mask: url(../images/Risorsa-8.png) center / contain no-repeat;
    mask: url(../images/Risorsa-8.png) center / contain no-repeat;
}

/* Regali e-card */
body[data-theme="rosso"] .ecard .background-asset img.gift {
    filter: hue-rotate(var(--ecard-gift-hue-rotate));
}

/* Testi responsive step_3 e step_5 */
.ecard #step_3 .text-block,
.ecard #step_5 .text-block {
    top: 10%;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    padding: 0 30px 45vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: none;
}

.ecard #step_3 p,
.ecard #step_5 p {
    width: 100%;
}

@media (min-width: 768px) {
    .ecard #step_3 .text-block,
    .ecard #step_5 .text-block {
        top: 45%;
        bottom: auto;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        height: auto;
        padding: 0 30px;
        display: block;
        transform: translateY(-50%);
    }
}

/* Libro responsive */
@media (max-width: 767px) {
    .ecard .book_container {
        top: 30%;
        bottom: auto;
        left: 50%;
        right: auto;
        width: 100%;
        height: auto;
        transform: translateX(-50%);
    }
}

@media (min-width: 768px) {
    .ecard .book_container {
        top: auto;
        bottom: 5vh;
        left: 50%;
        right: auto;
        width: min(694px, 92vw);
        height: auto;
        transform: translateX(-50%);
    }
}

@media (min-width: 1200px) {
    .ecard .book_container {
        top: auto;
        bottom: 0;
        left: auto;
        right: 4vw;
        width: min(894px, 80vw);
        height: auto;
        transform: none;
    }
}
