/* ---- Site footer ------------------------------------------------------------------------------------------------------
   Navy band with an accent hairline on top. Brand + contact, two link columns and a newsletter card; four columns on
   desktop, two on tablets, one on phones. The band is navy in both themes (the light theme gets a slightly brighter
   navy, the dark theme a deeper one with a border), so the lettering is always light. Selectors start with
   `html footer.site-footer` to outrank the template's bare `footer` rules in Style.css. Loaded after site-brand.css. */
html footer.site-footer {
    --sf-bg: linear-gradient(180deg, #0b2038 0%, #071525 100%);
    --sf-text: #c9d6e6;
    --sf-strong: #fff;
    --sf-muted: #8fa3bb;
    --sf-line: rgba(255, 255, 255, 0.1);
    --sf-card: rgba(255, 255, 255, 0.06);
    --sf-accent: #1685ff;
    background: var(--sf-bg);
    border-top: 3px solid var(--sf-accent);
    color: var(--sf-text);
    margin-top: 4rem !important;
    padding: 0;
}

html[data-theme="dark"] footer.site-footer {
    --sf-bg: linear-gradient(180deg, #08121f 0%, #050d17 100%);
    --sf-text: #b8c7da;
    --sf-card: rgba(255, 255, 255, 0.04);
    --sf-line: #1c3250;
    --sf-accent: #3d97ff;
}

footer.site-footer .sf-wrap {
    padding-block: 3rem 1.25rem;
}

footer.site-footer .sf-grid {
    display: grid;
    gap: 2.5rem 2rem;
    grid-template-columns: 1.3fr 0.8fr 0.8fr 1.3fr;
}

/* ---- Brand + contact ---- */
footer.site-footer .sf-logo {
    display: inline-block;
    margin-bottom: 1.25rem;
}

footer.site-footer .sf-logo img {
    height: auto;
    max-height: 46px;
    max-width: 180px;
    width: auto;
}

footer.site-footer .sf-contact,
footer.site-footer .sf-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

footer.site-footer .sf-contact li {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    margin: 0 0 0.85rem;
}

footer.site-footer .sf-contact i {
    align-items: center;
    background: var(--sf-card);
    border-radius: 0.6rem;
    color: var(--sf-accent);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.95rem;
    height: 2.1rem;
    justify-content: center;
    width: 2.1rem;
}

footer.site-footer .sf-contact span {
    font-size: 0.9rem;
    line-height: 1.7;
    padding-top: 0.2rem;
    text-align: start;
    word-break: break-word;
}

/* ---- Link columns ---- */
footer.site-footer h3 {
    color: var(--sf-strong);
    font-size: 1.05rem;
    margin: 0 0 1.1rem;
    padding-bottom: 0.7rem;
    position: relative;
}

footer.site-footer h3::after {
    background: var(--sf-accent);
    border-radius: 2px;
    content: "";
    height: 3px;
    inset-block-end: 0;
    inset-inline-start: 0;
    position: absolute;
    width: 2rem;
}

footer.site-footer .sf-links li {
    margin: 0;
}

footer.site-footer .sf-links a {
    color: var(--sf-text);
    display: inline-block;
    font-size: 0.92rem;
    padding: 0.35rem 0;
    position: relative;
    text-decoration: none;
    transition: color 0.2s ease, padding-inline-start 0.2s ease;
}

footer.site-footer .sf-links a:hover,
footer.site-footer .sf-links a:focus-visible {
    color: var(--sf-strong);
    padding-inline-start: 0.4rem;
}

/* ---- Newsletter ---- */
footer.site-footer .sf-news {
    background: var(--sf-card);
    border: 1px solid var(--sf-line);
    border-radius: 1.1rem;
    padding: 1.4rem;
}

footer.site-footer .sf-news h3 {
    margin-bottom: 0.9rem;
}

footer.site-footer .sf-news p {
    color: var(--sf-text);
    font-size: 0.88rem;
    line-height: 1.8;
    margin: 0 0 1rem;
    text-align: start;
}

footer.site-footer .sf-form {
    position: relative;
}

footer.site-footer .sf-form input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--sf-line);
    border-radius: 999px;
    color: var(--sf-strong);
    font-size: 0.92rem;
    height: 3rem;
    margin: 0;
    padding-block: 0;
    padding-inline: 1.1rem 3.6rem;
    width: 100%;
}

footer.site-footer .sf-form input::placeholder {
    color: var(--sf-muted);
}

footer.site-footer .sf-form input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--sf-accent);
    box-shadow: 0 0 0 3px rgba(22, 133, 255, 0.25);
    outline: 0;
}

footer.site-footer .sf-form button {
    align-items: center;
    background: var(--sf-accent);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: 2.4rem;
    inset: 50% 0.3rem auto auto;
    justify-content: center;
    padding: 0;
    position: absolute;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
    width: 2.4rem;
}

[dir="rtl"] footer.site-footer .sf-form button {
    inset: 50% auto auto 0.3rem;
}

/* The paper plane points toward the inline end, i.e. the way text reads. */
[dir="rtl"] footer.site-footer .sf-form button i {
    transform: scaleX(-1);
}

footer.site-footer .sf-form button:hover {
    background: #0f6fe0;
}

footer.site-footer .sf-form button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

footer.site-footer .sf-news .sf-thanks {
    color: #5fd39a;
    margin: 0.75rem 0 0;
}

footer.site-footer .sf-social {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

footer.site-footer .sf-social span {
    color: var(--sf-muted);
    font-size: 0.85rem;
    margin-inline-end: 0.2rem;
}

footer.site-footer .sf-social a {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: var(--sf-strong);
    display: inline-flex;
    font-size: 1.05rem;
    height: 2.4rem;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    width: 2.4rem;
}

footer.site-footer .sf-social a:hover,
footer.site-footer .sf-social a:focus-visible {
    background: var(--sf-accent);
    color: #fff;
    transform: translateY(-3px);
}

/* ---- Bottom bar ---- */
footer.site-footer .sf-bottom {
    border-top: 1px solid var(--sf-line);
    color: var(--sf-muted);
    font-size: 0.85rem;
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 1199.98px) {
    footer.site-footer .sf-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575.98px) {
    footer.site-footer .sf-wrap {
        padding-block: 2.25rem 1rem;
    }

    footer.site-footer .sf-grid {
        gap: 2rem 1rem;
        grid-template-columns: 1fr 1fr;
    }

    /* Brand and newsletter take the full width; the two link lists sit side by side between them. */
    footer.site-footer .sf-brand,
    footer.site-footer .sf-news {
        grid-column: 1 / -1;
    }

    footer.site-footer .sf-news {
        padding: 1.15rem;
    }

    footer.site-footer .sf-social a {
        height: 2.75rem;
        width: 2.75rem;
    }

    footer.site-footer .sf-bottom {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
