@charset "utf-8";

html {
    color: white;
    font-family: "Calabri", sans-serif;
    background-color: #475b73;
    display: block;
}

body {
    background-color: #374b63;
    min-height: 100vh;
    max-width: 65ch;
    margin: 0 auto;
}

a {
    color: #ffe500;
}

a:hover {
    text-decoration: none;
}

/* a:active {
    color: white;
} */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
    hyphens: none;
}

p {
    line-height: 1.25em;
}

section + section {
    margin-top: 2em;
}

/* subheader configs */
header > h1 + p,
header > h2 + p {
    margin-top: -0.75em;
    font-size: 1.25em;
}

header > h2 + p {
    margin-top: -1em;
}

main {
    margin: 2rem 5%;
}

img,
video,
iframe {
    display: block;
    max-height: 70vh;
    /* max-height was  50 vmax but then on a wide screen one gets large images */
    max-width: 100%;
    margin: 2em;
}

img,
video {
    /* When both width and height are set to auto to keep the correct aspect
    ratio this breaks the automatic aspect-ratio calculation from the width and
    height attributes thus leading to cumulative layout shifts. Thus, replacing
    'width: auto;' by 'object-fit: scale-down;'. */
    height: auto; /* we do not want large spaces above and below the image */
    object-fit: scale-down;
}

figure {
    display: table;
    margin: 2em;
}

figcaption {
    margin-top: 1em;
    font-style: italic;
}

figure img {
    margin: auto;
}

[hidden] {
    display: none !important;
}

blockquote {
    margin: 0em;
}

/* blockquote p:first-of-type:before {
    content: '\201C';
}

blockquote p:last-of-type:after {
    content: '\201D';
} */

.centered {
    text-align: center;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media all and (min-width: 60ch) {
    .justified {
        text-align: justify;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }
}

.unbreakable {
    hyphens: none;
}

.right {
    text-align: right;
}

.striked-red {
    text-decoration-color: #ff5e00;
    text-decoration-thickness: 0.1em;
}

.notification {
    font-weight: bold;
}

.m1em {
    margin: 1em;
}

.m2T {
    margin-top: 2em;
}

.m3T {
    margin-top: 3em;
}

.no-margin {
    margin: 0;
}

.no-top-margin {
    margin-top: 0;
}

.no-bottom-margin {
    margin-bottom: 0;
}

.p1em {
    padding: 1em;
}

/* push the footer down with margin-top: auto or main min-height = 100vh - header + footer height */

.main-wrapper {
    display: flow-root;
    min-height: calc(100vh - 6.25rem);
}

@supports (display: flex) {
    body {
        display: flex;
        flex-direction: column;
    }

    .main-wrapper {
        min-height: auto;
    }
}

.footer {
    margin-top: auto;
    display: flow-root;
    background-color: #1f2c3b;
}

.button {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    background-color: #1f2c3b;
    outline: none;
    border: none;
    padding: 1em;
}

.button:focus,
.button:hover {
    background-color: #526780;
    text-decoration: none;
}

.header {
    position: sticky;
    top: 0;
    min-height: 3em;
    z-index: 9999;
    background-color: #1f2c3b;
}

.header nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.header nav ul li {
    float: left;
}

.collapsedNavigation {
    height: 3em;
    overflow: hidden;
}

.button[aria-current="page"] {
    color: white;
    background-color: #374b63;
}

.button[aria-current="page"]:focus {
    background-color: #526780;
}

.toggleNavigation {
    font-size: 2em;
    line-height: 1;
    padding: 0.25em 0.5em;
    color: white;
    cursor: pointer;
}

@supports (display: flex) {
    .header nav ul {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
    }

    .header nav ul li {
        flex-grow: 1;
        float: none;
    }

    .header nav ul li.toggleParent {
        flex-grow: 0;
    }

    .header nav ul li * {
        display: block;
    }
}

/* info */

.grid-container dt {
    font-weight: normal;
    padding-top: 2em;
}

.grid-container dt:first-child {
    padding-top: 0;
}

.grid-container dd {
    padding-top: 0.5em;
    margin-left: 10%;
}

@supports (display: grid) {
    @media all and (min-width: 40ch) {
        dl.grid-container {
            display: grid;
            grid-template-columns: auto auto;
            justify-content: start;
        }

        .grid-container dt {
            grid-column-start: 1;
        }

        .grid-container dd {
            grid-column-start: 2;
            padding-top: 0.5em;
            margin-left: 1em;
        }

        .grid-container dt + dd {
            padding-top: 2em;
        }

        .grid-container dt + dd:nth-child(2) {
            padding-top: 0;
        }
    }
}

/* pagination */

.boxContainer {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.box {
    background-color: #1f2c3b;
    border-radius: 0.5rem;
    margin: 1em 0;
    /* padding: 1em; */
    /* display: inline-block; */
}

@supports (display: grid) {
    .boxContainer {
        display: grid;
        grid-gap: 1em;
        grid-auto-flow: row dense;
        height: auto;
    }

    .twoColumnGrid {
        grid-template-columns: repeat(auto-fit, minmax(28ch, 1fr));
    }

    .box {
        margin: 0;
    }
}

/* make boxes clickable */

.clickable {
    position: relative;
}

.clickable:focus-within,
.clickable:hover {
    background-color: #526780;
}

.clickable a {
    text-decoration: none;
    position: static;
}

.clickable a:hover,
.clickable a:focus {
    outline: none;
}

.clickable a:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* box content */
.box article,
.box blockquote {
    margin: 1em;
}

.box article h1 {
    font-size: 1.25em;
}

/* card is a additional markup within a box with an image */
.card {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1em;
}

.card header > h1 {
    margin-bottom: 0;
}

.cardImage {
    flex-shrink: 0;
    width: 50%;
    margin: 0em;
}

.boxed {
    display: block;
    background-color: #1f2c3b;
    border-radius: 0.5rem;
    margin: 1em 0;
    padding: 1em;
}
