.cwc-multi-color-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    line-height: 1.2;
}

.cwc-mch-part-1,
.cwc-mch-part-2,
.cwc-mch-part-middle {
    margin-right: 0.25em;
}

/* Part 3: The Wrapper */
.cwc-mch-part-3 {
    display: inline-block;
    position: relative;
    vertical-align: bottom;
    perspective: 300px;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: visible;
    box-sizing: content-box;
}

/* Text Items */
.cwc-mch-animated-text {
    display: inline-block;
    white-space: nowrap;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    line-height: inherit;
    /* ensure inherits from parent for check */
    width: auto;
    padding-right: 2px;
}

/* Active Text */
.cwc-mch-animated-text.active {
    opacity: 1;
    z-index: 2;
    visibility: visible;
    position: relative;
}

/* Exit: Stays absolute */
.cwc-mch-animated-text.exit {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    z-index: 1;
    visibility: visible;
}

/* Letters */
.cwc-mch-letter {
    display: inline-block;
    backface-visibility: hidden;
    opacity: 0;
    transform: translateZ(-20px) rotateX(90deg);
    transform-style: preserve-3d;
    animation-fill-mode: forwards;
}

/* Animation triggers */
.cwc-mch-animated-text.active .cwc-mch-letter {
    animation-name: elementor-headline-swirl-in;
    animation-duration: 0.8s;
}

.cwc-mch-animated-text.exit .cwc-mch-letter {
    animation-name: elementor-headline-swirl-out;
    animation-duration: 0.8s;
}

/* Keyframes */
@keyframes elementor-headline-swirl-in {
    0% {
        opacity: 0;
        transform: translateZ(-20px) rotateX(90deg);
    }

    60% {
        opacity: 1;
        transform: translateZ(-20px) rotateX(-10deg);
    }

    to {
        opacity: 1;
        transform: translateZ(-20px) rotateX(0deg);
    }
}

@keyframes elementor-headline-swirl-out {
    0% {
        opacity: 1;
        transform: translateZ(-20px) rotateX(0);
    }

    60% {
        opacity: 0;
        transform: translateZ(-20px) rotateX(-100deg);
    }

    to {
        opacity: 0;
        transform: translateZ(-20px) rotateX(-90deg);
    }
}