/* CSS for the Education Page */

.classlist {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    margin-left: 5%;
    margin-right: 5%;
}
.class {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
    display: none;
}
.front, .back {
    position: absolute;
    display: grid;
    grid-template-areas:
        "course course code"
        "hr hr hr"
        "body body body";
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    border: 2px solid black;
    padding: 10px;
    box-sizing: border-box;
}
.front {
    background-color: #93dfe7;
}
.back {
    background-color: #f4a261;
    transform: rotateY(180deg);
}
.back .name, .back .code{
    color: black;
}
.class.flipped {
    transform: rotateY(180deg);
}
.code {
    grid-area: code;
    padding-left: 1em;
    text-align: right;
    font-weight: bold;
}
.name {
    grid-area: course;
    font-weight: bold;
    height: 3em; 
}
.desc{
    grid-area: body;
}
.skills{
    grid-area: body;
}
.class ul{
    list-style: " - ";
    font-style: italic;
    list-style-position: inside;
    background-color: inherit;
}
label{
    display: block;
}
hr {
    border-color: black;
    width: 100%;
}
.show {
    display: block;
}
@media (max-width: 960px){
    .classlist{
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .classlist {
        display: block;
        margin: auto;
        width: 100%;
        justify-content: center;
    }
    .class {
        width: 100%;
        font-size: 10pt;
        padding: 0;
        min-height: calc(2vw*18);/* Calculates based on font size */
        margin: auto;
        aspect-ratio: auto;
    }
    .front, .back {
        position: absolute;
        display: flex;
        width: 100%;
        height: 100%;
        justify-content: center;
        align-items: center;
        backface-visibility: hidden;
        border: 2px solid black;
        padding: 10px;
        box-sizing: border-box;
    }
    .skills{
        column-count: 2;
    }
    .skills ul{
        list-style: none;
    }
    .skills em{
        display: none;
    }
}