
.insightHeadingWrapper {
    display: block;
    aspect-ratio: 200/175;
    width: auto;
    max-width: 90%;
    padding: 40px;
    /*background-color: var(--col-menthe-blue);*/
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: linear-gradient(135deg, rgba(0, 167, 181, 1) 0%, rgba(0, 167, 181, 0) 100%);
    backdrop-filter: blur(3px);
}


/* fontin koko sen containerin mukaan?  */


.insightHeadingWrapper h1,
.entry-content .elomatic-section:first-of-type .insightHeadingWrapper h1 {
    margin-top: 0;
    margin-bottom: 0;
    /*text-wrap: balance;*/
}


@media (min-width: 992px) {
    .insightHeadingWrapper h1,
    .entry-content .elomatic-section:first-of-type .insightHeadingWrapper h1 {
        max-width: 800px; /*40vw;*/
        /*font-size: calc(1.8rem + 1.5vw);*/
        font-size: 4.5rem;
        padding: 30px;
    }

    .insightHeadingWrapper {
        padding: 100px;
    }


    /* TODO: parempi kontrilli: sisälle container  - ei välttämättä ola aina h1:stä. Toki voi css:llä testata josko sillä on h1 sisällä :has()*/
    .insightHeadingWrapper:has(h1),
    .insightHeadingWrapper h1 {
        transform-origin: center center;
        animation-duration: 50s;
        animation-direction: alternate;
        animation-iteration-count: infinite;
        animation-timing-function: ease-in-out;
        animation-play-state: running;
        animation-delay: -25s;
    }

    .insightHeadingWrapper:has(h1) {
        animation-name: headinBG;
    }

    .insightHeadingWrapper h1 {
        animation-name: headinTitle;
    }

}


@media (min-width: 1100px) {

    .insightHeadingWrapper {
        padding: 140px;
    }

}


@media (max-width: 1100px) {
    .insightHeadingWrapper h1,
    .entry-content .elomatic-section:first-of-type .insightHeadingWrapper h1 {

        font-size: calc(2.0rem + 1.0vw);
        padding: 65px;
    }
}

@media (max-width: 800px) {
    .insightHeadingWrapper h1,
    .entry-content .elomatic-section:first-of-type .insightHeadingWrapper h1 {

        font-size: calc(2.0rem + 1.5vw);
        padding: 65px;
    }

    .insightHeadingWrapper {
        max-width: calc(100% - 24px);
    }
}

@media (max-width: 640px) {
    .insightHeadingWrapper h1,
    .entry-content .elomatic-section:first-of-type .insightHeadingWrapper h1 {

        font-size: calc(1.6rem + 1.5vw);
        padding: 55px;
    }

    .insightHeadingWrapper {
        max-width: calc(100% - 24px);
    }
}

@media (max-width: 560px) {
    .insightHeadingWrapper h1,
    .entry-content .elomatic-section:first-of-type .insightHeadingWrapper h1 {

        font-size:1.3rem;
        padding: 25px;
    }

    .insightHeadingWrapper {
        max-width: calc(100% - 24px);
    }
}

@keyframes headinBG {

    from {
        transform: rotateZ(-30deg);
    }

    to {
        transform: rotateZ(30deg);
    }

}

@keyframes headinTitle {

    from {
        transform: rotateZ(30deg);
    }

    to {
        transform: rotateZ(-30deg);
    }

}
