/*
 * Единый подвал для всех страниц.
 */

:root {
    --sj-footer-width: 1180px;
    --sj-footer-bg: #0f172a;
    --sj-footer-bg-end: #172554;
    --sj-footer-text: #cbd5e1;
    --sj-footer-muted: #94a3b8;
    --sj-footer-border: rgba(148, 163, 184, 0.18);
    --sj-footer-chip: rgba(255, 255, 255, 0.055);
    --sj-footer-chip-hover: rgba(37, 99, 235, 0.28);
}

body .sj-global-footer,
body .sj-global-footer * {
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif !important;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body .sj-global-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 160px;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--sj-footer-border);
    background:
        linear-gradient(
            105deg,
            var(--sj-footer-bg) 0%,
            var(--sj-footer-bg) 62%,
            var(--sj-footer-bg-end) 100%
        );
    color: var(--sj-footer-text);
}

body .sj-global-footer .sj-global-container {
    width: min(calc(100% - 40px), var(--sj-footer-width));
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
}

body .sj-global-footer-inner {
    min-height: 160px;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) max-content;
    align-items: center;
    gap: 48px;
    padding-top: 34px;
    padding-bottom: 34px;
}

body .sj-global-footer-about {
    min-width: 0;
    margin: 0;
    padding: 0;
}

body .sj-global-footer-copyright {
    margin: 0 0 12px;
    padding: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

body .sj-global-footer-about p {
    max-width: 620px;
    margin: 0;
    padding: 0;
    color: var(--sj-footer-muted);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
}

body .sj-global-footer-nav {
    width: max-content;
    max-width: none;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0;
}

body .sj-global-footer-nav a {
    flex: 0 0 auto;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--sj-footer-border);
    border-radius: 24px;
    background: var(--sj-footer-chip);
    color: #e2e8f0;
    box-shadow: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

body .sj-global-footer-nav a:hover,
body .sj-global-footer-nav a:focus,
body .sj-global-footer-nav a[aria-current="page"] {
    border-color: rgba(96, 165, 250, 0.55);
    background: var(--sj-footer-chip-hover);
    color: #ffffff;
    text-decoration: none;
}

@media (max-width: 980px) {
    body .sj-global-footer-inner {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 34px;
        padding-bottom: 34px;
    }

    body .sj-global-footer-nav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    body .sj-global-footer .sj-global-container {
        width: min(calc(100% - 28px), var(--sj-footer-width));
    }

    body .sj-global-footer-inner {
        min-height: auto;
        padding-top: 30px;
        padding-bottom: 30px;
    }

    body .sj-global-footer-copyright {
        font-size: 15px;
    }

    body .sj-global-footer-about p {
        font-size: 14px;
    }

    body .sj-global-footer-nav {
        gap: 7px;
    }

    body .sj-global-footer-nav a {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* SJ_MOBILE_FOOTER_FINAL_BEGIN */

@media (max-width: 760px) {
    body .sj-global-footer {
        min-height: 0 !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }

    body .sj-global-footer .sj-global-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-right:
            max(16px, env(safe-area-inset-right))
            !important;
        padding-left:
            max(16px, env(safe-area-inset-left))
            !important;
    }

    body .sj-global-footer-inner {
        min-height: 0 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 24px !important;
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    body .sj-global-footer-copyright {
        font-size: 15px !important;
    }

    body .sj-global-footer-about p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    body .sj-global-footer-nav {
        width: 100% !important;
        max-width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    body .sj-global-footer-nav a {
        width: 100% !important;
        min-height: 44px !important;
        padding: 9px 10px !important;
        font-size: 14px !important;
        text-align: center !important;
    }

    body .sj-global-footer-nav a:last-child:nth-child(odd) {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 430px) {
    body .sj-global-footer .sj-global-container {
        padding-right:
            max(14px, env(safe-area-inset-right))
            !important;
        padding-left:
            max(14px, env(safe-area-inset-left))
            !important;
    }

    body .sj-global-footer-nav {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body .sj-global-footer-nav a:last-child:nth-child(odd) {
        grid-column: auto !important;
    }
}

/* SJ_MOBILE_FOOTER_FINAL_END */
