/* Shared footer layout. Child themes override palette variables, not markup. */
#footer.site-footer {
    --footer-background: dimgray;
    --footer-border: #777;
    --footer-text: #f0f0f0;
    --footer-heading: #fff;
    --footer-muted: #e2e2e2;
    --footer-label: #ddd;
    --footer-divider: rgba(255, 255, 255, 0.2);
    --footer-accent: #00aed4;
    --footer-hover: #8deaff;
    --footer-social-background: rgba(255, 255, 255, 0.08);
    --footer-social-border: rgba(255, 255, 255, 0.24);
    --footer-max-width: 1000px;
    clear: both;
    width: 100%;
    margin: 48px 0 0;
    padding: 0;
    overflow: visible;
    border-top: 1px solid var(--footer-border);
    background: var(--footer-background);
    color: var(--footer-text);
    font-family: "PT Sans", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.site-footer-container {
    box-sizing: border-box;
    width: calc(100% - 40px);
    max-width: var(--footer-max-width);
    margin: 0 auto;
    padding: 40px 0 24px;
}

.site-footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.75fr) minmax(0, 1fr);
    gap: 40px;
    padding-bottom: 32px;
}

#footer.site-footer ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    float: none;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
}

#footer.site-footer li {
    margin: 0;
    padding: 0;
}

#footer.site-footer a {
    display: inline-block;
    padding: 3px 0;
    color: var(--footer-text);
    text-decoration: none;
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
    transition: color 150ms ease;
}

#footer.site-footer a:hover {
    color: var(--footer-hover);
    text-decoration: underline;
}

#footer.site-footer a:focus-visible {
    border-radius: 2px;
    outline: 2px solid var(--footer-accent);
    outline-offset: 4px;
}

#footer.site-footer .site-footer-wordmark {
    padding: 0;
    color: var(--footer-heading);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    text-decoration: none;
}

.site-footer-wordmark span {
    color: var(--footer-accent);
}

.site-footer-tagline {
    margin: 8px 0 18px;
    color: var(--footer-muted);
    font-size: 13px;
    line-height: 1.5;
}

.site-footer-contact {
    font-size: 13px;
}

#footer.site-footer h2 {
    margin: 2px 0 12px;
    padding: 0;
    color: var(--footer-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.5;
    text-transform: uppercase;
}

.site-footer-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--footer-divider);
    font-size: 12px;
}

.site-footer-copyright {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--footer-muted);
    line-height: 1.7;
}

.site-footer-copyright span {
    color: var(--footer-label);
    font-size: 11px;
}

.site-footer-additional {
    min-width: 0;
}

#footer.site-footer .site-footer-secondary {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 22px;
}

@media (max-width: 760px) {
    .site-footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 24px;
    }

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

    .site-footer-tagline {
        margin-bottom: 10px;
    }

    .site-footer-bottom {
        flex-direction: column;
        gap: 16px;
    }

    #footer.site-footer .site-footer-secondary {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    #footer.site-footer {
        margin-top: 32px;
    }

    .site-footer-container {
        width: calc(100% - 32px);
        padding-top: 28px;
    }

    #footer.site-footer .site-footer-secondary {
        flex-direction: column;
        gap: 4px;
    }

    #footer.site-footer a {
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

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

.site-footer-identity {
    min-width: 0;
}

.site-footer-counters {
    margin-top: 12px;
}

.site-footer-counters img {
    display: block;
    border: 0;
}

.site-footer-social {
    margin-top: 18px;
}

.site-footer-social-label {
    display: block;
    margin-bottom: 8px;
    color: var(--footer-muted);
    font-size: 12px;
}

#footer.site-footer .info-social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

#footer.site-footer .info-social-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--footer-social-border);
    border-radius: 9px;
    background: var(--footer-social-background);
    color: var(--footer-text);
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

#footer.site-footer .info-social-link svg {
    display: block;
    width: 22px;
    height: 22px;
}

#footer.site-footer .info-social-link--max { --footer-social-color: #8255c9; }
#footer.site-footer .info-social-link--telegram { --footer-social-color: #1687b7; }
#footer.site-footer .info-social-link--dzen { --footer-social-color: #292d32; }
#footer.site-footer .info-social-link--vk { --footer-social-color: #1976d2; }

#footer.site-footer .info-social-link:hover,
#footer.site-footer .info-social-link:focus-visible {
    border-color: var(--footer-social-color);
    background: #fff;
    color: var(--footer-social-color);
    text-decoration: none;
    transform: translateY(-1px);
}

#footer.site-footer .info-social-link:focus-visible {
    outline-color: var(--footer-social-color);
}

#footer.site-footer .footer_ad {
    box-sizing: border-box;
    max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    #footer.site-footer .info-social-link {
        transition: none;
        transform: none;
    }
}
