html {
    --primary: #0a2f85;
    /* REPLACE:COLOR_1 */
    --secondary: #666666;
    /* REPLACE:COLOR_2 */
    --accent: #4177f2;
    --accent: #4798b8;
    /* REPLACE:COLOR_3 */
    --text: #333;
    overflow-x: hidden;
    font-size: 17px;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: inherit;
    color: #333;
}

p {
    margin-bottom: .75em;
}


/*--------------------------------------------------------
    Headings
--------------------------------------------------------*/

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Josefin Slab', serif;
    font-weight: 600;
    margin: 0 0 .75em;
    padding: 0;
    text-transform: capitalize;
    color: var(--primary);
}

h1 {
    font-size: 36px;
    letter-spacing: -.05ch;
}

h2 {
    font-size: 29px;
}

h3 {
    font-size: 26px;
}

h4 {
    font-size: 23px;
}

h5 {
    font-size: 20px;
}

h6 {
    font-size: 18px;
}


/*--------------------------------------------------------
    Links
--------------------------------------------------------*/

a {
    color: var(--accent);
    transition: color .125s ease-in-out;
    text-decoration: underline;
}

a:hover,
a:focus {
    color: var(--secondary);
}


/*--------------------------------------------------------
    Objects
--------------------------------------------------------*/

.offscreen {
    /* This class allows an element to be read by a screenreader without appearing in the viewport  */
    position: absolute;
    left: -666vw;
}


/*  Wrappers
    *.wrapper acts as a more symantic stand in for <container><row><col-md-12></col-md-12></row></container> in sections of this build that don't require stacking columns 
 */

.wrapper {
    margin-right: auto;
    margin-left: auto;
    max-width: 100%;
    position: relative;
    height: inherit;
    padding-left: 15px;
    padding-right: 15px;
}

.full-width {
    /* Make an element span the width of the viewport */
    --side-margin: calc((100vw - var(--page-width) + 13px) / -2);
    /* 13px to compensate for width of scrollbar */
    position: relative;
    left: var(--side-margin);
    right: var(--side-margin);
    width: calc(100vw + 13px);
}

#gm-canvas .full-width {
    left: unset;
    right: unset;
    width: unset;
}

@media (min-width:992px) {
     :root {
        --page-width: 970px;
    }
    .wrapper {
        width: 970px;
    }
}

@media (min-width:1200px) {
     :root {
        --page-width: 1170px;
    }
    .wrapper {
        width: 1170px;
    }
}

@media (max-width: 990px) {
    .container,
    .wrapper {
        /* Extra wiggle room at a breakpoint that needs it  */
        width: 100%;
    }
    .full-width {
        --side-margin: unset;
        left: unset;
        right: unset;
        width: unset;
    }
}

.row_background {
    color: white;
    position: relative;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.row_background::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -666vw;
    right: -666vw;
    display: block;
    background-color: var(--primary);
}

.row_background *:not(input) {
    color: white;
}


/* .row_background:last-child {
    margin-bottom: -3rem;
} */

@media (max-width: 767px) {
    .row_background {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}


/*--------------------------------------------------------
    Header
--------------------------------------------------------*/

header.wrapper {
    position: sticky;
    top: 0;
    z-index: 10;
    padding-top: .75rem;
    padding-bottom: .75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    /* Font-size included because some pages of the MMS try to override the body's font-size */
    gap: 1rem 30px;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -666vw;
    right: -666vw;
    background: white;
    z-index: -1;
}

header img {
    margin-right: 1ch;
    display: block;
}

#mobile-header {
    display: flex;
    align-items: center;
    color: var(--primary);
}

[href*="search.php?"]:hover,
[href*="search.php?"]:focus {
    text-decoration: none;
}

[href*="search.php?"] svg {
    display: block;
    height: 1em;
}

#mobile-header [href*="search.php?"] svg {
    margin-right: 1ch;
    margin-top: 2px;
}

#mobile-header a {
    color: inherit;
}

#mobile-header [data-target="#login-modal"] {
    white-space: pre;
}

@media (min-width: 768px) {
    #mobile-header {
        display: none;
    }
}

@media (max-width: 500px) {
    #mobile-header a {
        display: none;
    }
}


/* Mobile menu trigger  */

header .mobileMenuTrigger {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    transition: color .125s ease-in-out;
    margin-left: 1ch;
}

header .mobileMenuTrigger:hover,
header .mobileMenuTrigger:focus {
    color: var(--secondary);
    outline: none;
}

@media (min-width: 768px) {
    .mobileMenuTrigger {
        display: none;
    }
}


/*--------------------------------------------------------
    Desktop Navigation
--------------------------------------------------------*/

nav:not(.navbar) {
    /* max-width: calc(100% - 350px); */
    width: 100%;
    font-size: 16px;
    /* Font-size included because some pages of the MMS try to override the body's font-size */
}

#nav_menu {
    position: relative;
    z-index: 1;
    padding: 0;
}

#nav_menu>ul {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
}

#nav_menu>ul::before,
#nav_menu>ul::after {
    content: none;
}

#nav_menu>ul>li>a {
    color: var(--text);
    padding: 0 .5ch;
    transition: color .125s ease-in-out;
}

#nav_menu a,
#nav_menu a:hover,
#nav_menu a:focus {
    text-decoration: none;
}

#nav_menu .nav>li>a:focus,
#nav_menu .nav>li>a:hover {
    background-color: transparent;
    color: var(--accent);
}

#nav_menu .caret {
    margin-left: .5ch;
}

#nav_menu .dropdown-menu {
    /* Dropdown menu  */
    /* background: var(--primary); */
    font-size: inherit;
    padding-bottom: 1em;
    min-width: 20ch;
}

@media (max-width: 990px) and (min-width: 768px) {
    header.wrapper {
        display: block;
    }
    nav:not(.navbar) {
        max-width: 100%;
        padding-top: .5rem;
    }
}

@media (max-width: 767px) {
    nav:not(.navbar) {
        display: none;
    }
}


/* Login modal */

.modal-open .modal {
    display: flex;
}

.modal-dialog {
    max-width: 100%;
    font-size: 16px;
    margin: auto;
    width: 300px;
}

.modal-content {
    margin-top: 20px;
    border-radius: 0;
}

.modal-header,
.modal-body {
    padding: .5rem 1rem;
}

.modal-header .close {
    opacity: 1;
    z-index: 1;
    position: relative;
}

.modal h2 {
    font-size: 24px;
}

.modal-header,
.modal-body {
    padding: 1em 2ch;
}

.modal input[name="Username"],
.modal input[name="Password"] {
    width: 100%;
    padding-left: .25em;
    padding-right: .25em;
    margin-bottom: 0.5em;
    height: 2em;
    border: 1px solid rgba(68, 68, 68, .5);
}

.modal a {
    display: block;
    margin-bottom: .5em;
}


/*--------------------------------------------------------
    Mobile navigation
--------------------------------------------------------*/

#mobileMenuWrapper {
    position: fixed;
    background: white;
    top: 0;
    bottom: 0;
    z-index: 50;
    overflow-y: auto;
    overflow-x: hidden;
    left: -120%;
    width: 300px;
    box-shadow: 0 3px 14px -2px rgba(0, 0, 0, 0.4);
    transition: left .125s ease-in-out;
}

#mobileMenuWrapper.open {
    left: 0;
}

#mobileMenuWrapper ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

#mobileMenuWrapper li {
    display: block;
    margin-bottom: .7rem;
}

#mobileMenuWrapper a {
    background-color: transparent;
    text-decoration: none;
}

#mobileMenuWrapper .mDropdown {
    display: none;
    padding-top: .7rem;
}

#mobileMenuWrapper .mDropdown.open {
    display: block;
}

#mobileMenuWrapper .mDropdown a {
    color: #333;
}

#triggerClose {
    font-size: 22px;
    cursor: pointer;
    text-align: right;
}

#mobileMenuWrapper #mobile-menu {
    overflow: auto;
    padding: 1rem;
}


/* dropdown only */


/* #mobileMenuWrapper .mDropdown a {
    padding: 8px;
    margin-bottom: 10px;
}

#mobile-menu>li>ul {
    background-color: rgba(0, 0, 0, .04);
} */


/*--------------------------------------------------------
    Main
--------------------------------------------------------*/

#subpage-main,
#mms-main {
    padding-top: 3rem;
    min-height: calc(100vh - (101px + 50px + 141px + 3rem));
}

main .row+.row {
    margin-top: 3rem;
}

@media (max-width: 990px) {
    #subpage-main,
    #mms-main {
        padding-top: 2rem;
    }
    main .row+.row {
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    #subpage-main,
    #mms-main {
        min-height: calc(100vh - (120px + 52px + 157px)) padding-top: 1rem;
    }
    main [class*="col-"]+[class*="col-"] {
        margin-top: 1rem;
    }
}


/* Slideshows defaults */

.carousel {
    font-size: 20px;
}


/* Homepage slideshow */

#slide-row .carousel-indicators {
    top: 1rem;
    right: 1rem;
    left: unset;
    bottom: unset;
    text-align: right;
    margin: unset;
    z-index: 1;
}

#slide-row .carousel-indicators li {
    border-color: var(--primary);
    background: white;
}

#slide-row .carousel-indicators li.active {
    background: var(--primary);
}

@media (min-width: 768px) {
    #slide-row img {
        width: 100%;
        max-height: 75vh;
        object-fit: cover;
        object-position: center;
    }
}

#slide-row a:hover,
#slide-row a:focus {
    text-decoration: none;
}

#slide-row .carousel-caption {
    position: absolute;
    z-index: 2;
    color: #fff;
    left: 0;
    bottom: 0;
    right: 0;
    top: 0;
    width: 100%;
    text-align: left;
    text-shadow: none;
    margin: auto;
    padding: 0;
    display: flex;
    align-items: center;
    /* Style needed to overwrite BS defaults */
}

#slide-row .caption-wrapper {
    position: relative;
    padding: 1.5em 15px;
    width: calc(33% - 15px);
}

#slide-row .caption-wrapper::before {
    content: '';
    position: absolute;
    background: var(--secondary);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -1;
    opacity: .8;
}

#slide-row .caption-text {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.2;
    text-transform: capitalize;
}

#slide-row .alt-text {
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

#slide-row .carousel-control.left,
#slide-row .carousel-control.right,
#slide-row .carousel-control:hover {
    display: none;
}

@media (min-width: 1170px) {
    #slide-row .carousel-caption {
        width: 1170px;
        padding: 0 15px;
    }
}

@media (max-width: 990px) {
    #slide-row .carousel-caption {
        align-items: flex-end;
    }
    #slide-row .caption-wrapper {
        width: 100%;
    }
    /* #slide-row .carousel-caption::before {
        opacity: 1;
    }
    #slide-row .caption-wrapper::before {
        opacity: 1;
    } */
    #slide-row .caption-text {
        font-size: 18px;
        margin-bottom: .5em;
    }
    #slide-row .alt-text {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    #slide-row .carousel-caption {
        position: relative;
    }
    #slide-row .carousel-caption::before {
        opacity: 1;
    }
    #slide-row .caption-wrapper::before {
        opacity: 1;
    }
}

#home-six-up-slideshow .carousel-control {
    width: 3%;
}


/* Welcome row  */

#welcome-row .col-md-12:not(.gm-editing) {
    columns: 3;
    column-gap: 30px;
    break-inside: avoid;
    orphans: 3;
}

#welcome-row h1,
#welcome-row h2 {
    column-span: all;
}

@media (max-width: 900px) {
    #welcome-row .col-md-12:not(.gm-editing) {
        columns: 2;
    }
}

@media (max-width: 767px) {
    #welcome-row .col-md-12:not(.gm-editing) {
        columns: unset;
    }
}


/* Feed row */

#feed-row h2 {
    font-size: 25px;
}

#feed-row h2>svg {
    width: 1.3em;
    height: 1.3em;
    border: 1px solid currentColor;
    padding: 7px;
    border-radius: 50%;
    margin-right: .5ch;
    position: relative;
    top: .25em;
    color: var(--primary);
    background: white;
}

.feed-item+.feed-item {
    margin-top: 1rem;
}

.feed-item h3 {
    font-size: 18px;
    margin-bottom: 5px;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
}

.feed-item time {
    display: block;
}

#feed-row #contact-form .row+.row {
    margin-top: .25rem;
    margin-bottom: 0;
}

#feed-row #contact-form .form-group:nth-of-type(1),
#feed-row #contact-form .form-group:nth-of-type(2) {
    /* Very specific selector needed to overwrite BS default */
    width: calc(50% + 15px);
    display: inline-block;
    margin: 0 -15px;
}

#feed-row #contact-form .form-group:nth-of-type(2) {
    position: relative;
    left: 30px;
}

#feed-row #contact-form .form-group:nth-of-type(3) {
    margin-top: 0;
}

#feed-row #contact-form .form-group:nth-of-type(1)>* {
    /* Take away 15px from the gap between the first two inputs for a total of 15px between them  */
    padding-right: 7.5px;
}

#feed-row #contact-form .form-group:nth-of-type(2)>* {
    /* Take away 15px from the gap between the first two inputs for a total of 15px between them  */
    padding-left: 7.5px;
}

#feed-row .form-group>* {
    width: 100%;
    text-align: left;
    margin-left: 0;
    font-weight: normal;
}

#feed-row .form-horizontal .control-label {
    padding-top: 0;
}

#feed-row input[type="submit"] {
    margin-top: .5rem;
}

@media (max-width: 900px) {
    #feed-row .column {
        width: 50%;
    }
    #feed-row .column:nth-of-type(1) {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 1rem 30px;
        margin-bottom: 1rem;
    }
    #feed-row .column:nth-of-type(1) h2 {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }
    #feed-row .column:nth-of-type(1) .feed-item {
        margin-top: 0;
    }
}

@media (max-width: 767px) {
    #feed-row .column {
        width: 100%;
    }
    #feed-row .column:not(:nth-of-type(3)) {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 1rem 30px;
        margin-bottom: 1rem;
    }
    #feed-row h2 {
        grid-column: 1 / -1;
    }
    #feed-row .column:nth-of-type(3) h2 {
        margin-bottom: 0;
    }
    #feed-row .feed-item {
        margin-top: 0;
    }
    #contact-form [class*="col-"]+[class*="col-"] {
        margin-top: 0;
    }
    #contact-form label {
        margin-top: .5rem;
    }
}

@media (max-width: 600px) {
    #feed-row>#news-column,
    #feed-row>#events-column,
    #feed-row>#newsletter-column {
        display: block;
    }
    #feed-row .feed-item,
    #feed-row .column:nth-of-type(1) .feed-item {
        margin-top: 1rem;
    }
}

#newsletter-column form#contact-form .col-sm-12.form-group,
#newsletter-column form#contact-form .form-group {
    width: 100% !important;
    margin: 0 !important;
    left: 0 !important;
    padding: 0;
}

#newsletter-column form#contact-form .col-sm-10,
#newsletter-column form#contact-form label,
#newsletter-column form#contact-form .col-12 {
    padding: 0 !important;
    margin-bottom: 10px;
}

#newsletter-column form#contact-form label {
    display: none;
}

#newsletter-column form#contact-form label[for="contactCaptcha"] {
    display: block;
}

#contactus-newsletter form#contact-form .col-sm-10 {
    padding: 0;
    width: 100%;
    margin: 0;
}

#contactus-newsletter form#contact-form label {
    display: none;
}

#contactus-newsletter form#contact-form label[for="contactCaptcha"] {
    display: block;
    padding-left: 0px;
    margin-bottom: 15px;
}

#contactus-newsletter form#contact-form .form-group {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}


/*--------------------------------------------------------
    Footer
--------------------------------------------------------*/

footer {
    color: white;
    position: relative;
    margin-top: 3rem;
    padding: 2rem 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 16px;
    /* Font-size included because some pages of the MMS try to override the body's font-size */
}

#homepage-main+footer {
    margin-top: 0;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -666vw;
    right: -666vw;
    background: var(--secondary);
    z-index: -1;
}


/* #homepage-main+footer {
    margin-top: 0;
    padding-top: 3rem;
} */

footer a {
    color: inherit;
    text-decoration: underline;
}

footer a:hover {
    color: var(--accent);
}

@media (max-width: 990px) {
    footer {
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    footer {
        margin-top: 1rem;
        flex-direction: column-reverse;
    }
}

.credits span {
    display: block;
}

.credits span:last-of-type {
    margin-top: 5px;
}

.social-wrapper {
    margin-bottom: 5px;
}

.social-wrapper svg {
    margin-left: 5px;
    width: 40px;
    height: 40px;
}

.social-wrapper a,
.social-wrapper a:hover,
.social-wrapper a:focus {
    text-decoration: none;
}

.social-wrapper circle,
.social-wrapper #youtube-icon .cls-1,
.social-wrapper #ig-icon .cls-1 {
    stroke: white;
    fill: var(--secondary);
    transition: stroke .125s ease-in-out, fill .125s ease-in-out;
}

.social-wrapper path,
.social-wrapper #youtube-icon .cls-2,
.social-wrapper #ig-icon .cls-2 {
    fill: white;
    transition: fill .125s ease-in-out;
}

.social-wrapper :hover circle,
.social-wrapper :focus circle,
.social-wrapper :hover #youtube-icon .cls-1,
.social-wrapper :hover #ig-icon .cls-1,
.social-wrapper :focus #youtube-icon .cls-1,
.social-wrapper :focus #ig-icon .cls-1 {
    fill: var(--accent);
}

.social-wrapper :hover path,
.social-wrapper :focus path,
.social-wrapper :hover #youtube-icon .cls-2,
.social-wrapper :hover #ig-icon .cls-2,
.social-wrapper :focus #youtube-icon .cls-2,
.social-wrapper :focus #ig-icon .cls-2 {
    fill: var(--secondary);
}


/*--------------------------------------------------------
    UTILITIES
--------------------------------------------------------*/


/*--------------------------------------------------------
    MMS Styles
--------------------------------------------------------*/


/* MMS Member Menu icons */

@media (min-width: 1200px) {
    .nav-tabs li.dropdown {
        width: 190px;
    }
}

@media (min-width: 990px) and (max-width: 1200px) {
    .nav-tabs li.dropdown {
        width: 155px;
    }
}

@media (min-width: 767px) and (max-width: 990px) {
    .nav-tabs li.dropdown {
        width: 120px;
    }
}