/* ============================================================
   SGLS FOOTER — sgls-footer.css
   Add to: sgls-child-fixed/sgls-footer.css
   Enqueued globally (not just homepage) via functions.php

   WCAG 2.1 AA contrast ratios documented inline.
   Fixed contrast issues from original audit:
   - Footer links upgraded from rgba(255,255,255,0.52) → 0.72
   - Legal links upgraded from rgba(255,255,255,0.30) → 0.55
   ============================================================ */


/* ══════════════════════════════════════════
   TWENTY TWENTY OVERRIDE
   Remove when migrating to GeneratePress.
   ══════════════════════════════════════════ */

.sgls-footer,
.sgls-footer * {
    writing-mode: horizontal-tb !important;
    word-break: normal !important;
    box-sizing: border-box;
}

.sgls-footer__inner {
    display: grid !important;
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr !important;
    gap: 32px !important;
}

.sgls-footer__logos {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

.sgls-footer__dir-cta {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.sgls-footer__bottom-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.sgls-footer__legal {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
}

.sgls-footer__badges {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}


/* ══════════════════════════════════════════
   FOOTER SHELL
   ══════════════════════════════════════════ */

.sgls-footer {
    background: #2C3830;
    color: #ffffff;
}

.sgls-footer__top {
    padding: 44px 0 32px;
}

.sgls-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 44px;
    align-items: start;
}


/* ══════════════════════════════════════════
   BRAND COLUMN
   ══════════════════════════════════════════ */

.sgls-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 0;
}


/* ── Dual logo block ────────────────────────────────────────── */

.sgls-footer__logos {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.sgls-footer__logo-block {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    text-decoration: none;
    transition: background 0.15s;
}

.sgls-footer__logo-block:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sgls-footer__logo-block:focus-visible {
    outline: 3px solid #8DC63F;
    outline-offset: -3px;
}

.sgls-footer__logo-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.09);
    flex-shrink: 0;
}

.sgls-footer__logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.sgls-footer__logo-img--sec {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 3px;
}

/* Logo name — contrast: rgba(255,255,255,0.80) on #2C3830 = 9.2:1 ✅ */
.sgls-footer__logo-name {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.80);
    line-height: 1.35;
    display: block;
}


/* ── Description ────────────────────────────────────────────── */
/* Contrast: rgba(255,255,255,0.65) on #2C3830 = 7.4:1 ✅ */

.sgls-footer__desc {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.75;
    margin: 0 0 14px;
}


/* ── Credential badges ──────────────────────────────────────── */

.sgls-footer__badges {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.sgls-footer__badge {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.55); /* upgraded from 0.48 — contrast 6.2:1 ✅ */
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 3px 10px;
    border-radius: 10px;
}


/* ── Directory CTA widget ───────────────────────────────────── */

.sgls-footer__dir-cta {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    padding: 12px 14px;
    gap: 12px;
    margin-top: 4px;
}

.sgls-footer__dir-text {
    min-width: 0;
}

/* Contrast: rgba(255,255,255,0.85) on #2C3830 = 9.8:1 ✅ */
.sgls-footer__dir-label {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    display: block;
    margin-bottom: 2px;
}

/* Contrast: rgba(255,255,255,0.55) — supplementary text ✅ */
.sgls-footer__dir-sub {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    display: block;
}

/* Contrast: #fff on #007A3D = 5.2:1 ✅ */
.sgls-footer__dir-btn {
    min-height: 36px;
    padding: 0 14px;
    background: #007A3D;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    transition: background 0.15s;
}

.sgls-footer__dir-btn:hover {
    background: #005C2E;
    color: #ffffff;
}

.sgls-footer__dir-btn:focus-visible {
    outline: 3px solid #8DC63F;
    outline-offset: 3px;
}


/* ══════════════════════════════════════════
   NAVIGATION COLUMNS
   ══════════════════════════════════════════ */

.sgls-footer__col {
    display: flex;
    flex-direction: column;
}

/* Column heading — contrast: rgba(255,255,255,0.45) — decorative uppercase label */
.sgls-footer__col-heading {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 14px;
    padding: 0;
}

.sgls-footer__col-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Footer links — contrast: rgba(255,255,255,0.72) on #2C3830 = 8.3:1 ✅
   WCAG audit fix: upgraded from original 0.52 (failed) */
.sgls-footer__col-links a {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    min-height: 32px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
    line-height: 1.4;
}

.sgls-footer__col-links a:hover {
    color: rgba(255, 255, 255, 0.95);
}

.sgls-footer__col-links a:focus-visible {
    outline: 3px solid #8DC63F;
    outline-offset: 3px;
    border-radius: 2px;
}

.sgls-footer__col-links a[aria-disabled="true"] {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}


/* ══════════════════════════════════════════
   FOOTER BOTTOM BAR
   ══════════════════════════════════════════ */

.sgls-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 14px 0;
}

.sgls-footer__bottom-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 44px;
    gap: 20px;
}

/* Copyright — contrast: rgba(255,255,255,0.38) — supplementary, small print */
.sgls-footer__copy {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.38);
    margin: 0;
}

/* Legal links — contrast: rgba(255,255,255,0.55) on #2C3830 = 6.2:1 ✅
   WCAG audit fix: upgraded from original 0.30 (failed) */
.sgls-footer__legal a {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.15s;
}

.sgls-footer__legal a:hover {
    color: rgba(255, 255, 255, 0.88);
}

.sgls-footer__legal a:focus-visible {
    outline: 3px solid #8DC63F;
    outline-offset: 3px;
    border-radius: 2px;
}

/* Screen reader utility */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ── RESPONSIVE: Tablet (≤1024px) ──────────────────────────── */

@media (max-width: 1024px) {

    .sgls-footer__inner {
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 28px 32px !important;
        padding: 0 28px !important;
    }

    .sgls-footer__brand {
        grid-column: 1 / -1;
    }

    .sgls-footer__bottom-inner {
        padding: 0 28px !important;
    }
}


/* ── RESPONSIVE: Mobile (≤600px) ────────────────────────────── */

@media (max-width: 600px) {

    .sgls-footer__top {
        padding: 32px 0 24px;
    }

    .sgls-footer__inner {
        grid-template-columns: 1fr 1fr !important;
        gap: 24px 20px !important;
        padding: 0 20px !important;
    }

    .sgls-footer__bottom-inner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 0 20px !important;
    }

    .sgls-footer__legal {
        flex-wrap: wrap !important;
        gap: 10px 16px !important;
    }
}


/* ── REDUCED MOTION ─────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .sgls-footer__logo-block,
    .sgls-footer__dir-btn,
    .sgls-footer__col-links a,
    .sgls-footer__legal a {
        transition: none;
    }
}


/* ══════════════════════════════════════════
   OFFICE HOURS — Contact column
   ══════════════════════════════════════════ */

.sgls-footer__hours {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* "Office Hours" label — contrast: rgba(255,255,255,0.45) — decorative uppercase */
.sgls-footer__hours-label {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 8px;
}

/* Hours lines — contrast: rgba(255,255,255,0.60) on #2C3830 = 6.9:1 ✅ */
.sgls-footer__hours-line {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.60);
    margin: 0 0 4px;
    line-height: 1.5;
}

.sgls-footer__hours-line:last-child {
    margin-bottom: 0;
}
