@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');

body{
    font-size: calc(15px + 0.390625vw);
    margin: 0;
    font-family: 'Roboto', sans-serif;
}

header{
    background-color: black;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem 0;
    flex-wrap: wrap;

}
header .img{
    height: 3rem;
    background-image: url('/static/nw-w.png');
    background-size: cover;
    width: 6rem;
}
header span{
    color: white;
    line-height: 3rem;
    font-size: 1.5rem;
}

h1 {
    margin: 0;
    color: gold;
}
h2 {
    color: gold;
    text-align: center;
}

#footer{
    display: grid;
    grid-template-columns: none;
    grid-column-gap: 5rem;
    padding: 0 1rem;
    color: lightgray;
    background-color: black;
}
#subfooter {
    text-align: center;
    border-top: solid 1px lightgray;
    background-color: black;
    color: lightgray;
    padding: 1rem 1rem;
}
#footer, #subfooter {
    font-size: 1.2rem;
}

#footer a, #footer a:visited, #subfooter a, #subfooter a:visited{
    text-decoration: none;
    color: lightgray;
}
#footer a:hover, #subfooter a:hover{
    text-decoration: underline;
}

#footer h3 {
    color:white;
    font-size: 1.5rem;
}

#popup{
    position: fixed;
    width: 20rem;
    border: solid 1px gold;
    border-radius: 1rem;
    background-color: black;
    color: lightgray;
    padding: 1rem;
    z-index: 100;
    font-size: 1rem;
}
#popup h2{
    font-size: 1.2rem;
    color: gold;
}


#main{
    background-image: linear-gradient(#012601, #000047);
    padding: 1rem 0;
    min-height: 80vh;
}
.programmeselect{
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.programmeselect a.programme,.programmeselect a.programme:visited {
    color: lightgray;
    display: block;
    text-decoration: none;
    width: 40vw;
    height: 40vw;
    background-repeat:no-repeat;
    background-size:cover;
    position: relative;
    transition: all 0.25s ease-out;
}
.programmeselect a.programme:hover{
    color: gold;
    transform: scale(1.1);
}
.programmeselect a.programme p{
    position: absolute;
    text-align: center;
    width: 100%;
    bottom: 0;
    font-size:  1.2rem;
    background-color: rgba(0, 0, 0, 0.8);

}

.description p{
    color: lightgray;
}
.description h2{
    text-align: left;
    font-size: 1.2rem;
}
#ectsarea{
    position: sticky;
    top:10px;
    display: flex;
    flex-direction: column;
    background-color: black;
    z-index: 100;
    margin-bottom: 1rem;
}
#ectsarea h3{
    margin: 0.5rem ;
    color: gold;
}
#ectscalc{
    margin: 0.5rem;
    display: flex;
    column-gap: 1rem;
    color: lightgray;
}

#ectscalc .year{
    display: flex;
    column-gap: 1rem;
    flex-wrap: wrap;
}
#ectscalc .year{
    display: flex;
}

#ectscalc .sum{
    font-weight: bold;
}

.red{
    color: red;
}
.green{
    color: green;
}

#treearea{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: space-around;
}

.tree{
    border-radius: 1rem;
    border: solid 1px gold;
    padding-bottom: 3rem;
    margin-bottom: 1rem;
    /*background: linear-gradient(black 0%, #000047 15%, #012601 85%, black 100%);*/
}

.tree .semester{
    display:  grid;
    grid-template-columns: 1.5rem auto;
}

.tree .semester .modules{
    display:  grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 0.5rem;
    padding: 1rem;
}

.tree .semester .left{
    color: gold;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
    text-align: center;
}

/*.tree .sem1,.tree .sem3,.tree .sem5{
    background: linear-gradient(black, #012601 80%, #012601);
}
.tree .sem2,.tree .sem4,.tree .sem6{
    background: linear-gradient(#012601, #000047 80%, black);
}*/
.tree .sem1,.tree .sem3,.tree .sem5{
    border-bottom: dotted gold 1px;
}
.tree .sem2,.tree .sem4{
    border-bottom: dashed gold 1px;
}
.emptymodule{
    width: 5rem;
    height: 12.5rem;
}
.module {
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 6rem;
    color: lightgray;
    text-align: center;
}

.module img{
    width: 5rem;
    height: 7rem;
    object-fit: cover;
    object-position: center;
    border-radius: 2.5rem;
    border: solid 1px gold;
    transition: width 0.2s;
    pointer-events:none;
}

.module img.active{
    border-width: 3px;
}

.module:hover img{
    width: 5.5rem;
    transition: width 0.2s;
}

.module h3{
    font-size: 1rem;
    margin: 0 0 2rem 0;
    pointer-events:none;
}

.module .ects{
    display: block;
    background: #1f1f1f;
    color: lightgray;
    padding: 0.1rem;
    width: 1rem;
    border-radius: 1rem;
    border: solid 1px lightgray;
    font-size: 0.8rem;
    text-align: center;
    justify-self: center;
    top: -0.5rem;
    position: relative;
    pointer-events:none;
}


@media screen and (min-width: 992px) {
    header{
        padding: 1rem 3rem;
    }
    header .img{
        background-image: url('/static/hgklogo-w.png');
        width: 25rem;
    }
    h1{
        padding: 0 3rem;
    }

    .programmeselect a.programme,.programmeselect a.programme:visited {
        width: 20vw;
        height: 20vw;
    }
    .programmeselect a.programme p{
        font-size: 2.5rem;
    }
    .description{
        padding: 0 3rem;
    }
    #ectsarea{
        padding: 0 3rem;
    }
    #treearea{
        flex-direction: row;
        padding: 0 3rem;
    }
    .tree .semester{
        grid-template-columns: 3rem auto;
    }
    .module{
        width: 8rem;
    }

    #footer{
        grid-template-columns: 2fr 3fr 2fr;
        grid-column-gap: 5rem;
        padding: 0 3rem;
    }

    #subfooter {
        padding: 1rem 3rem;
    }
}