*,
*:before,
*:after {
    box-sizing: border-box;
}

:root {
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    font-family: 'Merriweather', serif;
    --scroll: 1;
    --primary: #70a9a9;
    --secondary: #a99f70;
    overflow-x: hidden;
    --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: #333;
    font-size: inherit !important;
    font-family: inherit !important;
}

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

p:empty {
    display: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    font-family: 'Raleway', sans-serif;
    margin-top: 0;
    margin-bottom: .5em;
    padding: 0;
    font-weight: 600;
    color: gray;
}

h1 {
    font-size: 48px;
}

h1.title:empty {
    display: none;
}

h2 {
    font-size: 36px;
}

h3 {
    font-size: 30px;
}

h4 {
    font-size: 28px;
}

h5 {
    font-size: 25px;
}

h6 {
    font-size: 20px;
}


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

 */

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

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

a.button-link,
input[type="submit"]:not(#mms-main input),
.mobile-login button {
    /* :not exception needed to avoid messing with all sorts of different buttons in the MMS  */
    display: block;
    font-size: 24px;
    font-weight: bold;
    background: var(--primary);
    color: white;
    padding: .5em 2ch;
    border-radius: 5px;
    border: 1px solid var(--primary);
    transition: .125s color ease-in-out, .125s background ease-in-out;
    width: fit-content;
}

a.button-link:hover,
input[type="submit"]:not(#mms-main input):hover,
.mobile-login button:hover,
a.button-link:focus,
input[type="submit"]:not(#mms-main input):focus,
.mobile-login button:focus {
    text-decoration: none;
    background: transparent;
    color: var(--primary);
}

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

a.button-link:hover,
a.button-link:focus {
    text-decoration: none;
}

a.button-link+*:not(.button-link) {
    padding-top: 1.5em;
}

*+.button-link {
    margin-top: 1em;
}

li:not(:last-child) .button-link {
    margin-bottom: .75rem;
}

@media (max-width: 1200px) {
    a.button-link,
    input[type="submit"]:not(#mms-main input),
    .mobile-login button {
        font-size: 1rem;
        padding: .5rem;
    }
}


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

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

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

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

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

@media (min-width: 767px) {
    /*The following styles are meant to give more space to the label column in contact forms that are too narrow for the entire label to be read normally*/
    .col-md-5 form[action="contact_form_resp.php"] .col-sm-2,
    .col-md-4 form[action="contact_form_resp.php"] .col-sm-2,
    .col-md-3 form[action="contact_form_resp.php"] .col-sm-2,
    .col-md-2 form[action="contact_form_resp.php"] .col-sm-2,
    .col-md-1 form[action="contact_form_resp.php"] .col-sm-2 {
        width: 25%;
        padding-right: 1em;
    }
    .col-md-5 form[action="contact_form_resp.php"] .col-sm-10,
    .col-md-4 form[action="contact_form_resp.php"] .col-sm-10,
    .col-md-3 form[action="contact_form_resp.php"] .col-sm-10,
    .col-md-2 form[action="contact_form_resp.php"] .col-sm-10,
    .col-md-1 form[action="contact_form_resp.php"] .col-sm-10 {
        width: 75%;
        padding-left: 0;
    }
    .col-md-5 form[action="contact_form_resp.php"] .col-sm-offset-2,
    .col-md-4 form[action="contact_form_resp.php"] .col-sm-offset-2,
    .col-md-3 form[action="contact_form_resp.php"] .col-sm-offset-2,
    .col-md-2 form[action="contact_form_resp.php"] .col-sm-offset-2,
    .col-md-1 form[action="contact_form_resp.php"] .col-sm-offset-2 {
        margin-left: 25%;
    }
    /*^^Adjusts the form-group placement of the reCAPTCHA iframe and submit buttom to match the new widths from the styles above*/
    .col-md-4 form[action="contact_form_resp.php"] .col-sm-offset-2 {
        margin-left: 15px;
    }
    #newsletter-column form[action="contact_form_resp.php"] .col-sm-offset-2 {
        margin-left: 0;
    }
}

blockquote {
    font-size: inherit;
    border-left-color: var(--primary);
}

blockquote p {
    font-size: 1.05em;
}


/*Styles below are taken from Bootstrap's table style to ensure that tables on content pages are responsive and neat whether Bootstrap classes are added or not. :not added to prevent styling Google Custom Search tables*/

#subpage-main table {
    max-width: 100%;
    border-collapse: collapse;
    color: #212529;
    margin-bottom: 1em;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    margin-top: 2em;
}

#subpage-main thead {
    font-weight: bold;
}

#subpage-main td,
#subpage-main th {
    padding: .75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
    text-align: inherit;
}

#subpage-main thead th {
    vertical-align: bottom;
    border-top: none;
}

#subpage-main table caption {
    color: currentColor;
    text-align: left;
    font-size: 1.375em;
    font-weight: bold;
    padding: 0;
}

#subpage-main tbody tr:hover {
    color: #212529;
    background-color: rgba(0, 0, 0, .075);
}

@media (max-width: 767px) {
    #subpage-main table {
        font-size: 14px;
    }
    #subpage-main td:first-child,
    #subpage-main th:first-child {
        padding-left: 5px;
    }
    #subpage-main td:last-child,
    #subpage-main th:last-child {
        padding-right: 5px;
    }
}

@media (max-width: 500px) {
    #subpage-main td,
    #subpage-main th {
        padding: 5px 2px;
    }
}

grammarly-btn {
    display: none;
    /*If someone copy/pastes text from Grammarly it will add this invisible button and cause the page to scroll horizontally. This style hides that.*/
}

.ui-widget {
    /* Part of some pages in the MMS, this style tells it not to overwrite the font with Verdana */
    font-family: revert;
}


/* Slideshow defaults */

.carousel-caption {
    position: absolute;
    z-index: 100;
    background-color: #002857;
    background: rgba(0, 0, 0, .6);
    padding: 10px 15px;
    left: inherit;
    bottom: 0px;
    right: 0px;
    top: inherit;
    width: 100%;
    text-align: left;
    text-shadow: none;
}

@media (max-width: 600px) {
    .carousel-caption {
        padding: 0px 10px;
    }
}

.caption-text {
    font-size: 28px;
    font-weight: 600;
    line-height: 33px;
    display: block;
    color: initial;
    margin-bottom: 10px;
}

.alt-text {
    font-size: 16px;
    color: initial;
    margin-bottom: 10px;
}


/*--end slideshow-defaults---------*/


/*----------Responsive Nivo*/

div[id^=slider-container-FD],
div[id^=slider_FD],
.nivoSlider img {
    max-width: 100% !important;
    height: auto !important;
}


/*----------Nivo Controls*/

.nivo-prevNav,
.nivo-nextNav {
    background-image: none !important;
    width: 25px !important;
    top: 25% !important;
    /*Fallback for browsers that don't support calc*/
    top: calc( 50% - 50px) !important;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 75px;
    font-family: Arial, sans-serif;
    text-shadow: 0px 0px 10px rgba(51, 51, 51, 0.4);
}

.nivo-prevNav:hover,
.nivo-nextNav:hover {
    text-decoration: none;
    color: #ae0e0d;
    text-shadow: none;
}

.nivo-prevNav {
    left: 10px !important;
}

.nivo-nextNav {
    right: 10px !important;
}

.nivo-prevNav:after {
    content: "‹";
}

.nivo-nextNav:after {
    content: "›";
}


/*  Modals ---------------------------------
    ----------------------------------------
 */

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

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

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

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

.modal h2 {
    font-size: 20px;
    opacity: .9;
}

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

.modal input[type="submit"]:not(#mms-main input) {
    font-size: 1rem;
}


/*  Login Forms ----------------------------
----------------------------------------
*/

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


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

header {
    position: sticky;
    top: 0;
    background: white;
    box-shadow: 0 3px 14px -2px rgb(0 0 0 / 10%);
    z-index: 300;
    transition: .25s background ease-in-out;
}

header .wrapper {
    display: grid;
    grid-template-columns: 1fr max-content;
    gap: 30px;
    align-items: center;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

header .wrapper>a:first-child svg *,
.search-item path {
    --offset: .05;
    fill: hsl(calc(var(--scroll) * var(--offset)) 50% 48%);
}

@media (max-width: 990px) {
    header .wrapper {
        display: flex;
        justify-content: space-between;
    }
}


/*  Desktop Menu ---------------------------
    ----------------------------------------
 */

#nav_menu .triggerClose {
    display: none;
}

#nav_menu>ul {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

#nav_menu>ul>li>ul {
    /* 1st tier submenus */
}

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

#nav_menu a {
    padding: 5px 1ch;
    white-space: nowrap;
    color: #333;
    text-decoration: none;
}

#nav_menu .navbar-nav>li>a {
    /* padding: 5px .5ch; */
    font-size: 16px;
}

#nav_menu .search-item a {
    padding: 5px;
}

.dropdown-menu {
    font-size: inherit;
}

.dropdown-menu>li>a {
    font-size: inherit;
    padding: .5rem 1rem;
}

#nav_menu .nav .open>a,
#nav_menu .nav .open>a:focus,
#nav_menu .nav .open>a:hover,
#nav_menu .nav>li>a:focus,
#nav_menu .nav>li>a:hover {
    /* ^^Overwriting BS defaults */
    background-color: white;
    color: var(--primary);
    transition: color .125s ease-in-out, background .125s ease-in-out;
}

.nav .open>a:hover,
.dropdown-menu>li>a:focus,
.dropdown-menu>li>a:hover {
    color: #333;
    background-color: transparent;
}

#nav_menu li.greyed a {
    opacity: .75;
}


/*  Mobile Menu-----------------------------
----------------------------------------
*/

header .mobileMenuTrigger {
    color: var(--primary);
    background: transparent;
    border: 2px solid currentColor;
    display: flex;
    padding: 2.5px 5px;
    border-radius: 3px;
    transition: .125s color ease-in-out, .125s background ease-in-out;
}

header .mobileMenuTrigger:hover,
header .mobileMenuTrigger:focus {
    color: white;
    border-color: var(--primary);
    background: var(--primary);
}

.mobileMenuTrigger label {
    display: none;
}

.menu-trigger {
    cursor: pointer;
    margin: 0;
    width: 30px;
    height: 30px;
    padding: 5px;
}

#mobileMenuWrapper {
    box-shadow: 7px 0 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 400;
    overflow-y: auto;
    overflow-x: hidden;
    left: -120%;
    width: 300px;
    background-color: white;
    transition: left 300ms cubic-bezier(1.000, 0.010, 0.0, 1.000);
    color: #444;
}

#mobileMenuWrapper.open {
    left: 0;
}

#mobile-menu {
    list-style: none;
    overflow-y: auto;
    overflow-x: visible;
    padding: 1em 1.5em;
}

#triggerClose {
    text-align: right;
    font-size: 1.5em;
    cursor: pointer;
}

#mobileMenuWrapper #mobile-menu a {
    display: inline-block;
    margin-bottom: .75em;
    text-decoration: none;
}

#mobileMenuWrapper .mDropdown {
    display: none;
    list-style: none;
    padding: 0;
    background: none;
    border-top: 1px solid var(--primary);
    border-bottom: 1px solid var(--primary);
    padding-top: .75em;
    margin-bottom: .75em;
}

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

.mDropdown>li>a {
    padding: 0;
}

@media (max-width: 990px) {
    #nav_menu {
        display: none !important;
    }
}

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


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

#subpage-main,
#mms-main {
    background: white;
    padding-top: 3rem;
}

#subpage-main {
    min-height: 100vh;
}

#mms-main {
    min-height: calc(100vh - 139px - 588px);
    font-size: 16px;
}

main .row {
    position: relative;
}

main:not(#mms-main)>.row:not(#slideshow-row) {
    padding-top: 2rem;
    padding-bottom: 2rem;
    line-height: 1.75;
}

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

@media (max-width: 767px) {
    main:not(#mms-main) .column+.column {
        margin-top: 1rem;
    }
}


/*  Home Slideshow  ------------------------
    ----------------------------------------
 */

#slideshow-row .column {
    padding: 0;
}

#slideshow-row img {
    width: 100%;
    object-fit: cover;
    max-height: 80vh;
}

#slideshow-row .carousel-caption {
    position: absolute;
    z-index: 100;
    background: transparent;
    left: calc(var(--side-margin) * 1);
    bottom: 0;
    right: unset;
    top: unset;
    width: calc((var(--side-margin) * -2) + 100vw);
    text-shadow: none;
    padding: 15px;
    color: white;
    text-shadow: 2px 2px 3px rgb(0 0 0 / 50%);
    line-height: 1.3;
}

#slideshow-row .caption-text {
    font-size: clamp(26px, 3vw, 50px);
    font-weight: bold;
    color: inherit;
}

#slideshow-row .caption-text:not(:empty) {
    margin-bottom: 10px;
}

#slideshow-row .alt-text {
    font-size: clamp(20px, calc(3vw * .75), 35px);
    color: inherit;
}

#slideshow-row .button-link {
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1600px) {
    #slideshow-row .carousel-caption {
        width: 30%;
    }
}

@media (max-width: 1400px) {
    #slideshow-row .carousel-caption {
        width: 40%;
    }
}

@media (max-width: 1200px) {
    #slideshow-row .carousel-caption {
        width: calc(100% - (var(--side-margin) * 2));
        left: var(--side-margin);
        right: var(--side-margin);
        bottom: 0;
        padding: 1rem;
    }
}

@media (max-width: 990px) {
    #slideshow-row .carousel-caption {
        position: relative;
        width: 100%;
        left: 0;
        right: 0;
        bottom: 0;
        padding: .5rem 30px;
        background: var(--primary);
    }
    #slideshow-row .caption-text {
        color: white;
    }
    #slideshow-row .button-link {
        border: 1px solid white;
    }
    #slideshow-row .button-link:hover,
    #slideshow-row .button-link:focus {
        color: #1FA5FE;
        transition: .125s color ease-in-out;
        border-color: currentColor;
    }
}


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

#news-column h2,
#newsletter-column h2,
#events-column h2 {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    width: fit-content;
    font-size: 30px;
}

#news-column h2 svg,
#newsletter-column h2 svg,
#events-column h2 svg {
    display: block;
    margin-left: 0.5ch;
    border-radius: 50%;
    border: 2.5px solid currentColor;
    width: 1em;
    height: 1em;
    padding: 6px;
}

@media (max-width: 1200px) {
    #news-column h2,
    #newsletter-column h2,
    #events-column h2 {
        font-size: 28px;
    }
}


/*  Newsletter Column -------------------------------
    ----------------------------------------
 */

#newsletter-column label:not(label[for=contactCaptcha]) {
    display: none;
}

#newsletter-column:not(#foo) .row:not(#foo) {
    /* I hate how the not selector increases CSS specificity. It should be neutral. */
    padding-top: 0;
    padding-bottom: 0;
    margin-left: 0;
    margin-right: 0;
}

#newsletter-column .form-horizontal .form-group {
    margin-inline: 0;
}

#newsletter-column .col-sm-10:not(.col-sm-offset-2) {
    width: 100%;
    padding: 0;
}

#newsletter-column .form-group:has([style="font-size: 10px; font-style: italic;"]) {
    display: none;
}


/* #newsletter-column [for="contactCaptcha"] img {
    display: block;
    max-width: 100%;
} */


/*  Introduction Row -------------------------------
    ----------------------------------------
 */

#introduction-row img {
    width: 100%;
    max-height: 490px;
    object-fit: cover;
}


/*  Events Column -------------------------------
    ----------------------------------------
 */

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

#events-column h2,
#news-column h2 {
    grid-column: 1/-1;
    margin-bottom: calc(.5em - 1rem);
}


/* Feed items */

.feed-item {
    padding: 1.25rem 20px;
    border-radius: 5px;
    font-size: 17px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

#events-column .feed-item {
    /* background: var(--primary); */
    /* color: white; */
}

#events-column .feed-item::before {
    content: '';
    background: var(--primary);
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: .2;
    z-index: -1;
}

#news-column .feed-item {
    border: 2px solid #ddd;
}

.feed-item h3 {
    font-size: 1.1rem;
    margin-bottom: .75rem;
}

#events-column .feed-item h3 {
    color: inherit;
}

.feed-item h3 a {
    color: inherit;
    text-decoration: underline;
}

.feed-item h3 a::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.feed-item time {
    display: block;
}

#events-column .feed-item time {
    display: block;
    padding-top: 5px;
    border-top: 1px solid currentColor;
}

#news-column .feed-item time {
    margin-top: -.5rem;
}


/*  Subpages -------------------------------
    ----------------------------------------
 */

#about-page .photo-background::before {
    background-image: url('../images/GettyImages-1208205959-2880w.png');
}

#inspections-page .photo-background::before {
    background-image: url('../images/GettyImages-1145254175-2880w.png');
}

#contact-page main:not(#mms-main) [action="contact_form_resp.php"] .row:not(foo) {
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}

[action="contact_form_resp.php"] input[type="submit"]:not(#mms-main input) {
    font-size: 1rem;
}


/*  Grid Page Editor workarounds -----------
----------------------------------------
 */


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

footer {
    padding-top: 2rem;
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem 30px;
    flex-wrap: wrap;
}

.social-list {
    list-style: none;
    display: flex;
    gap: 1rem .5ch;
    padding: 0;
    margin: 0;
}


/* .social-list svg {
    filter: grayscale(1);
    transition: .125s filter ease-in-out;
}

.social-list svg:hover,
.social-list svg:focus {
    filter: grayscale(0);
} */