@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;

    box-sizing: border-box;
}

:root {
    --index: calc(1vh + 1vw);
    --transition: 1s cubic-bezier(.05, .5, 0, 1);
}

body {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* Паралакс єфект та стилізація слоїв для нього */

.layers {
    perspective: 1000px;
    overflow: hidden;

    color: white;
}

.layers__container {
    height: 100vh;
    transform-style: preserve-3d;
    transform: rotateX(var(--move-y)) rotateY(var(--move-x));
    will-change: transform;
    /*оптимізація*/
    transition: transform var(--transition);
}

.buttonStart {
    background: transparent;
    margin-top: 15px;

    width: 100px;
    height: 30px;

    border: 1px white solid;
    border-radius: 5px;
}

.buttonStart a {
    text-decoration: none;
    color: #fff;

    font-size: 16px;
}

.layers__items {
    position: absolute;

    inset: -5vw;

    background-size: cover;
    background-position: center;

    display: flex;
    align-items: center;
    justify-content: center;
}

.layer1 {
    transform: translateZ(-30px) scale(1.06);
}

.layer2 {
    transform: translateZ(80px) scale(.8);
}

.layer3 {
    transform: translateZ(180px) scale(.8);
}

.layer4 {
    transform: translateZ(190px) scale(.8);
}

.layer5 {
    transform: translateZ(300px) scale(.8);
}

.header-main-text {
    font-size: calc(var(--index) * .9);
    text-align: center;

    width: 900px;
}

.layer4,
.layer5 {
    pointer-events: none;

}

/* Кінець стилізації паралаксу */

.container {
    max-width: 1280px;
    margin: 0 auto;
}


.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    z-index: 1;
}


.navigation {
    height: 40px;
    width: 600px;

    display: flex;
    justify-content: space-around;
    align-items: center;

    padding: 0;
    margin: 0;


    list-style: none;

}

.navigation a {
    text-decoration: none;
    cursor: pointer;

    color: black;
}


.button {
    border: none;
    background: transparent;

}

.button:hover {
    border-bottom: 1px gray solid;
}

/* =========================main========================== */

#main,
#reviews {
    min-height: 100vh;
}

#reviews {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.shortNameBlack {
    background: #000;
    color: white;

    text-align: center;

    width: 100px;
}

/* firstBlockInMain */

.mainAboutUsBlock {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    /* height: 400px; */
}

.mainTextForAuto, .mainTextForReviews {
    font-size: 36px;
}

.addTextForAuto {
    width: 570px;
    font-size: 20px;

    text-align: justify;
}

/* SecondBlockInMain */

.secondImageBlock img {
    width: 700px;
}

.secondImageBlock button {
    border: none;
    background: transparent;

}

/* UpBlock */

.upBlock {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.firstTextBlock {
    height: 220px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* DownBlock */

.downBlock {
    display: flex;
    justify-content: space-around;

    width: 100%;
}

/* ServesBlock */

.servesBlockSearch,
.servesBlockWheel,
.servesBlockWrench,
.servesBlockComputer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    width: 300px;
}

.imageServesBlock {
    width: 50px;
    height: 50px;
}

/* reviews */

.reviewsTextContent {
    width: 400px;
    height: 350px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    text-align: center;
}

.shortDescriptionReviews a {
    text-decoration: none;
    color: #000;

}

.lastReviewsBlocks {
    display: flex;
    justify-content: space-between;

    width: 1200px;
}

.reviewsBlock {
    width: 280px;
    height: 150px;

    text-align: left;

    padding-top: 5px;
    padding-left: 10px;

    border-radius: 10px;
    border: 2px solid black;
}


.footer {
    border-top: 1px solid black;
}
.footerContent {
    display: flex;
    justify-content: space-between;
    align-items: center;


    height: 55px;
}

.buttonUp {
    width: 40px;
    height: 40px;

    background: transparent;
    border: 1px solid #000;
    border-radius: 5px;
}

.buttonUp img {
    width: 30px;
}


@media (max-width: 992px) {
    .container {
        width: 90%;
        padding: 0 10px;
    }

    .navbar {
        flex-direction: column;
        align-items: center;
    }

    .navigation {
        width: 100%;
    }

    .navigation li {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .footer .container {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .navbar h3 {
        font-size: 1.5em;
    }

    .button {
        padding: 8px 15px;
        font-size: 14px;
    }

    .footer .buttonUp a img {
        width: 25px;
        height: 25px;
    }

    .footer .container {
        padding: 10px;
    }
}


/* Styles for screen widths of 992px and below */
@media (max-width: 992px) {
    .header-main-text h1 {
        font-size: 24px;
    }

    .header-main-text p {
        font-size: 14px;
    }

    .buttonStart {
        font-size: 14px;
    }

    .navbar h3 {
        font-size: 18px;
    }

    .navigation .button a {
        font-size: 14px;
    }

    .mainAboutUsBlock .firstTextBlock h4 {
        font-size: 18px;
    }

    .mainAboutUsBlock .firstTextBlock h2 {
        font-size: 22px;
    }

    .mainAboutUsBlock .firstTextBlock p {
        font-size: 14px;
    }

    .servesBlockSearch h5, 
    .servesBlockWheel h5, 
    .servesBlockWrench h5, 
    .servesBlockComputer h5 {
        font-size: 16px;
    }

    .servesBlockSearch p, 
    .servesBlockWheel p, 
    .servesBlockWrench p, 
    .servesBlockComputer p {
        font-size: 12px;
    }

    .reviewsTextContent h2 {
        font-size: 22px;
    }

    .reviewsTextContent p {
        font-size: 14px;
    }

    .reviewsBlock h5 {
        font-size: 14px;
    }

    .reviewsBlock p {
        font-size: 12px;
    }

    /* Adjust image sizes */
    .secondImageBlock img {
        width: 80%;
    }

    .servesBlockSearch img, 
    .servesBlockWheel img, 
    .servesBlockWrench img, 
    .servesBlockComputer img {
        width: 50px;
        height: 50px;
    }

    .reviewsBlock img {
        width: 60px;
        height: 60px;
    }
}

/* Styles for screen widths of 768px and below */
@media (max-width: 768px) {
    .header-main-text h1 {
        font-size: 20px;
    }

    .header-main-text p {
        font-size: 12px;
    }

    .buttonStart {
        font-size: 12px;
    }

    .navbar h3 {
        font-size: 16px;
    }

    .navigation .button a {
        font-size: 12px;
    }

    .mainAboutUsBlock .firstTextBlock h4 {
        font-size: 16px;
    }

    .mainAboutUsBlock .firstTextBlock h2 {
        font-size: 18px;
    }

    .mainAboutUsBlock .firstTextBlock p {
        font-size: 12px;
    }

    .servesBlockSearch h5, 
    .servesBlockWheel h5, 
    .servesBlockWrench h5, 
    .servesBlockComputer h5 {
        font-size: 14px;
    }

    .servesBlockSearch p, 
    .servesBlockWheel p, 
    .servesBlockWrench p, 
    .servesBlockComputer p {
        font-size: 10px;
    }

    .reviewsTextContent h2 {
        font-size: 18px;
    }

    .reviewsTextContent p {
        font-size: 12px;
    }

    .reviewsBlock h5 {
        font-size: 12px;
    }

    .reviewsBlock p {
        font-size: 10px;
    }

    /* Adjust image sizes */
    .secondImageBlock img {
        width: 70%;
    }

    .servesBlockSearch img, 
    .servesBlockWheel img, 
    .servesBlockWrench img, 
    .servesBlockComputer img {
        width: 40px;
        height: 40px;
    }

    .reviewsBlock img {
        width: 50px;
        height: 50px;
    }

    .layers__items.layer1,
    .layers__items.layer2,
    .layers__items.layer3,
    .layers__items.layer5 {
        background-size: cover;
    }
}
