/* Manmachine Works responsive footer --------------------------------------- */
#site-footer.footer-layout5 {
    overflow: hidden;
}

#site-footer.footer-layout5 .widget-area .container,
#site-footer.footer-layout5 > .container {
    width: min(calc(100% - 48px), 1320px);
    max-width: 1320px;
}

#site-footer.footer-layout5 .mm-footer-grid {
    display: grid;
    grid-template-columns:
        minmax(250px, 1.25fr)
        minmax(175px, .72fr)
        minmax(238px, .96fr)
        minmax(245px, 1fr);
    gap: clamp(32px, 3.2vw, 54px);
    align-items: start;
}

#site-footer.footer-layout5 .mm-footer-column,
#site-footer.footer-layout5 .footer-widget {
    min-width: 0;
}

#site-footer.footer-layout5 .mm-footer-column > *,
#site-footer.footer-layout5 .footer-contact__item > * {
    min-width: 0;
    max-width: 100%;
}

#site-footer.footer-layout5 .footer-widget {
    margin: 0;
}

#site-footer.footer-layout5 .mm-footer-column--about .about-text {
    max-width: 320px;
}

#site-footer.footer-layout5 .mm-footer-column--pages .menu {
    margin: 0;
}

#site-footer.footer-layout5 .mm-footer-column--pages .menu li:last-child a,
#site-footer.footer-layout5 .footer-contact__item:last-child {
    margin-bottom: 0;
}

#site-footer.footer-layout5 .footer-contact,
#site-footer.footer-layout5 .sidebar-gallery {
    width: 100%;
    max-width: none;
}

#site-footer.footer-layout5 .sidebar-gallery {
    grid-template-columns: repeat(3, minmax(0, 78px));
}

#site-footer.footer-layout5 .footer-contact__item a {
    display: block;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    text-decoration: none;
}

#site-footer.footer-layout5 .sidebar-gallery .gallery-thumb {
    width: 100%;
    min-width: 0;
}

#site-footer.footer-layout5 .copyright-wrap {
    padding: 22px 0;
}

#site-footer.footer-layout5 .mm-footer-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px 28px;
    align-items: center;
}

#site-footer.footer-layout5 .copyright-text {
    margin: 0;
}

#site-footer.footer-layout5 .mm-footer-legal {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
}

#site-footer.footer-layout5 .mm-footer-legal a {
    color: var(--body-color);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    transition: color .2s ease;
}

#site-footer.footer-layout5 .mm-footer-legal a + a::before {
    margin: 0 12px;
    color: rgb(from var(--white) r g b / .28);
    content: "|";
}

#site-footer.footer-layout5 .mm-footer-legal a:hover,
#site-footer.footer-layout5 .mm-footer-legal a:focus-visible {
    color: var(--primary-color);
}

#site-footer.footer-layout5 .footer-payment {
    justify-self: end;
}

#site-footer.footer-layout5 .footer-payment img {
    display: block;
}

@media (max-width: 1199px) {
    #site-footer.footer-layout5 .mm-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 44px 64px;
    }

    #site-footer.footer-layout5 .mm-footer-column--about .about-text,
    #site-footer.footer-layout5 .footer-contact {
        max-width: 380px;
    }

    #site-footer.footer-layout5 .sidebar-gallery {
        grid-template-columns: repeat(3, minmax(0, 90px));
    }

    #site-footer.footer-layout5 .mm-footer-bottom {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    #site-footer.footer-layout5 .mm-footer-legal {
        grid-column: 1;
        grid-row: 2;
    }

    #site-footer.footer-layout5 .footer-payment {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
}

@media (max-width: 767px) {
    #site-footer.footer-layout5 .widget-area .container,
    #site-footer.footer-layout5 > .container {
        width: min(calc(100% - 32px), 540px);
    }

    #site-footer.footer-layout5 .widget-area {
        padding: 52px 0 34px;
    }

    #site-footer.footer-layout5 .mm-footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    #site-footer.footer-layout5 .mm-footer-column {
        padding: 29px 0;
        border-bottom: 1px solid var(--border-color);
    }

    #site-footer.footer-layout5 .mm-footer-column:first-child {
        padding-top: 0;
    }

    #site-footer.footer-layout5 .mm-footer-column:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    #site-footer.footer-layout5 .about-logo {
        width: min(100%, 210px);
        margin: 0 0 22px;
    }

    #site-footer.footer-layout5 .about-text {
        margin-bottom: 22px;
        font-size: 14px;
        line-height: 1.7;
    }

    #site-footer.footer-layout5 .th-social {
        gap: 10px;
    }

    #site-footer.footer-layout5 .th-social a {
        width: 44px;
        height: 44px;
    }

    #site-footer.footer-layout5 .widget_title {
        margin-bottom: 20px;
        padding-bottom: 12px;
        font-size: 19px;
    }

    #site-footer.footer-layout5 .widget_nav_menu .menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 18px;
    }

    #site-footer.footer-layout5 .widget_nav_menu a {
        margin-bottom: 13px;
        padding-left: 17px;
        font-size: 13px;
        line-height: 1.45;
    }

    #site-footer.footer-layout5 .sidebar-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
    }

    #site-footer.footer-layout5 .footer-contact {
        max-width: 100%;
    }

    #site-footer.footer-layout5 .footer-contact__item {
        grid-template-columns: 20px minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 15px;
        font-size: 14px;
    }

    #site-footer.footer-layout5 .copyright-wrap {
        padding: 25px 0 27px;
    }

    #site-footer.footer-layout5 .mm-footer-bottom {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    #site-footer.footer-layout5 .copyright-text {
        max-width: 310px;
        font-size: 12px;
        line-height: 1.65;
        text-align: left;
    }

    #site-footer.footer-layout5 .mm-footer-legal {
        flex-wrap: wrap;
        white-space: normal;
    }

    #site-footer.footer-layout5 .mm-footer-legal a {
        font-size: 12px;
    }

    #site-footer.footer-layout5 .footer-payment {
        margin: 2px 0 0;
        justify-self: auto;
        text-align: left;
    }

    #site-footer.footer-layout5 .footer-payment img {
        max-width: min(100%, 194px);
    }
}

@media (max-width: 389px) {
    #site-footer.footer-layout5 .widget_nav_menu .menu {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    #site-footer.footer-layout5 .mm-footer-legal a {
        transition: none;
    }
}
