/* ----------------------------------Adding Images to subjects of index.html ----------------------*/

#sub_images{
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    align-items: center;
}

.names_with_images{
    /* border: 1px solid red; */
    border-radius: 5px;
    height: 300px;
    width: 400px;
    position: relative;
    overflow: hidden;
    font-size: 25px;
    transition: all 0.1s linear;
    margin: 20px 10px;
}

.names_with_images a{
    text-decoration: none;
}

.names_with_images:hover{
    box-shadow: inset 0px -30px 150px rgba(0, 0, 0, 0.479);
}

/* for computers and programming  */
#computers{
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
    color: white;
    height: 100%;
    width: 100%;
    /* font-size: 25px; */
    text-shadow: 0px 0px 3px white, 0px 0px 3px black;
}

#computers::before{
    content: "";
    position: absolute;
    background: url(../subjects/computers_and_programming/static/computers_2.jpg);
    background-size: cover;
    top: 0px;
    left: 0px;
    height: 100%;
    width: 100%;
    z-index: -1;
    opacity: 0.5;
    transition: all 0.1s linear;
}

.names_with_images:hover #computers::before{
    transform: scale(1.2);
    opacity: 0.7;
}

/* for finance and economics */
#finance{
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    height: 100%;
    width: 100%;
    /* font-size: 25px; */
    text-shadow: 0px 0px 3px white, 0px 0px 3px black;
}

#finance::before{
    content: "";
    position: absolute;
    background: url(../subjects/finance/static/money_1.jpg);
    background-size: cover;
    top: 0px;
    left: 0px;
    height: 100%;
    width: 100%;
    z-index: -1;
    opacity: 0.5;
    transition: all 0.1s linear;
}

.names_with_images:hover #finance::before{
    transform: scale(1.2);
    opacity: 0.7;
}

/* for mathematics */
#mathematics{
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    height: 100%;
    width: 100%;
    /* font-size: 25px; */
    text-shadow: 0px 0px 3px white, 0px 0px 3px black;
}

#mathematics::before{
    content: "";
    position: absolute;
    background-image: url(../subjects/mathematics/static/math_1.jpg);
    background-size: cover;
    top: 0px;
    left: 0px;
    height: 100%;
    width: 100%;
    z-index: -1;
    opacity: 0.5;
    transition: all 0.1s linear;
}

.names_with_images:hover #mathematics::before{
    transform: scale(1.3);
    opacity: 0.8;
}

/* for physics  */
#physics{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    color: white;
    /* font-size: 25px; */
    text-shadow: 0px 0px 3px white, 0px 0px 3px black;
}

#physics::before{
    content: "";
    position: absolute;
    background-image: url(../subjects/physics/static/physics_1.jpg);
    background-size: cover;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    transition: all 0.1s linear;
}

.names_with_images:hover #physics::before{
    transform: scale(1.2);
    opacity: 0.7;
}

/* for design  */
#design{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    color: white;
    /* font-size: 25px; */
    text-shadow: 0px 0px 3px white, 0px 0px 3px black;
}

#design::before{
    content: "";
    position: absolute;
    background-image: url(../subjects/design/static/design_4.jpg);
    background-size: cover;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    transition: all 0.1s linear;
}

.names_with_images:hover #design::before{
    transform: scale(1.2);
    opacity: 0.6;
}

/* for office */
#office{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    color: white;
    /* font-size: 25px; */
    text-shadow: 0px 0px 3px white, 0px 0px 3px black;
}

#office::before{
    content: "";
    position: absolute;
    background-image: url(../subjects/office/static/office_1.jpg);
    background-size: cover;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    transition: all 0.1s linear;
}

.names_with_images:hover #office::before{
    transform: scale(1.2);
    opacity: 0.6;
}

/* ------------- media queries ---------------- */

@media (max-width: 450px) and (min-width: 401px){
    #sub_images{
        display: flex;
        flex-flow: column wrap;
        justify-content: space-evenly;
        align-items: center;
    }
    
    .names_with_images{
        /* border: 1px solid red; */
        height: 290px;
        width: 370px;
        font-size: 23px;
    }
}

@media (max-width: 400px) and (min-width: 351px){
    #sub_images{
        display: flex;
        flex-flow: column wrap;
        justify-content: space-evenly;
        align-items: center;
    }
    
    .names_with_images{
        /* border: 1px solid red; */
        height: 270px;
        width: 320px;
        font-size: 21px;
    }
}

@media (max-width: 350px) and (min-width: 301px){
    #sub_images{
        display: flex;
        flex-flow: column wrap;
        justify-content: space-evenly;
        align-items: center;
    }
    
    .names_with_images{
        /* border: 1px solid red; */
        height: 220px;
        width: 270px;
        font-size: 18px;
    }
}

@media (max-width: 300px) and (min-width: 251px){
    #sub_images{
        display: flex;
        flex-flow: column wrap;
        justify-content: space-evenly;
        align-items: center;
    }
    
    .names_with_images{
        /* border: 1px solid red; */
        height: 170px;
        width: 210px;
        font-size: 15px;
    }
}

@media (max-width: 250px){
    #sub_images{
        display: flex;
        flex-flow: column wrap;
        justify-content: space-evenly;
        align-items: center;
    }
    
    .names_with_images{
        /* border: 1px solid red; */
        width: 170px;
        height: 130px;
        font-size: 12px;
    }
}

