:root {
    --main-content-colour: #66101F;
    --bright-bgcolour: #F9CB40;
    --accent-colour: #33B760;
    --heavy-colour: #1B4079;
    --offBlue-stripe: #c0b0df;
    --calendarBlue: #aabbff;
}

@keyframes gentle-flow {
    0% {
        background-position: 0% 50%;
    }
    10% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 125% 50%;
    }
    90% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

* {
    box-sizing: border-box;
}
html, p {
    font-size:16px;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

p {
    line-height: 1.65;
    color: var(--main-content-colour);
}

p.centerText {
    text-align: center;
}

body {
    margin: 0;
    background: linear-gradient(65deg, #F9CB40 0%, #FCCC40 15%, #f0d000 40%, var(--offBlue-stripe) 50%, #f0d000 60%, #FCCC40 85%);
    background-size: 250% 250%; animation: gentle-flow 26s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    background-attachment: fixed;
    min-height: 90vh;
    height: auto;
}

h1, h2, h3, h4 , h5 {
    font-family: "Stack Sans Headline", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    color:var(--main-content-colour);
}
h1 {
    font-size: 3.6rem;
    margin: 1rem 0 2rem;
}
h2 {
    margin-top: 2rem;
    font-size: 1.6rem;
}
a, strong {
    color: var(--heavy-colour);
}
a:hover, a:focus {
    text-decoration: none;
    color: #00f;
}

body > div:first-of-type {
    width: 86%;
    min-width: 320px;
    max-width: 1250px;
    margin: 2rem auto;
    padding: 1rem;
    position: relative;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 0 0.5rem 0.5rem rgba(255, 255, 255, 0.9);
}

header {

}

div.notice {
    width: 85%;
    max-width: 600px;
    min-width: 280px;
    text-align: center;
    border: 5px double var(--accent-colour);
    background-color: var(--calendarBlue);
    color: #000;
    padding: 1.2rem;
    margin: 1rem auto 2rem;
    font-size: 1.1rem;
}

article#facilities > div h3 {
    margin-left: 1rem;
    margin-top: 2rem;
}

article#facilities > div p {
    margin-left: 2rem;
}

nav {
    display: block;
    text-align: right;
    border-bottom: 2px solid var(--main-content-colour);
}
nav a {
    text-align: right;
    display: inline-block;
    padding: 0.25rem 1rem;
    text-decoration: none;
    /*background-color: var(--accent-colour);*/
    /*background-color: rgba(254,147,140,0.5);*/
    /*background-color: rgba(202, 176, 151, 0.5);*/
    background-color: rgba(200, 181, 68, 0.5);
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    margin: 0 0.25rem;
}

nav a.chosen {
    background-color: var(--main-content-colour);
    color:var(--bright-bgcolour);
    font-weight: bold;
}

nav a:hover:not(.chosen),
nav a:focus:not(.chosen) {
    background-color: var(--accent-colour);
}

nav a.chosen:hover,
nav a.chosen:focus {
    color: #fff;
}

/*nav a:nth-of-type(5) {*/
/*    background-image: url('/images/PDF_file_icon_small.png');*/
/*    background-position: 90% center;*/
/*    background-repeat: no-repeat;*/
/*    background-size: auto 80%;*/
/*    padding-right: 2rem;*/
/*}*/

main {
    padding:1rem;
    background-color: #fff;
}
figure {
    max-width: 800px;
    margin: 1rem auto;
}
figure img {
    max-width: 100%;
    height: auto;
    width: 100%;
}
figure > img {
    border: 3px solid var(--accent-colour);
}
figure > figcaption,
div.alternativeCaption {
    text-align: center;
    font-style: italic;
    font-size: 0.8rem;
}
div.alternativeCaption {
    padding-top: 0.35rem;
}

article#facilities figure.letterbox,
article#facilities figure.betterbox {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
}
article#facilities figure.letterbox {
    max-height: 320px;
}

article#facilities figure.letterbox img.img {
    margin-top: -50%;
}

article#facilities figure.betterbox {
    max-height: 500px;
    max-width: 500px;
}
article#facilities figure.betterbox img.img {
    margin-top: -25%;
}

article > div {
    background-color: white;
}

main ul li {
    padding: 0.25rem 0;
}

div#container {
    width: 100%;
    margin: 0 auto;
    padding:0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    align-content: stretch;
    gap: 0.25rem;
}
div#container > div {
    flex-basis: 50%;
}
div#container > div p.address {
    padding-left: 20%;
    font-style: italic;
    font-style: 1.1rem;
}
#mapBox {
    background-color: #EEE;
    width: 100%;
    height: 350px;
    padding: 0.25rem;
    box-sizing: border-box;
    text-align: center;
    border: 2px solid var(--accent-colour);
    margin-top: 1.2rem;
    border-radius: 1rem;
}

footer {
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.5;
    padding: 1rem 0;
    font-family: "Lato", sans-serif;
}
footer a {
    text-decoration: none;
    color: #ba2020;
    font-weight: bold;
}
footer a:hover,
footer a:focus {
    text-decoration: underline;
    color: #d00;
}



@media screen and (max-width: 768px) {
    body > div:first-of-type {
        padding:0.75rem;
    }
    main {
        margin-top:0;
        padding-top:0;
    }
    h1 {
        margin-top: 0;
        text-align: center;
        font-size: 2.85rem;
    }
    figure {
        width: 100%;
        margin: auto;
    }
    figure  img {
        border-width: 2px;
    }
    div#container {
        flex-wrap: wrap;
        justify-content: stretch;
    }
    div#container > div {
        flex-basis: 100%;
    }
    nav a {
        margin: 0;
    }
}

@media screen and (max-width: 705px) {
       nav a {
           padding: 0.25rem 0.75rem;
       }
}

@media screen and (max-width: 640px) {
    nav a {
        padding: 0.5rem 1.5rem 0.5rem 0.5rem;
        display: block;
        margin-top: 0.75rem;
    }
    nav a:not(:last-of-type) {
        border-bottom-right-radius: 0.5rem;
    }
    /*nav a:nth-of-type(5) {*/
    /*    background-position: 98% center;*/
    /*    background-repeat: no-repeat;*/
    /*    background-size: auto 90%;*/
    /*    padding-right: 3rem;*/
    /*}*/
}

@media screen and (max-width:500px) {
    div.alternativeCaption {
        display: none;
    }

    article#facilities figure.letterbox,
    article#facilities figure.betterbox {
        max-width: 100%;
        max-height: unset;
        width:100%;
        height:auto;
        overflow: auto;
        border-radius: unset;
    }

    article#facilities figure.letterbox img.img,
    article#facilities figure.betterbox img.img {
        margin-top:0;
        border-radius: 0.5rem;
        border: 3px solid var(--accent-colour);
        width:100%;
        height: auto;
    }
}
@media screen and (max-width: 480px) {
    body > div:first-of-type {
        padding:0.5rem;
    }
    main {
        margin: 0 0.25rem 1rem;
    }
    nav a {
        padding: 1rem 1.5rem 1rem 0.5rem;
        display: block;
        margin-top: 1rem;
    }
    article#facilities > div h3 {
        margin-left: 0.5rem;
    }
    article#facilities > div p {
        margin-left: 1rem;
    }
}
