html {
    scroll-behavior: smooth;
}

@font-face {
  font-family: 'League Spartan Variable';
  src: url('/static/fonts/LeagueSpartanVariable.woff2') format('woff2-variations');
  font-weight: 200 900;
}
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    --page-width: 85rem;
    --standard-gap: 1.5rem;
    --standard-radius: 2rem;
    --hover-transition-time: 180ms;
    --accent-color: #006b1b;
    --secondary-accent-color: #005000;
    --background-color: white;
    --text-color: black;
    --inverse-text-color: white;
    --accent-text-color: #505050;
    --dark-link-color: #bee3f8;
    --dark-visited-link-color: #e8dfff;
    --card-background-color: #eeeeee;
    --standard-border-thickness: 3px; /*TODO: Implement this everywhere*/
    --error-color: #f1bfbf
}

/*@media (prefers-color-scheme: dark) {*/
/*    * {*/
/*        --accent-color: #006b1b;*/
/*        --secondary-accent-color: #005000;*/
/*        --background-color: #1e1e1e;*/
/*        --text-color: #ffffff;*/
/*        --inverse-text-color: white;*/
/*        --accent-text-color: #dcdcdc;*/
/*        --dark-link-color: #84daff;*/
/*        --dark-visited-link-color: #c4aeff;*/
/*        --card-background-color: #2a2a2a;*/
/*    }*/

/*    a:not(.card-action) {*/
/*        color: var(--dark-link-color)*/
/*    }*/

/*    a:visited:not(.card-action) {*/
/*        color: var(--dark-visited-link-color)*/
/*    }*/

/*    nav > .nav :not(li.ancestor),*/
/*    nav > .nav :not(li.active),*/
/*    nav > .nav :not(li.expand) {*/
/*        color: var(--text-color)*/
/*    }*/
/*}*/

.skiplink {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
}

.skiplink:focus {
    position: static;
    width: auto;
    height: auto;
    background: red;
    padding: 0.5rem;
    color: white;
}

body {
    background: var(--background-color);
    align-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-rows:
        auto /*Wagtail User Bar*/
        auto /*Header*/
        auto /*Navbar*/
        1fr /*Content*/
        auto; /*Footer*/
    font-family: "League Spartan Variable";
    font-variation-settings: "wght" 375;
    font-size: 1.2rem;
    line-height: 1.5rem;
    color: var(--text-color)
}

img {
    border-radius: var(--standard-radius);
}

.round-featured-image {
    width: 200px;
    height: 200px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.site-title > * {
    line-height: 1.1;
}

h1 {
    font-family: "League Spartan Variable";
    font-variation-settings: "wght" 450;
    text-align: center;
    margin-bottom: var(--standard-gap);
    font-size: 2.3rem;
    margin-inline: auto;
    border-bottom: var(--standard-border-thickness) solid var(--accent-color)
}

.visual-h2,
h2 {
    font-family: "League Spartan Variable";
    font-variation-settings: "wght" 450;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.visual-h3,
h3 {
    font-size: 1.7rem;
    font-variation-settings: "wght" 450;
    /*text-align: center;*/
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.visual-h4,
h4 {
    font-variation-settings: "wght" 450;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    /*text-align: center;*/
}

h5 {
    font-variation-settings: "wght" 450;
}

h6 {
    font-variation-settings: "wght" 450;
}

article h2 {
    margin-inline: auto;
    text-align: center;
}

article li {
    margin-bottom: 0.25rem;
}

article ul ul,
article ol ol{
    margin-top: 0.25rem;
}

a {
    tab-index: 0;
}

iframe {
    aspect-ratio: 1.77 / 1;
    width: 100%;
    height: auto;
}

.no-list-style {
    list-style: none;
}

/*Support Wagtail Rich Text image classes*/
.left:not(.parent-height),
.right:not(.parent-height) {
    max-width: 45%;
    height: auto;
    clear: both;
}

.left {
    float: left;
    margin: 0 1.5rem 0.75rem 0;
}

.right {
    float: right;
    margin: 0 0 1.5rem 0.75rem;
}

.full-width {
    max-width: 100%;
    align-self: center;
    margin: auto;
    display: block;
    height: auto;
}

.parent-height {
    width: auto;
}

.full-width,
.right,
.left {
    margin-bottom: 1rem;
}

.flush-bottom {
    margin-bottom: 0;
}
/*End Wagtail Rich Text image classes*/

strong,
b {
    font-variation-settings: "wght" 550;
}

/*Support custom text-align Rich Text blocks (no longer available in the editor, but pages may still use this styling)*/
.centered {
    text-align: center;
}

p.right-aligned {
    text-align: right;
}
/*End custom text-align blocks*/

/*Support wagtail_text_alignment*/
.text-left {
    text-align: left;
}
.text-center{
    text-align: center;
}
.text-right {
    text-align: right;
}
/*End support wagtail_text_alignment*/

main {
    max-width: var(--page-width);
    width: 100%;
    margin: auto;
    height: 100%;
    display: grid;
    grid-template-columns: 30ch auto;
}

main > :only-child {
    grid-column: span 2
}

body:not(.template-homepage) > main {
    margin-top: 1rem;
}

.site-logo > svg {
    fill: var(--accent-color);
    height: 100px;
}

header {
    padding: 20px calc(calc(100% - var(--page-width)) / 2);
    display: flex;
}

.header-left {
    display: flex;
    margin-left: 1rem;
}

.header-right {
    margin-right: 1rem;
    margin-left: auto;
    font-family: "League Spartan Variable";
    display: flex;
    flex-direction: column;
    font-variation-settings: "wght" 345;
    text-align: right;
}

.header-links > a {
    padding-bottom: 0;
    padding-top: 0.1rem;
}

.header-links > a + a {
    border-left: 1px solid black;
    padding-left: 0.3rem;
}

.announcement {
    font-size: 1.8rem;
    margin-top: auto;
    margin-bottom: auto;
    color: var(--accent-text-color);
    white-space: nowrap;
}

.site-title {
    align-self: center;
    margin-left: 1rem;
    font-family: "League Spartan Variable";
    font-variation-settings: "wght" 345;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.site-title > :nth-child(1) {
    font-size: 2.5rem;
    margin-bottom: -0.5rem;
}
.site-title > span:nth-child(2) {
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
}
.site-title > span:nth-child(3) {
    font-size: 1.2rem;
}

nav > .nav {
    display: flex;
    /*padding: 0 calc(calc(100% - var(--page-width)) / 2);*/
    padding: 0;
    align-items: start;
    max-width: calc(var(--page-width) - 2rem);
    margin: auto;
    border-bottom: 3px solid var(--accent-color);
    text-decoration: none;
    color: var(--text-color);
    font-family: "League Spartan Variable";
    font-variation-settings: "wght" 350;
    font-size: 1.5rem;
}

nav > .nav li {
    list-style: none;
    width: auto;
    height: 100%;
    position: relative;
    background: unset;
    transition: background var(--hover-transition-time);
    white-space: nowrap;
    color: var(--inverse-text-color);
    padding: 0;
}

.nav li a {
    color: var(--text-color);
    transition: color var(--hover-transition-time);
    padding: 0.75rem 1.5rem;
}

.nav li a:focus,
.nav li:hover a,
.nav li.ancestor a,
.nav li.active a,
.nav li.expand a {
    color: white;
    transition: color var(--hover-transition-time);
}

nav > .nav > li > ul {
    display: none;
}

nav > .nav > li.expand > ul {
    display: unset;
    position: absolute;
    /*background: var(--secondary-accent-color);*/
    background: var(--accent-color);
    z-index: 1100;
}

nav > .nav li:focus-within,
nav > .nav li:hover {
    background: var(--accent-color);
    transition: background var(--hover-transition-time);
    color: white;
}

nav > .nav li.ancestor,
nav > .nav li.active,
nav > .nav li.expand {
    background: var(--accent-color);
}

.nav li > ul > li {
    background: unset;
    transition: background var(--hover-transition-time);
}

.nav li > ul > li:hover {
    background: var(--secondary-accent-color);
    transition: background var(--hover-transition-time);
}

nav > .nav a {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    color: var(--text-color)
}

nav > .nav .menu-toggle {
    display: none;
}

article {
    max-width: var(--page-width);
    display: block;
    padding: 1rem;
    container-type: inline-size;
    /*margin: auto;*/
}

.block-article,
article.list-page {
    display: flex;
    flex-direction: column;
    gap: var(--standard-gap)
}

article > p {
    margin-bottom: var(--standard-gap);
}

.page-preview.newsletter ul,
article > ul,
article > ol,
.block-rich_text > ul,
.block-rich_text > ol {
    list-style-position: outside;
    padding-left: 1rem;
}
.left ~ ul,
.left ~ ol {
    overflow: hidden;
    padding-left: 2rem;
}

.page-preview.newsletter ul {
    list-style-type: disc;
}

.post {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: var(--standard-gap);
}

.post.less > * {
    display: none;
}

.post.less > p:nth-of-type(1),
.post.less > h3.post-title,
.post.less > .showmore {
    display: unset;
}

hr {
    width: 75%;
    margin: 1rem auto 1rem auto;
    border: 2px solid var(--accent-color);
}

.block-multi_column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.block-column {
    grid-column: auto;
}

/*Directions List*/
.block-directions ol {
    list-style: none;
    counter-reset: directions-counter 0;
    display: grid;
    gap: var(--standard-gap)
}

.block-directions ol > li {
    counter-increment: directions-counter 1;
}

.block-directions ol > li.has-image {
    display: grid;
    grid-template-columns: 2fr 1fr;
    column-gap: var(--standard-gap)
}

.block-directions ol > li ol,
.block-directions ol > li ul {
    list-style: inside;
}

/*.block-directions ol > li.has-image > .image-container {*/
/*    max-height: 35rem;*/
/*    height: auto;*/
/*    width: 100%;*/
/*}*/

.block-directions ol > li.has-image > img {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 100%;
}

.block-directions ol > li > span:before {
    content: counter(directions-counter) ": "
}

.block-directions ol > li.has-image > span {
    grid-column: span 2;
}

@media screen and (max-width: 50rem) {
    /*Mobile directions list*/
    .block-directions > ol > li.has-image {
        grid-template-columns: 1fr;
    }

    .block-directions > ol > li.has-image > span {
        grid-column: auto;
    }

    .block-directions > ol > li.has-image > img {
        margin-bottom: 0.5rem;
    }
}

/*@media screen and (max-width: 25rem) {*/
/*    !*for very narrow devices*!*/
/*    * {*/
/*        --standard-gap: 0.75rem;*/
/*    }*/
/*    article {*/
/*        padding-inline: 0.75rem;*/
/*    }*/
/*}*/

@media screen and (max-width: 63rem) {
    /*Responsive Header*/
    header {
        flex-direction: column;
        align-content: center;
    }

    .header-right,
    .header-left {
        margin: auto;
    }

    .header-right {
        flex-direction: column-reverse;
    }

    .header-links {
        align-self: center;
    }
    /*End Responsive Header*/
}

.card.upcoming-service {
    gap: 0;
}

.card.upcoming-service h2,
.service-description {
    margin-bottom: 1rem;
}

.card.upcoming-service .heading-container {
    display: grid;
    grid-template-columns: 1fr 10rem;
    gap: 0 var(--standard-gap);
    margin-bottom: 0.5rem;
}

.card.upcoming-service .heading-container .card-action {
    grid-row: span 2;
    margin-top: 0;
    margin-bottom: auto;
    text-align: center;
    border-radius: calc(var(--standard-radius) - 0.5rem);
    padding-bottom: 0.5rem;
    padding-top: 0.75rem;
}

@media screen and (min-width: 60rem) {
    @container (width < 28rem) {
        .service-description {
            line-height: 1.3rem;
        }
        .service-description > img {
            height: 100px;
            width: auto;
        }
    }

    @container (width < 25.5rem) {
        .upcoming-service-buttons a {
            font-size: 1rem;
        }
        .upcoming-service-buttons {
            gap: 0.75rem;
        }
        .service-description {
            line-height: 1rem;
        }
        .card.upcoming-service h2,
        .service-description {
            margin-bottom: 0.5rem;
        }
        .card.upcoming-service .heading-container {
            grid-template-columns: 1fr 10rem;
            gap: 0.25rem;
        }
        .card.upcoming-service .heading-container .card-action {
            /*grid-template-rows: unset;*/
            padding-bottom: 0.25rem;
            padding-top: 0.5rem;
            font-size: 1.1rem;
            max-width: 15rem;
            margin-inline: auto;
        }
    }
}

@media screen and (max-width: 63rem) {

    .block-multi_column {
        display: flex;
        flex-direction: column;
    }

    .block-column {
        flex-grow: unset;
    }

    /*Responsive Navbar*/
    nav > .nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
        background: var(--secondary-accent-color);
    }

    nav > .nav li {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 0;
        background: var(--secondary-accent-color);
    }

    nav > .nav li.expand {
        padding-bottom: 0.5rem;
    }

    nav > .nav > li.expand > ul {
        display: flex;
        flex-direction: column;
        position: unset;
    }

    nav > .nav li > ul a {
        margin-left: 1rem;
    }

    nav > .nav li:hover {
        background: unset;
    }

    nav > .nav a {
        width: 100%;
        height: 100%;
        padding: 0.5rem;
        color: white;
    }

    nav > .nav li.active,
    nav > .nav li.expand,
    nav > .nav li.ancestor {
        background: var(--accent-color);
    }

    nav > .nav .menu-toggle {
        display: unset;
        text-align: center;
    }

    nav > .nav.closed li:not(.menu-toggle) {
        display: none;
    }

    /*End Responsive Navbar*/
    /*Responsive Header*/
    .site-title {
        text-align: center;
        margin: 0;
    }

    .site-title > :nth-child(1) {
        font-size: 1.6rem;
    }
    .site-title > span:nth-child(2) {
        font-size: 1.3rem;
    }
    .site-title > span:nth-child(3) {
        font-size: 1rem;
    }
    .site-logo {
        align-self: center;
    }
    .site-logo > svg {
        width: 75px;
        height: auto;
    }
    .header-left {
        flex-direction: column;
    }

    header {
        flex-direction: column;
        align-content: center;
    }

    .header-right {
        margin-top: .5rem;
        margin-right: auto;
        text-align: center;
    }

    .announcement {
        font-size: 1.4rem;
    }
    /*End Responsive Header*/
    /*Center all rich text images on mobile*/
    .left:not(.parent-height),
    .right:not(.parent-height),
    .full-width {
        float: unset;
        display: block;
        margin-right: auto;
        margin-left: auto;
        max-width: 100%;
    }
    /*End Center all rich text images on mobile*/
    /*Move sidebar to bottom on mobile*/
    main {
        grid-template-columns: unset;
    }

    main .content {
        order: -1;
    }

    .sidebar::before {
        content: "";
        border-top: 2px solid var(--accent-color);
        width: 100%;
        display: block;
        margin-bottom: 0.75rem;
    }
    /*End Move sidebar to bottom on mobile*/
}

@media screen and (max-width: 30rem) {
        .card.upcoming-service .heading-container {
            grid-template-columns: 1fr 10rem;
            gap: 0.25rem;
        }
        .card.upcoming-service .heading-container .card-action {
            padding-bottom: 0.25rem;
            padding-top: 0.5rem;
            font-size: 1.1rem;
            /*max-width: 15rem;*/
            margin-inline: auto;
            grid-column: 2;
            width: 100%;
        }
        .card.upcoming-service .heading-container h3 {
            grid-column: span 2;
        }
        .card.upcoming-service .heading-container .link-container {
            grid-row: 2;
        }
}

@media screen and (max-width: 22rem) {
        .card.upcoming-service .heading-container .card-action {
            grid-column: span 2;
        }
        .card.upcoming-service .heading-container h3 {
            grid-column: span 2;
        }
        .card.upcoming-service .heading-container .link-container {
            grid-column: span 2;
        }
}

.events-container li {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 4rem;
    gap: 0.13rem;
    width: 100%;
    border-radius: 5px;
}

.events-container li > .event-info {
    color: var(--accent-text-color);
}

.block-card_container > :nth-child(2n) {
    page-break-after: always;
}

.block-card_container:has(> :nth-child(4)):not(:has(> :nth-child(5))) > * {
    flex-basis: 40%;
}

.block-card_container {
    display: flex;
    gap: var(--standard-gap);
    flex-wrap: wrap;
    justify-content: center;
}

.block-expandable_card,
.block-card,
.card {
    font-family: "League Spartan Variable";
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--card-background-color);
    /*border: 1px solid var(--accent-color);*/
    border-radius: var(--standard-radius);
    /*padding: 1rem;*/
    overflow: clip;
    flex-basis: 30%;
    flex-grow: 1;
    scroll-margin: 1rem;
}

.block-expandable_card:not(.expand) .expanded-content {
    display: none;
}

.block-expandable_card.expand:not(#specificity-hack) {
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
}

.block-expandable_card:not(.expand) .card-action.contract {
    display: none;
}

.block-expandable_card.expand .card-action:not(.contract) {
    display: none;
}

.block-expandable_card:not(:has(> .card-action)),
.block-card:not(:has(> .card-action)),
.card:not(:has(> .card-action)) {
    padding-bottom: 1rem;
}

.block-card_container > .block-expandable_card:not(.expand),
.block-card_container > .block-card {
    max-width: 41rem;
    /*This is a weird value. Keeps cards from being full-width if they are alone on a row,*/
    /*but also allows 2 cards across to fill the fill width of <main/>.*/
}

@media screen and (max-width: 60rem) {
    .block-expandable_card:not(#specificity-hack),
    .block-card:not(#specificity-hack),
    .card {
        flex-basis: 40%; !important;
    }
}

@media screen and (max-width: 40rem) {
    .block-expandable_card:not(#specificity-hack),
    .block-card:not(#specificity-hack),
    .card {
        flex-basis: 100%; !important;
    }
}

.block-expandable_card:not(.upcoming-service):not(.badges) > :not(img),
.block-card:not(.upcoming-service):not(.badges) > :not(img),
.card:not(.upcoming-service):not(.badges) > :not(img):not(hr) {
    margin-inline: 1rem;
}

.block-expandable_card > img,
.block-card > img,
.card > img {
    /*margin: -1rem -1rem -1rem -1rem;*/
    width: 100%;
    height: auto;
}

.block-expandable_card > h2,
.block-card > h2,
.card h2 {
    text-align: center;
    margin-top: 0.5rem;
    font-variation-settings: "wght" 450;
    font-size: 1.8rem;
}

.block-expandable_card h2:first-child,
.block-card h2:first-child,
.card h2:first-child {
    margin-top: var(--standard-gap);
}

.block-expandable_card h3,
.block-card h3,
.card h3 {
    font-size: 1.4rem;
    margin-top: initial;
    margin-bottom: initial;
}

.block-expandable_card h4,
.block-card h4,
.card h4 {
    font-size: initial;
    margin-bottom: initial;
    margin-top: initial;
}

.card-action {
    align-self: center;
    margin-top: auto;
    /*margin-bottom: calc(-2.5rem - 6px);*/
    padding: 1rem 1.5rem 0.85rem;
    border: var(--standard-border-thickness) solid var(--accent-color);
    border-radius: var(--standard-radius);
    background: unset;
    color: var(--text-color);
    text-decoration: none;
    transition: background var(--hover-transition-time), color var(--hover-transition-time);
    margin-bottom: 1rem;
    font-variation-settings: "wght" 450;
}

.card-action:focus,
.card-action:hover {
    background: var(--accent-color);
    color: white;
    transition: background var(--hover-transition-time), color var(--hover-transition-time);
}

.block-button_block {
    display: flex;
}

.block-button_block .card-action {
    margin-inline: auto;
    margin-bottom: 0;
}

.card > .events-container ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card > .events-container h3 {
    font-variation-settings: "wght" 450;
}

.card.badges > ul {
    padding: 1rem;
    display: flex;
    flex-direction: initial;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.card.badges > a {
    display: block;
    width: fit-content;
    height: fit-content;
}

.card.badges > ul {
    list-style: none;
}

.card.badges > ul > li {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min-content;
    text-align: center;
    margin: auto;
}

.card.badges img {
    border-radius: 0;
}

@media screen and (min-width: 63rem) {
    .card.horizontal {
        flex-direction: row;
        padding: 1rem;
    }
    .card.horizontal > h2 {
        white-space: nowrap;
        justify-self: center;
    }
    .card.horizontal > p {
        align-self: center;
        height: min-content;
    }
}

.event-title {
    display: flex;
}

.event-title a {
    margin-left: auto;
    margin-right: 0.25rem;
    white-space: nowrap;
}

.events-container.services li {
    min-height: 3rem;
}

/*.event-title > a {*/
/*    text-decoration: none;*/
/*    color: black;*/
/*    font-size: larger;*/
/*    font-weight: bold;*/
/*}*/

/*.events-container > h2 {*/
/*    margin-bottom: 10px;*/
/*}*/

/*.events-container li:hover {*/
/*    box-shadow: 0 0 3px inset black;*/
/*}*/

/*.events-container li:hover a {*/
/*    text-decoration: underline;*/
/*}*/

/*Footer*/
footer {
    /*max-width: var(--page-width);*/
    width: 100%;
    /*padding: 0 calc(calc(100% - 11in) / 2);*/
    /*min-height: 20rem;*/
    height: auto;
    padding: 1.5rem;
    margin-top: auto;
    margin-bottom: 0;
    background: var(--secondary-accent-color);
    color: white;
    display: grid;
    /*grid-template-columns: 1.5fr repeat(4, 1fr);*/
    gap: 1.5rem;
}

footer a:link {
    color: var(--dark-link-color);
}

footer a:visited {
    color: var(--dark-visited-link-color);
}

footer > div {
    flex-grow: 1;
}

footer .nav {
    list-style: none;
}

footer .nav > li ul {
    display: none;
}

footer .menu-toggle {
    display: none;
}

footer .block-image img {
    max-width: 100%;
    height: auto;
    max-height: 20rem;
}

footer > .footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-inline: auto;
    text-align: center;
}

.footer-content > * {
    margin-inline: auto;
}

footer > .footer-content > * {
}

.minister-feature {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.minister-feature > span > :not(p:first-of-type):not(img):not(h3):not(h4) {
    display: none;
}

.minister-feature h3 {
    margin-bottom: 0.5rem;
}

.minister-feature h4 {
    margin-bottom: 0.25rem;
}

/*End Footer*/

.sidebar {
    padding: 0.75rem;
    padding-top: 1rem;
    font-family: "League Spartan Variable";
    display: flex;
    flex-direction: column;
}

.sidebar img {
    width: 100%;
    height: auto;
}

.sidebar ul {
    list-style: none;
    padding-left: 1rem;
}

.sidebar ul ul {
    padding-left: 0.75rem;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar ul li ul > :first-child {
    margin-top: 0.5rem;
}

.sidebar .visual-h4 {
    margin-inline: auto;
    margin-top: 0;
}


/*Copied from home.css - reconsider how to do this*/


/*article {*/
/*    display: grid;*/
/*    gap: var(--standard-gap)*/
/*}*/

.home-header-container {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: var(--standard-gap);
    width: 100%;
    height: fit-content;
}

.card.upcoming-service {
    display: flex;
    flex-direction: column;
    grid-template-columns: 3fr 1fr;
    grid-template-rows: auto auto 1fr auto;
    container-type: inline-size;
    padding: 0 1rem 1rem 1rem;
}

.card.upcoming-service > h2,
/*.card.upcoming-service > div,*/
.card.upcoming-service > .upcoming-service-buttons {
    grid-column: span 2;
}

.card.upcoming-service > img {
    grid-row: span 2;
}

.card.upcoming-service > h2 {
    /*margin-bottom: 0;*/
    height: auto;
}

.card.upcoming-service > h3 {
    font-variation-settings: "wght" 350;
    height: auto;
}

:where(.card.upcoming-service:has(img) .service-description) {
    line-height: 1.1;
}

.card.upcoming-service:has(img) .upcoming-service-buttons .card-action {
    line-height: 1;
    margin-bottom: 0.25rem;
}

.card.upcoming-service:has(img) .upcoming-service-buttons .card-action svg {
    margin-block: 0.25rem;
}

.card.upcoming-service:has(img) .upcoming-service-buttons {
    height: auto;
}

.card.upcoming-service:has(img) > h3 {
    margin-bottom: 0;
}

.upcoming-service-buttons {
    margin-bottom: 0;
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    /*grid-auto-columns: 1fr;*/
    height: 6rem;
    gap: 1rem;
    max-width: 30rem;
    width: 100%;
    align-self: center;
}

.upcoming-service-buttons > a {
    height: 100%;
    max-width: 15rem;
}

.upcoming-service-buttons > a:nth-child(1) {
    grid-column: 1;
}

.upcoming-service-buttons > a:nth-child(2) {
    grid-column: 2;
}

.upcoming-service-buttons > a:nth-child(3) {
    grid-column: 3;
}

.upcoming-service-buttons > a:only-child {
    grid-column: 2;
}

.upcoming-service-buttons .card-action {
    padding: 0 0.5rem 0 0.5rem;
    text-align: center;
    margin-top: auto;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    border-radius: calc(var(--standard-radius) - 0.5rem);
}

.upcoming-service .card-action > svg {
    margin: 0.5rem auto 0.5rem auto;
}

@container (width < 25.5rem) {
    .upcoming-service-buttons .card-action {
        font-size: 1rem;
        line-height: 1rem;
        margin-bottom: 0.25rem;
    }

    .upcoming-service-buttons .card-action svg {
        margin-block: 0.25rem;
    }

    .upcoming-service-buttons {
        height: auto;
    }

    /*Work around mobile safari being garbage. If this ever breaks, check https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html */
    /*for another property labeled "Safari on iOS only", and stick that in in place of "webkit-touch-callout".*/
    @supports (-webkit-touch-callout: none) {
        .upcoming-service-buttons {
            height: 5rem;
        }
    }

    .link-container {
        margin-bottom: 0.25rem;
    }

    .card.upcoming-service > h3 {
        margin-bottom: 0;
    }
}

@container (width < 19rem) {
    .upcoming-service-buttons a {
        font-size: 1rem;
        border-radius: calc(var(--standard-radius) / 1.5);
        font-variation-settings: "wght" 375;
    }

    .upcoming-service-buttons {
        gap: 3px;
        line-height: normal;
    }
}

/*.upcoming-service-buttons a {*/
/*    border: 3px solid var(--accent-color);*/
/*    border-radius: var(--standard-radius);*/
/*    font-size: 1rem;*/
/*    text-align: center;*/
/*}*/

/*End copied from home.css*/


/*Copied from generic-index.css*/
.block-expandable_list > ul,
.index-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--standard-gap);
    container-type: inline-size;
    /*height: 100%;*/
}

.block-expandable_list > ul > li,
.block-page_feature,
.index-list > li {
    display: grid;
    grid-template-columns: auto 1fr;
    /*grid-template-rows: auto 1fr;*/
    gap: 1rem;
    padding: 1rem;
    background: var(--card-background-color);
    border-radius: var(--standard-radius);
    margin-bottom: 0;
}

@container (max-width: 40rem) {
    .block-page_feature,
    .block-expandable_list > ul > li,
    .index-list > li {
        display: flex;
        flex-direction: column;
    }
}

.block-expandable_list > ul > li > img,
.block-page_feature > img,
.index-list > li > img {
    grid-row: span 3;
    border-radius: 100%;
    margin: auto;
}

.block-expandable_list > ul > li > a,
.block-page_feature > a,
.index-list > li > a {
    margin-left: auto;
    margin-right: 1rem;
    margin-bottom: 1rem;
    grid-column: 2;
}

/*End copied from generic-index.css*/

/*Blocks!*/

.block-show_featured_image {
    display: flex;
    flex-direction: column;
}

.block-rich_text {
    display: block;
}

.block-rich_text > p {
    margin-bottom: 1rem;
}

.page-preview.richtext > *:not(p:first-of-type){
    display: none;
}

.page-preview.stream > .block-read_more ~ * {
    display: none;
}

.block-read_more {
    display: none;
}

.page-preview.stream img {
    display: none;
}

.planningcenter-html ul,
.planningcenter-html ol,
.block-rich_text ul,
.block-rich_text ol {
    margin-left: 1rem;
}

/*Expandable Text Block*/
.block-page_feature .block-read_more ~ *,
.expandable .block-read_more ~ * {
    display: none;
}

/*.block-read_more.expand ~ * {*/
/*    display: initial;*/
/*}*/
.expandable {
    display: grid;
}

.expandable .show-more,
.expandable .show-less {
    margin-right: 1.5rem;
    margin-left: auto;
}

.expandable.expand > * {
    display: initial;
}

.expandable .show-more {
    display: initial;
}

.expandable.expand .show-less {
    display: initial;
}

.expandable.expand .show-more {
    display: none;
}

.expandable:not(.expand) .show-less {
    display: none;
}

.expandable:not(:has(.block-read_more)) .show-more {
    display: none;
}

/*.expandable > button {*/
/*    display: initial;*/
/*}*/
/*End Expandable Text Block*/

/*Order of Service on desktop/mobile*/
.program {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    /*text-align: center;*/
    max-width: 40rem;
}

.program h4 {
    text-transform: uppercase;
    font-variation-settings: "wght" 550;
}

.block-page_feature.order-of-service {
    width: 100%;
}

.block-page_feature.order-of-service > img {
    border-radius: 0;
}

.block-page_feature.order-of-service > .program > :not(a.show) {
    display: none;
}

.block-page_feature.order-of-service.expand > .program > :not(a.show) {
    display: initial;
}

.block-page_feature.order-of-service.expand > .program > a.show {
    display: none;
}

.block-page_feature.order-of-service > img {
    margin-top: 0.6rem;
    margin-bottom: auto;
}
/*End order of service*/

/*Hack to kinda fix styling on list page body, this will be unnecessary when all pages are block pages someday*/
article.list-page > p {
    margin-bottom: 0;
}

/*Search styling*/
article.search-page h1 {
    margin-bottom: 0;
}

article.search-page .available-filters {
    margin-inline: auto;
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

article.search-page .available-filters .visual-h4 {
    margin-block: 0;
}

article.search-page .available-filters .filter-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-buttons button {
    border-radius: 1rem;
    padding-inline: 0.7rem;
    border: 2px solid var(--accent-color);
    background: var(--background-color);
    color: var(--text-color);
    transition: var(--hover-transition-time) background, var(--hover-transition-time) color;
    height: 1.7rem;
}

.filter-buttons button:hover {
    background: var(--accent-color);
    color: var(--inverse-text-color)
}

article.search-page > form {
    display: flex;
    text-align: center;
    justify-content: center;
    gap: 1rem;
}

article.search-page > form > label {
    padding: 1rem 1.5rem 0.85rem;
    border: var(--standard-border-thickness) solid var(--accent-color);
    border-radius: var(--standard-radius);
    display: inline-block;
    max-width: 100%;
}

article.search-page > form > label > input {
    border: none;
    border-bottom: var(--standard-border-thickness) solid var(--accent-color);
    font-size: 1.2rem;
    max-width: 100%;
}

article.search-page .card-action {
    margin: 0;
}

article.search-page .page-buttons {
    text-align: center;
}


/*End search styling*/

.block-anchor {
    margin-top: calc(var(--standard-gap) * -1);
    display: inline;
}

.hidden {
    display: none;
}

@media print {
    header,
    nav,
    footer,
    .sidebar {
        display: none;
    }

    .block-table_of_contents a:not(#specificity-hack) {
        text-decoration: none;
        color: black;
    }

    .richtext-image.full-width:not(#specificity-hack) {
        max-height: 10in;
        width: auto;
    }

    #main {
        grid-template-columns: 1fr;
    }
}

.emergency-alert {
    border: 10px solid red;
    padding: 0.25rem;
    padding-bottom: 0;
}

/* Tree Index Block */

.expander {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.2s;
    overflow: hidden;
}

.expander > * {
    min-height: 0;
    height: auto;
}

ul.searchable_tree {
    display: flex;
    flex-direction: column;
    gap: var(--standard-gap);
}

.page-leaf > .expander > ul > li,
ul.searchable_tree > li {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 8rem;
}

.page-leaf:not(.expand) > .expander {
    grid-template-rows: 0fr;
}

.page-leaf.expand > .expander {
    grid-template-rows: 1fr;
}

.page-leaf > .expander {
    grid-column: span 2;
}

.page-leaf > button > svg {
    width: 2rem;
    height: 2rem;
}

.page-leaf:not(.expand) > button > svg {
    transform: none;
    transition: transform 0.2s;
}

.page-leaf.expand > button > svg {
    transform: rotate(180deg);
    transition: transform 0.2s;
}

.page-leaf.no-children {
    grid-column: span 2;
}

.page-leaf {
    border-left: 4px solid var(--accent-color);
    background: var(--card-background-color);
    border-radius: 0 var(--standard-radius) var(--standard-radius) 0;
}

.page-leaf .visual-h2 {
    padding: 0;
    display: inline-block;
}

.page-leaf .page-leaf {
    margin-left: var(--standard-gap);
}

.page-leaf > button {
    margin: 1rem;
}

.summary-in-tree {
    grid-column: 1;
}

.page-leaf > span {
    padding: 1rem;
}

.page-leaf.hidden:not(#specificity-hack){
    display: none;
}

.tree-search {
    display: block;
    font-size: 1.5rem;
    background: #ededed;
    max-width: 100%;
    border-top: none;
    border-inline: none;
    border-top-left-radius: 0.2rem;
    border-top-right-radius: 0.2rem;
    padding: 0.5rem;
    border-bottom: var(--standard-border-thickness) solid var(--accent-color);
    margin-inline: auto;
    margin-bottom: var(--standard-gap);
}

.block-rich_text blockquote {
    background: var(--card-background-color);
    padding-block: var(--standard-gap);
    padding-left: 2.6rem;
    padding-right: var(--standard-gap);
    position: relative;
    border-radius: 0.5rem;
    margin-bottom: var(--standard-gap);
}

.block-rich_text blockquote::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1.8rem;
    height: calc(100% - calc(var(--standard-gap) * 2));
    /*height: 100%;*/
    margin-block: var(--standard-gap);
    border: 3px solid var(--accent-color);
    border-radius: 1rem;
}

/*Advanced Forms Styling*/

.advanced-form {
    padding: var(--standard-gap);
}

.advanced-form p {
    margin-bottom: 1rem;
}

.advanced-form label {
    display: block;
    font-variation-settings: "wght" 500;
}

/*form p > label:has(+input[type=checkbox]) {*/
/*    display: inline;*/
/*}*/

.advanced-form .helptext {
    display: block;
    font-style: italic;
    margin-top: 0.25rem;
}

.advanced-form p + div {
    margin-top: -1rem;
}

.advanced-form input {
    display: block;
}

.advanced-form input[type=text],
.advanced-form input[type=email],
.advanced-form input[type=url],
.advanced-form input[type=tel],
.advanced-form input[type=number] {
    background: #ededed;
    border-top: none;
    border-inline: none;
    border-top-left-radius: 0.2rem;
    border-top-right-radius: 0.2rem;
    padding: 0.5rem;
    border-bottom: var(--standard-border-thickness) solid var(--accent-color)
}

.advanced-form input[type=checkbox],
.advanced-form input[type=radio] {
    width: 1.5em;
    height: 1.5em;
    accent-color: var(--accent-color);
}

.advanced-form option:focus {
    color: #000;
}

.advanced-form .card-action {
    font-size: 1.2rem;
    font-family: "League Spartan Variable";
    display: block;
    margin-inline: auto;
    margin-block: var(--standard-gap)
}

/*.advanced-form .repeating-fields:not(:last-of-type) button {*/
/*    display: none;*/
/*}*/

.advanced-form .repeating-fields:only-child button.remove {
    display: none;
}

.advanced-form .repeating-fields {
    border: var(--standard-border-thickness) solid var(--accent-color);
    width: fit-content;
    padding: var(--standard-gap);
    border-radius: var(--standard-radius);
    margin-bottom: var(--standard-gap);
    margin-left: calc(var(--standard-gap) * -1);
}

.advanced-form .repeating-fields p:first-of-type {
    margin-top: 0.5rem;
}

.advanced-form .field-error:not(#specificity-hack) {
    background: var(--error-color);
}

.advanced-form .multiple-choice.field-error {
    border: 0.5rem solid var(--error-color);
    border-radius: 0.5rem;
}

.advanced-form .error {
    margin-inline: auto;
    margin-block: var(--standard-gap);
    border: var(--standard-border-thickness) solid red;
    background-color: var(--error-color);
    border-radius: var(--standard-radius);
    padding: 0.75rem;
    display: block;
    max-width: fit-content;
}

.advanced-form .card-action.warning {
    --accent-color: red;
}

.advanced-form .multiple-choice input {
    display: inline;
}

.advanced-form .multiple-choice label {
    font-variation-settings: unset;
}

textarea {
    display: block;
    width: 20rem;
    height: 10rem;
    font-family: "League Spartan Variable";
    font-size: 1.2rem;
    border: var(--standard-border-thickness) solid var(--accent-color);
    border-radius: 1rem;
    padding: 0.75rem;
}

.advanced-form select {
    display: block;
}

.advanced-form .block-radio_buttons_field,
.advanced-form .block-checkboxes_field,
.advanced-form .block-dropdown_field {
    margin-bottom: var(--standard-gap);
}

.required-asterisk {
    color: red;
    font-size: 2rem;
}

.block-radio_buttons_field:not(:has(.field-error)) .form-required-error,
.block-checkboxes_field:not(:has(.field-error)) .form-required-error,
.block-dropdown_field:not(:has(.field-error)) .form-required-error,
.advanced-form-field:not(:has(.field-error)) .form-required-error {
    display: none;
}

.form-required-error {
    margin-top: 0.75rem;
}
/*End Advanced Forms Styling*/

.block-table_of_contents ul {
    margin-left: 1rem;
}

.block-table_of_contents ul ul {
    margin-left: 0.75rem;
}

.order-of-service-dual-page-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--standard-gap);
    width: 100%;
}

.order-of-service-dual-page-feature .oos-content,
.order-of-service-dual-page-feature .tab {
    gap: 1rem;
    padding: 1rem;
    background: var(--card-background-color);
    border-radius: var(--standard-radius);
    margin-bottom: 0;
    border: none;
    min-height: 5rem;
    font-family: "League Spartan Variable";
    font-variation-settings: "wght" 375;
    font-size: 1.2rem;
    line-height: 1.5rem;
    display: grid;
}

.order-of-service-dual-page-feature .oos-content {
    grid-column: span 2;
}

.order-of-service-dual-page-feature .tab.selected {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: var(--standard-gap) solid var(--card-background-color);
    margin-bottom: calc(var(--standard-gap) - calc(var(--standard-gap) * 2));
}

.order-of-service-dual-page-feature .tab.selected .card-action.show {
    display: none;
}

.order-of-service-dual-page-feature .tab:not(.selected) .card-action.hide {
    display: none;
}

.order-of-service-dual-page-feature .oos-content:not(.selected) {
    display: none;
}

.order-of-service-dual-page-feature .oos-content.selected {
    display: initial;
}

#oos-program.selected {
    border-top-left-radius: 0;
}

#oos-info.selected {
    border-top-right-radius: 0;
}

.order-of-service-dual-page-feature .card-action {
    display: inline-block;
    margin-top: 0;
    margin-bottom: auto;
}

button.card-action {
    font-family: "League Spartan Variable";
    font-variation-settings: "wght" 450;
    font-size: 1.2rem;
    line-height: 1rem;
}

@media screen and (max-width: 30rem) {
    .order-of-service-dual-page-feature {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
    }

    .order-of-service-dual-page-feature:has(#oos-program.selected) .tab:not(.selected) {
        grid-row: 3;
    }

    .order-of-service-dual-page-feature:has(#oos-info.selected) .tab.selected {
        grid-row: 2;
    }

    .order-of-service-dual-page-feature .tab:not(#specificity-hack) {
        width: 100%;
    }

    .order-of-service-dual-page-feature .tab:not(:first-of-type) {
        margin-top: var(--standard-gap)
    }
}

.expander.expand {
    grid-template-rows: 1fr;
}

.events-container .expander {
    grid-column: span 2;
}

.events-container .card-action {
    grid-row: span 2;
    margin-top: 0;
    margin-bottom: auto;
    padding-inline: 0.5rem;
    padding-block: 0.25rem;
}

.events-container .event-title {
    grid-row: 1;
}

.events-container .event-info {
    grid-row: 2;
}

.events-container li:has(.expand) .card-action svg {
    transform: rotate(180deg);
    transition: transform 0.2s;
}

.events-container li:not(:has(.expand)) .card-action svg {
    transform: rotate(0);
    transition: transform 0.2s;
}

.events-container li:hover .card-action,
.events-container li:has(.expand) .card-action {
    background: var(--accent-color);
    color: white;
    transition: background var(--hover-transition-time), color var(--hover-transition-time);
}

.pagination-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-links a[disabled] {
    pointer-events: none;
    color: #505050;
}

/* Spinner from https://loading.io/css/ */
.lds-dual-ring {
    /* change color here */
    color: var(--accent-color)
}
.lds-dual-ring,
.lds-dual-ring:after {
    box-sizing: border-box;
}
.lds-dual-ring {
    display: inline-block;
    width: 66px;
    height: 66px;
    overflow: clip;
    transition: height 200ms;
    margin-inline: auto;
}
.lds-dual-ring:after {
    content: " ";
    display: block;
    width: 50px;
    height: 50px;
    margin: 8px;
    border-radius: 50%;
    border: 6.4px solid currentColor;
    border-color: currentColor transparent currentColor transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.lds-dual-ring:not(.htmx-request) {
    height: 0;
}
