.department-container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.department-hero {
    position: relative;
    overflow: hidden;
    padding-block: 55px 62px;
    color: #fff;
    background:
        radial-gradient(circle at 86% 24%, rgba(255, 209, 0, .18), transparent 25%),
        linear-gradient(110deg, #061d3b, #0d4277);
    border-bottom: 6px solid var(--gold-500);
}

.department-hero::after {
    position: absolute;
    top: -170px;
    right: -70px;
    width: 390px;
    height: 390px;
    border: 65px solid rgba(255, 255, 255, .035);
    border-radius: 50%;
    content: "";
}

.department-hero .department-container {
    position: relative;
    z-index: 1;
}

.department-hero h1 {
    margin: 0;
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: -.05em;
}

.department-hero > .department-container > p:last-child {
    max-width: 760px;
    margin: 18px 0 0;
    color: #d3dfeb;
    line-height: 1.75;
}

.department-section {
    padding-block: 58px 82px;
    background: #fff;
}

.department-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 27px;
    gap: 30px;
}

.department-heading h2 {
    margin: 0;
    color: var(--navy-900);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.department-heading > p {
    max-width: 430px;
    margin: 0;
    color: #60738a;
    line-height: 1.7;
}

.department-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.department-card {
    --department-color: #175ca6;
    position: relative;
    display: grid;
    grid-template-columns: minmax(190px, 42%) minmax(0, 1fr);
    min-height: 310px;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d6e0ea;
    border-top: 5px solid var(--department-color);
    border-radius: 9px;
    box-shadow: 0 10px 28px rgba(7, 30, 65, .08);
}

.department-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: min(100%, 581px);
    justify-self: center;
}

.department-card--language { --department-color: #714fa0; }
.department-card--science { --department-color: #d71920; }
.department-card--religion { --department-color: #c99e00; }
.department-card--assessment { --department-color: #16806b; }

.department-photo {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 310px;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(145deg, var(--department-color), #082c55);
    font-size: 2rem;
    font-weight: 800;
    place-items: center;
}

.department-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.department-photo b {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 38px;
    height: 38px;
    color: var(--navy-950);
    background: var(--gold-500);
    border-radius: 50%;
    font-size: .7rem;
    place-items: center;
}

.department-card-copy {
    position: relative;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    min-height: 310px;
    padding: 29px 25px;
}

.department-code {
    position: static;
    display: grid;
    min-width: 48px;
    height: 42px;
    padding-inline: 10px;
    color: #fff;
    background: var(--department-color);
    border: 0;
    border-radius: 8px;
    font-size: .68rem;
    font-weight: 800;
    place-items: center;
}

.department-card-copy > p {
    margin: 17px 0 5px;
    color: var(--department-color);
    font-size: .65rem !important;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.department-card-copy h3 {
    margin: 0;
    color: var(--navy-900);
    font-size: 1.25rem;
    line-height: 1.25;
}

.department-card-copy > strong {
    display: block;
    margin-top: 13px;
    color: #233d5a;
    font-size: .86rem;
    line-height: 1.55;
}

.department-card-copy > small {
    display: block;
    margin-top: 14px;
    padding-top: 13px;
    color: #66798e;
    border-top: 1px solid #e0e7ef;
    font-size: .68rem;
    line-height: 1.65;
}

@media (max-width: 900px) {
    .department-grid {
        grid-template-columns: 1fr;
    }

    .department-card:last-child:nth-child(odd) {
        grid-column: auto;
        width: 100%;
    }
}

@media (max-width: 620px) {
    .department-container {
        width: min(100% - 28px, 1180px);
    }

    .department-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .department-card {
        grid-template-columns: minmax(135px, 40%) minmax(0, 1fr);
        min-height: 280px;
    }

    .department-photo {
        height: 100%;
        min-height: 280px;
    }

    .department-card-copy {
        min-height: 280px;
        padding: 22px 17px;
    }

    .department-card-copy h3 {
        font-size: 1.05rem;
    }

    .department-card-copy > strong {
        font-size: .76rem;
    }

    .department-card-copy > small {
        font-size: .62rem;
    }
}

@media (max-width: 430px) {
    .department-card {
        grid-template-columns: 1fr;
    }

    .department-photo {
        min-height: 300px;
    }

    .department-card-copy {
        min-height: 0;
    }
}
