/* Shared v2 footer, measured from footer.png at 2048 × 897. */
footer#footer.ft-footer {
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 0;
    min-height: min(43.8vw, 897px);
    background: linear-gradient(#34378c59, #34378c59), #1b3988 url('../images/footer-campus.webp') center / cover no-repeat;
    color: #fff;
}
.ft-footer, .ft-footer * {
    box-sizing: border-box;
    font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
.ft-footer .ft-inner {
    position: relative;
    width: 80.7%;
    max-width: 1652px;
    margin: 0 auto;
    padding-top: clamp(30px, 2.685vw, 55px);
}
.ft-footer a { color: #fff; text-decoration: none; }
.ft-footer a:hover { color: #f2ce71; }
.ft-footer a:focus-visible { outline: 2px solid #f2ce71; outline-offset: 5px; }
.ft-footer .ft-lockup { margin-bottom: clamp(40px, 2.93vw, 60px); }
.ft-footer .ft-lockup img { display: block; width: clamp(300px, 20.51vw, 420px); margin-left: -10px; max-width: 100%; height: auto; }
.ft-footer .ft-columns { display: grid; grid-template-columns: 36% minmax(0, 1fr); column-gap: 4.9%; padding-bottom: clamp(60px, 5.65vw, 116px); }
.ft-footer .ft-col { min-width: 0; }
footer#footer.ft-footer .ft-heading { margin: 0 0 clamp(16px, .928vw, 19px); color: #f2ce71; font-size: clamp(22px, 1.465vw, 30px); font-weight: 700; line-height: 1.45; letter-spacing: 0; }
footer#footer.ft-footer .ft-contact-copy,
footer#footer.ft-footer .ft-contact-copy p { margin: 0; color: #fff; font-size: clamp(16px, 1.075vw, 22px); font-weight: 500; line-height: 1.5; }
footer#footer.ft-footer .ft-contact-copy p + p { margin-top: clamp(16px, .928vw, 19px); }
footer#footer.ft-footer .ft-contact-copy a { display: inline; width: auto; height: auto; margin: 0; padding: 0; border: 0; line-height: inherit; }
.ft-footer .ft-links { display: grid; gap: clamp(16px, .928vw, 19px); margin: 0 0 clamp(40px, 2.685vw, 55px); padding: 0; list-style: none; font-size: clamp(16px, 1.075vw, 22px); font-weight: 500; line-height: 1.5; }
.ft-footer .ft-links li { list-style: none; }
footer#footer.ft-footer .ft-links a { display: inline; width: auto; height: auto; margin: 0; padding: 0; border: 0; line-height: inherit; }
/* Breathing room above the scan heading; only applies when friend links render,
 * since without them the heading sits at the top of the column already. */
footer#footer.ft-footer .ft-links + .ft-heading { margin-top: clamp(10px, .6vw, 12px); }
.ft-footer .ft-qr-grid { display: grid; grid-template-columns: repeat(4, minmax(108px, 1fr)); gap: 18px; align-items: start; padding-top: 2px; }
.ft-footer .ft-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; margin: 0; }
.ft-footer .ft-qr-image { display: block; width: 108px; height: 108px; max-width: 100%; object-fit: contain; background: #fff; }
.ft-footer .ft-qr-label { font-size: 14px; font-weight: 500; line-height: 1.4; color: rgba(255, 255, 255, .92); text-align: center; white-space: pre-line; max-width: 100%; }
.ft-footer .ft-legal { position: relative; padding: 0 24px 30px; margin: 0; text-align: center; font-size: clamp(16px, 1.075vw, 22px); font-weight: 500; line-height: 1.5; }
@media (max-width: 1199px) {
    .ft-footer .ft-inner { width: auto; margin: 0 40px; padding-top: 48px; }
    .ft-footer .ft-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; }
    .ft-footer .ft-qr-grid { grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); }
}
@media (max-width: 991px) {
    .ft-footer .ft-columns { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .ft-footer .ft-qr-grid { grid-template-columns: repeat(4, minmax(108px, 1fr)); }
}
@media (max-width: 767px) {
    .ft-footer .ft-inner { margin: 0 24px; padding-top: 40px; }
    .ft-footer .ft-lockup { margin-bottom: 40px; }
    .ft-footer .ft-lockup img { width: 280px; }
    footer#footer.ft-footer .ft-heading { font-size: 22px; margin-bottom: 20px; }
    .ft-footer .ft-columns { gap: 36px; padding-bottom: 48px; }
    .ft-footer .ft-links { margin-bottom: 36px; }
    .ft-footer .ft-qr-grid { grid-template-columns: repeat(2, minmax(0, 116px)); gap: 22px 18px; justify-content: start; }
    .ft-footer .ft-qr-image { width: 100%; height: auto; aspect-ratio: 1 / 1; }
    .ft-footer .ft-legal { padding-bottom: 28px; font-size: 14px; }
}

/*
 * Fixed phone action bar (v2/public/footer.html, shared by every v2 page).
 *
 * The bar and the spacer that reserves room for it both read --ft-bar-height,
 * so the spacer cannot end up shorter than the bar and leave the last of the
 * page unreachable behind it. The safe-area inset is part of that height, for
 * devices whose home indicator sits over the bottom edge.
 *
 * Two joined application and consultation buttons follow the mobile design.
 */
.ft-actions-dock {
    position: relative;
    z-index: 1000;
}

.ft-actions-spacer,
.ft-actions {
    --ft-bar-height: calc(75px + env(safe-area-inset-bottom, 0px));
    height: var(--ft-bar-height);
}

.ft-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 15px calc(15px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: linear-gradient(110deg, #0c2644, #153275);
}

.ft-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2.67vw, 10px);
    flex: 1 1 0;
    min-width: 0;
    height: 45px;
    padding: 4px 8px;
    box-sizing: border-box;
    border: 1px solid #ffda96;
    border-radius: 3px;
    background: linear-gradient(#ffedca, #cbaa6b);
    box-shadow: 0 3px 5px #0005;
    color: #082d76;
    font-family: 'Alimama ShuHeiTi', 'Noto Sans SC', sans-serif;
    font-size: clamp(19px, 6vw, 22.5px);
    font-weight: 700;
    letter-spacing: clamp(2px, .667vw, 2.5px);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.ft-action-apply { position: relative; z-index: 1; box-shadow: 3px 3px 5px #0005; }
.ft-action-enquire { border-left: 0; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, #fff8e8, #fff); }
.ft-action svg { flex: 0 0 auto; width: clamp(20px, 6vw, 22.5px); height: clamp(20px, 6vw, 22.5px); }
.ft-actions:lang(en) .ft-action { font-family: 'Noto Sans SC', sans-serif; letter-spacing: .5px; }
.ft-action span { font-family: inherit; overflow-wrap: anywhere; }
.ft-action:hover,
.ft-action:focus { color: #082d76; text-decoration: none; }
.ft-action:focus-visible { outline: 2px solid #082d76; outline-offset: -4px; }

/* Shared footer follows the accepted wider composition. */
footer#footer.ft-footer {
    min-height: 0;
    background: #1b3988 url('../images/footer-campus.webp') center / cover no-repeat;
}
.ft-footer .ft-inner {
    width: calc(100% - 80px);
    max-width: 1540px;
    margin: 0 auto;
    padding: 55px 0 0;
}
.ft-footer .ft-lockup { margin-bottom: 60px; }
.ft-footer .ft-lockup img { margin-left: -10px; }
.ft-footer .ft-columns {
    grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
    gap: 80px;
    padding-bottom: 70px;
}
footer#footer.ft-footer .ft-heading {
    margin-bottom: 14px;
    color: #ffde90;
    font-size: 28px;
    font-weight: 600;
    line-height: 49px;
}
footer#footer.ft-footer .ft-contact-copy,
footer#footer.ft-footer .ft-contact-copy p {
    font-size: 20px;
    font-weight: 600;
    line-height: 49px;
}
footer#footer.ft-footer .ft-contact-copy p + p { margin-top: 0; }
.ft-footer .ft-links {
    gap: 0;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 600;
    line-height: 49px;
}
footer#footer.ft-footer .ft-links + .ft-heading { margin-top: 0; }
.ft-footer .ft-qr-grid {
    grid-template-columns: repeat(4, 139px);
    gap: 46px;
    padding-top: 0;
}
.ft-footer .ft-qr { align-items: center; gap: 0; }
.ft-footer .ft-qr-image { width: 139px; height: 139px; max-width: 100%; }
.ft-footer .ft-qr-label {
    width: 100%;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 49px;
    text-align: center;
    white-space: normal;
}
.ft-footer .ft-legal { padding-bottom: 60px; }

@media (max-width: 1439px) {
    .ft-footer .ft-qr-grid { grid-template-columns: repeat(2, minmax(0, 139px)); gap: 20px; }
}

@media (max-width: 1199px) {
    .ft-footer .ft-inner { width: calc(100% - 64px); padding-top: 48px; }
    .ft-footer .ft-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; }
}

@media (max-width: 991px) {
    .ft-footer .ft-columns { grid-template-columns: minmax(0, 1fr); }
    .ft-footer .ft-qr-grid { grid-template-columns: repeat(4, minmax(0, 139px)); }
}

/* Mobile footer: Pixso 187:435, at half the 750px design width. */
@media (max-width: 767px) {
    footer#footer.ft-footer {
        /* The existing campus image already includes its blue tint. */
        background: linear-gradient(180deg, #002878 15%, rgba(5, 57, 159, .15) 55%),
            url('../images/footer-campus.webp') center bottom / auto 75% no-repeat,
            #05399f;
    }
    .ft-footer .ft-inner {
        width: auto;
        margin: 0 32px 0 36px;
        padding-top: 24.5px;
    }
    .ft-footer .ft-lockup { margin: 0 -13px 10px 0; }
    .ft-footer .ft-lockup img { width: 135.5px; height: auto; margin: 0 0 0 auto; }
    .ft-footer .ft-columns { gap: 29.5px; padding-bottom: 31.5px; }
    footer#footer.ft-footer .ft-heading {
        margin-bottom: 2px;
        font-size: 14px;
        font-weight: 600;
        line-height: 24.5px;
    }
    footer#footer.ft-footer .ft-contact-copy,
    footer#footer.ft-footer .ft-contact-copy p,
    .ft-footer .ft-links {
        font-size: 10px;
        font-weight: 600;
        line-height: 24.5px;
    }
    .ft-footer .ft-links { margin-bottom: 0; padding-bottom: 21px; }
    .ft-footer .ft-qr-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        padding-top: 9.5px;
    }
    .ft-footer .ft-qr-image { width: 63px; height: auto; aspect-ratio: 1; }
    .ft-footer .ft-qr-label { font-size: 8px; line-height: 24.5px; }
    .ft-footer .ft-legal {
        width: 195px;
        max-width: calc(100% - 40px);
        margin: 0 auto;
        /* Keep both legal lines above the current floating consultation bubble. */
        padding: 0 0 40px;
        font-size: 10px;
        font-weight: 600;
        line-height: 18.5px;
    }
}
@media (max-width: 374px) {
    .ft-footer .ft-inner { margin: 0 20px; }
    .ft-footer .ft-lockup { margin-right: 0; }
    .ft-footer .ft-qr-grid { gap: 8px; }
}
