.case{
    padding-top: 50px;
    background-color: #ffffff;
    min-height: 100vh;
    padding-bottom: 100px;
}

.case .case__wrapper{
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    flex-direction: column;
    padding-left: 7%;
    padding-right: 7%;
}

.case .case__wrapper .case__contents {
    width: 100%;

}
.case .case__wrapper .case__contents a {
    width: 130px;
    height: 50px;
    border-radius: 30px;
    background-color: #7d1e27;
    z-index: 50;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    margin-bottom: 3%;
}
.case .case__wrapper .case__contents a svg {
    width: 10px;
    height: 10px;
    fill: #fff;
    margin-right: 10px;
}
.case .case__wrapper .case__contents .case__photos {
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    flex-direction: row;
    height: 300px;
}
.case .case__wrapper .case__contents .case__photos .case__photo {
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
    margin-right: 0.5%;
}
.case .case__wrapper .case__contents .case__photos .case__photo img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    width: 100%;
    min-height: 100%;
}
.case .case__wrapper .case__contents .case__photos .case__photo-min {
    height: 100%;
    width: 50%;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    flex-wrap: wrap;
}
.case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image {
    width: 48%;
    height: 49%;
    position: relative;
    overflow: hidden;
}
.case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image:nth-child(2n-1) {
    margin-right: 1%;
}
.case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image:nth-child(1),
.case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image:nth-child(2){
    margin-bottom: 1%;
}
.case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    /*min-width: 100%;
    max-height: 100%;*/
    min-height: 100%;
    max-width: 100%;
}
.case .case__wrapper .case__contents .case__text {
    font-size: 18px;
}


@media only screen and (max-width: 950px){
    .case{
        padding-top: 140px;
    }
    .case .case__wrapper .case__contents{
        margin-top: -140px;
        padding-top: 140px;
    }
    .case .case__wrapper .case__contents .case__photos .case__photo img{
        width: initial;
        min-height: initial;
        min-width: 100%;
    }
}

@media only screen and (max-width: 490px){
    .case{
        padding-top: 90px;
    }
    .case .case__wrapper .case__contents{
        padding-top: 90px;
        margin-top: -90px;
    }
    .case .case__wrapper .case__contents .case__photos{
        flex-direction: column;
        height: auto;
    }
    .case .case__wrapper .case__contents .case__photos .case__photo{
        width: 100%;
        margin-bottom: 2%;
        height: 200px;
    }
    .case .case__wrapper .case__contents .case__photos .case__photo-min {
        width: 100%;
    }
    .case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image {
        width: 49%;
        height: 100px;
    }

    .case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image img{
        min-width: initial;
        max-height: initial;
        min-height: 100%;
        max-width: 100%;
    }
    .case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image:nth-child(2n-1){
        margin-right: 2%;
    }
    .case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image:nth-child(1), .case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image:nth-child(2),
    .case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image:nth-child(1), .case .case__wrapper .case__contents .case__photos .case__photo-min .case__min-image:nth-child(1){
        margin-bottom: 2%;
    }




}

.case__subtitle {
	display: inline-block;
    background-color: #cec7a5;
    font-family: Museo Sans Cyrl;
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: #292d2d;
    padding: 20px;
	margin: 20px 0;
}

.case__photo {
	margin: 20px 0;
	width: 100%;
}
.case__photo img {
	width: 100%;
	height: auto;
}

.case__text {
	margin: 20px 0;
}

.case__gallery {
	margin: 20px 0;
	display: grid;
    grid-gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
}
.case__gallery > div {
	height: 200px;
}
.case__gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.case__gallery .case__photos {
	height: auto !important
}