:root {
    --primary-color: #007ED4;
    --secondary-color: #E9F5FC;
    --tertiary-color: #F8F8F8;
    --neutral-color: #595959;
    --neutral-variant-color: #757575;
    --gradient-color: linear-gradient(90deg, rgba(0, 160, 233, 1) 0%, rgba(0, 126, 212, 1) 100%);
}

/*-------------------casestudies start----------------------*/
.casestudies {
    margin: 0;
    width: 100%;
    height: auto;
    background-color: #f4f4f4;
    padding: 40px 0 60px 0;
}

.casestudies .contents {
    width: 90%;
    max-width: 1200px;
    height: auto;
    padding: 0;
    box-sizing: border-box;
    text-align: center;
    margin: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

.casestudy .contents h2 {
    font-weight: 300;
    color: #595959;
    width: 100%;
    text-align: center;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    vertical-align: top;
    width: 100%;
}

.container a {
    position: relative;
}

.image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 126, 212, 0.7);
    overflow: hidden;
    width: 100%;
    height: 0;
    transition: .5s ease;
    font-weight: 500;
    border-radius: 5px;
}

.container a:hover .overlay {
    height: 60%;
}

.text {
    white-space: pre-line;
    color: white;
    font-weight: 400;
    position: absolute;
    overflow: hidden;
    top: 50%;
    left: 50%;
    width: 95%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    line-height: 1.5em;
}

@media only screen and (max-width: 1366px) {
    .casestudies .contents {
        width: 80%;
    }

    .f16 {
        font-size: 0.9em;
    }
}

@media only screen and (max-width: 1024px) {
    .casestudies .contents {
        width: 90%;
    }
}

@media only screen and (max-width: 768px) {
    .container {
        display: flex;
        flex-direction: column;
    }

    .container .a {
        text-decoration: none;
    }

    .image {
        max-width: 350px;
        margin: 0px auto;
    }

    .overlay {
        position: inherit;
        overflow: hidden;
        width: 100%;
        height: auto;
        transition: inherit;
        background-color: #f4f4f4;
        text-align: center;
    }

    .text {
        top: 0;
        left: 0;
        color: #595959;
        font-weight: 400;
        position: inherit;
        overflow: hidden;
        transform: inherit;
        margin: 4%;
        font-size: 1em;
    }
}