.back{
    display: None;
}

body, .wrapper{
    height: 100%;
    min-height: 1300px;
}

.content-grid_container{
    margin: 0 auto;
    margin-top: 150px;
    margin-bottom: 550px;
    width: 1200px;
}

.head{
    font-family: Taviraj;
    font-size: 30px;
    font-weight: 300;
    line-height: 51px;
    letter-spacing: 0.02em;
    text-align: left;
    color: white;
    margin-bottom: 40px;
}
html[lang='uk'] .head{
    font-family: Inter;
}
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(370px, 1fr)); /* Ширина колонки */
    grid-auto-rows: 400px; /* Высота строки */
    grid-column-gap: 15px; /* Расстояние между колонками */
    grid-row-gap: 15px; /* Расстояние между строками */
    grid-auto-flow: dense;
}
.photo-card:hover .caption {
    opacity: 1;
    transform: translateY(0);
}

.caption {
    position: absolute;
    bottom: 0px;
    left: 0px;
    background-color: rgba(0, 0, 0, 0.4);
    font-family: Questrial;
    font-size: 16px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0.02em;
    text-align: left;
    color: white;
    padding: 5px;
    opacity: 0;
    transform: translateY(30%);
    transition: opacity 0.5s, transform 0.5s;
}
.card {
    position: relative;
    cursor: pointer;
    width: 100%;
    height: 100%;
    animation: slideIn 1.5s forwards;
    transition: transform 0.5s ease;
}

.photo-card {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.card.f2x1{
    grid-column: span 2;
}
.card.f1x2{
    grid-row: span 2;
}
.card.f2x2{
    grid-column: span 2;
    grid-row: span 2;
}
.card.f3x1{
    grid-column: span 3;
}
.card.f3x2{
    grid-column: span 3;
    grid-row: span 2;
}
.pagination {
    font-family: Questrial;
    font-size: 16px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0.02em;
    text-align: left;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 120px;
}
.pagination nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}
.pagination nav ul li {
    margin: 0 5px;
}
.pagination nav ul li a {
    text-decoration: none;
    color: gray; /* Цвет ссылок */
    padding: 5px 10px; /* Отступы вокруг текста */
}
.pagination nav ul li span {
    color: white;
    padding: 5px 10px;
}

@media screen and (max-width: 1600px){
    .content-grid_container{
        left: 0.90%;
    }
}

@media screen and (max-width: 1250px){
    body, .wrapper{
       min-height: 1000px;
    }
    .head{
        margin-bottom: 30px;
    }
    .content-grid_container{
        width: 960px;
        margin-top: 110px;
        margin-bottom: 500px;
    }
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); /* Ширина колонки */
        grid-auto-rows: 305px; /* Высота строки */
        grid-column-gap: 12px; /* Расстояние между колонками */
        grid-row-gap: 12px; /* Расстояние между строками */
    }

}
@media screen and (max-width: 1020px){
    body, .wrapper{
       min-height: 1000px;
    }
    .head{
        margin-bottom: 20px;
    }
    .content-grid_container .slider span{
        font-size: 45px;
    }
    .content-grid_container{
        width: 600px;
        margin-top: 80px;
        margin-bottom: 420px;
    }
    .content-grid{
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); /* Ширина колонки */
        grid-auto-rows: 180px; /* Высота строки */
        grid-column-gap: 10px; /* Расстояние между колонками */
        grid-row-gap: 10px; /* Расстояние между строками */
    }
    .pagination{
        margin-top: 100px;
    }
}

@media screen and (max-width: 660px){
    body, .wrapper{
       min-height: 1000px;
    }
    .head{
        font-size: 20px;
        font-weight: 300;
        line-height: 24px;
        margin-bottom:15px;
    }
    .caption{
        font-size: 14px;
    }
    .content-grid_container{
        width: 100%;
        margin-top: 60px;
        margin-bottom: 380px;
    }
    .content-grid_container .slider span{
        font-size: 40px;
    }
    .content-grid{
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 120px;
        grid-column-gap: 5px;
        grid-row-gap: 5px;
    }
    .pagination{
        margin-top: 45px;
        font-size: 14px;
    }
}