/* Reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base styles */
body {
    font-family: "Poppins", sans-serif;
}

a {
    text-decoration: none;
    color: #ff6c1a;
}

li {
    list-style: none;
}

/* Header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #cbcbcb;
    padding: 8px 70px;
    color: white;
}

.header a {
    color: #ff6c1a;
    text-decoration: none;
    font-size: 25px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 25px;
    transition:
        background-color 0.3s,
        color 0.3s;
}

.header a.logo {
    font-size: 22px;
    font-weight: bold;
    margin-right: auto;
}

.header-catalogo {
    color: darkgray;
}
.header a:hover {
    background-color: #214762;
    color: white;
}

.header a.active {
    background-color: #ff6c1a;
    color: white;
    margin-right: 350px;
}

.header a.active:hover {
    background-color: #214762;
    color: white;
}

/* Media Queries */
@media screen and (max-width: 1200px) {
    .header {
        padding: 8px 40px;
    }

    .header a.active {
        margin-right: 200px;
    }
}

@media screen and (max-width: 992px) {
    .header {
        padding: 8px 30px;
    }

    .header a {
        font-size: 20px;
        padding: 8px 15px;
    }

    .header a.active {
        margin-right: 150px;
    }
}

@media screen and (max-width: 768px) {
    .header {
        padding: 8px 20px;
    }

    .header a {
        font-size: 18px;
        padding: 8px 12px;
    }

    .header a.active {
        margin-right: 100px;
    }
}

@media screen and (max-width: 480px) {
    .header {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .header a {
        width: 100%;
        text-align: center;
        font-size: 16px;
        padding: 10px;
        margin: 0;
    }

    .header a.logo {
        margin: 0;
    }

    .header a.active {
        margin: 0;
    }
}

/* Small mobile devices */
@media screen and (max-width: 320px) {
    .header {
        padding: 10px;
    }

    .header a {
        font-size: 14px;
        padding: 8px;
    }
}
nav {
    margin: auto;
    width: 1200px;
    height: 50px;
}

.top-nav {
    background-color: white;
    font-size: 14px;
    margin-top: 40px;
}

.top-nav a {
    color: #000;
    text-align: center;
    padding: 40px 40px;
    font-size: 18px;
    font-weight: bold;
}

.top-nav a:hover {
    border-bottom: 2px solid #000;
}

.top-nav .icon {
    display: none;
}

#block-for-slider {
    width: 100%;
    margin: 0 auto;
}

#viewport {
    width: 100%;
    display: table;
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

#slide-wrapper {
    position: relative;
    width: calc(100% * 5);
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    -webkit-transition: 1s;
    -o-transition: 1s;
    transition: 1s;
    -webkit-transition-timing-function: ease-in-out;
    -o-transition-timing-function: ease-in-out;
    transition-timing-function: ease-in-out;
}

#slide-wrapper ul,
#slide-wrapper li {
    margin: 0;
    padding: 0;
}

#slide-wrapper li {
    width: calc(100% / 5);
    list-style: none;
    display: inline;
    float: left;
}

.slide-img {
    width: 100%;
    max-width: 1920px;
    justify-content: center;
}

#prev-btn,
#next-btn {
    position: absolute;
    font-size: 40px;
    top: calc(50% - 25px);
}

#prev-btn:hover,
#next-btn:hover {
    cursor: pointer;
}

#prev-btn {
    left: 10px;
}

#next-btn {
    right: 10px;
}

#nav-btns {
    position: absolute;
    width: 100%;
    bottom: 20px;
    padding: 0;
    margin: 0;
    text-align: center;
}

.slide-nav-btn {
    position: relative;
    display: inline-block;
    list-style: none;
    width: 20px;
    height: 20px;
    background-color: #ff6c1a;
    border-radius: 50%;
    margin: 3px;
}

.slide-nav-btn:hover {
    cursor: pointer;
    background-color: #214762;
}

.slide-nav-btn:active {
    cursor: pointer;
    background-color: #214762;
}
.product-button {
    display: inline-block;
    background-color: #214762;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    font-family: 'Berkshire Swash', sans-serif;
    border-radius: 20px;
    font-size: 24px;
    position: absolute;
    z-index: 2;
    /* Позиционирование кнопки поверх изображения */
    top: 88%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.slide {
    position: relative;
}
.advantages-container {
    display: flex;
    justify-content: center;
}

.advantages-container_bancale {
    display: flex;
    justify-content: center;
}
.advantages {
    padding-top: 40px;
    padding-bottom: 40px;
    width: 70%;
    display: flex;
    justify-content: space-between;
    text-align: center;
    flex-wrap: wrap;
}

.advantages-item {
    width: 30%;
}

footer {
    width: 100%;
    height: auto;
    margin: 0 auto;
    background: #cbcbcb;
    text-align: center;
    padding-top: 25px;
}

footer a {
    color: #ff6c1a;
    font-size: 16px;
    margin-left: 21px;
}

footer p {
    color: #ff6c1a;
}

footer nav a:hover {
    border-bottom: 1px solid white;
}

.social img {
    margin-left: 10px;
    margin-bottom: 10px;
}

.social img:hover {
    background: #494949;
    border-radius: 50%;
}

.gallery {
    width: 80%;
    margin: auto;
    margin-bottom: 50px;
    display: grid;
    grid-template-columns: auto auto auto auto;
}

.toggles {
    display: flex;
    justify-content: center;
}

.toggles button {
    border: none;
    color: #414146;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin: 20px 22px;
    background: white;
}

.toggles button:after {
    content: " -";
}

.toggles button:last-child:after {
    content: none;
}

.post {
    width: 90%;
    margin: 0 auto 20px auto;
}

.post img {
    box-sizing: border-box;
    max-width: 200px;
    max-height: 150px;
    opacity: 0.7;
}

.photo-item img:hover {
    opacity: 1;
}

.blog-container {
    background: #fafafa;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.2) 0 4px 2px -2px;
    font-weight: 100;
    margin: 48px auto;
    width: 50rem;
}

.blog-container a:hover {
    border-color: #ff4d4d;
    color: #ff4d4d;
}

.blog-cover {
    background: url("img/world.jpg");
    background-size: cover;
    border-radius: 5px 5px 0 0;
    height: 15rem;
    box-shadow: inset rgba(0, 0, 0, 0.2) 0 64px 64px 16px;
}

.blog-body {
    margin: 0 auto;
    width: 80%;
}

.blog-title h1 a {
    color: #333;
    font-weight: 100;
}

.blog-text p {
    color: #4d4d4d;
}

.blog-tags ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    list-style: none;
    padding-left: 0;
}

.blog-tags li + li {
    margin-left: 0.5rem;
}

.blog-tags a {
    border: 1px solid#999;
    border-radius: 3px;
    color: #999;
    font-size: 0.75rem;
    height: 1.5rem;
    line-height: 1.5rem;
    letter-spacing: 1px;
    padding: 0 0.5rem;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    width: 5rem;
}

.blog-footer {
    border-top: 1px solid #e6e6e6;
    margin: 0 auto;
    padding-bottom: 0.125rem;
    width: 80%;
}

.blog-footer ul {
    list-style: none;
    display: flex;
    flex: row wrap;
    justify-content: flex-end;
    padding-left: 0;
}

.blog-footer li {
    color: #cbcbcb;
    font-size: 0.75rem;
    height: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    white-space: nowrap;
}

.published-date {
    border: 1px solid #999;
    border-radius: 3px;
    padding: 0 0.5rem;
}

.local_map {
    width: 50%;
}

#map {
    width: 90%;
    height: 400px;
    border: 2px solid black;
    margin-bottom: 60px;
}

#local {
    display: flex;
    justify-content: center;
}

#local h2 {
    margin-bottom: 20px;
    margin-top: 30px;
}

.local_info {
    margin-right: 200px;
}

.local_info h3 {
    margin-top: 75px;
    margin-bottom: 15px;
    font-size: 20px;
}

.local_info h6 {
    margin: 10px 0;
    font-size: 14px;
}

.form {
    width: 50%;
    margin: 50px auto;
}

.feedback-input {
    color: black;
    font-size: 14px;
    font-weight: 300;
    line-height: 22px;
    background-color: white;
    padding: 13px;
    margin-bottom: 10px;
    width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    border: 0px solid transparent;
    border-bottom: 1px solid #000;
}

textarea {
    width: 100%;
    height: 150px;
    resize: vertical;
}

.button-submit {
    float: left;
    width: 30%;
    border: 0px solid transparent;
    cursor: pointer;
    background-color: #ff6c1a;
    color: white;
    font-size: 18px;
    padding-top: 14px;
    padding-bottom: 14px;
    transition: all 0.4s;
    margin-top: -4px;
    font-weight: 700;
}

.button-submit:hover {
    background-color: white;
    color: black;
    border: 1px solid #000;
}

.ease {
    width: 0;
    height: 74px;
    background-color: white;
}

.about-container {
    width: 80%;
    margin: 50px auto;
    text-align: center;
}

.about-container img {
    max-width: 100%;
}

.about-container p {
    margin-top: 50px;
}

.about-container h1 {
    margin-top: 50px;
}

.services {
    width: 80%;
    margin: 50px auto;
    text-align: center;
}

.services img {
    max-width: 100%;
}

.services-container {
    margin-top: 50px;
    display: grid;
    grid-template-columns: auto auto;
    grid-gap: 50px 100px;
}

/*Cтили для разрешения экрана от 768пкс*/

@media screen and (max-width: 768px) {
    .top-nav a:not(:first-child) {
        display: none;
    }

    .top-nav a.icon {
        float: right;
        margin-top: -17px;
        display: block;
        color: black;
    }

    nav {
        width: 100%;
    }

    .top-nav.responsive {
        position: relative;
    }

    .top-nav.responsive a.icon {
        position: absolute;
        right: 0;
        top: 0;
    }

    .top-nav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }

    .advantages-item {
        width: 45%;
    }

    .photo-item {
        width: 45%;
        margin-left: 10px;
    }

    .blog-container {
        width: 28rem;
    }

    .services-container {
        margin-top: 50px;
        display: grid;
        grid-template-columns: auto;
        grid-gap: 50px 100px;
    }
}

/*Cтили для разрешения экрана от 420пкс*/

@media screen and (max-width: 420px) {
    .advantages {
        flex-direction: column;
    }

    .advantages-item {
        width: 100%;
    }

    .project {
        display: flex;
        flex-direction: column; /* Ensure consistent layout on smaller screens */
        justify-content: center;
        align-items: center;
    }

    .gallery {
        width: 100%; /* Ensures full container width */
        margin: 0 auto; /* Centers the gallery container */
        text-align: center; /* Aligns inline elements like text or images */
    }

    .photo-item {
        width: 70%;
        margin: 0 auto; /* Ensures the element is centered */
        text-align: center; /* Centers inline content inside */
    }

    img {
        display: block; /* Ensures image behaves like a block element */
        margin: 0 auto; /* Centers the image within its container */
        max-width: 100%; /* Ensures the image doesn't overflow the container */
        height: auto; /* Maintains aspect ratio */
    }
    .blog-container {
        width: 100%; /* Make it responsive for smaller screens */
        max-width: 20rem; /* Restrict to the intended size */
        margin: 0 auto; /* Center align */
    }

    .services-container {
        margin-top: 50px;
        display: grid;
        grid-template-columns: 1fr; /* Single-column layout for smaller screens */
        grid-gap: 50px; /* Adjusted grid-gap to avoid redundancy */
    }
}
