/* Homepage "Faculty" course cards. Scoped to .sfs-courses so nothing else changes. */
.sfs-courses {
    background: #fff;
    padding: 60px 20px;
}

.sfs-courses__inner {
    max-width: 1264px;
    margin: 0 auto;
}

.sfs-courses__head {
    text-align: center;
    margin-bottom: 36px;
}

.sfs-courses__title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 0;
    padding: 10px 56px;
    min-width: min(100%, 360px);
    background: #0f2d5c;
    color: #fff;
    border: 2px solid #c8d4ea;
    border-radius: 999px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.2;
}

.sfs-courses__book {
    width: 26px;
    height: 26px;
    flex: none;
}

.sfs-courses__sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 18px 0 0;
    color: #0f2d5c;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.sfs-courses__sub i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.sfs-courses__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sfs-courses__card {
    --c-bg: #e3edfb;
    --c-border: #8fb0e3;
    --c-dark: #0f2d5c;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 84px;
    padding: 14px 18px;
    background: var(--c-bg);
    border: 1.5px solid var(--c-border);
    border-radius: 12px;
    color: var(--c-dark);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sfs-courses__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(15, 45, 92, 0.14);
}

.sfs-courses__card:nth-child(4n + 2) { --c-bg: #fde3ec; --c-border: #ec9bb8; --c-dark: #8a1f4b; }
.sfs-courses__card:nth-child(4n + 3) { --c-bg: #e1f3e4; --c-border: #8ccf99; --c-dark: #1c6b38; }
.sfs-courses__card:nth-child(4n + 4) { --c-bg: #e9e2fb; --c-border: #b3a0ea; --c-dark: #4a2d8c; }

/* Cards after the first row: eight more colours, so no card repeats the colour above or beside it. */
.sfs-courses__card:nth-child(8n + 5) { --c-bg: #fff0d9; --c-border: #f2b866; --c-dark: #a85a00; }
.sfs-courses__card:nth-child(8n + 6) { --c-bg: #dcf4f2; --c-border: #7fd0c8; --c-dark: #0d6b66; }
.sfs-courses__card:nth-child(8n + 7) { --c-bg: #ffe4de; --c-border: #f2a090; --c-dark: #b33a22; }
.sfs-courses__card:nth-child(8n + 8) { --c-bg: #e4e6fb; --c-border: #9ea6ee; --c-dark: #2f3a9c; }
.sfs-courses__card:nth-child(8n + 9) { --c-bg: #f1f5d2; --c-border: #c3d46a; --c-dark: #5a6b0c; }
.sfs-courses__card:nth-child(8n + 10) { --c-bg: #dff1fb; --c-border: #84c6ea; --c-dark: #0b6a99; }
.sfs-courses__card:nth-child(8n + 11) { --c-bg: #fbe0f6; --c-border: #e698d8; --c-dark: #922a7e; }
.sfs-courses__card:nth-child(8n + 12) { --c-bg: #efe6dc; --c-border: #c9ab8c; --c-dark: #6b4426; }

.sfs-courses__icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--c-dark);
    color: #fff;
    font-size: 26px;
    line-height: 1;
}

.sfs-courses__icon svg {
    width: 26px;
    height: 26px;
}

.sfs-courses__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-self: stretch;
    justify-content: center;
    padding-left: 16px;
    border-left: 1.5px solid var(--c-dark);
    min-width: 0;
}

.sfs-courses__name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.sfs-courses__tagline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 13px;
    font-style: italic;
    line-height: 1.35;
    color: var(--c-dark);
    opacity: 0.9;
}

@media (max-width: 1024px) {
    .sfs-courses__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .sfs-courses { padding: 40px 16px; }
    .sfs-courses__title { font-size: 24px; padding: 8px 28px; gap: 12px; }
    .sfs-courses__book { width: 20px; height: 20px; }
    .sfs-courses__sub { font-size: 12px; letter-spacing: 0.2em; gap: 10px; }
    .sfs-courses__grid { grid-template-columns: 1fr; gap: 14px; }
    .sfs-courses__card { min-height: 76px; }
}

/* Cards that open a department page: whole card is the link. */
.sfs-courses__card--link { position: relative; cursor: pointer; }
.sfs-courses__stretch { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.sfs-courses__stretch:focus-visible { outline: 3px solid var(--c-dark); outline-offset: 2px; }
