/* Questetra theme: shared footer components. */

/* Footer Custom Styles */
.questetra-footer-band {
    background: var(--q-surface);
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.questetra-footer-band > .wp-block-template-part {
    width: 100%;
    max-width: none;
}


.questetra-footer-links {
    width: min(100% - 48px, var(--wp--style--global--wide-size));
    max-width: var(--wp--style--global--wide-size);
    margin-inline: auto;
}

.questetra-footer-set {
    display: none;
    grid-template-columns: minmax(320px, 1.35fr) minmax(140px, 0.7fr) minmax(180px, 0.85fr) minmax(260px, 1fr);
    gap: clamp(2rem, 4vw, 4.5rem);
    align-items: start;
}

.questetra-lang-ja .questetra-footer-set--ja,
body:not(.questetra-lang-ja):not(.questetra-lang-en) .questetra-footer-set--ja,
.questetra-lang-en .questetra-footer-set--en {
    display: grid;
}

.questetra-lang-ja .questetra-footer-set--en,
.questetra-lang-en .questetra-footer-set--ja {
    display: none;
}

.questetra-footer-brand,
.questetra-footer-brand__head {
    display: block;
    min-width: 0;
    text-align: left;
}

.questetra-footer-brand__home {
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

.questetra-footer-logo-gray {
    fill: #656565;
}

.questetra-footer-logo-blue {
    fill: #2196f3;
}

.questetra-footer-support-logo {
    display: block;
    width: min(100%, 320px);
    height: auto;
    margin-inline: 0;
}

.questetra-footer-brand p {
    max-width: 34rem;
    margin: 0.75rem 0 0;
    color: var(--q-text-secondary);
    font-size: 16px;
    line-height: 1.65;
}

.questetra-footer-community.support-community-banner {
    width: min(100%, 28rem);
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 2rem 0 0;
    padding: 0.7rem 0.85rem;
    box-sizing: border-box;
    border: 1px solid var(--q-primary);
    border-radius: 10px;
    background: var(--q-primary);
    color: var(--wp--preset--color--white);
    box-shadow: var(--q-shadow-1);
    text-align: center;
    text-decoration: none;
}

.questetra-footer-community.support-community-link {
    display: flex;
    height: auto;
    align-items: center;
    justify-content: center;
}

.questetra-footer-community .support-community-icons {
    font-size: clamp(32px, 3vw, 44px);
    gap: 0.55rem;
    margin-bottom: 0.2rem;
}

.questetra-footer-community .support-community-label {
    color: currentColor;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.questetra-footer-community.support-community-banner:hover,
.questetra-footer-community.support-community-banner:focus-visible {
    background: linear-gradient(135deg, #e9f3ff 0%, #f5faff 100%);
    color: var(--q-primary-dark);
}

.questetra-footer-column,
.questetra-footer-product {
    min-width: 0;
    text-align: left;
}

.questetra-footer-column h6,
.questetra-footer-product h6 {
    margin: 0 0 0.75rem;
    color: var(--q-text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
}

.questetra-footer-column ul,
.questetra-footer-product ul {
    min-width: 0;
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.questetra-footer-column li,
.questetra-footer-product li {
    margin-bottom: 0.75rem;
}

.questetra-footer-column a,
.questetra-footer-product a {
    color: var(--q-text-secondary);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.questetra-footer-column a:hover,
.questetra-footer-product a:hover {
    color: var(--q-primary);
    text-decoration: underline;
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.questetra-footer-product__logo {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
    border-radius: 16px;
    background: var(--wp--preset--color--white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.questetra-footer-product__logo img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.questetra-footer-product__logo::after {
    content: none !important;
}

.questetra-footer-product__title-link,
.questetra-footer-product a.q-external {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    align-items: baseline;
    gap: 0.45em;
    white-space: normal;
}

.questetra-footer-column a.q-external::after,
.questetra-footer-product a.q-external::after,
.questetra-footer-product__title-link::after {
    content: "";
    display: inline-block;
    flex: 0 0 auto;
    width: 0.82em;
    height: 0.82em;
    margin-left: 0;
    vertical-align: baseline;
    background:
        linear-gradient(currentColor, currentColor) 1px 1px / calc(100% - 3px) calc(100% - 3px) no-repeat,
        linear-gradient(currentColor, currentColor) 3px 3px / calc(100% - 3px) calc(100% - 3px) no-repeat;
    opacity: 0.7;
}

.q-highlight {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 6px 16px;
    border: 1px solid var(--q-primary);
    color: var(--q-primary) !important;
    text-decoration: none !important;
    background: transparent;
    border-radius: 4px;
    font-size: 13px;
}

.q-highlight:hover {
    background: var(--q-primary);
    color: var(--wp--preset--color--white) !important;
}

.q-highlight.q-external::after {
    opacity: 0.9;
}

@media (max-width: 1100px) {
    .questetra-footer-set {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .questetra-footer-brand,
    .questetra-footer-product {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .questetra-footer-band {
        padding-block: 3rem 3.5rem;
    }

    .questetra-footer-links {
        width: 92%;
        max-width: 92%;
    }

    .questetra-footer-set {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.25rem;
        row-gap: 2rem;
    }

    .questetra-footer-brand {
        grid-column: 1 / -1;
    }

    .questetra-footer-column {
        grid-column: auto;
        min-width: 0;
    }

    .questetra-footer-product {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .questetra-footer-support-logo {
        width: min(100%, 280px);
    }

    .questetra-footer-community.support-community-banner {
        width: min(100%, 20rem);
    }

    .questetra-footer-column h6,
    .questetra-footer-product h6 {
        font-size: 13px;
    }

    .questetra-footer-column a,
    .questetra-footer-product a {
        font-size: 13px;
        line-height: 1.45;
    }

    .questetra-footer-product__logo {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .questetra-footer-product__logo img {
        width: 40px;
        height: 40px;
    }
}
.questetra-footer-bottom-band {
    background: var(--q-primary-dark);
    color: var(--wp--preset--color--white);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.questetra-footer-bottom {
    gap: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.questetra-footer-bottom .footer-lang-switcher {
    margin-left: auto;
}
.questetra-footer-copyright {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--wp--preset--color--white);
}
.questetra-footer-copyright-and-social {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
}
.questetra-footer-company {
    color: var(--wp--preset--color--white);
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.1em;
}
.questetra-footer-social-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    line-height: 1;
}
.questetra-footer-social-links li {
    margin: 0;
    padding: 0;
}
.questetra-footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--wp--preset--color--white);
    line-height: 1;
    height: 24px;
    opacity: 0.95;
    transition: opacity 150ms ease, transform 150ms ease;
}
.questetra-footer-social-links a:hover {
    opacity: 1;
    transform: translateY(-1px);
}
.questetra-footer-social-links svg {
    display: block;
}
.questetra-footer-copyright img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}
.questetra-footer-copyright span {
    font-size: 14px;
}
@media (max-width: 600px) {
    .questetra-footer-bottom {
        flex-wrap: wrap !important;
        justify-content: center !important;
        text-align: center;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .questetra-footer-copyright {
        justify-content: center;
    }
    .questetra-footer-copyright-and-social {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    .questetra-footer-company {
        width: 100%;
        white-space: normal;
        display: block;
    }
    .questetra-footer-social-links {
        justify-content: center;
        gap: 1.1rem;
    }
    .questetra-footer-social-links a {
        width: 36px;
        height: 36px;
    }
    .questetra-footer-social-links svg {
        width: 36px;
        height: 36px;
    }
    .questetra-footer-bottom .footer-lang-switcher {
        margin-left: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.9rem;
    }
    .questetra-footer-bottom .footer-lang-switcher a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        min-height: 36px;
    }
}
