/* ==========================================================================
   Site footer — footer.php
   Same palette and type as the page hero (page-hero.css): navy star lattice,
   gold accents, serif headings.
   Scoped under .sf so it cannot leak into Bootstrap 3 / style-v1.css, and
   specific enough to beat style-v1.css's bare `footer` / `footer a` rules.
   ========================================================================== */

.sf,
.sf-top {
    --sf-navy: #243a73;
    --sf-navy-deep: #1a2b57;
    --sf-navy-ink: #131f40;
    --sf-gold: #faa619;
    --sf-gold-soft: #fbe3b3;
    --sf-cream: #faf8f3;
    --sf-line: #e6e3da;
    --sf-gold-text: #9a5b00;
    --sf-ink: #1c2541;
    --sf-text: #3d4458;
    --sf-muted: #586074;
    --sf-on-dark: #ffffff;
    --sf-on-dark-2: rgba(255, 255, 255, .82);
    --sf-mist: #c3cbe0;       /* body links on navy */
    --sf-mist-dim: #8f9ab8;   /* secondary text on navy */
    --sf-mist-bright: #e3e8f4;/* contact values on navy */
    --sf-rule-dark: rgba(255, 255, 255, .1);
    --sf-radius: 14px;
    --sf-shadow: 0 1px 2px rgba(28, 37, 65, .04), 0 2px 8px rgba(28, 37, 65, .05);
    --sf-shadow-lift: 0 4px 10px rgba(28, 37, 65, .06), 0 14px 32px rgba(28, 37, 65, .1);
    --sf-serif: "Noto Serif", Georgia, "Times New Roman", serif;
    --sf-sans: "Open Sans", "Segoe UI", Arial, sans-serif;
}

footer.sf {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--sf-navy-ink);
    color: var(--sf-mist);
    font-family: var(--sf-sans);
    font-size: 14px;
    font-weight: 400;
    /* style-v1.css sets body line-height in em, which would inherit as a fixed px value */
    line-height: 1.6;
}

.sf *,
.sf *::before,
.sf *::after {
    box-sizing: border-box;
}

.sf a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.sf a:hover,
.sf a:focus {
    text-decoration: none;
}

.sf :focus-visible,
.sf-top:focus-visible {
    outline: 3px solid var(--sf-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

.sf ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf h2 {
    text-transform: none;
    letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Call to action band
   -------------------------------------------------------------------------- */

.sf-cta {
    padding: 48px 0;
    color: var(--sf-on-dark);
    background-color: var(--sf-navy);
    /* Faint eight-point-star lattice, as in the page hero */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07'%3E%3Crect x='16' y='16' width='40' height='40'/%3E%3Crect x='16' y='16' width='40' height='40' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='8'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, var(--sf-navy) 0%, var(--sf-navy-deep) 100%);
    background-size: 72px 72px, auto;
    border-top: 3px solid var(--sf-gold);
}

/* Pages that already close with their own navy call-to-action band
   (donation, faculty, about, graduates, programmes) would otherwise get two
   in a row. Add a page's CTA class here when a new one is introduced. */
body:has(.don-cta, .fac-cta, .sa-cta, .ga-cta, .pg-cta) .sf-cta {
    display: none;
}

.sf-cta__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
}

.sf-cta__text {
    flex: 1 1 420px;
    min-width: 0;
}

.sf .sf-cta__eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--sf-gold);
}

.sf .sf-cta__title {
    margin: 0 0 10px;
    font-family: var(--sf-serif);
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 700;
    line-height: 1.25;
    color: var(--sf-on-dark);
}

.sf .sf-cta__lede {
    margin: 0;
    max-width: 56ch;
    font-size: 15px;
    color: var(--sf-on-dark-2);
}

.sf-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sf .sf-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.sf .sf-btn .fa {
    transition: transform .2s ease;
}

.sf .sf-btn--gold {
    background: var(--sf-gold);
    color: var(--sf-navy-ink);
}

.sf .sf-btn--gold:hover,
.sf .sf-btn--gold:focus {
    background: #ffb938;
    color: var(--sf-navy-ink);
    transform: translateY(-1px);
}

.sf .sf-btn--gold:hover .fa,
.sf .sf-btn--gold:focus .fa {
    transform: translateX(3px);
}

.sf .sf-btn--ghost {
    border-color: rgba(255, 255, 255, .45);
    color: var(--sf-on-dark);
}

.sf .sf-btn--ghost:hover,
.sf .sf-btn--ghost:focus {
    border-color: var(--sf-on-dark);
    background: rgba(255, 255, 255, .08);
    color: var(--sf-on-dark);
}

/* --------------------------------------------------------------------------
   Hidayah family — partner sites
   -------------------------------------------------------------------------- */

.sf-family {
    padding: 36px 0 40px;
    background: var(--sf-cream);
    border-bottom: 1px solid var(--sf-line);
}

.sf .sf-family__title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 20px;
    font-family: var(--sf-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--sf-muted);
}

.sf .sf-family__title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--sf-line);
}

.sf-family__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.sf .sf-family__card {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    box-shadow: var(--sf-shadow);
    color: var(--sf-ink);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.sf .sf-family__card:hover,
.sf .sf-family__card:focus {
    transform: translateY(-2px);
    border-color: var(--sf-gold-soft);
    box-shadow: var(--sf-shadow-lift);
    color: var(--sf-ink);
}

.sf-family__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
}

.sf-family__logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sf-family__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.sf-family__name {
    font-family: var(--sf-serif);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--sf-navy);
}

.sf-family__desc {
    font-size: 13px;
    line-height: 1.45;
    color: var(--sf-muted);
}

.sf .sf-family__go {
    flex: 0 0 auto;
    font-size: 13px;
    color: #a3a9b8;
    transition: color .2s ease;
}

.sf .sf-family__card:hover .sf-family__go,
.sf .sf-family__card:focus .sf-family__go {
    color: var(--sf-gold);
}

/* --------------------------------------------------------------------------
   Main footer — brand, campuses and link columns (navy surface)
   -------------------------------------------------------------------------- */

.sf-main {
    padding: 48px 0 40px;
    background: var(--sf-navy-ink);
}

.sf-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
    gap: 36px 32px;
}

.sf-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sf-brand__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 58px;
    padding: 5px;
    background: #fff;
    border-radius: 10px;
}

.sf-brand__mark img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.sf .sf-brand__name {
    display: flex;
    flex-direction: column;
    font-family: var(--sf-serif);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.sf .sf-brand__name small {
    margin-top: 3px;
    font-family: var(--sf-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sf-gold);
}

.sf .sf-about {
    margin: 0 0 14px;
    max-width: 30ch;
    color: var(--sf-mist-dim);
}

.sf-contact li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 2px 0;
    overflow-wrap: anywhere;
}

.sf-contact .fa {
    flex: 0 0 14px;
    text-align: center;
    color: var(--sf-gold);
}

.sf .sf-contact a {
    color: var(--sf-mist-bright);
    font-weight: 600;
}

.sf .sf-contact a:hover,
.sf .sf-contact a:focus {
    color: var(--sf-gold);
    text-decoration: underline;
    text-decoration-color: var(--sf-gold);
    text-underline-offset: 3px;
}

.sf .sf-social {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.sf .sf-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--sf-rule-dark);
    font-size: 16px;
    color: var(--sf-mist);
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.sf .sf-social a:hover,
.sf .sf-social a:focus {
    background: var(--sf-gold);
    border-color: var(--sf-gold);
    color: var(--sf-navy-ink);
    transform: translateY(-2px);
}

/* Column headings */

.sf .sf-heading {
    position: relative;
    margin: 4px 0 16px;
    padding-bottom: 10px;
    font-family: var(--sf-serif);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--sf-gold);
}

.sf .sf-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 2px;
    background: rgba(250, 166, 25, .35);
}

.sf .sf-heading a {
    color: var(--sf-gold);
}

.sf .sf-heading a:hover,
.sf .sf-heading a:focus {
    color: #ffc463;
}

/* Link lists */

.sf-links li {
    margin: 0;
    padding: 0;
}

.sf .sf-links a {
    display: inline-block;
    padding: 3px 0;
    color: var(--sf-mist);
    transition: color .2s ease, transform .2s ease;
}

.sf .sf-links a:hover,
.sf .sf-links a:focus {
    color: var(--sf-gold);
    transform: translateX(3px);
}

/* Campuses: name, then the address as a maps link */

.sf address.sf-campus {
    margin: 0 0 14px;
    font-style: normal;
    line-height: 1.5;
}

.sf address.sf-campus:last-child {
    margin-bottom: 0;
}

.sf-campus strong {
    display: block;
    margin-bottom: 2px;
    font-weight: 700;
    color: var(--sf-mist-bright);
}

.sf .sf-campus__map {
    display: inline;
    color: var(--sf-mist-dim);
}

.sf .sf-campus__map .fa {
    margin-right: 4px;
    color: var(--sf-gold);
}

.sf .sf-campus__map:hover,
.sf .sf-campus__map:focus {
    color: var(--sf-mist-bright);
    text-decoration: underline;
    text-decoration-color: var(--sf-gold);
    text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Bottom bar
   -------------------------------------------------------------------------- */

.sf-bottom {
    padding: 16px 0;
    border-top: 1px solid var(--sf-rule-dark);
    background: #0e1831;
    font-size: 13px;
    color: var(--sf-mist-dim);
}

.sf-bottom__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 24px;
}

.sf .sf-bottom p {
    margin: 0;
}

.sf .sf-bottom a {
    color: var(--sf-mist);
    font-weight: 600;
}

.sf .sf-bottom a:hover,
.sf .sf-bottom a:focus {
    color: var(--sf-gold);
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */

.sf-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--sf-navy);
    border: 2px solid var(--sf-gold);
    color: #fff;
    font-size: 24px;
    box-shadow: 0 6px 18px rgba(19, 31, 64, .3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .2s ease;
}

.sf-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.sf-top:hover,
.sf-top:focus {
    background: var(--sf-gold);
    color: var(--sf-navy-ink);
    text-decoration: none;
}

.sf-top .fa {
    margin-top: -2px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
    .sf-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sf-col--brand {
        grid-column: span 2;
    }
}

@media (max-width: 991px) {
    .sf-family__list {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
}

@media (max-width: 767px) {
    .sf-cta {
        padding: 36px 0;
    }

    .sf-cta__actions,
    .sf .sf-btn {
        width: 100%;
    }

    .sf .sf-btn {
        justify-content: center;
    }

    .sf-family {
        padding: 28px 0 32px;
    }

    .sf-main {
        padding: 40px 0 28px;
    }

    .sf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 20px;
    }

    .sf-col--brand {
        grid-column: 1 / -1;
    }

    .sf-bottom__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .sf-top {
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 359px) {
    .sf-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf *,
    .sf-top {
        transition: none !important;
    }

    .sf .sf-family__card:hover,
    .sf .sf-family__card:focus,
    .sf .sf-btn:hover,
    .sf .sf-btn:focus,
    .sf .sf-social a:hover,
    .sf .sf-social a:focus,
    .sf .sf-links a:hover,
    .sf .sf-links a:focus {
        transform: none;
    }
}

@media print {
    .sf-cta,
    .sf-family,
    .sf-top {
        display: none !important;
    }
}
