/* Site footer (matches mytutor-jpn.com) */

#footer {
    clear: both;
    background: #ffffff;
    color: #333333;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    font-weight: 400;
}

#footer p { margin: 0; }

#footer .box.footer-inner {
    clear: both;
    padding: 0 16px 16px;
    text-align: left;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    width: 100%;
}

#footer .footer-bar {
    height: 6px;
    background: #f1f3f5;
}

#footer .footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    padding: 20px 0 14px;
    justify-content: space-between;
    align-items: flex-start;
}

#footer .footer-col {
    flex: 1 1 140px;
    min-width: 140px;
    max-width: 220px;
}

#footer .footer-col-brand {
    flex: 0 0 auto;
    max-width: none;
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
}

#footer .footer-heading {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

#footer .footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

#footer .footer-links li {
    margin: 0 0 5px;
    padding: 0;
    background: none;
    display: block;
    white-space: normal;
}

#footer .footer-links li:last-child { margin-bottom: 0; }

#footer .footer-links a {
    color: #5c5c5c;
    text-decoration: none;
    font-size: 13px;
    overflow-wrap: break-word;
}

#footer .footer-links a:hover {
    text-decoration: underline;
    color: #333333;
}

#footer .footer-logo-link {
    display: inline-block;
    text-decoration: none;
    line-height: 0;
}

#footer .footer-logo-img {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    vertical-align: top;
}

#footer .footer-tagline {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 400;
    color: #8a8a8a;
    letter-spacing: 0.02em;
    text-align: center;
    width: 100%;
}

#footer .footer-rule {
    height: 0;
    border: 0;
    border-top: 1px solid #e2e4e8;
    margin: 0 0 10px;
}

#copyright {
    clear: both;
    font-size: 12px;
    color: #9a9a9a;
    text-align: center;
    margin: 0;
}

@media only screen and (min-width: 769px) {
    #footer {
        position: relative;
        margin-top: 0;
        min-height: 0;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #footer .box.footer-inner {
        width: min(900px, 100%);
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
        margin-left: auto;
        margin-right: auto;
    }

    #footer .footer-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(200px, 240px);
        column-gap: 20px;
        row-gap: 14px;
        align-items: start;
        width: 100%;
        box-sizing: border-box;
    }

    #footer .footer-col {
        max-width: none;
        min-width: 0;
    }

    #footer .footer-col:not(.footer-col-brand) {
        justify-self: start;
        width: 100%;
        max-width: 100%;
    }

    #footer .footer-col-brand {
        grid-column: auto;
        justify-self: stretch;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #footer .footer-col-brand .footer-logo-link {
        width: 100%;
        max-width: 220px;
    }

    #footer .footer-logo-img {
        width: 100%;
        max-width: 220px;
        height: auto;
    }
}

@media only screen and (max-width: 767px) {
    #footer .footer-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
        gap: 16px 12px;
        padding: 18px 0 12px;
    }

    #footer .footer-grid > .footer-col {
        flex: 1 1 calc(50% - 8px);
        max-width: calc(50% - 8px);
        min-width: 0;
        width: auto;
        box-sizing: border-box;
    }

    #footer .footer-col-brand {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    #footer .footer-col-brand .footer-logo-link {
        align-self: flex-start;
        width: 220px;
        max-width: 100%;
    }

    #footer .footer-col-brand .footer-tagline {
        width: 220px;
        max-width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

@media only screen and (max-width: 640px) {
    #footer {
        min-width: 320px;
        padding-bottom: 16px;
    }

    #footer .footer-grid { gap: 14px 10px; }
}
