.footer {
    background-color: #161620;
    background-image: url("../images/starsbg.png");
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: cover;
    padding: 113px 73px 113px 73px;
    height: 600px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 200px;
}

.footer__container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    
}

.footer__logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 378px;
}

.footer__logo img {
    width: 278px;
}

.footer__logo p {
    color: #FFF;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    margin-top: 14px;
}

.footer__logo button {
    display: flex;
    width: 248px;
    height: 40px;
    padding: 8px;
    justify-content: center;
    align-items: center;
    color: #161620;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: -0.16px;
    border-radius: 47px;
    background: #FFF;
    margin-top: 25px;
    border: none;
    cursor: pointer;
}

.footer__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.footer__links span {
    color: #FFF;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
}

.footer__links--contacts .footer__about-link {
    color: #FFF;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
    text-decoration: none;
    display: inline-block;
}

.footer__links--contacts .footer__about-link:link,
.footer__links--contacts .footer__about-link:visited,
.footer__links--contacts .footer__about-link:hover,
.footer__links--contacts .footer__about-link:active,
.footer__links--contacts .footer__about-link:focus {
    color: #FFF !important;
    text-decoration: none !important;
}

.footer__links-items {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.footer__links-items a {
    color: #E0E0E0;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 22.516px;
    letter-spacing: -0.14px;
    text-decoration: none;
}

.footer__form-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 200px;
    align-items: center;
}

.footer__form-field input.invalid {
    border-color: #ff8686 !important;
}

.footer__form-field:has(input.invalid) .footer__form-label {
    color: #ff8686;
}

.footer__form-field input.invalid[name="phone"] {
    border-color: #E4E4E4 !important;
}

.footer__form-field:has(input[name="phone"].invalid) .footer__form-label {
    color: #FFF;
}

.footer__form-field input {
    border-radius: 8px;
    border: 0.5px solid #E4E4E4 !important;
    display: flex;
    padding: 11px 14px 8px 14px;
    align-items: center;
    gap: 8px;
    color: rgba(238, 248, 255, 0.47);
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 105%;
    letter-spacing: -0.16px;
    background: transparent;
    outline: none;
}

.footer__form-btn {
    display: flex;
    height: 48px;
    padding: 8px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    border-radius: 47px;
    background: rgba(50, 220, 149, 0.68);
    border: none;
    color: #161620;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: -0.16px;
}

.footer__form-label {
    color: #FFF;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 105%;
    letter-spacing: -0.16px;
}

.footer__form-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    max-width: 550px;
}

.footer__form-title h4 {
    color: #FFF;
    font-family: "Montserrat", sans-serif;
    font-size: 52px;
    font-style: normal;
    font-weight: 600;
    line-height: 103%;
    letter-spacing: -1.04px;
}

.footer__form-title p {
    color: #E4E4E4;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
}

.footer__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer__form--hidden {
    display: none;
}

.footer__form-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__form-label {
    color: #FFF;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%;
    cursor: pointer;
}

.footer__form-thanks {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.footer__form-thanks--visible {
    display: flex;
}

.footer__form-thanks-title {
    color: #FFF;
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%;
}

.footer__form-thanks-text {
    color: #FFF;
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
    line-height: 140%;
    max-width: 374px;
}

.footer__form-message {
    display: none;
    margin-top: 12px;
    color: #FF8686;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
}

.footer__form-message--visible {
    display: block;
}

@media (max-width: 768px) {
    .footer {
        padding: 48px 24px;
        margin-top: 0;
        height: auto;
        min-height: auto;
        gap: 32px;
        align-items: stretch;
    }

    .footer__form-container {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        width: 100%;
    }

    .footer__container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
    }

    .footer__logo,
    .footer__links:not(.footer__links--products):not(.footer__links--contacts) {
        display: none;
    }

    .footer__links--products,
    .footer__links--contacts {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer__links--products span,
    .footer__links--contacts span {
        text-align: center;
    }

    .footer__links--products .footer__links-items,
    .footer__links--contacts .footer__links-items {
        align-items: center;
    }

    .footer__form-title h4{
        font-size: 32px;
        text-align: center;
    }

    .footer__form-title p{
        text-align: center;
        font-size: 14px;
    }

    .footer__form-container{
        gap: 32px;
    }
}

.contact-modal {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 10, 18, 0.78);
    -webkit-backdrop-filter: blur(13px);
    backdrop-filter: blur(13px);
}

.contact-modal__panel {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    max-width: fit-content;
    padding: 40px ;
    border-radius: 16px;
    background: #161620;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.contact-modal__panel--success-only {
    padding: 44px 36px 40px;
}

.contact-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.contact-modal__success {
    box-sizing: border-box;
    padding: 12px 40px 8px 12px;
    max-width: 380px;
    margin: 0 auto;
}

.contact-modal__success:not([hidden]) {
    display: block;
}

.contact-modal__success-message {
    margin: 0;
    color: #fff;
    text-align: center;
    font-family: "Inter", sans-serif;
}

.contact-modal__success-lead {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 130%;
    margin-bottom: 16px;
}

.contact-modal__success-detail {
    display: block;
    font-size: 16px;
    font-weight: 400;
    line-height: 140%;
}

#contact-modal-form-wrap[hidden] {
    display: none !important;
}

.contact-modal .form-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 38px;
}

.contact-modal .footer__form-title.contact-modal__form-intro {
    gap: 16px;
    padding-right: 36px;
    max-width: 500px;
    padding-right: 0 !important;
}

.contact-modal .footer__form-title.contact-modal__form-intro h4 {
    font-size: 40px;
    letter-spacing: -0.56px;
    line-height: 1.08;
}

.contact-modal .footer__form-title.contact-modal__form-intro p {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 400;
    color: #E4E4E4;
}

.contact-modal .form-content form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-modal .form-content input[type="text"],
.contact-modal .form-content input[type="tel"] {
    box-sizing: border-box;
    width: 100%;
    border-radius: 8px;
    border: 0.5px solid #e4e4e4 !important;
    padding: 12px 14px;
    color: rgba(238, 248, 255, 0.85);
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.16px;
    background: transparent;
    outline: none;
}

.contact-modal .form-content input::placeholder {
    color: rgba(238, 248, 255, 0.47);
}

.contact-modal .form-content input:focus {
    border-color: rgba(50, 220, 149, 0.6) !important;
}

.contact-modal .form-content .footer__form-btn {
    margin-top: 8px;
}

.contact-modal .form-content .footer__form-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .contact-modal .footer__form-title.contact-modal__form-intro {
        display: none !important;
    }

    .contact-modal .form-content {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .contact-modal__panel {
        padding: 36px 20px 28px;
    }

    .contact-modal__panel.contact-modal__panel--success-only {
        padding: 36px 28px 32px;
    }
}