html {
    --primary: #1c226e;
    --secondary: #43b58f;
    --accent: #ffcc00;
    --border: #bec4cc;
    --gray: #f5f2f0;
    overflow-x: hidden;
    font-size: 17px;
    font-family: 'Nunito Sans', sans-serif;
    color: #3f4444;
    scroll-behavior: smooth;
}

body {
    font-size: inherit !important;
    font-family: inherit !important;
    color: inherit;
}

p {
    margin: 0;
}

p+p {
    margin-top: .75em;
}

@media (max-width: 500px) {
    body {
        overflow-x: hidden;
    }
}


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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Sen', sans-serif;
    margin: 0 0 .75em;
    padding: 0;
    font-weight: bold;
    color: var(--primary);
    text-transform: capitalize;
    line-height: 1.2;
}

h1:not(:first-child),
h2:not(:first-child),
h3:not(:first-child),
h4:not(:first-child),
h5:not(:first-child),
h6:not(:first-child) {
    margin-top: 1em;
}

h1 {
    font-size: 40px;
}

h2 {
    font-size: 34px;
}

h3 {
    font-size: 30px;
}

h4 {
    font-size: 26px;
}

h5 {
    font-size: 23px;
}

h6 {
    font-size: 21px;
}

@media (max-width: 767px) {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        line-height: 1;
    }
}


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

a {
    text-decoration: underline;
}

a:hover,
a:focus {}

a.button-link {
    text-transform: capitalize;
    display: block;
    max-width: fit-content;
    background-color: var(--secondary);
    color: white;
    text-align: center;
    padding: 1em 2.5ch;
    text-decoration: none;
    line-height: 1;
    transition: background .125s ease-in-out, color .125s ease-in-out;
    font-weight: bold;
    text-shadow: none;
    text-transform: capitalize;
    border-radius: 5px;
    width: max-content;
}

.button-link:not(:first-child) {
    margin-top: 2em;
}

.button-link:not(:last-child) {
    margin-bottom: 2em;
}

a.button-link:hover,
a.button-link:focus {
    background-color: var(--accent);
    color: var(--primary);
}

#mms-main a {
    text-decoration: none;
}


/*--------------------------------------------------------
    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:768px) {
     :root {
        --page-width: 100%;
    }
}

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

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

.row-background {
    position: relative;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.row-background::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc((100vw - var(--page-width) + 13px) / -2);
    right: calc((100vw - var(--page-width) + 13px) / -2);
    display: block;
    background-color: var(--gray);
    z-index: -1;
}

@media (max-width: 990px) {
    .container,
    .wrapper {
        /* Extra wiggle room at a breakpoint that needs it  */
        width: 100%;
    }
    .full-width {
        --side-margin: -15px;
        left: var(--side-margin);
        right: var(--side-margin);
        width: calc(100vw + 30px);
    }
    .row-background::before {
        left: 0;
        right: 0;
    }
}


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

body,
header,
footer,
main,
nav:not(#mms-main nav) {
    font-family: inherit !important;
    font-size: inherit !important;
    /* Prevent MMS pages with hard-coded fonts from overwriting this  */
}

header {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    padding: 1em 0;
    align-items: center;
}

@media (max-width: 990px) and (min-width: 768px) {
    .logo-link {
        align-self: center;
    }
    .logo-link img {
        max-width: 200px;
    }
}

a.logo-link img {
    width: 165px;
}


/* --- Search ---  */

.searchbox {
    border: 1px solid var(--border);
    border-radius: 5px;
    max-width: 100%;
    position: relative;
    width: 285px;
    height: 40px;
    transition: border .125s ease-in-out;
    overflow: hidden;
    background: white;
    margin-bottom: 1em;
}

.searchbox:hover,
.searchbox:focus,
.searchbox:focus-within {
    border: 1px solid var(--primary);
}

.search-input {
    border: none;
    padding: .5em 1ch;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.search-input:focus {
    outline: none;
}

.search-button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background-image: url(../images/search-icon.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--secondary);
    width: 40px;
    border: none;
}

.search-button:focus {
    background-color: var(--primary);
}


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

header nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

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

#nav_menu>ul {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 2ch;
    width: 100%;
}

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

#nav_menu li {
    position: relative;
}

#nav_menu>ul>li>a {
    transition: color .125s ease-in-out;
    position: relative;
    padding: 0;
    text-transform: capitalize;
}

#nav_menu>ul>li:last-child>a {
    padding-right: 0;
}

#nav_menu a {
    color: #646464;
    text-decoration: none;
    background: transparent;
    font-size: 17px;
    transition: color .125s ease-in-out;
}

#nav_menu a:hover,
#nav_menu a:focus,
#nav_menu .nav .open>a,
#nav_menu .nav .open>a:focus,
#nav_menu .nav .open>a:hover {
    color: var(--secondary);
}

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

#nav_menu .dropdown-menu {
    /* Dropdown menu  */
    font-size: inherit;
    padding: 0.5em 0;
    border: none;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

#nav_menu .dropdown-menu:not(.men-level-):not(.men-level-0) {
    top: 0;
}

#nav_menu .dropdown-menu a {
    padding: .5em 20px;
}

@media (max-width: 1200px) {
    #nav_menu>ul>li>a {
        padding: 0 .75ch;
        font-size: 16px;
    }
}

@media (max-width: 850px) {
    #nav_menu>ul>li>a {
        font-size: 14px;
    }
}

@media (max-width: 700px) {
    header nav {
        display: contents;
    }
    .searchbox {
        grid-area: search;
        width: 100%;
    }
    .logo-link>* {
        grid-area: logo;
    }
    header .mobileMenuTrigger {
        grid-area: trigger;
    }
    header {
        display: grid;
        grid-template-columns: repeat(2, auto);
        grid-template-areas: "search search""logo trigger";
    }
}


/* Mobile menu trigger  */

nav .mobileMenuTrigger {
    border: none;
    padding: 10px 5px;
    color: white;
    transition: background .125s ease-in-out;
    display: inline-flex;
    border-radius: 5px;
    background: var(--secondary);
}

nav .mobileMenuTrigger:hover,
nav .mobileMenuTrigger:focus {
    background: var(--primary);
    outline: none;
}

@media (min-width: 768px) {
    nav .mobileMenuTrigger {
        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: .5ch;
    padding-right: .5ch;
    margin-bottom: .5em;
    height: 2em;
    border: 1px solid var(--border);
}

.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;
    color: var(--tan);
}

#mobileMenuWrapper a.mToggle {}

#mobileMenuWrapper .mDropdown {
    display: none;
    padding-top: .7rem;
    color: var(--orange);
}

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

#mobileMenuWrapper .mDropdown a {
    color: var(--light-green);
}

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

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


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

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

main:not(#mms-main) .row {
    position: relative;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

main:not(#homepage-main)+footer {
    margin-top: 3rem;
}

@media (max-width: 1200px) {
    main:not(#mms-main) .row {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 767px) {
    #homepage-main {
        overflow-x: hidden;
    }
}


/* Slideshows defaults */

.carousel {
    font-size: 20px;
}


/* Slideshow row  */

#homepage-main #slideshow-row {
    padding-top: 10px;
    padding-bottom: 10px;
}

#slideshow-row .carousel-indicators {
    bottom: 0;
    text-align: right;
    right: 30px;
    left: unset;
}

#slideshow-row .carousel-indicators li {
    width: 14.5px;
    height: 14.5px;
    border: none;
    background: white;
    margin: 0;
}

#slideshow-row .carousel-indicators .active {
    background: var(--secondary);
}

#slideshow-row .carousel-indicators li+li {
    margin-left: 5px;
}

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

#slideshow-row .carousel-caption {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    text-align: left;
    line-height: 1.1;
    padding-bottom: .75em;
}

#slideshow-row .caption-text,
#slideshow-row .alt-text {
    padding: .5rem 30px;
    position: relative;
    color: white;
    text-shadow: none;
    z-index: 1;
    transform: translateX(-100%);
    transition: .125s transform ease-in-out;
    opacity: 0;
}

#slideshow-row .caption-text {
    font-size: 35px;
    font-weight: bold;
    font-family: 'Sen', sans-serif;
    max-width: 35ch;
}

#slideshow-row .alt-text {
    font-size: 19px;
    max-width: 55ch;
    line-height: 1.4;
    transition-delay: .125s;
}

#slideshow-row .active .caption-text,
#slideshow-row .active .alt-text {
    transform: translate(0);
    opacity: 1;
}

#slideshow-row .caption-text::after,
#slideshow-row .alt-text::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    opacity: .9;
    z-index: -1;
}

@media (max-width: 1200px) {
    #slideshow-row .caption-text,
    #slideshow-row .alt-text {
        max-width: 75%;
    }
    #slideshow-row .caption-text {
        font-size: 24px;
    }
}

@media (max-width: 990px) {
    #slideshow-row .caption-text {
        font-size: 18px;
    }
    #slideshow-row .alt-text {
        font-size: 16px;
    }
}

@media (max-width: 800px) {
    #slideshow-row .carousel-caption {
        position: relative;
    }
    #slideshow-row .caption-text,
    #slideshow-row .alt-text {
        max-width: max-content;
    }
    #slideshow-row .carousel-indicators {
        top: 0;
    }
}


/* CTA row */

#cta-row .column {
    overflow-x: hidden;
}

#cta-row .column:nth-child(1) {
    --delay: none;
}

#cta-row .column:nth-child(2) {
    --delay: .75s;
}

#cta-row .column:nth-child(3) {
    --delay: 1.5s;
}

#cta-row h2 {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.cta-icon {
    margin-right: 5px;
}

.cta-icon circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3.9694;
    stroke-miterlimit: 10;
    animation-name: circleAnimation;
    animation-delay: var(--delay);
}

#cta-row.animate circle {
    animation-duration: 1s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: 1;
    animation-fill-mode: both;
    animation-play-state: running;
}

@keyframes circleAnimation {
    0%,
    100% {
        fill: white;
    }
    25%,
    75% {
        fill: var(--secondary);
    }
}

.cta-icon path {
    fill: var(--primary);
}

@media (max-width: 1200px) {
    .cta-icon {
        width: 50px;
    }
}

@media (max-width: 990px) {
    #cta-row h2 {
        margin-bottom: .25em;
    }
}

@media (max-width: 767px) {
    #cta-row .column+.column {
        margin-top: 2rem;
    }
}


/* General Feed stuff */

#news-row h2,
#events-column h2,
#blog-row h2 {
    margin-bottom: 5.5px;
}

#news-row h2,
#news-row .button-link,
#events-column h2,
#events-column .button-link,
#blog-row h2,
#blog-row .button-link {
    grid-column: 1 / -1;
}


/* News row */

#news-row>.column:not(#mycanvas .column) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 30px;
}

#news-row figure {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
}

#news-row figure:first-of-type {
    grid-column: 1/3;
    grid-row: 2/4;
}

#news-row figcaption {
    position: absolute;
    bottom: 0;
    font-family: 'Sen', sans-serif;
    font-size: 20px;
    font-weight: bold;
    padding: 10px 20px;
    z-index: 1;
    color: white;
    max-height: 2.2em;
    transition: .25s max-height ease-in-out;
}

#news-row figcaption::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -1;
    background: black;
    opacity: .6;
}

#news-row figcaption:focus-within::before {
    background: var(--primary);
    transition: .125s background ease-in-out;
}

#news-row figure:first-of-type figcaption {
    font-size: 25px;
    max-height: unset;
}

#news-row figure:not(:first-of-type) figcaption::after {
    content: '+';
    position: absolute;
    top: calc(1em - 10px);
    right: 20px;
    opacity: 1;
    transition: .25s opacity ease-in-out;
}

#news-row figure:hover figcaption,
#news-row figure:focus figcaption,
#news-row figure:focus-within figcaption,
#news-row figcaption:hover {
    max-height: 244px;
}

#news-row figure a:focus {
    outline: none;
}

#news-row figure:hover figcaption::after,
#news-row figure:focus figcaption::after,
#news-row figure:focus-within figcaption::after,
#news-row figcaption:hover::after {
    opacity: 0;
}

#news-row figcaption a {
    color: inherit;
}

#news-row img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 990px) {
    #news-row>.column:not(#mycanvas .column) {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    #news-row>.column:not(#mycanvas .column) {
        display: flex;
        flex-direction: column;
    }
    #news-row figure:first-of-type figcaption,
    #news-row figcaption {
        font-size: 1rem;
        position: relative;
        max-height: unset;
        font-weight: normal;
    }
    #news-row figcaption::before {
        background: var(--primary);
        opacity: 1;
    }
    #news-row figure:not(:first-of-type) figcaption::after {
        content: none;
    }
}


/* Feed row */

@media (min-width: 991px) {
    #feed-row:not(#mycanvas #feed-row) {
        display: grid;
        grid-template-columns: 2fr 1fr;
    }
}

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

@media (max-width: 990px) and (min-width: 768px) {
    #rss-column .rss-item {
        width: calc(50% - 30px);
        display: inline-block;
        margin-right: 30px;
    }
}


/* Events column and Blog row*/

#events-column:not(#mycanvas #events-column) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px 30px;
}

#blog-row:not(#mycanvas #blog-row)>.column {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px 30px;
}

.feed-item {
    border: 1px solid var(--border);
    background: white;
    border-radius: 5px;
}

.feed-item section:first-child,
.feed-item div,
.feed-item time {
    padding: 10px 20px;
    font-size: 16px;
}

.feed-item section:first-child {
    background: var(--secondary);
    min-height: calc(20px + 6em);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

#blog-row .feed-item section:first-child {
    background: var(--primary);
}

.feed-item h3,
.feed-item h3 a {
    color: white;
    font-size: 18px;
    margin-bottom: 0;
}

.feed-item section:last-child {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feed-item time {
    display: block;
}

@media (max-width: 800px) {
    .feed-item section:first-child {
        min-height: unset;
    }
}


/* RSS column */

.rss-item {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: white;
}

.rss-item+.rss-item {
    margin-top: 10px;
}


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

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

footer {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

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

footer>section {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: row;
}

.social-links li:not(:last-child) {
    margin-right: 1ch;
}

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

.social-links svg {
    background: var(--primary);
    border-radius: 5px;
    width: 35px;
    height: 35px;
    transition: .125s background ease-in-out;
}

.social-links svg:hover,
.social-links svg:focus {
    background: var(--secondary);
}

.social-links .st0 {
    display: none;
}

.top-link {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.top-button {
    width: 35px;
    height: 35px;
    background: var(--secondary);
    transition: .125s background ease-in-out;
    margin-left: 1ch;
    border-radius: 5px;
    display: flex;
    padding-top: 5px;
}

.button-arrow {
    margin: auto;
    width: 10px;
    height: 10px;
    border-left: 3px solid white;
    border-top: 3px solid white;
    transform: rotate(45deg);
}

.top-link:focus .top-button,
.top-link:focus-within .top-button,
.top-link:hover .top-button {
    background: var(--accent);
}


/*--------------------------------------------------------
    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;
    }
}


/* News Archive styles per message #43 on https://mmsusersupport.com/users/request_detail.php?rid=223000180&internal=Y# ticket: 189257 */

.month-header {
    font-size: 30px !important;
}

.article-headline {
    font-size: 17px !important;
}

.article-HTML {
    font-size: 17px !important;
}

.result-headline {
    font-family: 'EB Garamond', serif !important;
    margin: 5px 0 !important;
    padding: 0 15px;
    font-weight: bold;
    color: var(--burgandy);
    display: inline-block;
    font-size: 30px !important;
}

#searchButton,
#clearSearch,
#returnToSearch {
    text-transform: uppercase;
    display: inline-block;
    background-color: var(--orange);
    color: white;
    text-align: center;
    padding: .8em 2.5ch;
    text-decoration: none;
    line-height: 1;
    transition: background .125s ease-in-out, color .125s ease-in-out;
    font-weight: bold;
    text-shadow: none;
    font-family: 'Nunito Sans', sans-serif !important;
    border-radius: 0;
    /* font-size: 19px !important; */
    border: none;
}

#searchButton.ui-state-hover,
#clearSearch.ui-state-hover,
#returnToSearch.ui-state-hover {
    background: var(--burgandy);
}

#searchButton>span,
#clearSearch>span,
#returnToSearch>span {
    all: revert;
}