/* Shared footer */
:root {
    --footer-padding-x: clamp(20px, 4vw, 32px);
}

.footer-space {
    padding: 0;
    background: var(--footer-bg);
}

footer {
    width: 100%;
    background: var(--footer-bg);
    color: var(--text-primary);
    border-top: 1px solid var(--border);
}

footer > .footer-grid,
footer > .footer-bottom {
    width: calc(100% - (var(--footer-padding-x) * 2));
    max-width: calc(var(--site-max-width, 1400px) - (var(--footer-padding-x) * 2));
    margin-left: auto;
    margin-right: auto;
}

footer .container {
    max-width: var(--site-max-width, 1400px);
    margin: 0 auto;
    padding: clamp(48px, 7vw, 72px) var(--footer-padding-x) 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(160px, 1fr));
    gap: clamp(28px, 5vw, 56px);
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    max-width: 170px;
    margin-bottom: 18px;
}

.footer-logo img {
    display: block;
    width: min(160px, 100%);
    height: auto !important;
    max-height: 44px;
    object-fit: contain;
    border-radius: 0;
}

.footer-logo span {
    margin-left: 10px;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.footer-brand {
    margin-top: 0;
}

.footer-brand p,
.footer-col p {
    max-width: 280px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

.footer-col h4 {
    margin: 0 0 18px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
}

.footer-links,
.footer-col ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li,
.footer-col ul li {
    margin: 0;
}

.footer-links a,
.footer-col ul a,
.footer-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-col ul a:hover,
.footer-col ul a:focus-visible,
.footer-contact-item:hover,
.footer-contact-item:focus-visible {
    color: var(--primary);
    transform: translateX(2px);
    text-decoration: none;
}

.footer-contact-item svg,
.footer-contact-item i,
.footer-links a i,
.footer-col ul a i {
    width: 18px;
    min-width: 18px;
    height: 18px;
    color: var(--primary);
    font-size: 16px;
    line-height: 1;
}

.footer-bottom {
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    footer .container {
        padding: 44px 20px 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: left;
    }

    .footer-brand p,
    .footer-col p {
        max-width: none;
    }
}
