html {
    --blue: #337998;
    --dark-blue: #004760;
    --yellow: #ffe189;
    --cyan: #6dcef5;
    --light-cyan: #e1f3f9;
    overflow-x: hidden;
    font-size: 19px;
    font-family: 'Inter', sans-serif;
    color: #444;
    --side-margin: 1px;
}

@media (min-width:768px) {
     :root {
        --side-margin: calc((100vw - 750px) / 2);
    }
}

@media (min-width:991px) {
     :root {
        --side-margin: calc((100vw - 970px) / 2);
    }
    .wrapper {
        width: 970px;
    }
}

@media (min-width:1201px) {
     :root {
        --side-margin: calc((100vw - 1170px) / 2);
    }
    .wrapper {
        width: 1170px;
    }
}

body {
    color: inherit;
    overflow: inherit;
}

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

p {
    margin: 0;
}

p:not(:last-child) {
    margin-bottom: .75em;
    color: inherit;
}


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

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 .3em;
    padding: 0;
    text-transform: capitalize;
    line-height: 1.2;
    font-family: 'Lora', serif;
}

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: 36px;
}


/* #homepage-main h2 {
    font-size: 27px;
} */

h3 {
    font-size: 31px;
}


/* #homepage-main h3 {
    font-size: 24px;
} */

h4 {
    font-size: 27px;
}

h5 {
    font-size: 24px;
}

h6 {
    font-size: 20px;
}


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

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

a:hover,
a:focus {
    color: var(--dark-blue);
    text-decoration: underline;
}

.button-link {
    text-transform: capitalize;
    display: block;
    width: fit-content;
    color: white;
    background-color: var(--blue);
    text-align: center;
    padding: 0.6em 2ch;
    text-decoration: none;
    line-height: 1;
    transition: background .125s ease-in-out;
    text-shadow: none;
    border-radius: 3px;
    border: none;
}

.button-link:hover,
.button-link:focus {
    background-color: var(--dark-blue);
    text-decoration: none;
    outline: none;
    color: white;
}

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

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

#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 */
    position: relative;
    left: calc(var(--side-margin) * -1);
    right: calc(var(--side-margin) * -1);
    width: calc(100vw + 13px);
}

.img-responsive.full-width:not(#mycanvas img) {
    /* Make sure that when the system automatically adds the class .img-responsive that it doesn't break .full-width. This is not applied to images viewed on the Grid Editor page. */
    max-width: unset;
}

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

.blue-background:not(#mycanvas .blue-background) {
    position: relative;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    /* padding-left: 15px; */
}

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


/* @media (min-width: 992px) {
    .blue-background:not(#mycanvas .blue-background)>.col-md-9 {
        width: calc(75% - 15px);
    }
    .blue-background:not(#mycanvas .blue-background)>.col-md-8 {
        width: calc(66.7% - 15px);
    }
    .blue-background:not(#mycanvas .blue-background)>.col-md-7 {
        width: calc(58.3% - 15px);
    }
    .blue-background:not(#mycanvas .blue-background)>.col-md-6 {
        width: calc(50% - 15px);
    }
    .blue-background:not(#mycanvas .blue-background)>.col-md-5 {
        width: calc(41.7% - 15px);
    }
    .blue-background:not(#mycanvas .blue-background)>.col-md-4 {
        width: calc(33.3% - 20px);
    }
    .blue-background:not(#mycanvas .blue-background)>.col-md-3 {
        width: calc(25% - 20px);
    }
    .blue-background:not(#mycanvas .blue-background)>.col-md-2 {
        width: calc(20% - 20px);
    }
} */

@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);
    }
    .blue-background:not(#mycanvas .blue-background) {
        padding-right: 15px;
    }
    .blue-background::before {
        left: 0;
        right: 0;
    }
}

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


/* Events/News items */

.feed-item {
    display: flex;
    gap: 1em 15px;
    line-height: 1.35;
    position: relative;
    border: 1px solid #e6e6e6;
    border-radius: 3px;
    background: white;
    overflow: hidden;
}

.feed-item section {
    padding: 13px 20px;
}

.feed-item h3 {
    font-size: 19px;
    margin: 0 0 5px;
}

.feed-item time {
    position: relative;
    display: block;
    margin-top: -5px;
    /* Pull up the description to fill the gap left under h3 in news-items containing <time> */
}

.feed-item time::before {
    content: '';
    background: url(../images/calendar-icon.svg);
    position: relative;
    top: .125em;
    display: inline-block;
    width: 1em;
    height: 1.1em;
    background-repeat: no-repeat;
    margin-right: .5ch;
}

@media (min-width: 768px) {
    .feed-item time {
        font-size: 15px;
    }
}


#member-views-row .feed-item {
    display: inline-block;
}
#member-views-row .feed-item img {
    max-width: 100%;
    height: auto;
    width: 30%;
    margin: 15px 20px 10px;
}


/* Slideshows defaults */

.carousel {
    font-size: 20px;
}

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


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

header {
    padding: 1rem 30px 0;
    padding: 1rem clamp(15px, 5vw, 100px) 0;
}

header section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    gap: 1ch;
}

header .pdca-logo {
    max-width: 100%;
}

.social-list {
    display: flex;
    gap: .5rem 1ch;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}

header .social-list path {
    fill: var(--dark-blue);
    transition: .125s fill ease-in-out;
}

header .social-list :hover path,
header .social-list :focus path {
    fill: var(--blue);
    outline: none;
}

header .social-list rect {
    display: none;
}

@media (max-width: 990px) {
    header .pdca-logo {
        width: 230px;
    }
}

@media (max-width: 767px) {
    header {
        padding: .5rem 15px;
    }
    .social-list {
        gap: .5rem .75ch;
    }
}
svg#x-twitter-icon {
    width: 18px;
    height: 20px;
}


/* Search */

.searchbox {
    width: 180px;
    width: clamp(180px, 20vw, 300px);
    max-width: 100%;
    position: relative;
    top: -3px;
    padding: 5px 1ch;
    height: 39px;
    outline: 1px solid #e6e6e6;
    transition: .125s outline ease-in-out;
    overflow: hidden;
    margin-left: 1ch;
}

#mobile-menu .searchbox {
    margin-left: 0;
    width: 100%;
}

.searchbox:hover,
.searchbox:focus,
.searchbox:focus-within {
    outline: 1px solid var(--dark-blue);
}

.search-input {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border: none;
    width: 100%;
    padding: inherit;
    background: transparent;
}

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

.search-button {
    color: transparent;
    background-color: var(--dark-blue);
    border: none;
    background-image: url(../images/search-new.svg.php?fc=eeeeee);
    position: absolute;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 15px;
    transition: .125s background-image ease-in-out;
    top: 0;
    bottom: 0;
    width: 40px;
    right: 0;
}

.search-button:hover,
.search-button:focus {
    background-image: url(../images/search-new.svg.php?fc=6dcef5);
    outline: none;
}

@media (max-width: 767px) {
    header .searchbox {
        display: none;
    }
}


/* Desktop menu  */

nav {
    position: relative;
}

nav::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(clamp(15px, 5vw, 100px) * -1);
    right: calc(clamp(15px, 5vw, 100px) * -1);
    display: block;
    z-index: -1;
    background: var(--dark-blue);
}

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

#nav_menu>ul {
    display: flex;
    /* flex-wrap: wrap; */
    width: 100%;
    justify-content: flex-start;
    align-items: center;
}

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

#nav_menu li {
    position: relative;
}

#nav_menu .login-item {
    margin-left: auto;
}

.login-item button {
    background: var(--blue);
    border: none;
    color: white;
    padding: .5rem 1ch;
    transition: .125s background ease-in-out, .125s color ease-in-out;
}

.login-item button:hover,
.login-item button:focus {
    background: var(--cyan);
    color: var(--dark-blue);
}

#nav_menu>ul>li>a {
    transition: background .125s ease-in-out;
    position: relative;
    padding: .7em 2ch;
    border-left: 1px solid #00587e;
    text-transform: capitalize;
    color: white;
}

#nav_menu>ul>li>a:nth-last-child(1) {
    border-right: 1px solid #00587e;
}

#nav_menu a {
    text-decoration: none;
    background: var(--dark-blue);
    transition: .125s background 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 {
    background: var(--blue);
}

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

#nav_menu .dropdown-menu {
    /* Dropdown menu  */
    font-size: inherit;
    padding: 0;
    border: none;
    border-radius: 0;
    top: calc(100% + 3px);
}

#nav_menu .dropdown-menu a {
    text-decoration: none;
    background: transparent;
    transition: .125s background ease-in-out, .125s color ease-in-out;
    padding: .5em 1ch;
}

#nav_menu .dropdown-menu a:hover,
#nav_menu .dropdown-menu a:focus {
    background: var(--dark-blue);
    color: white;
}

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

@media (max-width: 990px) {
    header nav {
        display: none;
    }
}


/* Mobile menu trigger  */

.mobileMenuTrigger:not(.triggerClose) {
    border: 2px solid currentColor;
    padding: 10px 5px;
    color: var(--dark-blue);
    transition: color .125s ease-in-out;
    display: inline-flex;
    border-radius: 5px;
    background: transparent;
    margin-top: -5px;
}

.mobileMenuTrigger:not(.triggerClose):hover,
.mobileMenuTrigger:not(.triggerClose):focus {
    color: var(--blue);
    outline: none;
}

.menu-trigger {
    width: 30px;
}

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

@media (max-width: 600px) {
    .mobileMenuTrigger:not(.triggerClose) {
        padding: 5px 3px;
    }
    .menu-trigger {
        width: 24px;
    }
}


/* 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;
    margin-top: 0;
}

.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;
}

@media (max-width: 990px) {
    .header-links li:not(:last-child) {
        display: none;
    }
}


/*--------------------------------------------------------
    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 .mobile-search-close {
    display: flex;
    justify-content: space-between;
}

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

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

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

.triggerClose {
    text-align: right;
}

.triggerClose button {
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0;
    line-height: 1;
}

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


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

#subpage-main,
#mms-main {
    padding-top: 3rem;
    min-height: calc(100vh - 54px - 167px - 4rem);
}

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

@media (max-width: 990px) {
    main:not(#mms-main) .row:not(#slideshow-row) {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }
    main:not(#mms-main) .column+.column {
        margin-top: 1rem;
    }
}


/* slideshow row  */

#slideshow-row {
    position: relative;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

#slideshow-row::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--side-margin) * -1);
    right: calc(var(--side-margin) * -1);
    display: block;
    background: var(--light-cyan);
}

#slideshow-row .carousel-indicators {
    bottom: 0;
    margin: 0;
    text-align: left;
    width: unset;
    margin-left: 15px;
    display: flex;
    gap: 1rem .5ch;
}

#slideshow-row .carousel-indicators li {
    background: #abd1dd;
    border: 0;
    width: 14px;
    height: 14px;
    margin: 0;
}

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

#slideshow-row .carousel-caption {
    /*margin-top: 10%;*/
    margin-bottom: auto;
    position: relative;
    top: unset;
    bottom: unset;
    left: unset;
    right: unset;
    z-index: 2;
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-right: calc(var(--side-margin) / 2);
    color: #444;
    text-align: left;
    text-shadow: none;
}

@media (min-width: 768px) {
    #slideshow-row .item>* {
        float: left;
        width: calc(50% - 15px);
    }
    #slideshow-row .item>*+* {
        margin-left: 29px;
    }
    #slideshow-row img {
        padding-left: calc(var(--side-margin) / 2);
    }
}

@media (max-width: 990px) {
    #slideshow-row .carousel-caption {
        margin-top: 0;
        padding-right: 30px;
    }
}

@media (max-width: 767px) {
    #slideshow-row {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    #slideshow-row .carousel-indicators {
        left: 0;
    }
    #slideshow-row img {
        padding: 0 30px 0 15px;
        margin: unset !important;
        /* Overwrite inline style generated by slideshow function */
    }
    #slideshow-row .carousel-caption {
        padding-left: 15px;
    }
}


/* Introduction row */

#introduction-row ul {
    padding-left: 2ch;
}

#introduction-row li::marker {
    color: var(--yellow);
    font-size: 1.25em;
}


/* Quick Links row */

#quick-links-row ul {
    padding: 0;
    margin: 0;
    align-items: center;
    color: white;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    /*grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));*/
    grid-template-columns: repeat(auto-fill, minmax(305px, 1fr));
    /* Comment this style ^^ out when client is ready to show renew link */
    gap: 30px;
}

#quick-links-row li {
    background: #00587e;
    transition: .125s background ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 155px;
    padding: 15px 4ch 10px;
    position: relative;
    text-align: center;
    border-radius: 3px;
}

.renew-link {
    display: none !important;
}

#quick-links-row li:hover,
#quick-links-row li:focus {
    background: var(--dark-blue);
}

#quick-links-row li a {
    color: white;
    text-decoration: none;
}

#quick-links-row li:hover a,
#quick-links-row li:focus a {
    text-decoration: none;
}

#quick-links-row li a::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

@media (max-width: 767px) {
    #quick-links-row ul {
        grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    }
}


/* News rows */

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

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

#news-row img {
    object-fit: cover;
    width: 154px;
}

#news-row p {
    font-size: 16px;
}

@media (min-width: 991px) {
    #news-row .feed-item:first-of-type {
        grid-row: 2/4;
        background: transparent;
        color: white;
    }
    #news-row .feed-item:first-of-type section {
        padding: 30px 40px;
    }
    #news-row .feed-item:first-of-type::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--blue);
        opacity: .8;
        z-index: -1;
    }
    #news-row .feed-item:first-of-type section>*+* {
        margin-top: .75rem;
    }
    #news-row .feed-item:first-of-type a {
        color: white;
    }
    #news-row .feed-item:first-of-type h3 {
        font-size: 26px;
    }
    #news-row .feed-item:first-of-type p {
        font-size: 19px;
    }
    #news-row .feed-item:first-of-type img {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        height: 100%;
        width: 100%;
        z-index: -1;
    }
}


/* Member Views rows */

#member-views-row:not(#mycanvas #member-views-row)::before {
    background-color: #00587e;
}

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

#member-views-row h2 {
    color: white;
}

#member-views-row .button-link {
    background: white;
    color: var(--blue);
}

#member-views-row time {
    display: none;
}

@media (max-width: 990px) {
    #news-row .column:not(#mycanvas .column),
    #member-views-row:not(#mycanvas #member-views-row)>.column {
        grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    }
    .feed-item {
        flex-direction: column;
    }
    #news-row img {
        width: unset;
    }
}


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

footer {
    --padding: 3rem;
    background: #0e252d;
    padding: var(--padding) 0;
}

footer:not(#homepage-main+footer) {
    margin-top: var(--padding);
}

footer .wrapper {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1em 30px;
    color: white;
}

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

footer a:hover,
footer a:focus {
    color: inherit;
}

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


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