@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

:root {
    --color-background: #0D0D0D;
    --color-accent: #88D498;
    --color-header-bg: #2B2B2B;
    --color-text: #FFFFFF;
    --color-link-text: #F3E9D2;
    --verticalspacing: 1.5em;
}

body {
    font-family: 'Quicksand', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 100%;
    line-height: 135%;
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
}

body>* {
	padding: 0 1rem;
}

.map {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.location .map iframe {
    width: 80%;
    height: 500px;
    border: none;
}

.location .map h1 {
    margin-bottom: 60px;
}

a.current {
    pointer-events: none;
    /* color: var(--color-link-text); */
    background-color: darkgreen;
}

p,h3,h4,ul {
    margin-top: var(--verticalspacing);
}

.next .videowrapper {
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
}

.next iframe {
    width: 100%;
    position: absolute;
    height: 100%;
}

.gallery figure {
    /* width: 100%; */
    margin: 0;
    position: relative;
}

/* .gallery figure img {
    width: 100%;
    height: 100%;
} */

.gallery figcaption {
    /* text-align: center; */
    position: relative;
    bottom: 0;
    margin: 0;
    width: 100%;
    padding: 0.5em 0 1em 2em;
}

table.carlist {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

table.carlist th {
    background-color: var(--color-accent);
    color: #111;
    padding: 0.75em;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #555;
}

table.carlist td {
    padding: 0.75em;
    border-bottom: 1px solid #555;
}

table.carlist tr:nth-child(even) {
    background-color: #1a1a1a;
}

table.carlist tr:nth-child(odd) {
    background-color: #222;
}

table.carlist tr:hover {
    background-color: #2a2a2a;
}

.clickable-thumb {
cursor: pointer;
max-width: 320px;
height: auto;
display: block;
}

/* p {
    font-variant-numeric: proportional-nums
} */

header {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    background-color: var(--color-header-bg);
    justify-content: space-between;
}

h1 {
    font-size: 1.5rem;
    background-color: #0006;
    margin: .5rem 0;
    padding: .2em;
    color: #ccc;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

ul.top-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

li.top-link {
    outline: 1px dotted #aaa;
    margin-right: 20px;
    width: 20%;
    margin-top: .5em;
    text-align: center;
    background-color: var(--color-accent);
    border-radius: 20px;
}

.top-links a {
    text-decoration: none;
    background-color: goldenrod;
    text-align: center;
    color: black;
    display: block;
    padding: .2em .3em;
    border-radius: 4px;
}

main {
    padding: 0 1em;
}

@media screen and (min-width: 600px) {
    .home main {
        margin: 0 5em;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2rem;
    }

    .home section {
        flex: 1 1 auto;
    }

    li.top-link {
        width: 30%;
    }

    .next main {
        display: flex;
        flex-direction: row;
        gap: 1rem;
    }

    .next main section:first-child {
        flex: 15;
    }

    .next main section:last-child {
        flex: 10;
    }

    .gallery main {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2rem;
        padding-top: 2rem;
    }

    .gallery main section {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2rem;
        width: 100%;
    }

    .gallery img {
        flex: 0 1 calc(33.333% - 1.5rem);
        max-width: 100%;
        height: auto;
    }
}

.gallery section {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
}

.gallery section img {
    flex: 0 1 calc(33.333% - 1.5rem);
    max-width: 100%;
    height: auto;
}

@media screen and (prefers-color-scheme: dark) {
    body {
        background-color: var(--color-background);
    }
}

/* Dialog and opener helpers */
dialog {
    max-width: 90vw;
    width: 720px;
    border: none;
    border-radius: 8px;
    padding: 0;
    background: #111;
    color: var(--color-text);
}

.picturewrapper {
    padding: 1rem;
}

.picturewrapper img {
    max-width: 100%;
    height: auto;
    display: block;
}

.js-open-dialog:focus,
.clickable-thumb:focus {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
}

.js-close-dialog {
    background: var(--color-accent);
    color: #111;
    border: none;
    padding: .5em 1em;
    border-radius: 6px;
    cursor: pointer;
    margin: .5rem;
}

/* Make images that open dialogs obviously clickable */
.js-open-dialog {
    cursor: pointer;
    display: inline-block;
    border-radius: 6px;
}

:root {
    --link: #1a73e8;
    --link-visited: #5b3bd1;
    --link-hover: #174ea6;
    --link-active: #113f8a;
    --link-focus: #ffd54f;
}

a:hover {
    color: var(--link-hover);
    background-color: lightblue;
    text-decoration: underline;
}
a:active {
    color: var(--link-active);
}
a:focus-visible {
    outline: 3px solid var(--link-focus);
    outline-offset: 3px;
}