@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');

body {
    font-family: 'Open sans', Helvetica, sans-serif;
    color: hsl(0, 0%, 11%);
    background-color: hsl(0, 0%, 98%);
    line-height: 1.4;
}

#wrapper {
    inline-size: 100%;
    max-inline-size: 1000px;
    margin-block: 0;
    margin-inline: auto;
    padding-block: 2em;
}

h1, h2 {
    text-align: center;
    margin-block: 1em;
}

h1 {
    font-size: 200%;
}

h2 {
    font-size: 150%;
}

h3 {
    text-align: center;
    font-size: 115%;
    font-weight: normal;
    color: white;
    padding-block: 1em;
    background-color: hsl(240, 100%, 20%);
    border-radius: 2px;
}

p {
    margin-block-start: 1em;
}

p + ul {
    margin-inline-start: 2em;
}

ul {
    list-style-type: square;
}

.month {
    margin-block: 2em;
    margin-inline: 1em;
    padding-block: 0.2em;
    padding-inline: 0.2em;
    background-color: hsl(240, 100%, 92%);
    border-radius: 2px;
}

.week-days, .month-days {
    display: grid;
    list-style-type: none;
    grid-template-columns: repeat(5, 3fr) 1fr 1fr;
    grid-gap: 0.2ex;
}

.week-days {
    block-size: 2em;
    background-color: lightgrey;
    padding-block: 1em 0.5em;

    li {
        text-align: center;
    }
}

.month-days li {
    font-size: 90%;
    block-size: 10em;
    background-color: hsl(240, 100%, 99%);

    &:nth-child(7n+6), &:nth-child(7n), &.holiday {
        background-color: hsl(0, 0%, 65%);
    }

    &.invalid {
        background-color: hsl(0, 0%, 80%);
    }

    &:empty {
        background-color: transparent;
    }

    div {
        color: white;
        margin-block: 0.5em;
        margin-inline: 0.3em;
        padding-block: 0.3em;
        padding-inline: 0.3em;
        border-radius: 2px;
    }

    div::before {
        content: var(--subject);
    }
}

nav ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-inline: 10%;
    grid-gap: 1em;

    li {
        inline-size: 100%;
        text-align: center;

        img {
            inline-size: 100%;
        }

        a {
            text-decoration: none;
        }

        a::before {
            content: attr(href);
        }
    }
}


/*** Styles for subjects ***/
/* 1st semeter */
.calculo {
    background-color: hsl(293, 100%, 25%);
    --subject: "Cálculo Vectorial e Integración de Lebesgue";
}

.edo {
    background-color: hsl(0, 100%, 25%);
    --subject: "Ecuacións Diferenciais Ordinarias";
}

.probabilidade {
    background-color: hsl(192, 100%, 25%);
    --subject: "Probabilidade e Estatística";
}

.estruturas {
    background-color: hsl(41, 100%, 25%);
    --subject: "Estruturas Alxébricas";
}

.metodos {
    background-color: hsl(177, 95%, 7%);
    --subject: "Métodos Numéricos en Optimización e Ecuacións Diferenciais";
}

.topoloxia {
    background-color: hsl(120, 100%, 25%);
    --subject: "Topoloxía Xeral";
}

/* 2nd semeter */
.galois {
    background-color: hsl(41, 100%, 25%);
    --subject: "Ecuacións Alxébricas";
}

.inferencia {
    background-color: hsl(192, 100%, 25%);
    --subject: "Inferencia Estatística";
}

.tgs {
    background-color: rgb(13, 0, 128);
    --subject: "Teoría Global de Superficies";
}

.fourier {
    background-color: hsl(293, 100%, 25%);
    --subject: "Series de Fourier e Introdución ás Ecuacións en Derivadas Parciais";
}

.supertopo {
    background-color: hsl(120, 100%, 25%);
    --subject: "Topoloxía de Superficies";
}
