* {
    --main-background-color: #e0e0e0;
    --main-text-color: #2D3256;
    --main-font: 'Montserrat', sans-serif;

    --nav-background-color: rgb(201, 183, 163);
    --nav-text-color: #252E38;
    --nav-selected-background-color: #314650;
    --nav-selected-text-color: #F6FEFF;

    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #d9d9d9;
}

main {
    position: relative;
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: -1;
    background-attachment: initial;
    pointer-events: none;

    background: var(--background-color);
    background: url('background.png');
    background-repeat: repeat;
    background-position: 0 0;
    background-size: auto;
}

#document {
    width: 60%;
    margin: 2rem auto 1rem auto;

    background: var(--main-background-color);
    color: var(--main-text-color);
    font-family: var(--main-font);
    font-size: 15pt;
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    #document {
        width: 90%;
    }
}

nav {
    position: absolute;
    width: calc(20% - 2em);
    max-width: calc(20% - 2em);
    left: 1em;
    background: var(--nav-background-color);

    .items div {
        text-align: center;
        font-size: 12pt;
        padding: 0.5em;

        a {
            color: var(--nav-text-color);
        }

        &.active {
            cursor: default;
        }

        &.active, &:hover, &:hover a {
            background-color: var(--nav-selected-background-color);
            color: var(--nav-selected-text-color);
        }
    }

    img {
        max-width: calc(100% - 1em);
        margin: 0.5em;
        margin-bottom: 2em;
    }
}

#alt-logo {
    display: none;
}

@media (max-width: 1200px) {
    nav {
        position: sticky;
        top: 0;
        left: unset;

        width: 100%;
        max-width: unset;

        & > .items {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            align-content: center;
            padding: 0.5em 1em;

            div {
                font-size: 10pt;
                display: inline-block;
                padding: 0.8em;
                margin-left: 0.3em;
                margin-right: 0.3em;
            }
        }

        & > #logo {
            display: none;
        }
    }

    #alt-logo {
        display: block;
        width: 100%;

        img {
            display: block;
            width: 70%;
            max-width: 300px;
            margin: 1em auto;
        }
    }
}

@media (max-width: 900px) {
    nav .items div {
        padding: 0.5em;
        margin-left: 0.2em;
        margin-right: 0.2em;
        font-size: 10pt;
    }
}

@media (max-width: 450px) {
    nav .items div {
        font-size: 8pt;
    }
}

#description {
    padding: 1.5rem;

    & > :first-child {
        margin-top: 0;
    }

    & > :last-child {
        margin-bottom: 0;
    }

    ul {
        padding-left: 2em;

        & > li {
            margin-top: 0.8em;
            margin-bottom: 0.8em;
        }
    }

    p {
        font-family: var(--main-font);
    }

    a {
        color: var(--main-text-color);
        text-decoration: underline;
    }

    h1 {
        font-size: 1.7em;
        color: #878a8a;
        text-transform: uppercase;
    }
    h2 {
        font-size: 1.2em;
        color: #878a8a;
        margin-bottom: 0.5em;
    }
    :is(h1, h2) + p {
        margin-top: 0;
    }

    & > img {
        float: right;
        max-width: 100%;
        margin-left: 0.5em;
    }

    & > .frame {
        float: right;
        max-width: 100%;
        margin-left: 0.5em;
        margin-bottom: 0.5em;

        img {
            display: block;
            max-width: 100%;
        }
    }

    & > .full {
        width: 100%;
        margin-bottom: 1em;

        img {
            width: 100%;
        }
    }

    & > .center {
        margin: 1em 0;
        text-align: center;

        img {
            display: block;
            margin-left: auto;
            margin-right: auto;
        }

        p {
            text-align: center;
        }
    }

    #title {
        display: block;
        margin: 1em auto;
        margin-top: 0;
        text-align: center;

        h2 {
            font-size: 1.3em;
            font-weight: normal;
            margin: 0;
        }

        .spacer {
            margin: 0 1em;
        }
    }

    .logo {
        margin: 1em;

        img {
            display: block;
            margin: 0 auto;
            max-width: 100%;
        }
    }

    #summary {
        text-align: center;
    }

    .mail, .mail a {
        color: #999999;
    }

    #details {
        color: #878a8a;
        text-align: center;
        font-size: 0.9em;
    }
}

@media (max-width: 1200px) {
    #description p {
        text-align: justify;
        hyphens: auto;
    }
}

@media (max-width: 800px) {
    #description {
        padding: 0.8em;

        h1 {
            font-size: 1.2em;
        }
        h2 {
            font-size: 1em;
        }

        #title .spacer {
            margin: 0;
        }
    }
}

#description #logo-gallery {
    img {
        display: block;
        clear: both;
        max-width: 100%;
        margin: 1em 0;
    }

    .center {
        margin-left: auto;
        margin-right: auto;
    }

    .right {
        float: right;
        margin-bottom: 1em;
        margin-top: -0.2em;
    }
}

#logo-gallery + p {
    margin-top: 1em;
    clear: both;
}

.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1em;
    margin-bottom: 1em;

    & > div {
        display: flex;
        justify-content: center;
        flex-direction: column;

        img {
            width: 100%;
            max-height: 20rem;
            object-fit: cover;
        }
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr 1fr;
        gap: 0.5em;
    }
}

:is(p, ul) + .gallery {
    margin-top: 2em;
}

.clear {
    clear: both;
}

iframe {
    border: none;
}
