/* Shared site footer (gateway, forestry, drone-ops) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.site-footer-legal {
    border-top: 1px solid rgba(16, 185, 129, 0.12);
    --footer-alj-text-h: 5.5rem;
    --footer-mdec-text-h: 4.5rem;
}

.footer-cert-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    color: #9ca3af;
    font-family: ui-monospace, monospace;
    font-size: 10px;
    line-height: 1.5;
}

.footer-cert-list .cert-sep {
    color: rgba(16, 185, 129, 0.45);
    user-select: none;
}

.footer-brand-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 1.25rem;
    align-items: center;
}

.footer-brand-row > .footer-logo-slot--alj {
    grid-column: 1;
    grid-row: 1;
}

.footer-brand-row > .footer-brand-text--alj {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.footer-brand-row > .footer-logo-slot--mdec {
    grid-column: 1;
    grid-row: 2;
}

.footer-brand-row > .footer-brand-text--mdec {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
}

@media (max-width: 639px) {
    .footer-brand-row {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        row-gap: 1.25rem;
        justify-items: center;
        text-align: center;
    }

    .footer-brand-row > .footer-logo-slot--alj,
    .footer-brand-row > .footer-brand-text--alj,
    .footer-brand-row > .footer-logo-slot--mdec,
    .footer-brand-row > .footer-brand-text--mdec {
        grid-column: 1;
        grid-row: auto;
    }

    .footer-brand-text--alj,
    .footer-brand-text--mdec {
        width: 100%;
        max-width: 22rem;
    }

    .footer-brand-text--mdec p {
        max-width: none !important;
    }

    .footer-cert-list {
        justify-content: center;
    }

    .footer-brand-text--alj .footer-copy-sm,
    .footer-brand-text--mdec .footer-copy-sm {
        font-size: 10px;
    }

    .footer-logo-slot--alj,
    .footer-logo-slot--mdec {
        height: auto !important;
        width: auto;
        justify-self: center;
    }

    .footer-logo-slot--mdec {
        max-height: 5rem;
        max-width: 5rem;
    }

    .footer-logo-slot--alj img {
        height: auto;
        max-height: 4rem;
        max-width: 3.25rem;
        width: auto;
    }

    .footer-logo-slot--mdec img {
        width: auto;
        height: auto;
        max-height: 5rem;
        max-width: 5rem;
    }
}

@media (min-width: 640px) and (max-width: 1279px) {
    .footer-brand-row {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        max-width: none;
        margin-inline: 0;
        justify-items: start;
        text-align: left;
        row-gap: 1.25rem;
        column-gap: 1.25rem;
    }

    .footer-brand-row > .footer-logo-slot--alj {
        grid-column: 1;
        grid-row: 1;
    }

    .footer-brand-row > .footer-brand-text--alj {
        grid-column: 2;
        grid-row: 1;
    }

    .footer-brand-row > .footer-logo-slot--mdec {
        grid-column: 1;
        grid-row: 2;
    }

    .footer-brand-row > .footer-brand-text--mdec {
        grid-column: 2;
        grid-row: 2;
    }

    .footer-brand-text--alj,
    .footer-brand-text--mdec {
        width: 100%;
        min-width: 0;
    }

    .footer-brand-text--mdec p {
        max-width: none !important;
    }

    .footer-cert-list {
        justify-content: flex-start;
    }

    .footer-logo-slot--alj,
    .footer-logo-slot--mdec {
        height: auto !important;
        width: auto;
        justify-self: start;
    }

    .footer-logo-slot--mdec {
        max-height: 5rem;
        max-width: 5rem;
    }

    .footer-logo-slot--alj img {
        height: auto;
        max-height: 4rem;
        max-width: 3.25rem;
        width: auto;
    }

    .footer-logo-slot--mdec img {
        width: auto;
        height: auto;
        max-height: 5rem;
        max-width: 5rem;
    }
}

@media (min-width: 640px) {
    .footer-brand-row {
        column-gap: 1.25rem;
    }
}

@media (min-width: 1280px) {
    .footer-brand-row {
        grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
        grid-template-rows: auto;
        row-gap: 0;
        column-gap: 2rem;
        max-width: none;
        margin-inline: 0;
        text-align: left;
    }

    .footer-brand-row > .footer-logo-slot--mdec {
        grid-column: 3;
        grid-row: 1;
    }

    .footer-brand-row > .footer-brand-text--mdec {
        grid-column: 4;
        grid-row: 1;
        max-width: 18rem;
    }

    .footer-cert-list {
        justify-content: flex-start;
    }
}

.footer-logo-slot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo-slot--alj {
    height: var(--footer-alj-text-h);
}

.footer-logo-slot--mdec {
    height: var(--footer-mdec-text-h);
    width: var(--footer-mdec-text-h);
}

.footer-logo-slot img {
    display: block;
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
}

.footer-logo-slot--mdec img {
    width: 100%;
    height: 100%;
}

.footer-md-badge-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    flex-shrink: 0;
    min-height: 0;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(16, 185, 129, 0.1);
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: #9ca3af;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 0.25rem;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.footer-social-link:hover {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.08);
}

.footer-social-link svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.footer-copyright {
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: #9ca3af;
    letter-spacing: 0.02em;
    margin: 0;
}

@media (max-width: 1279px) {
    .footer-bottom {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 1rem;
        text-align: center;
    }

    .footer-bottom .footer-copyright {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-legal {
        margin-bottom: 0;
    }
}

@media (min-width: 1280px) {
    .footer-bottom {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .footer-bottom .footer-copyright {
        text-align: right;
    }
}
