.case-box-offer , .case-box-villa , .case-box-apartment ,.case-box-construction {
    width: 90%;
    display: flex;
    flex-direction: row;
    margin-inline: auto;
    margin-top: 5%;
    margin-bottom: 3%;
    padding-bottom: 3%;
    border-bottom: 3px solid var(--primary-color);
}

.case-file{
    width: 17%;
    height: 18rem;
    border-radius: 30px;
    margin-right: 2%;
    overflow: hidden;
    position: relative;
}

.case-file img{
    width: 100%;
    height:100%;
    object-fit: cover;
}

.case-offer{
    width: 25%;
}

.case-offer a{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-right: 2%;
    text-decoration: none;
}

.case-offer h3{
    margin-top: 55%;
    color: var(--primary-color);
    font-size: 2rem;
}

.case-offer img{
    width: 40%;
    height:25%;
}

.case-detail-box{
    width: 100%;
    height: 37%;
    display: flex;
    flex-direction: column;
    position: absolute;
    background-color: var(--primary-color-opacity);
    bottom: 0;
}

.case-title-price{
    width: 100%;
    display: flex;
    justify-content: center;
    padding-inline: 5%;
    margin-top: 3%;
    font-family: var(--primary-font-bold);
}

.case-title-price span{
    color: var(--white-color);
    font-size: 1rem;
    padding-left: 1%;
    width: 50%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.case-title-price p{
    color: var(--white-color);
    font-size: 1rem;
    padding-right: 3%;
    border-right: 3px solid var(--white-color);
    width: 50%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.case-detail-box a{
    width: 60%;
    margin-inline: auto;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: var(--white-color);
    color: var(--primary-color);
    font-size: 1rem;
    font-family: var(--primary-font-bold);
    border: none;
    margin-top: 3%;
    cursor: pointer;
    text-align: center;
}

.label-img{
    width:15%;
    height: auto;
    position: absolute;
    top: 0;
    right: 15%;
}
.label-img img{
    width: 100%;
    height: 100%;
}




/* -----media query----- */

@media screen and (max-width:1400px) {
    .case-file {
        height: 18rem;
    }
}

@media screen and (max-width:1300px) {
    .case-file {
        height: 16rem;
    }
}

@media screen and (max-width:1200px) {
    .case-file {
        height: 15rem;
    }

    .case-title-price span {
        font-size: .9rem;
    }

    .case-title-price p {
        font-size: .9rem;
    }

    .case-box-offer , .case-box-villa , .case-box-apartment ,.case-box-construction {
        margin-inline: 0;
        margin-right: 6%;
    }
}

@media screen and (max-width:1100px) {
    .case-file {
        height: 14rem;
    }

    .case-offer {
        padding-right: 2%;
    }

    .case-offer h3 {
        font-size: 1.5rem;
    }

}

@media screen and (max-width:1000px) {
    .case-box-offer , .case-box-villa , .case-box-apartment ,.case-box-construction{
        margin-right: 1%;
    }

    .case-offer {
        width: 35%;
        padding-right: 0;
    }

    .case-file {
        width: 20%;
        height: 13rem;
    }

    .case-offer h3 {
        margin-top: 65%;
    }

    .case-title-price p {
        font-size: .7rem;
    }

    .case-title-price span {
        font-size: .7rem;
    }
    .case-box-offer , .case-box-villa , .case-box-apartment ,.case-box-construction {
        margin-inline: 6.5%;
    }
}

@media screen and (max-width:900px) {
    .case-file {
        width: 30%;
    }

    .case-offer img {
        width: 60%;
    }
}

@media screen and (max-width: 768px) {

    .case-box-offer , .case-box-villa , .case-box-apartment ,.case-box-construction{
        width: 90%;
        display: grid;
        flex-direction: row;
        margin-inline: auto;
        margin-bottom: 10%;
        grid-template-columns: auto auto;
        justify-items: center;
        column-gap: 20%;
        row-gap: 10%;
        padding-bottom: 20%;
    }

    .case-detail-box {
        height: 40%;
    }

    .case-box-offer {
        margin-top:30%;
    }

    .case-file {
        width: 80%;
    }

    .case-offer {
        grid-column: span 2;
        justify-self: center;
        grid-row: 1;
        z-index: 1;
    }

    .case-offer h3 {
        margin-top: 0;
    }

    .case-title-price span {
        font-size: .8rem;
    }

    .case-title-price p {
        font-size: .8rem;
    }
}


@media screen and (max-width: 600px) {
    .case-file {
        width: 100%;
        margin-right: 0;
    }

    .case-box-offer , .case-box-villa , .case-box-apartment ,.case-box-construction{
        column-gap: 30%;
    }

}

@media screen and (max-width: 500px) {
    .case-box-offer , .case-box-villa , .case-box-apartment ,.case-box-construction{
        grid-template-columns: auto;
        row-gap: 5%;
        padding-bottom: 50%;
    }

    .case-box-offer {
        margin-top: 40%;
    }

    .case-offer {
        grid-column: auto;
    }

    .case-file {
        width: 50%;
        height: 14rem;
    }

    .case-detail-box button {
        width: 50%;
    }

    .case-offer h3 {
        white-space: nowrap;
    }

}

@media screen and (max-width: 400px) {

    .case-box-offer , .case-box-villa , .case-box-apartment ,.case-box-construction{
        padding-bottom: 65%;
    }
}

@media screen and (max-width: 370px) {

    .case-file {
        width: 60%;
    }
}

@media screen and (max-width: 350px) {
    .case-box-offer , .case-box-villa , .case-box-apartment ,.case-box-construction{
        margin-top: 10%;
    }

}


@media screen and (max-width: 300px) {

    .case-box-offer , .case-box-villa , .case-box-apartment ,.case-box-construction{
        padding-bottom: 75%;
    }
}
