#departments {
    width: 100%;
    height: 100%;
    margin-top: 10%;
}

.departmentsDiv {
    display: flex;
    justify-content: center;
    margin-bottom: 64px;
    margin-bottom: 6%;
}

.departmentsTitle {
    color: white;
    margin: auto;
    font-size: 48px;
    font-weight: 900;
    position: relative;
}

.departmentsTitle:after {
    content: '';
    height: 4px;
    border-radius: 8px;
    width: 50%;
    background-color: #1579D6;
    position: absolute;
    bottom: 0;
    left: calc(50% - 25%);
    top: 1.5em;
}


/* First row */

#departmentsCardsFirstRow {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-left: 9%;
    margin-right: 9%;
}

.cardFR {
    width: 280px;
    height: 300px;
    border-radius: 16px;
    background: linear-gradient(109.61deg, rgba(255, 255, 255, 0.078) 4.21%, rgba(255, 255, 255, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-right: 5.5%;
    box-shadow: 0px 0px 8px rgba(19, 129, 230, 0.8);
    transition: all 0.7s ease-in-out;
}


/* for hover card state */

.cardFR h2 {
    display: none;
    color: white;
    margin-top: 1em;
    transition: all 0.9s ease-in-out;
}

.cardFR span {
    display: none;
    color: white;
    opacity: 0.8;
    text-align: center;
    margin-top: 1.5em;
    margin-left: 2%;
    margin-right: 2%;
    transition: all 0.9s ease-in-out;
}

.cardFR:hover {
    background: linear-gradient(180deg, #205689 0%, #093966 100%);
    box-shadow: none;
}

.cardFR:hover img,
.cardFR:hover p {
    display: none;
}

.cardFR:hover h2,
.cardFR:hover span {
    display: block;
}


/* for different cards */

.cardFRCompetitive h2 {
    display: none;
    color: white;
    text-align: center;
    margin-top: 1em;
    transition: all 0.9s ease-in-out;
}

.cardFRCompetitive span {
    display: none;
    color: white;
    opacity: 0.8;
    text-align: center;
    margin-top: 1.5em;
    margin-left: 2%;
    margin-right: 2%;
    transition: all 0.9s ease-in-out;
}

.cardFRCompetitive:hover {
    background: linear-gradient(180deg, #205689 0%, #093966 100%);
    box-shadow: none;
}

.cardFRCompetitive:hover img,
.cardFRCompetitive:hover p {
    display: none;
}

.cardFRCompetitive:hover h2,
.cardFRCompetitive:hover span {
    display: block;
}

.cardTitle {
    color: white;
    font-size: 32px;
    font-weight: 500;
    padding-top: 40px;
    text-align: center;
    transition: all 0.7s ease-in-out;
}


/* For competitive card */

.cardFRCompetitive {
    width: 280px;
    height: 300px;
    border-radius: 16px;
    background: linear-gradient(109.61deg, rgba(255, 255, 255, 0.078) 4.21%, rgba(255, 255, 255, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-right: 0%;
    box-shadow: 0px 0px 8px rgba(19, 129, 230, 0.8);
    transition: all 0.7s ease-in-out;
}

.departmentCardimageCompetitive {
    padding-top: 2.3em;
    padding-bottom: 2.3em;
    transition: all 0.9s ease-in-out;
}

.departmentCardimage {
    transition: all 0.9s ease-in-out;
}

.cardTitleCompetitve {
    color: white;
    font-size: 32px;
    font-weight: 500;
    padding: 0 0.1em;
    /* padding-top: 40px; */
    text-align: center;
    transition: all 0.7s ease-in-out;
}


/* Second Row */

#departmentsCardsSecondRow {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-left: 22%;
    margin-right: 22%;
    margin-top: 3%;
}


/* Responisve styles for title  */

@media only screen and (max-width: 1000px) {
    .departmentsTitle {
        font-size: 40px;
    }
}

@media only screen and (max-width:550px) {
    .departmentsTitle {
        font-size: 32px;
    }
}

@media only screen and (max-width:360px) {
    .departmentsTitle {
        font-size: 28px;
    }
}


/* Responsive styles */

@media only screen and (max-width:1020px) {
    .cardTitle {
        font-size: 28px;
    }
    .cardTitleCompetitve {
        font-size: 28px;
    }
    .cardFR h2 {
        font-size: 30px;
    }
    .cardFR span {
        font-size: 14px;
    }
    .cardFRCompetitive h2 {
        font-size: 30px;
    }
    .cardFRCompetitive span {
        font-size: 14px;
    }
    .departmentCardimage {
        width: 30%;
    }
    .departmentCardimageCompetitive {
        width: 30%;
    }
    .cardFR {
        height: 260px;
    }
    .cardFRCompetitive {
        height: 260px;
    }
    .departmentCardimageCompetitive {
        padding-bottom: 2.1em;
    }
}

@media only screen and (max-width:950px) {
    .cardTitle {
        font-size: 24px;
    }
    .cardTitleCompetitve {
        font-size: 24px;
    }
    .cardFR h2 {
        font-size: 24px;
    }
    .cardFR span {
        font-size: 11px;
        margin-left: 4%;
        margin-right: 4%;
    }
    .cardFRCompetitive h2 {
        font-size: 24px;
    }
    .cardFRCompetitive span {
        font-size: 11px;
        margin-left: 4%;
        margin-right: 4%;
    }
    .cardFR {
        height: 240px;
    }
    .cardFRCompetitive {
        height: 240px;
    }
    .departmentCardimageCompetitive {
        padding-bottom: 1.9em;
        padding-top: 2.1em;
    }
}

@media only screen and (max-width:830px) {
    .cardTitle {
        font-size: 20px;
    }
    .cardTitleCompetitve {
        font-size: 20px;
    }
    .cardFR h2 {
        font-size: 23px;
    }
    .cardFR span {
        font-size: 11px;
    }
    .cardFRCompetitive h2 {
        font-size: 23px;
    }
    .cardFRCompetitive span {
        font-size: 11px;
    }
    .cardFR {
        height: 210px;
    }
    .cardFRCompetitive {
        height: 210px;
    }
    .departmentCardimageCompetitive {
        padding-bottom: 2em;
        padding-top: 0em;
    }
}

@media only screen and (max-width:750px) {
    .cardTitle {
        font-size: 18px;
    }
    .cardTitleCompetitve {
        font-size: 18px;
    }
    .cardFR h2 {
        font-size: 21px;
    }
    .cardFR span {
        font-size: 10px;
    }
    .cardFRCompetitive h2 {
        font-size: 21px;
    }
    .cardFRCompetitive span {
        font-size: 10px;
    }
    .cardFR {
        height: 190px;
    }
    .cardFRCompetitive {
        height: 190px;
    }
}

@media only screen and (max-width:670px) {
    .cardTitle {
        font-size: 18px;
    }
    .cardTitleCompetitve {
        font-size: 18px;
    }
    .cardFR h2 {
        font-size: 18px;
    }
    .cardFR span {
        font-size: 8px;
    }
    .cardFRCompetitive h2 {
        font-size: 18px;
    }
    .cardFRCompetitive span {
        font-size: 8px;
    }
    .cardFR {
        height: 190px;
    }
    .cardFRCompetitive {
        height: 190px;
    }
}

@media only screen and (max-width:650px) {
    .cardTitle {
        font-size: 16px;
    }
    .cardFR h2 {
        font-size: 16px;
    }
    .cardFRCompetitive h2 {
        font-size: 16px;
    }
    .cardTitleCompetitve {
        font-size: 16px;
    }
    .cardFR {
        height: 160px;
    }
    .cardFRCompetitive {
        height: 160px;
    }
}

@media only screen and (max-width:500px) {
    .cardTitle {
        font-size: 14px;
        padding-top: 8px;
    }
    .cardTitleCompetitve {
        font-size: 14px;
        padding-top: 8px;
    }
    .cardFR h2 {
        font-size: 12px;
    }
    .cardFRCompetitive h2 {
        font-size: 12px;
    }
    .cardFR span {
        font-size: 6px;
        margin-top: 4px;
    }
    .cardFRCompetitive span {
        font-size: 6px;
        margin-top: 4px;
    }
    .cardFR {
        height: 140px;
    }
    .cardFRCompetitive {
        height: 140px;
    }
    .departmentCardimage {
        margin-bottom: 10px;
        margin-top: 20px;
    }
    .departmentCardimageCompetitive {
        padding-bottom: 0.2em;
        padding-top: 1.6em;
    }
}

@media only screen and (max-width:450px) {
    #departmentsCardsFirstRow {
        flex-direction: column;
        justify-content: center;
    }
    #departmentsCardsSecondRow {
        flex-direction: column;
        justify-content: center;
        margin-top: 0;
    }
    .departmentCardimage {
        width: 20%;
    }
    .departmentCardimageCompetitive {
        width: 20%;
    }
    .cardTitle {
        font-size: 16px;
    }
    .cardTitleCompetitve {
        font-size: 16px;
    }
    .cardFR h2 {
        font-size: 18px;
        padding-bottom: 0.5em;
    }
    .cardFRCompetitive h2 {
        font-size: 18px;
        padding-bottom: 0.5em;
    }
    .cardFR span {
        font-size: 14px;
        margin-top: 8px;
        margin-left: 10%;
        margin-right: 10%;
    }
    .cardFRCompetitive span {
        font-size: 14px;
        margin-top: 4px;
    }
    .cardFR {
        height: 240px;
        margin-top: 1.5em;
        margin-right: 0;
    }
    .cardFRCompetitive {
        height: 240px;
        margin-top: 1.5em;
    }
}