.footer {
    position: relative;
    margin-top: 100px;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px; /* 177.778% */
}

.footer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    transform: translateY(-50%);
    width: 70px;
    aspect-ratio: 70 / 394;
    background-image: url('../images/footer-pattern.png');
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.footer span {
    display: block;
}

.footer .container {
    margin-bottom: 0;
}

.footer__top {
    background-color: #f7f7f7;
}

.footer__top-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
    padding: 100px 0;
}

.footer__info {
    min-width: 440px;
}

.footer__logo {
    height: 70px;
    margin-bottom: 50px;
}

.footer__heading {
    font-size: 21px;
    font-weight: 700;
    line-height: 35px; /* 166.667% */
    margin-bottom: 12px;
    text-decoration: none;
}

.footer__contact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 30px;
}

.footer__contact a {
    text-decoration: none;
}

.footer__contact-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer__contact-icon {
    width: 22px;
    margin-top: 4px;
}

.footer__contact-row--email .footer__contact-icon {
    transform: translateY(30%);
}

.footer__contact-row--email {
    grid-column: span 2;
}

.footer__contact-row--address {
    grid-column: span 2;
}

.footer__contact-text--tablet {
    display: none;
}

.footer__menu {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 120px;
}

/* .footer__menu-group:nth-child(3) {
    position: absolute;
    top: 80px;
} */

.footer__menu-sub {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.footer__menu-group:nth-child(3) .footer__menu-sub {
    /*display: none;*/
    max-width:93%;
}

.footer__menu-sub a {
    display: block;
    text-decoration: none;
}

.footer__form .wpcf7-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-top: 12px;
}

.footer__form .wpcf7-form p + p {
    margin: 0;
}

.footer__form input[type='email'] {
    min-width: 390px;
}

.footer__middle {
    display: none;
}

.footer__bottom {
    background-color: #ffcd2d;
    padding: 25px 0;
    color: #3b3b3b;
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
}

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

.footer__bottom-main {
    display: flex;
    align-items: center;
    gap: 50px;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
}

.footer__links a {
    text-decoration: none;
}

.footer__socials {
    display: flex;
    align-items: center;
    gap: 40px;
}

.footer__social {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* Contact Form 7 Modal Styles */
.footer__form .wpcf7-response-output {
    display: none !important;
}

.cf7-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cf7-modal.cf7-modal--active {
    opacity: 1;
    visibility: visible;
}

.cf7-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.cf7-modal__container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.cf7-modal__content {
    position: relative;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cf7-modal.cf7-modal--active .cf7-modal__content {
    transform: scale(1);
}

.cf7-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px 15px;
    border-bottom: 1px solid #e8e8e8;
}

.cf7-modal__title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    color: #3b3b3b;
}

.cf7-modal__close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s ease;
}

.cf7-modal__close:hover,
.cf7-modal__close:focus {
    color: #333;
    outline: none;
}

.cf7-modal__body {
    padding: 20px 30px 30px;
}

.cf7-modal__message {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #3b3b3b;
    padding: 15px 20px;
    border-radius: 4px;
    border: 2px solid #00a0d2;
}

.cf7-modal__message--success {
    border-color: #46b450;
    background-color: #f0f9f0;
    color: #2e7d32;
}

.cf7-modal__message--error {
    border-color: #dc3232;
    background-color: #fdf2f2;
    color: #c62828;
}

.cf7-modal__message--warning {
    border-color: #ffb900;
    background-color: #fff8e1;
    color: #f57c00;
}

.cf7-modal__message--spam {
    border-color: #f56e28;
    background-color: #fff3e0;
    color: #e65100;
}

.scroll-up-btn {
    position: fixed;
    z-index: 9;
    bottom: 100px;
    right: 53px;
    width: 62px;
    aspect-ratio: 1 / 1;
}

.scroll-up-btn img {
    width: 100%;
    height: 100%;
}

@media (max-width: 1920px) {
    .footer::after {
        width: 40px;
    }
}

@media (max-width: 1440px) {
    .footer__form input[type='email'] {
        min-width: 250px;
    }
}

@media (max-width: 1280px) {
    .footer {
        margin-top: 20px;
        font-size: 21px;
    }

    .footer::after {
        transform: translateY(-20%);
    }

    .footer__top-inner {
        padding: 50px 0;
    }

    .footer__info {
        flex: 1;
        min-width: unset;
    }

    .footer__logo {
        margin-bottom: 10px;
    }

    .footer__contact {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px 10px;
        margin-top: 10px;
    }

    .footer__contact-row--email {
        grid-column: span 1;
    }

    .footer__contact-row--address {
        grid-column: span 3;
    }

    .footer__contact-text--desktop {
        display: none;
    }

    .footer__contact-text--tablet {
        display: block;
    }

    .footer__menu {
        flex: unset;
        flex-direction: column;
        gap: 10px;
        margin: 0 20px 0 0;
    }

    .footer__menu-group:nth-child(3) {
        position: static;
    }

    .footer__menu-sub {
        display: none;
    }

    .footer__menu .footer__newsletter {
        display: none;
    }

    .footer__middle {
        display: block;
        background-color: #e8e8e8;
        padding: 50px 0;
    }

    .footer__form .wpcf7-form {
        flex-direction: row;
        gap: 12px;
        margin-right: 20px;
    }

    .footer__form .wpcf7-form p:first-of-type {
        width: 100%;
    }

    .footer__form input[type='email'] {
        background-color: #f7f7f7;
    }

    .footer__bottom-inner {
        flex-direction: row-reverse;
    }

    .footer__bottom-main {
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }

    .footer__links {
        gap: 30px;
    }

    .footer__socials {
        gap: 30px;
    }

    .footer__social {
        width: 26px;
        height: 26px;
    }

    .scroll-up-btn {
        bottom: 60px;
        width: 53px;
    }
}

@media (max-width: 900px) {
    .footer__contact-row--email {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .footer::after {
        aspect-ratio: 70 / 300;
        transform: translateY(-50%);
    }

    .footer__top-inner {
        padding: 20px 0;
    }

    .footer__logo {
        margin-bottom: 20px;
    }

    .footer__contact {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 10px;
        margin-top: 30px;
        max-width: 500px;
    }

    .footer__contact-text--tablet {
        display: none;
    }

    .footer__contact-text--mobile {
        display: block;
    }

    .footer__menu {
        display: none;
    }

    .footer__middle {
        padding: 28px 0;
    }

    .footer__form {
        margin: 20px 0 0;
    }

    .footer__bottom-inner {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .footer__bottom-main {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
    }

    .footer__links {
        justify-content: center;
        gap: 20px;
    }

    .footer__form .wpcf7-form {
        margin-right: 0;
    }

    .cf7-modal__container {
        padding: 15px;
    }

    .cf7-modal__content {
        max-width: 100%;
    }

    .cf7-modal__header {
        padding: 15px 20px 10px;
    }

    .cf7-modal__title {
        font-size: 18px;
    }

    .cf7-modal__body {
        padding: 15px 20px 20px;
    }

    .cf7-modal__message {
        font-size: 14px;
        padding: 12px 15px;
    }

    .scroll-up-btn {
        bottom: 50px;
        right: 18px;
        width: 50px;
    }
}

@media (max-width: 480px) {
    .footer__logo {
        height: 50px;
    }
}

@media (max-width: 400px) {
    .footer__contact-row {
        grid-column: span 2;
    }

    .footer__form .wpcf7-form {
        flex-direction: column;
    }
}