/* Home: About overview + Academic programs + CTA + ticker — SFELK palette */

/* —— About overview (3-column) —— */
.sf-about {
    padding: 3.2rem 0 0;
    background: #fff;
}
.sf-about-grid {
    display: grid;
    gap: 2rem;
    align-items: stretch;
}
.sf-about-media {
    position: relative;
    min-height: 20rem;
    overflow: hidden;
    border-radius: 0.65rem;
    background: #0b1630;
    box-shadow: 0 22px 44px rgba(12, 46, 120, 0.18);
    isolation: isolate;
}
.sf-about-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.sf-about-media:hover img {
    transform: scale(1.05);
}
.sf-about-media::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    width: 72%;
    height: 42%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath fill='%23E10600' d='M0 70C90 30 150 100 250 55 310 28 360 48 400 35V120H0Z'/%3E%3Cpath fill='%230C2E78' d='M0 85C100 50 170 110 260 70 320 48 360 62 400 52V120H0Z'/%3E%3Cpath fill='%23ffffff' d='M0 98C80 75 170 115 255 82 320 60 365 72 400 66V120H0Z' opacity='.95'/%3E%3C/svg%3E") left bottom / 100% auto no-repeat;
    pointer-events: none;
}
.sf-about-copy h2 {
    margin: 0.4rem 0 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.65rem, 2.5vw, 2.2rem);
    font-weight: 700;
    line-height: 1.18;
    color: #0C2E78;
    max-width: 26rem;
}
.sf-about-copy .sf-about-lead {
    margin: 1rem 0 0;
    color: #5C6B80;
    font-size: 0.98rem;
    line-height: 1.75;
}
.sf-about-checks {
    margin: 1.15rem 0 1.35rem;
    padding: 0;
    list-style: none;
}
.sf-about-checks li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.42rem 0;
    color: #1C2B44;
    font-size: 0.95rem;
    font-weight: 650;
}
.sf-about-checks i {
    flex: none;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: #0C2E78;
    color: #fff;
    font-size: 0.62rem;
    display: inline-grid;
    place-items: center;
}
.sf-about-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1.35rem;
    border-radius: 999px;
    background: #E10600;
    color: #fff;
    font-weight: 700;
    font-size: 0.94rem;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(225, 6, 0, 0.28);
    transition: transform 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}
.sf-about-btn:hover {
    background: #B80500;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(225, 6, 0, 0.35);
}
.sf-about-btn i {
    transition: transform 0.3s ease;
}
.sf-about-btn:hover i {
    transform: translateX(4px);
}
.sf-about-crest {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.65rem 1.1rem 1.4rem;
    border-radius: 1.35rem;
    background: #fff;
    box-shadow: 0 16px 40px rgba(12, 46, 120, 0.12);
    animation: sfAboutCrestBreathe 5.5s ease-in-out infinite;
}
.sf-about-crest__logo {
    width: min(9.5rem, 72%);
    height: auto;
    max-height: 9.5rem;
    margin: 0 auto 0.5rem;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}
.sf-about-crest em {
    display: block;
    font-family: "Great Vibes", cursive;
    font-style: normal;
    font-size: clamp(1.65rem, 2.2vw, 1.85rem);
    color: #0C2E78;
    line-height: 1.1;
}
.sf-about-crest .brush {
    width: 88%;
    height: 0.55rem;
    margin-top: 0.55rem;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #1A4CB8 18%, #fff 42%, #E10600 68%, transparent);
    opacity: 0.92;
}
@keyframes sfAboutCrestBreathe {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* —— Academic programs band —— */
.sf-programs {
    margin-top: 2.6rem;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
    padding: 2.6rem 0 2.85rem;
    background: linear-gradient(180deg, #0A276E 0%, #0B2C78 48%, #08245F 100%);
    color: #fff;
}
.sf-programs .wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}
.sf-programs-head {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 1.75rem;
}
.sf-programs-head h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 700;
}
.sf-programs-head h3::before,
.sf-programs-head h3::after {
    content: "";
    flex: 1;
    max-width: 4.5rem;
    height: 2px;
    border-radius: 2px;
    background: #E10600;
}
.sf-programs-head p {
    margin: 0.65rem 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    line-height: 1.55;
    animation: sfProgramsSubIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}
.sf-programs-head.reveal.is-in h3,
.sf-programs-head.reveal.is-in p {
    animation-play-state: running;
}
.sf-programs-head h3 {
    animation: sfProgramsTitleIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes sfProgramsTitleIn {
    from {
        opacity: 0;
        transform: translate3d(48px, 0, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes sfProgramsSubIn {
    from {
        opacity: 0;
        transform: translate3d(32px, 0, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Infinite marquee — smooth right to left */
.sf-programs-marquee {
    position: relative;
    overflow: hidden;
    padding: 0.35rem 0 0.65rem;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.sf-programs-marquee::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(8, 36, 95, 0.35) 0%,
        transparent 12%,
        transparent 88%,
        rgba(8, 36, 95, 0.35) 100%
    );
}
.sf-programs-marquee__track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: sfProgramsMarquee var(--sf-programs-duration, 52s) linear infinite;
}
.sf-programs-marquee:hover .sf-programs-marquee__track,
.sf-programs-marquee.is-paused .sf-programs-marquee__track {
    animation-play-state: paused;
}
.sf-programs-marquee__group {
    display: flex;
    flex: none;
    align-items: stretch;
    gap: 0.85rem;
    padding-right: 0.85rem;
}
@keyframes sfProgramsMarquee {
    to {
        transform: translate3d(-50%, 0, 0);
    }
}

.sf-program-card {
    flex: 0 0 9.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    min-height: 9.5rem;
    padding: 1.35rem 0.45rem 1.05rem;
    border-radius: 1.125rem;
    background: #fff;
    color: #0C2E78;
    text-align: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.sf-program-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
}
.sf-programs-marquee .sf-program-card {
    animation: none;
}
.sf-program-icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 2.75rem;
    color: #0C2E78;
    font-size: 2.35rem;
    line-height: 1;
}
.sf-program-icon i {
    display: block;
    line-height: 1;
}
.sf-program-icon--flag {
    width: 2.75rem;
    height: 1.65rem;
    border-radius: 3px;
    overflow: hidden;
    background: linear-gradient(90deg, #0055A4 0 33.33%, #fff 33.33% 66.66%, #EF4135 66.66% 100%);
    box-shadow: 0 0 0 1px rgba(12, 46, 120, 0.12);
}
.sf-program-icon--stack {
    position: relative;
    width: 2.85rem;
    height: 2.75rem;
    font-size: 1.55rem;
}
.sf-program-icon--stack i:first-child {
    position: absolute;
    left: 0.15rem;
    top: 0.35rem;
    transform: rotate(-8deg);
    opacity: 0.92;
}
.sf-program-icon--stack i:last-child {
    position: absolute;
    right: 0.1rem;
    top: 0;
    transform: rotate(6deg);
}
.sf-program-card > span:last-child {
    font-size: clamp(0.68rem, 1.1vw, 0.8rem);
    font-weight: 700;
    line-height: 1.28;
    max-width: 7.5rem;
}

/* Premium programmes grid (replaces marquee) */
.sf-programs-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
    gap: 1.2rem;
    margin-top: 0.5rem;
    align-items: stretch;
}
@media (min-width: 720px) {
    .sf-programs-showcase {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.35rem;
    }
}
@media (min-width: 1080px) {
    .sf-programs-showcase {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.45rem;
    }
}
.sf-program-card--photo {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0;
    border-radius: 1.25rem;
    overflow: hidden;
    text-decoration: none;
    color: #0c2e78;
    background: #fff;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.38s ease;
}
.sf-program-card--photo:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 26px 52px rgba(0, 0, 0, 0.32);
}
.sf-program-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    min-height: 186px;
    overflow: hidden;
}
.sf-program-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s ease;
}
.sf-program-card--photo:hover .sf-program-card__media img {
    transform: scale(1.06);
}
.sf-program-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 16, 45, 0.05) 0%, rgba(4, 16, 45, 0.42) 100%);
    pointer-events: none;
}
.sf-program-card__icon {
    position: absolute;
    left: 14px;
    bottom: 12px;
    width: auto;
    min-width: 2.65rem;
    height: 2.65rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    font-size: 1.25rem;
}
.sf-program-card__title {
    margin: 0;
    padding: 0.95rem 1rem 1.15rem;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(0.92rem, 1.35vw, 1.05rem);
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}
.sf-programs-showcase.reveal.is-in .sf-program-card--photo {
    animation: sfProgramTileIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.sf-programs-head h3 span,
.sf-programs-head p {
    color: #fff;
}
.sf-programs-showcase.reveal.is-in .sf-program-card--photo:nth-child(2) { animation-delay: 0.06s; }
.sf-programs-showcase.reveal.is-in .sf-program-card--photo:nth-child(3) { animation-delay: 0.12s; }
.sf-programs-showcase.reveal.is-in .sf-program-card--photo:nth-child(4) { animation-delay: 0.18s; }
.sf-programs-showcase.reveal.is-in .sf-program-card--photo:nth-child(5) { animation-delay: 0.24s; }
.sf-programs-showcase.reveal.is-in .sf-program-card--photo:nth-child(6) { animation-delay: 0.3s; }
.sf-programs-showcase.reveal.is-in .sf-program-card--photo:nth-child(7) { animation-delay: 0.36s; }
@keyframes sfProgramTileIn {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* —— Pre-footer CTA —— */
.sf-cta {
    position: relative;
    overflow: hidden;
    background: #B80500;
    color: #fff;
    isolation: isolate;
}
.sf-cta::before {
    content: "";
    position: absolute;
    inset: -50px 0;
    z-index: -2;
    background: url("../images/home/sfelk-cta-map.jpg") center / cover no-repeat;
    animation: sfCtaMapDrift 22s ease-in-out infinite alternate;
}
.sf-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(12, 46, 120, 0.82) 0%, rgba(12, 46, 120, 0.35) 50%, rgba(12, 46, 120, 0.82) 100%);
}
@keyframes sfCtaMapDrift {
    from { transform: scale(1); }
    to { transform: scale(1.07); }
}
.sf-cta-inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem 2.5rem;
    padding: 2.4rem 0;
}
.sf-cta blockquote {
    position: relative;
    flex: 1 1 16rem;
    margin: 0;
    padding-left: 3.2rem;
    min-width: 0;
}
.sf-cta-mark {
    position: absolute;
    top: -0.85rem;
    left: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 4.2rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.92;
}
.sf-cta blockquote p {
    margin: 0;
    max-width: 36rem;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.08rem, 1.45vw, 1.28rem);
    font-style: italic;
    line-height: 1.45;
}
.sf-cta-brand {
    display: grid;
    gap: 0.2rem;
    padding: 0.5rem 0 0.5rem 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.45);
}
.sf-cta-brand strong {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.1;
}
.sf-cta-brand span {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.sf-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: none;
    padding: 0.7rem 1.25rem;
    border: 1.5px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.sf-cta-btn:hover {
    background: #fff;
    color: #0C2E78;
    transform: translateY(-2px);
}
.sf-cta-btn svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}
.sf-cta-btn:hover svg {
    transform: translateX(4px);
}

/* —— Ticker —— */
.sf-ticker {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-top: 1px solid #E6EDF5;
    background: linear-gradient(180deg, #ffffff 0%, #F4F7FB 100%);
    color: #0C2E78;
    isolation: isolate;
}
.sf-ticker::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0C2E78 0%, #E10600 40%, #C6A15B 70%, #0C2E78 100%);
    background-size: 200% 100%;
    animation: sfTickerSheen 9s linear infinite;
}
.sf-ticker-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding: 1.55rem 0 1.45rem;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 92%, transparent 100%);
}
.sf-ticker-track {
    display: flex;
    width: max-content;
    animation: sfTickerScroll var(--sf-ticker-duration, 140s) linear infinite;
    will-change: transform;
}
.sf-ticker-viewport:hover .sf-ticker-track,
.sf-ticker-viewport.is-paused .sf-ticker-track {
    animation-play-state: paused;
}
.sf-ticker-group {
    display: flex;
    flex: none;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sf-ticker-group li {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding-right: 1.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.005em;
    line-height: 1.2;
    white-space: nowrap;
}
.sf-ticker-star {
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
    color: #E10600;
    animation: sfTickerSpin 9s linear infinite;
}
.sf-ticker-group li:nth-child(even) .sf-ticker-star {
    color: #C6A15B;
    animation-direction: reverse;
}
.sf-ticker-toggle {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    margin: 0 1rem 0 0.35rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #E10600 0%, #B80500 100%);
    box-shadow: 0 0 0 4px #fff, 0 8px 18px rgba(225, 6, 0, 0.28);
    color: #fff;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
.sf-ticker-toggle:hover {
    transform: scale(1.08);
}
.sf-ticker-toggle svg {
    width: 1rem;
    height: 1rem;
}
.sf-ticker-icon-play,
.sf-ticker-toggle[aria-pressed="true"] .sf-ticker-icon-pause {
    display: none;
}
.sf-ticker-toggle[aria-pressed="true"] .sf-ticker-icon-play {
    display: block;
}
@keyframes sfTickerScroll {
    to { transform: translate3d(-50%, 0, 0); }
}
@keyframes sfTickerSpin {
    to { transform: rotate(360deg); }
}
@keyframes sfTickerSheen {
    to { background-position: -200% 0; }
}

.sf-about .reveal {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.sf-about .reveal.is-in {
    opacity: 1;
    transform: none;
}

/* CTA band lives in .sf-prefooter (outside #main) — never hide entire inner block */
.sf-prefooter .sf-cta .reveal {
    opacity: 1;
    transform: none;
}
.sf-program-card.reveal {
    transition-delay: calc(var(--reveal-i, 0) * 0.07s);
}

@media (min-width: 960px) {
    .sf-about-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 0.8fr);
        gap: 2.2rem;
    }
    .sf-about-media {
        min-height: 26rem;
    }
}

@media (min-width: 1100px) {
    .sf-program-card {
        flex: 0 0 10.5rem;
        min-height: 10rem;
        padding: 1.5rem 0.5rem 1.15rem;
    }
}
@media (max-width: 959px) {
    .sf-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .sf-cta-brand {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.35);
        padding-top: 1rem;
        width: 100%;
    }
}
.sf-programs-showcase.reveal:not(.is-in) .sf-program-card--photo {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .sf-about-crest,
    .sf-program-card .sf-program-icon i,
    .sf-programs-marquee__track,
    .sf-programs-head h3,
    .sf-programs-head p,
    .sf-programs-showcase.reveal.is-in .sf-program-card--photo,
    .sf-ticker::before,
    .sf-ticker-star,
    .sf-cta::before {
        animation: none;
    }
    .sf-programs-marquee__track {
        animation-duration: var(--sf-programs-duration, 120s) !important;
    }
    .sf-ticker-track {
        animation-duration: var(--sf-ticker-duration, 180s) !important;
    }
    .sf-about .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}