:root {
    --light: #FFFCE1;
    --darker: #261A15;
    --dark: #34231C;
    --accent: #DB9672;
}

body, html {
    width: 100%;
    margin: 0;
    font-size: 24px;
    color: var(--light);
    background-color: var(--dark);
}

.top {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: max-content;
    background-image: url(../images/top_background.jpg);
    background-repeat: no-repeat;
    background-size: cover;
}

header {
    display: flex;
    flex-direction: column;
    width: 90%;
}

header a {
    text-decoration: none;
    color: var(--light);
}

header p {
    margin: 0;
}

.contact-button {
    display: inline-block;
    text-decoration: none;
    color: var(--darker);
    background-color: var(--accent);
    padding: 15px;
    border-radius: 10px;
    top: 50px;
    margin-top: 50px;
}

.contact-button:hover {
    color: var(--darker);
    background-color: var(--light);
}

.header-top, .header-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 5px 2vw
}

.header-top {
    border-bottom: 1px solid var(--light);
}

.header-top-left, .header-top-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1vw;
}

.header-bottom-left, .header-bottom-right {
    display: flex;
    flex-direction: row;
    gap: 1vw;
}

.header-bottom-left a {
    font-size: 32px;
    font-weight: bold;
}

.top-main {
    display: flex;
    flex-direction: row;
    width: 80%;
    margin-top: 3%;
    justify-content: space-between;
}

.top-main-left {
    width: 45%;
}

h1 {
    margin: 0;
    font-size: 64px;
}

.top-main-right img{
    height: 730px;
}

.main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 -5px 5px var(--dark);
}

.content {
    width: 80%;
}

.top-block {
    background-color: var(--darker);
    font-size: 36px;
    text-align: center;
    font-weight: bold;
    padding: 50px;
    position: relative;
    top: -90px;
    border-radius: 15px;
}

.content-block {
    margin-top: 50px;
    width: 100%;
}

h2 {
    text-align: center;
    font-size: 45px;
    font-weight: bold;
    margin: 0;
    margin-bottom: 50px;
}

.blocks-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.blocks-container.center {
    justify-content: center;
}

.block {
    display: flex;
    flex-direction: column;
    background-color: var(--darker);
    border-radius: 15px;
    width: 400px;
    padding: 15px;
    text-align: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.block:hover {
    background-color: var(--accent);
}

.block p {
    width: 80%;
}

h3 {
    width: max-content;
}

footer {
    margin-top: 15px;
    background-color: var(--darker);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
}

footer a {
    color: var(--light);
}

.footer-content {
    width: 90%;
    display: flex;
    flex-direction: column;
}

.footer-top {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.footer-middle {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    text-align: center;
}

.footer-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-top: 1px solid var(--light);
}

.footer-bottom p {
    margin: 5px;
    font-size: 16px;
}

.content-block-main {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.content-block-left {
    width: 50%;
}

.reviews-block {
    margin-top: 70px;
    padding: 30px 0;
    width: 100%;
    background-color: var(--light);
}

.reviews-block h2 {
    color: var(--dark);
}

.reviews-block-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.slider-content {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.slider-button {
    background-color: var(--dark);
    width: 70px;
    height: 70px;
    border-radius: 15px;
    flex-shrink: 0;
}

.left-button {
    left: 15px;
}

.right-button {
    right: 15px;
}

.slider-block {
    background-color: var(--dark);
    width: 25%;
    height: 400px;
    padding: 20px;
    border-radius: 15px;
    font-weight: bold;
}

.slider-title {
    font-size: 32px;
}

.map {
    width: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    width: 50%;
    background-color: var(--darker);
    padding: 2vw;
    border-radius: 15px;
    gap: 1vw;
    align-items: center;
}

.contact-form input, textarea {
    height: 35px;
    border: 0;
    border-radius: 5px;
    background-color: var(--light);
    font-size: 20px;
    width: 100%;
}

.contact-form textarea {
    height: 100px;
    resize: none;
}

.contact-form button {
    width: 50%;
    height: 35px;
    background-color: var(--accent);
    color: var(--light);
    border: 0;
    border-radius: 5px;
}

.contact-form button:hover {
    background-color: var(--light);
    color: var(--darker);
}

.price-blocks-container {
    display: grid;
    justify-items: center;
    grid-template-columns: repeat(3, 1fr); /* Фиксированно 3 колонки */
    gap: 20px;
    justify-content: space-between; 
}

.price-blocks-container .block {
    justify-content: space-between;
}

.price-blocks-container .block:last-child:nth-child(3n + 1) {
  grid-column: 2;
}

.price {
    background-color: var(--accent);
    padding: 5px 25px;
    border-radius: 5px;
}

.block:hover .price {
    background-color: var(--darker);
}


.article {
    background-color: var(--darker);
    width: 100%;
    padding: 1%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    height: 200px;
    margin-top: 50px;
}

.article h2 {
    margin-bottom: 0;
    text-align: left;
}

.article-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 70%;
}

.article-right {
    max-width: 30%;
    width: max-content;
    height: auto;
    text-align: right;
}

.article-right img {
    height: 100%;
}

.contacts-block a{
    color: var(--light);
}

@media (max-width: 1630px) {
    .blocks-container.main {
        display: grid; 
        justify-items: center;
        grid-template-columns: 1fr 1fr;
        row-gap: 50px;
    }

    .blocks-container.main div {
        height: 90%;
    }

    .blocks-container.main div:nth-child(3) {
        grid-column: 1 / -1;
    }

    .price-blocks-container {
        grid-template-columns: repeat(2, 1fr); /* Фиксированно 3 колонки */
    }

    .contact-form {
        width: 60%;
    }
}

@media (max-width: 1490px) {
    .top-main.index {
        height: 750px;
    }

    .top-main-left {
        width: 60%;
        z-index: 1;
    }

    .top-main-right {
        z-index: 0;
        position: absolute;
        right: 10%;
    }

    .article {
        height: max-content;
    }

    .article-right img {
        width: 100%
    }
}

@media (max-width: 1300px) {
    .header-bottom-right {
        display: none;
    }

    .contact-form {
        width: 70%;
    }
}

@media (max-width: 1130px) {
    /* .top-block {
        top: 10px;
    } */

    .top-main.index {
        height: max-content;
        padding-bottom: 150px;
    }

    .top-main-right {
        display: none;
    }

    .top-main-left {
        width: 100%;
    }

    .blocks-container.main {
        grid-template-columns: 1fr;
    }

    .price-blocks-container {
        grid-template-columns: repeat(1, 1fr); 
    }

    .price-blocks-container .block:last-child:nth-child(3n + 1) {
        grid-column: 1;
    }

    .content-block-main {
        flex-direction: column-reverse;
    }

    .content-block-left {
        width: 100%;
    }

    .content-block-right {
        text-align: center;
    }

}