/* Some parts of this code may have been taken from Stack Overflow and other websites, and then changed by me. */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    line-height: 1.5;
    color: #10121A;
    background: white;
}

h1 {
    font-size: 48px;
    margin: 0 0 16px 0;
}

h2 {
    font-size: 30px;
    margin: 0 0 16px 0;
}

h3 {
    font-size: 21px;
    margin: 0 0 10px 0;
}

p {
    margin: 0 0 14px 0;
}

a {
    color: #1C2FCB;
}

a:focus, button:focus, input:focus, select:focus, textarea:focus, summary:focus, .slider:focus {
    outline: 3px solid #10121A;
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: 10px;
    top: -60px;
    background: #10121A;
    color: white;
    padding: 10px;
}

.skip-link:focus {
    top: 10px;
}

/* Header */
header {
    border-bottom: 4px solid #3654FF;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.logo {
    width: 180px;
}

nav a {
    display: inline-block;
    margin: 4px 0 4px 8px;
    padding: 8px 14px;
    color: #10121A;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #10121A;
}

nav a.active {
    background: #FFCB3D;
}

/* Page sections */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.band {
    padding: 40px 20px;
}

.band-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.blue {
    background: #3654FF;
    color: white;
}

.dark {
    background: #10121A;
    color: white;
}

.yellow {
    background: #FFCB3D;
}

.blue a, .dark a {
    color: white;
}

.intro {
    max-width: 700px;
}

/* Buttons */
.button {
    display: inline-block;
    background: #FFCB3D;
    color: #10121A;
    border: 2px solid #10121A;
    padding: 12px 20px;
    margin: 0 10px 10px 0;
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.blue a.button {
    color: #10121A;
}

/* Top of the Home page */
.hero {
    display: flex;
    align-items: center;
}

.hero-text {
    width: 50%;
    padding-right: 30px;
}

.hero-photo {
    width: 50%;
}

.hero-photo img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border: 4px solid white;
    display: block;
}

/* Boxes */
.row {
    display: flex;
}

.card {
    flex: 1;
    border: 2px solid #10121A;
    padding: 18px;
    margin-right: 20px;
}

.card:last-child {
    margin-right: 0;
}

/* Picture slider */
.slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    max-width: 800px;
    border: 2px solid #10121A;
}

.slide {
    flex: none;
    width: 100%;
    scroll-snap-align: start;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.slide p {
    padding: 8px 12px 0 12px;
    margin: 0;
}

.slide .slide-links {
    padding-bottom: 10px;
    font-size: 15px;
}

/* Story and event boxes on Home */
.teaser {
    flex: 1;
    background: white;
    color: #10121A;
    padding: 20px;
    margin-right: 20px;
}

.teaser:last-child {
    margin-right: 0;
}

.teaser a {
    color: #1C2FCB;
    font-weight: bold;
}

/* Event and map */
.event-card {
    display: flex;
}

.event-card > div {
    width: 50%;
}

.event-card > div:first-child {
    padding-right: 30px;
}

.event-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border: 3px solid #10121A;
    display: block;
}

.event-facts {
    list-style: none;
    padding: 0;
    margin: 14px 0;
}

.event-facts li {
    padding: 8px 0;
    border-bottom: 1px solid #999999;
}

.map-frame {
    width: 100%;
    height: 300px;
    border: 2px solid #10121A;
}

/* Member story */
.story {
    display: flex;
    background: #E8ECFF;
    border: 2px solid #3654FF;
    padding: 20px;
}

.story img {
    width: 200px;
    height: 200px;
    margin-right: 24px;
}

.story blockquote {
    margin: 0 0 14px 0;
    font-size: 21px;
    font-weight: bold;
    font-style: italic;
}

/* Resources */
.chip {
    background: white;
    border: 2px solid #10121A;
    padding: 8px 16px;
    margin: 0 8px 10px 0;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.chip.selected {
    background: #10121A;
    color: white;
}

.resources {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}

.resource {
    width: 31%;
    margin: 0 2% 20px 0;
    border: 2px solid #10121A;
}

.resource img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.resource video {
    width: 100%;
    display: block;
    background: #10121A;
}

.resource .body {
    padding: 14px;
}

/* Form */
.form-area {
    display: flex;
}

.form-area form {
    width: 62%;
    padding-right: 30px;
}

.aside {
    width: 38%;
    background: #E8ECFF;
    border: 2px solid #3654FF;
    padding: 18px;
    align-self: flex-start;
}

/* Small heading in the side box on the Join Us page */
.aside h2 {
    font-size: 21px;
}

label {
    display: block;
    font-weight: bold;
    margin: 16px 0 5px 0;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #555555;
    font-family: Arial, sans-serif;
    font-size: 16px;
}

textarea {
    height: 100px;
}

fieldset {
    margin: 20px 0 0 0;
    padding: 6px 14px 14px 14px;
    border: 1px solid #555555;
}

legend {
    font-weight: bold;
    padding: 0 6px;
}

.option {
    display: block;
    font-weight: normal;
    margin: 8px 0 0 0;
}

.option input {
    width: auto;
    margin-right: 8px;
}

input[type="range"] {
    padding: 0;
    border: 0;
}

input[type="submit"] {
    width: auto;
    margin-top: 24px;
    padding: 12px 22px;
    background: #FFCB3D;
    border: 2px solid #10121A;
    font-weight: bold;
    cursor: pointer;
}

.help {
    font-size: 14px;
    color: #444444;
}

.contact-line {
    margin: 16px 0;
}

/* Footer */
footer {
    border-top: 4px solid #3654FF;
    padding: 20px;
    text-align: center;
    font-size: 14px;
}

footer a {
    margin: 0 10px;
}

/* Phone layout */
@media (max-width: 700px) {
    h1 {
        font-size: 34px;
    }

    header {
        display: block;
    }

    nav a {
        margin: 6px 6px 0 0;
    }

    .hero, .row, .event-card, .story, .form-area, .resources {
        display: block;
    }

    .hero-text, .hero-photo, .event-card > div, .form-area form, .aside {
        width: 100%;
        padding-right: 0;
    }

    .hero-text {
        margin-bottom: 20px;
    }

    .hero-photo img {
        height: 230px;
    }

    .card, .teaser {
        margin: 0 0 16px 0;
    }

    .slide img {
        height: 220px;
    }

    .event-card img {
        height: 220px;
        margin-bottom: 16px;
    }

    .story img {
        margin: 0 0 16px 0;
    }

    .resource {
        width: 100%;
        margin-right: 0;
    }
}
