footer {
    background-color: #151517;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: -100px;
    margin-right: -100px;
    padding: 0;
    border-top: 1px solid #000;
    color: #fff;
    z-index: 3;
}

.footer-container {
    width: 100%;
    max-width: calc(100% - 200px);
    padding: 0 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.footer-container .copyright {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    margin-top: auto;
    height: auto;
}
.footer-container .logo__footer {position: relative;top: 28px;}
.footer-container .logo__footer img {height: 128px;}

.contact-info, .quote-form, .footer-menu{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.contact-info h4, .quote-form h4, .footer-menu h4 {margin: 5px 0;}
.contact-info p {margin: 5px 0;}

.footer-menu ul {
    list-style: none;
    padding: 0;
}

.footer-menu p {
    margin: 0;
}

.footer-menu p a {
    color: #fff;
    text-decoration: none;
}

.footer-menu p a:hover {
    text-decoration: underline;
}

.quote-form input,
.quote-form textarea {
    width: 55%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.quote-form button {
    padding: 10px;
    background-color: #3fa80d;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.quote-form button:hover {
    background-color: #3fa80d;
}

/* ===== Tablets 769–1024px footer alignment & sizing ===== */
@media (max-width: 1024px) and (min-width: 769px) {
    footer {
        margin-left: 0;
        margin-right: 0;
        padding: 24px 0;
        height: auto;
        width: 100%;
    }

    .footer-container {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 10px;
        align-items: start;
    }

    .footer-container .logo__footer { top: 0; }
    .footer-container .logo__footer img { height: 110px; }
    .footer-container .copyright {font-size: 12px;justify-content: center;}

    .contact-info h4, .footer-menu h4, .quote-form h4 {
        font-size: 16px;
        margin: 0 0 10px;
        text-align: center;
    }

    .contact-info p, .footer-menu p {
        font-size: 14px;
        line-height: 1.4;
        margin: 0 0;
        text-align: center;
    }

    .footer-menu p a { display: block;min-height: 15px; }

    .quote-form input, .quote-form textarea {
        width: 100%;
        font-size: 14px;
        padding: 10px;
    }

    .quote-form button {
        font-size: 14px;
        padding: 10px 12px;
        width: 100%;
    }

}

/* Мобильные устройства (до 768px) - FIXED */
@media (max-width: 768px) {
    footer {
        margin-left: 0;       /* фикс: было -20px */
        margin-right: 0;      /* фикс: было -20px */
        height: auto;
        padding: 30px 0;
        width: 100%;
    }

    .footer-container {
        width: 100%;
        max-width: 100%;                       /* фикс: было calc(100% - 40px) */
        padding: 0 20px;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 колонки */
        grid-template-rows: auto auto; /* 2 строки */
        gap: 25px;
        align-items: start;
    }

    /* Первый блок - логотип и копирайт (1 колонка, 1 строка) */
    .footer-container > .contact-info:first-child {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .footer-container .copyright {
        padding-top: 10px;
    }

    /* Второй блок - контакты (2 колонка, 1 строка) */
    .footer-container > .contact-info:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        text-align: center;
    }

    /* Третий блок - меню (скрываем) */
    .footer-container > .footer-menu {
        display: none;
    }

    /* Форма - на всю ширину (обе колонки, 2 строка) */
    .footer-container > .quote-form {
        grid-column: 1 / -1; /* Занимает все колонки */
        grid-row: 2; /* Вторая строка */
        text-align: center;
        margin-top: 20px;
        padding-top: 25px;
        border-top: 1px solid #333;
    }

    /* Остальные стили остаются без изменений */
    .logo__footer {
        top: 0;
    }

    .logo__footer img {
        height: 90px;
    }

    .copyright {
        justify-content: center;
        margin-top: 0;
    }

    .contact-info h4, .footer-menu h4, .quote-form h4 {
        margin: 0 0 12px 0;
        font-size: 16px;
        color: #3fa80d;
    }

    .contact-info p, .footer-menu p {
        margin: 6px 0;
        font-size: 14px;
        line-height: 1.4;
    }

    .quote-form input {
        width: 100%;
        margin: 5px 0;
        box-sizing: border-box;
        padding: 12px;
    }

    .quote-form button {
        width: 100%;
        margin-top: 8px;
        padding: 12px;
    }

    .footer-menu p a {
        display: block;
        padding: 4px 0;
        transition: color 0.3s ease;
    }

    .footer-menu p a:hover {
        color: #3fa80d;
    }
}

/* Очень маленькие экраны (до 480px) - FIXED */
@media (max-width: 480px) {
    footer {
        margin-left: 0;       /* фикс: было -15px */
        margin-right: 0;      /* фикс: было -15px */
        padding: 25px 0;
        width: 100%;
    }

    .footer-container {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 20px;
    }

    .footer-container > .contact-info:first-child {
        grid-column: 1;
        grid-row: 1;
    }

    .footer-container .copyright {
        padding-top: 10px;
    }

    .footer-container > .contact-info:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
        text-align: center;
    }

    .footer-container > .footer-menu {
        display: none;
    }

    .footer-container > .quote-form {
        grid-column: 1;
        grid-row: 4;
    }

    .logo__footer img {
        height: 75px;
    }

    .contact-info h4, .footer-menu h4, .quote-form h4 {
        font-size: 15px;
    }

    .contact-info p, .footer-menu p {
        font-size: 13px;
    }

    .quote-form input,
    .quote-form button {
        max-width: 100%;
    }
}
