@media (min-width: 320px) {
    /* HIL Card */
    .hil-card {
        position: relative;
        width: 100%;
        overflow: hidden;
        border-radius: 4px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.4);
        cursor: pointer;
        aspect-ratio: 3/4; /* Pystysuuntaisempi muoto */
        height: 340px;
        transition: opacity 0.5s ease-out;
        visibility: visible;
    }

    .hil-card-front{
        position: absolute;
        width: 100%;
        height: 100%;
        transition: all 0.5s ease-out;
    }

    .hil-card-front {
        background-color: #f8f8f8;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1;
    }
    .hil-card .hil-card-front figure{
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    .hil-card .hil-card-front img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
        margin-bottom:0px;
        padding-bottom:0px;
    }

    .hil-card .hil-card-front figure:after{
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.1);
        z-index: 1;
    }
    .hil-card-front h3 {
        position: relative;
        z-index: 2;
        margin: 0;
        color: #fff;
        text-shadow: 0 0.5px 0 black;
        text-align: center;
        margin-bottom: auto;
        margin-top:130px;
    }
    .aktiviteetit .hil-card-front h3, .aktiviteetit .hil-card-back h3, .hil-card-front h2, .hil-card-back h2{
        font-family:var(--title-font);
    }
    .hil-card-back {
        background-color: white;
        padding: 15px;
        display: flex;
        flex-direction: column;
        position: absolute;
        bottom: 0; /* Aloitetaan kuvan alapuolelta */
        z-index: 2;
        width: 100%;
        transition: top 0.6s ease-out, opacity 0.6s ease-out;
        align-items: flex-start;
        opacity: 1;
        min-height: 100px
    }

    .hil-card-back .gb-button{
        display: none;
    }

    .hil-card-back p {
        font-size: 0.8rem;
        line-height: 1.5;
        margin: 0;
        margin-top: auto;
        text-align: left;
    }
    /*Selling points*/
    .selling-points .hil-card-front{
        background:rgba(255, 255, 255, 0.7);
        padding:20px 20px;
        justify-content: center;
    }

    .selling-points .wp-block-lordicon-block{
        margin:0px;
    }

    .selling-points .lordicon-wrapper{
        width:60px;
    }

    .selling-points .lordicon-wrapper img{
        position: relative;
        top:auto;
        left:auto;
    } 
    .selling-points .hil-card h3{
        color:#000000;
        margin:0px;
        margin-bottom:20px;
        font-family:var(--title-font);
    }
    .selling-points .hil-card-front h3{
        margin-bottom:0px;
        color:#ffffff;
    }
    .selling-points .hil-card-front.black h3{
        color:#000000;
    }

}

@media (min-width: 768px) {
    .hil-card-front h3 {
        margin:0;
    }
    .hil-card-back {
        top: 100%;
        padding: 30px;
        position: absolute;
        width: 100%;
        height: 100%;
        transition: all 0.5s ease-out;
        align-items: center;
        opacity: 0;
     }
     
    .hil-card:hover .hil-card-back {
        top: 0; /* Tuodaan esiin hover-tilassa */
        opacity: 1;
    }

    .hil-card-back h3 {
        margin-top: 0;
        margin-bottom: 15px;
        font-size: 1.5rem;
        display: block;
    }
    .hil-card-back p {
        font-size: 1rem;
        line-height: 1.5;
        flex: 1;
        margin: 0;
        align-self: flex-start;
    }

    .hil-card-back .gb-button{
        display: block;
    }
    .editor-styles-wrapper .hil-card{
        display: flex;
        width:49% !important;
    }

    .editor-styles-wrapper .hil-card .hil-card-front, .editor-styles-wrapper .hil-card .hil-card-back{
        position:relative;
        width:48%;
        left:auto;
        top:auto;
        opacity:1 !important;
    }
    .editor-styles-wrapper .hil-card .hil-card-front{
        display: flex;
        flex-direction: column;
    }
    .editor-styles-wrapper .hil-card .hil-card-front figure{
        position:relative !important;
        left:auto;
        top:auto;
        width:100% !important; 
        object-fit: cover !important;
    }
    .editor-styles-wrapper .hil-card .hil-card-front .larger-h2{
        position: relative !important;
        left:auto;
        widtH:auto;
    }

}
@media (min-width: 990px) {
    /*Selling points*/
    .selling-points .hil-card{
        width: unset;

    }
    .selling-points .hil-card-front{
        padding:20px;
        padding-bottom:40px;
    }
}