body{
    color: #392808;
    background-color: #fff;
    margin: 0 auto;
    padding: 0;
    max-width: 40em;
    font-size: 1.1em;
    line-height: 1.62;
    font-family: Ebrima, Seravek, 'Gill Sans Nova', 'Gill Sans', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif;
}

a {
    color: #509cef;
}

a:visited {
    color: #947358;
}

a:hover {
    color: #1e62ad;
}

h1,h2,h3,h4 {
    line-height: 1.2;
    color: #947358;
}

h1 {
    margin: 0;
}

h2 {
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-align: center;
    padding-bottom: .25em;
    margin-bottom: -.25em;
}

h2:before, h2:after {
    position: absolute;
    top: 40%;
    overflow: hidden;
    width: 50%;
    height: .25em;
    content: '\a0';
    background-color: #947358;
}

h2:after {
    margin-left: 2%;
}

h2:before {
    margin-left: -52%;
    text-align: right;
}

h3 {
    font-size: 1.4em;
    color: #509cef;
}

h4 {
    font-size: 1.2em;
}

strong {
    color: #947358;
}

header {
    text-align: center;
    color: #947358;
}

header p {
    font-size: 2em;
    font-weight: bold;
    line-height: 1;
    margin: .25em 0 .75em;
}

header p small {
    font-size: .6em;
    letter-spacing: .3rem;
    font-weight: normal;
    line-height: 1.25;
    display: inline-block;
}

div.wrapper {
    background: #fff;
    padding: 0 2em;
}

img {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

img.border {
    border: .5em solid #947358;
    border-radius: .5em;
}

img.icon {
    width: 1.25em;
    vertical-align: text-bottom;
}

img.small {
    max-width: 100%;
    margin: auto;
}

footer {
    text-align: center;
}

footer img {
    max-width: 50%;
}

ul.legend {
    padding: 0;
    list-style: none;
}

ul.legend li {
    padding-left: 1em;
    border-radius: .5em;
    transition: background-color 1000ms;
}

ul.legend li:target {
    background: #cde4f3;
}

.flex {
    align-content: stretch;
}

.flex > div {
    flex-basis: 40%;
}

.flex > .map {
    flex-basis: 60%;
}

.center,
.schedule {
    text-align: center;
}

.schedule h3 {
    text-align: center;
}

.schedule strong {
    display: block;
    font-size: 1.1em;
    margin-top: .5em;
}

nav a,
.btn {
    transition: background-color 250ms, border 500ms;
}

nav ul {
    display:flex;
    margin: 0;
    padding: 0;
    flex-direction: column;
    list-style-type: none;
    justify-content: space-between;
    gap: .75em;
}
nav ul li{
    flex-basis: 50%;
}

nav ul li a,
.btn {
    color: #fff;
    background: #509cef;
    text-decoration: none;
    display: block;
    text-align: center;
    border-radius: .5em;
    padding: .75em 0;
    border-bottom: .5em solid #509cef;
    padding-bottom: .25em;
}

nav ul li a:visited,
.btn:visited {
    color: #fff;
}

nav ul li a:hover,
nav ul li.active a:hover,
nav ul li.active a,
.btn:hover {
    color: #fff;
    background: #345a84;
    border-bottom-color: #345a84;
}

nav ul li a:active,
.btn:active {
    background: #1e3854;
}

nav ul li a:hover,
.btn:hover {
    background: #417ab9;
}

nav img {
    margin: auto;
    max-width: 75%;
    display: block;
}

.quote {
    color: #fff;
    background: #509cef;
    margin: 1em -1em;
    padding: 1em;
    text-align: center;
    border-radius: .5em;
}

.quote blockquote {
    font-size: 1.3em;
    line-height: 1.4;
    margin: 0;
}

.rates {
    padding: 0;
    text-align: center;
    line-height: 1.2;
    margin-top: 1em;
    margin-bottom: 0em;
    color: #509cef;
}

.rates p {
    margin-top: 0em;
}

.rates li {
    flex-basis: 50%;
    font-size: 1.25em;
    margin-bottom: 1em;
    list-style: none;
}

.rates li strong {
    color: #509cef;
    font-size: 2em;
    letter-spacing: .2rem;
}

/* Large Screen */
@media (min-width: 500px) {

    nav ul {
        flex-direction: row;
        align-items: center;
    }

    .flex {
        display: flex;
    }

    .schedule {
        text-align: left;
    }

    .schedule strong {
        display: inline;
    }

    .schedule strong:after {
        content: ' – ';
    }

    img.border,
    .quote {
        border-radius: 0;
    }

    img.border {
        margin: 0 -1em;
        max-width: calc(100% + 2em);
    }

    img.small {
    max-width: 75%;
    }

    .quote blockquote {
        margin: 0 1em;
    }
}

@media (min-width: 800px) {
    html {
      scroll-padding-top: 7em;
    }

    body{
        background-color: #d1dae1;
        background-image: url("../img/background.jpg");
        background-size: cover;
        background-repeat: no-repeat;
        background-attachment: fixed;
        font-size: 1.3em;
    }

    header {
        display: flex;
        align-items: center;
        align-content: stretch;
    }

    header > * {
        flex-basis: 60%;
    }

    header h1  {
        flex-basis: 40%;
        margin: auto;
    }

    header p {
        font-size: 1.75em;
    }

    div.wrapper {
        padding: 1em;
        box-shadow: 0 0 1.5em #0005;
        margin-bottom: 5em;
    }

    div.wrapper > nav {
        top: 0;
        position: sticky;
        z-index: 10;
        background: #fffd;
        padding-top: 0.5em;
        padding-right: 1em;
        padding-bottom: 0.5em;
        padding-left: 1em;
        margin: 0 -1em;
        will-change: transform;
    }

    .btn {
        font-size: 1.125em;
        display: inline-block;
        padding: .5em 1.5em .25em;
    }

    img.small {
        max-width: 50%;
    }

    footer img {
        max-width: 30%;
    }

    .quote blockquote {
        margin: 0 3em;
    }
}

@media screen and (prefers-color-scheme: dark) {
    body {
        background-color: #181a1b;
        color: #fff;
    }

    div.wrapper {
        background-color: #181a1b;
    }

    div.wrapper > nav {
        background-color: #181a1bdd;
    }

    nav ul li a,
    .btn {
        background: #345a84;
        border-bottom-color: #345a84;
    }

    nav ul li a:hover,
    nav ul li.active a:hover,
    nav ul li.active a,
    .btn:hover {
        background: #1e3854;
    }

    .quote {
        background: #345a84;
    }

    .aliyah {
        filter: brightness(50%);
        border-radius: .5em;
    }

    ul.legend li:target {
        background: #5d676b;
    }
}

@media screen and (min-width: 800px) and  (prefers-color-scheme: dark) {
    body {
        background-color: #353b42;
        background-image: url("../img/background-dark.jpg");
    }

    .aliyah {
        border-radius: 1.5em;
    }
}


@media print{
    body{
        max-width: none;
        color: #000;
        font-size: 1em;
    }

    nav {
        display: none;
    }

    header img {
        max-width: 50%;
    }

    footer,
    .btn,
    .border {
        display: none;
    }

    h2 {
        break-before: page;
    }

    .nobreak {
        break-before: auto;
    }
}
