/**
 * 1. Set up a decent box model on the root element.
 * 2. Define CSS custom properties for colors and breakpoints.
 */
html {
    box-sizing: border-box;
    color-scheme: light dark;

    /* Spacing */
    --vb: 1.5em;

    /* Breakpoints (for reference, used in media queries) */
    --bp-tablet: 768px;
    --bp-desktop: 820px;
    --bp-wide: 960px;

    /* Colors - Light mode */
    --color-primary: #d7282e;
    --color-primary-dark: #d7282e;
    --color-accent: #dd7eb4;
    --color-bg: #ffffff;
    --color-bg-alt: #ffffff;
    --color-text: #444444;
    --color-text-inverted: #ffffff;
    --color-border: #cccccc;
}

@media (prefers-color-scheme: dark) {
    html {
        --color-primary-dark: #5c1a1d;
        --color-bg: #1a1a1a;
        --color-bg-alt: #2a2a2a;
        --color-text: #e0e0e0;
        --color-border: #444444;
    }
}

*,
::before,
::after {
  box-sizing: inherit;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font: 100% / 1.5 "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    body {
        font-size: 120%;
    }
}

a {
    text-underline-position: under;
}

.main_content {
    font-size: 1rem;
}

@media (min-width: 768px) {
    .main_content {
        font-size: 1.25rem;
    }
}

.main_content a {
    color: var(--color-primary);
    font-weight: bold;
}

@media (min-width: 768px) {
    .main_content > .container {
        display: grid;
        grid-template-columns: 4fr 1fr;
    }

    .main_content > .container > main {
        border-right: 2px solid var(--color-primary);
        margin-right: 1rem;
        padding-right: 1rem;
    }
}

.main_content > .container > aside ul,
.main_content > .container > aside ul li {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.main_content > .container > aside ul li {
    margin-bottom: 1rem;
}

.main_content > .container aside ul li a {
    color: var(--color-text);
    display: block;
    text-align: center;
}

.main_content > .container aside img,
.main_content > .container aside svg {
    height: auto;
    margin: 0 auto;
    padding: 0.5rem;
    width: 75%;
}

.main_content > .container aside ul:first-of-type {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.main_content > .container aside ul:first-of-type li a svg {
    margin: 0;
}

@media (min-width: 768px) {
    .main_content > .container aside img,
    .main_content > .container aside svg {
        margin: 0;
        width: 100%;
    }
}

hr {
    background-color: transparent;
    border-width: 0;
    border-bottom: 2px solid var(--color-primary);
    margin: var(--vb) 0;
}

h1,
h2,
h3 {
    margin-bottom: calc(var(--vb) / 2);
    margin-top: 0;
}

p {
    margin: 0 0 calc(var(--vb) / 2);
}

ul,
ol {
    margin: calc(var(--vb) / 2) 0;
    padding-left: var(--vb);
}

li {
    margin: calc(var(--vb) / 6) 0;
}

ul ul {
    margin-bottom: 0;
    margin-top: 0;
}

img {
    display: block;
    height: auto;
    margin: var(--vb) 0;
    max-width: 100%;
}

table {
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table thead tr th,
table tbody tr td {
    background-clip: padding-box;
    background-color: var(--color-bg);
    border: 1px solid var(--color-primary);
    padding: 0.5rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    table tr td,
    table tr th {
        font-size: 0.875rem;
    }
}

@media (min-width: 960px) {
    table tr td,
    table tr th {
        font-size: 1rem;
    }
}

table tr th:first-child,
table tr td:first-child {
    left: 0;
    position: sticky;
    z-index: 20;
}

.responsive-table {
    overflow: auto;
    width: 100%;
}

.responsive-table + .responsive-table table tbody tr td:nth-child(3) {
    text-align: center;
}

.responsive-table + .responsive-table table tbody tr td:nth-child(5),
.responsive-table + .responsive-table table tbody tr td:last-child {
    text-align: right;
}

/**
 * 1. Visually hide the link
 * 2. Place the link at the top left of the page
 */
a[href="#main"] {
    border-bottom: 2px solid transparent;
    color: inherit;
    font-size: 1rem;
    left: -1000rem;
    padding: 1rem;
    position: absolute;
    top: -1000rem;
}

/**
* 1. Display the link on focus/active
*/
a[href="#main"]:focus,
a[href="#main"]:active {
    border-bottom-color: var(--color-accent);
    left: 1rem;
    top: 1rem;
}

/**
 * Main content containers
 * 1. Make the container full-width with a maximum width.
 * 2. Leave some space on the edges, especially valuable on small screens.
 */
.container {
    margin: 0 auto;
    max-width: 950px;
    margin-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

header {
    margin: 1rem 0;
}

header .container {
    margin-bottom: 0;
}

header .container > a {
    display: block;
    text-align: right;
}

header .container > a svg {
    height: 100px;
    width: auto;
}

header nav {
    background-color: var(--color-primary-dark);
}

header nav button {
    appearance: none;
    background-color: var(--color-primary-dark);
    border-width: 0;
    box-sizing: border-box;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    margin: 0;
    padding: 1rem 0;
}

header nav button span {
    bottom: 2px;
    position: relative;
}

header nav ul {
    background-color: var(--color-primary-dark);
    box-sizing: border-box;
    color: white;
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    height: 0;
    line-height: 1.2;
    list-style: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
    transition: height 300ms;
}

@media screen and (min-width: 820px) {
    header nav button {
        display: none;
    }

    header nav ul {
        flex-direction: row;
        height: auto;
        max-height: 4rem;
    }
}

header nav button[aria-expanded="true"] + ul {
    height: 100vh;
}

header nav ul li {
    align-items: center;
    border-left: 1px solid white;
    box-sizing: border-box;
    display: flex;
    margin: 0;
}

header nav button[aria-expanded="false"] + ul li:last-child {
    border-right: 1px solid white;
}

header nav ul li a {
    box-sizing: border-box;
    color: white;
    display: block;
    padding: 1rem;
    text-decoration: none;
    width: 100%;
}

header nav ul li a:active,
header nav ul li a:focus,
header nav ul li a:hover {
    background-color: var(--color-bg);
    color: var(--color-text);
    text-decoration: underline;
}

.news {
    list-style-type: none;
}

.news > div {
    margin-bottom: 1rem;
}

.pagination {
    display: flex;
}

.pagination a:first-child {
    flex-grow: 1;
}

.pagination a:last-child {
    flex-grow: unset;
    margin-left: auto;
}

.gallery-wrapper {
    display: flex;
}

.gallery-container {
    max-height: 50vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.gallery-proximity {
    scroll-snap-type: y proximity;
}

.gallery-list {
    padding: 0;
}

.gallery-item {
    display: flex;
    flex-flow: column;
    justify-content: center;
    text-align: center;
    scroll-snap-align: start;
}

.gallery-image {
    margin: 0;
}

blockquote {
  border-left: 3px solid var(--color-border);
  font-style: italic;
  margin: 10px 0 10px 50px;
  padding-left: 15px;
}
