/**
 * Theme Name: CAUL Astra Child Theme
 * Author: Agileware
 * Author URI: https://agileware.com.au/
 * Description: Child theme for Astra, A very lightweight and beautiful theme made to work with Page Builders.
 * Version: 1.0.3
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: astra-child
 * Template:   astra
 */

:root {
    --brand--primary: var(--ast-global-color-0);
    --brand--secondary: var(--ast-global-color-1);
    --brand--white: #FFF;
    --brand--subtle-bg: var(--ast-global-color-5);
    --brand--secondary--rgba: rgba(0, 84, 144, 0.5);
    --brand--secondary--rgba--gradient: linear-gradient(0deg, rgba(0, 84, 144, 0.9) 0%, rgba(0, 84, 144, 0) 70%);
    --brand--alt--orange: #FF8632;
    --brand--alt--yellow: #EEC067;
    --brand--alt--green: #AAD75E;
    --brand--alt--teal: #74ECAC;
    --brand--alt--sky-blue: #0078FF;
    --brand--alt--baby-blue: #51CEFF;
    --brand--alt--purple: #E072E0;
    --brand--alt--coral: #F87470;

    --font-size--body: 18px;
    --font-size--small: 16px;
    --font-size--tags: 14px;
    --font-color--body: var(--ast-global-color-3);
    --font-color--lighten: brightness(2.5);
    --font-size--h1-scale: clamp(1.8rem, 8cqi, 80px);
    --font-size--h2-scale: clamp(1.6rem, 8cqi, 46px);
    --font-size--h1-weight: 400;
    --font-size--grid-entry-title: 24px;
    --font-size--h1-small: 32px;
    --font-size--sidebar-h2: 24px;
    --font-size--sidebar-h3: 22px;
    --font-size--sidebar-h4: 20px;

    --padding--content: 0 20px;
    --padding--button: 16px 24px;
    --padding--mega-menu: 24px;
    --padding--menu-item: 0 4px 8px;
    --padding--page-header: 0 20px 24px;
    --padding--tags: 4px 8px;
    --padding--form-elements: 0 40px 40px 0;
    --padding--form-input: 24px;
    --padding--small: 8px;
    --padding--medium: 16px;

    --margin--default: 24px;
    --margin--small: 8px;
    --margin--medium: 16px;
    --margin--link-text-list: 0 0 8px;
    --margin--main-content: 80px;
    --margin--block-spacing: 40px;

    --gap--default: 80px;
    --gap--grid-default: 24px;
    --gap--grid-small: 8px;
    --gap--grid-large: 32px;

    --border-width: 2px;
}

.ast-plain-container.ast-no-sidebar #primary header.entry-header.ast-no-thumbnail {
    margin-bottom: 0px;
}

@media (min-width: 1200px) {
    .entry-content {
        margin-bottom: 64px;
    }
}

@media (max-width: 1199px) {
    .ast-plain-container.ast-no-sidebar #primary h1.entry-title {
        margin-top: 24px;
    }

    .entry-content {
        margin-bottom: 32px;
    }
}

/* Override Customise typography settings for smooth scaling. */
h1, .h1, .entry-content h1, header.entry-header .entry-title {
    font-size: var(--font-size--h1-scale);
    font-weight: var(--font-size--h1-weight);
}

.h3 {
    color: var(--font-color--body);
    font-size: 1.3333333333333rem;

    @media (max-width: 921px) {
        /* Match Astra settings */
        font-size: 26px;
        font-size: 1.4444444444444rem;
    }
}

.site-branding {
    span.site-logo-img {
        display: block;

        svg {
            width: auto;
            height: clamp(30px, 5vw, 40px);
        }
    }

    .ast-site-title-wrap {
        position: relative;
    }
}

.visually-hidden:not(:focus):not(:active), .hidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: auto;
    margin: 0;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
}

/* Visually hidden site title */
.site-title {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Common Design Elements */
body {
    button, input[type=submit], a.wp-block-button__link, .wp-block-uagb-buttons a.wp-block-button__link, a[role=button] {
        transition: all .2s linear !important;
    }

    .entry-meta, .entry-meta * {
        color: var(--font-color--body) !important;
    }

    .entry-meta > *:not(i) {
        color: var(--font-color--body) !important;
        font-size: var(--font-size--small);
        font-weight: 400;
        filter: var(--font-color--lighten);
    }

    .h2-scale {
        font-size: var(--font-size--h2-scale);
    }
}


.design-pattern-right {
    position: relative;

    &:after {
        content: '';
        background: url(/wp-content/uploads/2025/05/design-pattern-alt.svg);
        background-position: right;
        background-repeat: no-repeat;
        background-size: contain;
        position: absolute;
        inset: -1px;
        z-index: 1;

        @media (max-width: 768px) {
            right: -30px;
        }

        @media (max-width: 544px) {
            right: -50px;
        }
    }
}

.design-pattern-left {
    position: relative;

    &:before {
        content: '';
        background: url(/wp-content/uploads/2025/05/design-pattern-alt.svg);
        background-position: left;
        background-repeat: no-repeat;
        background-size: contain;
        position: absolute;
        inset: 0;
        z-index: 1;

        @media (max-width: 768px) {
            left: -30px;
        }

        @media (max-width: 544px) {
            left: -50px;
        }
    }
}

.design-pattern-both {
    position: relative;

    &:before {
        content: '';
        background: url(/wp-content/uploads/2025/05/design-pattern-alt.svg);
        background-position: right;
        background-repeat: no-repeat;
        background-size: contain;
        position: absolute;
        inset: -1px;
        z-index: 1;
        -webkit-transform: scaleX(-1);
        -moz-transform: scaleX(-1);
        -o-transform: scaleX(-1);
        transform: scaleX(-1);

        filter: FlipH;
        -ms-filter: "FlipH";

        @media (max-width: 768px) {
            left: -30px;
        }

        @media (max-width: 544px) {
            left: -50px;
        }
    }

    &:after {
        content: '';
        background: url(/wp-content/uploads/2025/05/design-pattern-alt.svg);
        background-position: right;
        background-repeat: no-repeat;
        background-size: contain;
        position: absolute;
        inset: -1px;
        z-index: 1;

        @media (max-width: 768px) {
            right: -30px;
        }

        @media (max-width: 544px) {
            right: -50px;
        }
    }
}

.text-bg-light {
    background: var(--brand--subtle-bg);
    display: flex;
    align-items: center;
    line-height: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 500%;
}

/**
 * e.g.
 * 1 2
 * 3 4
 **/
.two-col-grid-horizontal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap--default);
    
    & > * {
        width: 100%;
        margin: 0;
    }

    @media (max-width: 544px) {
        grid-template-columns: repeat(1, 1fr);
    }
}

.sidebar {
    h2 {
        font-size: var(--font-size--sidebar-h2);
    }
    h3 {
        font-size: var(--font-size--sidebar-h3);
    }
    h4 {
        font-size: var(--font-size--sidebar-h4);
    }
}

h2.sidebar {
    font-size: var(--font-size--sidebar-h2);
}
h3.sidebar {
    font-size: var(--font-size--sidebar-h3);
}
h4.sidebar {
    font-size: var(--font-size--sidebar-h4);
}

.date-meta, .post-date {
    font-size: var(--font-size--small);
    font-weight: 400;
    filter: var(--font-color--lighten);
}

/* Header */
.ast-above-header-bar {
    .site-branding {
        padding: 8px 0;
    }

    .site-header-above-section-right {
        align-items: flex-start;
    }

    .ast-header-search {
        height: 40px;
    }
}

/* Footer */
footer {
    .site-logo {
        max-width: 300px;
    }
}

.footer-bottom-bar {
    ul {
        padding: 0;
        list-style: none;
        display: flex;
        gap: 1em;
    }
}

/* Menu and Mega Menu */
.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item {
    line-height: 3em;
}

.menu-item {
    transition: all .2s linear;
}

nav.site-navigation {
    ul.main-header-menu {
        gap: 16px;
        height: 100%;
    }

    .accent-button {
        background: var(--brand--white);

        .menu-text {
            color: var(--brand--secondary);
        }

        &:hover, &:focus {
            background: var(--brand--primary);

            .menu-text {
                color: var(--brand--white);
            }
        }
    }
}

.astra-megamenu {
    /* Do this here instead of tediously setting on each mega menu item in the admin UI */
    padding: var(--padding--mega-menu) !important;

    & > li > ul.sub-menu .menu-item-heading:not(:first-child) {
        margin-top: var(--margin--default);
    }

    li.menu-item {
        .menu-link {
            padding: var(--padding--menu-item);
            font-size: var(--font-size--small);
        }
    }

    .ast-mm-template-content {
        padding: var(--padding--menu-item);

        /* Query Loop content */
        ul.wp-block-post-template {
            li {
                padding: var(--padding--menu-item);
                padding-left: 0;
                padding-right: 0;
                font-size: var(--font-size--small);

                a {
                    color: var(--brand--secondary);

                    &:hover, &:focus, &:active {
                        color: var(--brand--primary);
                    }
                }
            }
        }
    }

    .menu-item-heading .ast-disable-link > span.menu-text,
    .menu-item-heading > a.menu-link {
        font-size: var(--font-size--body);
        font-weight: 600;
        text-transform: uppercase;
    }

    .menu-item-heading > a.menu-link {
        & > span.menu-text {
            color: var(--brand--secondary);
        }

        &:hover > span.menu-text, &:focus > span.menu-text {
            color: var(--brand--primary);
        }
    }

    .astra-nested-sub-menu {
        li {
            a:before {
                font-family: 'Dashicons';
                content: "\f345";
                display: inline-block;
                width: 1rem;
                height: 1rem;
                line-height: 1;
                font-weight: normal;
                font-style: normal;
                vertical-align: middle;
                text-decoration: inherit;
                text-transform: none;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                margin-right: 4px;
                color: var(--brand--primary);
            }
        }
        .display-as-submenu-item {
            a.menu-link {
                padding: var(--padding--menu-item) !important;
            }

            a:before {
                content: none;
            }
        }
    }
}

/* Mobile menu */
#ast-mobile-popup {
    .menu-link:not(.ast-disable-link) {
        color: var(--brand--primary);

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

.wp-block-agileware-child-pages-menu__nav-container,
.site-main .wp-block-agileware-menu-navigation__nav-container {
    ul {
        list-style: none;

        li {
            &.current-menu-item > a {
                color: var(--brand--secondary);
            }

            &:before {
                font-family: 'Dashicons';
                content: "\f345";
                display: inline-block;
                width: 1rem;
                height: 1rem;
                line-height: 1;
                font-weight: normal;
                font-style: normal;
                vertical-align: middle;
                text-decoration: inherit;
                text-transform: none;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                margin-right: 4px;
                color: var(--brand--primary);
            }
        }
    }

    & > ul {
        padding: 0;
    }
}

/* Hero and Featured */
.hero-design-pattern {
    position: relative;

    &:before {
        content: '';
        background: url(/wp-content/uploads/2025/05/design-pattern.svg);
        background-position: right;
        background-repeat: no-repeat;
        background-size: contain;
        position: absolute;
        inset: 0;
    }
}

.hero-cta {
    text-shadow: 1px 1px var(--brand--secondary);

    .uagb-cta__title {
        font-size: clamp(1.8rem, 8cqi, 80px);
        text-shadow: 2px 2px var(--brand--secondary);
    }

    &.wp-block-button a.wp-block-button__link {
        background: var(--brand--white);
        border-color: var(--brand--white);
        color: var(--brand--secondary);
        text-shadow: none;

        &:hover, &:focus {
            background: var(--brand--primary);
            border-color: var(--brand--primary);
            color: var(--brand--white);
        }
    }
}

.page-featured-image-pattern > .wp-block-cover {
    min-height: clamp(300px, 40cqi, 500px);
}

.page-featured-image-pattern.alt > .wp-block-cover {
    min-height: clamp(200px, 20cqi, 400px);
}

@media (min-width: 922px) {
    .ast-no-sidebar .site-content .ast-article-image-container--wide {
        margin-top: -60px;
    }
}

@media (max-width: 922px) {
    .ast-no-sidebar .site-content .ast-article-image-container--wide {
        margin-left: -20px;
        margin-right: -20px;
    }
}

.entry-header .post-thumb-img-content img {
    object-fit: cover;
}

.single:not(.single-post) .entry-header,
.page .entry-header {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
    position: relative;

    &.header-with-featured-image {
        margin-top: -60px;

        .entry-title-wrapper {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 1;
    
            .entry-title {
                color: var(--brand--white);
                text-shadow: 1px 1px var(--brand--secondary);
            }
        }
    
        .post-thumb-img-content {
            max-height: 400px;

            &:before {
                content: '';
                width: 100%;
                height: 100%;
                display: block;
                position: absolute;
                background: var(--brand--secondary--rgba--gradient);
                background: var(--brand--secondary--rgba);
            }
    
            img {
                max-height: 400px;
                object-fit: cover;
            }
        }
    }

    .entry-title {
        max-width: calc(var(--wp--style--global--content-size) + 40px);
        margin: auto;
        padding: var(--padding--page-header);
    }
}


/* Content Listings */
.content-listing, .wp-block-query, .archive {
    ul, .archive-layout {
        padding: 0;
    }

    .archive-layout {
        border-radius: 0!important;
        box-shadow: none;
    }

    .wp-block-post-title, .entry-title {
        font-size: var(--font-size--grid-entry-title);
    }

    .wp-block-post-title:not(:first-child) {
        margin: 0;
    }

    .entry-title {
        margin-block: 0.5em;

        a {
            color: var(--brand--primary);

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

    .featured-image-wrapper {
        width: 100%;
        aspect-ratio: 16 / 9;
        margin-bottom: 0.5rem;
    }

    figure, .featured-image {
        margin-bottom: 1.5rem;
    }

    .wp-block-post-excerpt, .entry-summary, .entry-excerpt {
        p:last-child {
            margin-bottom: 0;
        }
    }

    .tags-and-categories {
        margin-bottom: 0.5rem;
    }
}

.wp-block-query ul, .query-loop-block-wrapper ul {
    margin: 0;
}

.content-listing .sidebar, .content-listing.sidebar {
    ul li .wp-block-columns {

        @media (max-width: 1260px) {
            flex-direction: column;
        }

        @media (max-width: 782px) {
            flex-direction: row;
        }

        .wp-block-column {
            @media (max-width: 1260px) {
                flex-basis: 100%;
            }

            @media (max-width: 782px) {
                flex-basis: 25% !important;
            }
        }
    }
}

/* Pagination */
nav.pagination, nav.wp-block-query-pagination, .facetwp-pager {
    display: flex;
    gap: var(--gap--grid-small);
    justify-content: center;
    margin-top: var(--margin--default);

    .nav-links {
        display: flex;
        gap: var(--gap--grid-small);
        justify-content: center;
    }

    .pagination-numbers, .wp-block-query-pagination-numbers {
        display: flex;
        gap: var(--gap--grid-small);
    }

    .page-numbers, .facetwp-page {
        padding: var(--padding--tags);
        background: var(--brand--subtle-bg);
        display: block;
        line-height: normal;
        align-content: center;
        text-align: center;
        min-width: 2.33333em;
        min-height: 2.33333em;
    }

    .facetwp-page {
        margin-right: 0;
    }

    .current, .active {
        background: var(--brand--primary);
        color: white;
    }
}

/* Tags and Categories */
.tags-and-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    & > div, & > span {
        margin: 0!important;
        display: flex;
    }
}

.wp-block-post-terms, .tags-and-categories {
    position:relative;

    & > a, span {
        padding: var(--padding--tags);
        background: var(--brand--subtle-bg);
        text-transform: uppercase;
        font-size: var(--font-size--tags);

        &:not(:first-child) {
            margin-left: 8px;
        }
    }

    span a {
        padding: 0;
    }

    /* Visually hidden */
    .wp-block-post-terms__separator {
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        height: 1px;
        overflow: hidden;
        position: absolute;
        white-space: nowrap;
        width: 1px;
    }
}

.tags-and-categories .post-type, .wp-block-agileware-post-type {
    transition: all .2s linear;
    background: var(--brand--primary);
    padding: var(--padding--tags);
    text-transform: uppercase;
    font-size: var(--font-size--tags);

    & > a {
        color: var(--brand--white);
    }

    &:hover, &:focus {
        background: var(--brand--secondary);

        & > a {
            color: var(--brand--white);
        }
    }
}


/*
 * Collapsible Content - Search Filters
 */
button.collapsible-toggle {
    display:none;
}
.collapsible-content {
    margin-top: 0;
}

@media (max-width: 780px){
    button.collapsible-toggle {
        display: flex;
        justify-content: space-between;
        width: 100%;
        color: var(--brand--secondary) !important;
        background: var(--brand--white);
        border-color: var(--brand--secondary);
        transition: all 0.2s ease-out;

        &:hover, &:focus {
            color: var(--brand--white) !important;
            background: var(--brand--primary);
            border-color: var(--brand--primary);
        }
    }

    .collapsible-section {
        position: relative;
    }

    .collapsible-content {
        display: block;
        background: none;
        transition: max-height 0.2s ease-out, opacity 0.2s ease-out;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        margin-top: 1rem;

        &.open {
            display: block;
            opacity: 1;
            max-height: initial;
            padding: 1rem;
        }
    }
}

/* Groups and Committees */
.group-committee-box-wrapper {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
}

.group-committee-box {
    background: var(--brand--subtle-bg);
    margin: 0 !important;
    width: calc((100% / 4) - 1rem);

    @media (max-width: 1260px) {
        width: calc((100% / 2) - 1rem);
        max-width: calc((100% / 2) - 1rem);
    }

    @media (max-width: 780px) {
        width: calc((100% / 2) - 1rem);
        max-width: calc((100% / 2) - 1rem);
    }

    @media (max-width: 544px) {
        width: 100%;
        max-width: 100%;
    }

    .wp-block-heading {
        font-weight: normal;
    }

    ul {
        list-style: none;
        padding: 0;

        li {
            margin: var(--margin--link-text-list);
            display: flex;
            color: var(--brand--primary);

            &:before {
                content: "\f345";
                font-family: dashicons;
                display: inline-block;
                line-height: 1;
                font-weight: 400;
                font-style: normal;
                speak: never;
                text-decoration: inherit;
                text-transform: none;
                text-rendering: auto;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                width: 20px;
                height: 20px;
                font-size: 20px;
                vertical-align: text-bottom;
                text-align: center;
                transition: color .1s ease-in;
                margin-top: 0.1em;
                margin-right: 8px;
            }
        }
    }
}

ul.page-list-box {
    list-style: none;
    padding: 0;

    li {
        margin: var(--margin--link-text-list);
        display: flex;
        color: var(--brand--primary);

        &:before {
            content: "\f345";
            font-family: dashicons;
            display: inline-block;
            line-height: 1;
            font-weight: 400;
            font-style: normal;
            speak: never;
            text-decoration: inherit;
            text-transform: none;
            text-rendering: auto;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            width: 20px;
            height: 20px;
            font-size: 20px;
            vertical-align: text-bottom;
            text-align: center;
            transition: color .1s ease-in;
            margin-top: 0.1em;
            margin-right: 8px;
        }
    }
}

/* Gravity Forms */
body .gform-theme.gform_wrapper .gform_body,
body .gform-theme.gform_wrapper .gform_footer {
    font-size: var(--font-size--body);

    .gfield_label {
        font-size: var(--font-size--body);
    }

    button, input, optgroup, select, textarea, input[type=submit] {
        font-size: var(--font-size--body) !important;
    }

    button, input[type=submit] {
        padding: var(--padding--button) !important;
        background: var(--brand--primary) !important;
        color: var(--brand--white) !important;
        border: 2px solid var(--brand--primary) !important;
        border-radius: 0 !important;

        &:hover, &:focus {
            background: var(--brand--white) !important;
            color: var(--brand--primary) !important;
            border-color: var(--brand--primary) !important;
        }
    }

    div.mce-panel {
        button, input, optgroup, select, textarea, input[type=submit] {
            /* reset */
            font-size: 13px !important;
        }
    
        button, input[type=submit] {
            /* reset */
            padding: 2px 3px !important;

            .mce-ico {
                color: var(--brand--white);
            }

            &:hover, &:focus {
                .mce-ico {
                    color: var(--brand--primary);
                }
            }
        }
    }

    .gf-readonly *:disabled {
        background: var(--brand--subtle-bg);
    }

    .gf-readonly input:read-only {
        background: var(--brand--subtle-bg);
    }
}

/* Topics */
.single-topic {
    .topic-dynamic-content {
        gap: var(--gap--default);
        margin-bottom: var(--margin--main-content);

        & > .wp-block-column {
            flex-basis: 100%;
        }

        &.main-dynamic-content {
            flex-basis: 100%;
        }
    }

    .resources-by-topic.content-listing {
        display: flex;
        flex-direction: column;
        gap: var(--gap--grid-default);

        article {
            padding: var(--padding--medium);
            background: var(--brand--subtle-bg);
            display: flex;
            gap: var(--gap--grid-default);

            @media (max-width: 921px) {
                flex-direction: column;
            }

            @media (max-width: 780px) {
                flex-direction: row;
            }

            @media (max-width: 544px) {
                flex-direction: column;
            }

            .entry-title {
                margin-top: 0;
            }

            .featured-image {
                aspect-ratio: 16/9;
                flex-basis: 25%;
            }
        }
    }
}

/* Events */
.page .event-page {
    max-width: var(--ast-narrow-container-width);
    margin-inline: auto;
    margin-top: var(--margin--main-content);

    header.entry-header {
        max-width: var(--ast-narrow-container-width);
        width: 100%;
        margin-inline: 0;
        margin-bottom: var(--margin--default);
        
        h1, .entry-title {
            padding: 0;
        }
    }

    .entry-meta {
        margin-block: var(--margin--medium);
    }

    .event-details {
        i {
            width: 1rem;
        }

        .event-date span {
            display: flex;
            gap: 0.5rem;

        }

        .event-location {
            display: flex;
            gap: 0.5rem;
        }
    }

    .featured-image {
        margin-block: var(--margin--block-spacing);
    }

    .entry-content {
        margin-block: 0;
    }

    .event-registration {
        margin-top: var(--margin--block-spacing);
    }

    /* CiviCRM form */
    #crm-container.crm-container.crm-public {
        padding: 0;

        #additional_participants {
            padding-right: var(--padding--form-input);
        }

        #noOfparticipants {
            label {
                font-size: initial;
                padding-right: var(--padding--form-input);
            }
        }
    }
}

#event-listing {
    article {
        margin-bottom: var(--gap--grid-default);
        display: flex;
        gap: var(--gap--grid-default);

        @media (max-width: 1260px) {
            flex-direction: column;
        }
    }

    .entry-header {
        width: 100%;
        margin: 0;
    }

    .entry-title {
        margin-top: 0;
        margin-bottom: 0.5em;
        padding: 0;
        font-size: var(--font-size--grid-entry-title);

        a {
            color: var(--brand--primary);
            font-weight: 500;

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

    .entry-meta {
        margin-block: 0.5em;

        .event-details > * {
            margin-bottom: 0.25em;
        }
    }

    .entry-summary {
        margin-bottom: 0.5em;
    }

    .featured-image {
        margin-bottom: 0;
        
        img {
            aspect-ratio: 1 / 1;
            object-fit: cover;

            @media (max-width: 1260px) {
                aspect-ratio: 16 / 9;
                
            }
        }
    }

    .event-registration-status {
        color: var(--font-color--body) !important;
        font-size: var(--font-size--small);
        font-weight: 400;
        filter: var(--font-color--lighten);
    }

    .event-links {
        display: flex;
        gap: var(--gap--grid-small);

        .event-cancellation-confirm-dialog .confirm-yes {
            color: var(--brand--primary);
            background: var(--brand--white);

            &:hover, &:focus {
                color: var(--brand--white);
                background: var(--brand--primary);
            }
        }
    }
}

.event-listing-block {
    article {
        margin-bottom: var(--gap--grid-default);
        display: flex;
        gap: var(--gap--grid-default);

        @media (max-width: 1260px) {
            flex-direction: column;
        }
    }

    .entry-title {
        margin-top: 0;
        margin-bottom: 0.5em;
        padding: 0;

        a {
            color: var(--brand--primary);
            font-weight: 500;

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

    .featured-image {
        margin-bottom: 0;

        img {
            aspect-ratio: 1 / 1;
            object-fit: cover;

            @media (max-width: 1260px) {
                aspect-ratio: 16 / 9;
            }
        }
    }
}

.astra-full-megamenu-wrapper .event-listing-block {
    article {
        @media (max-width: 1260px) {
            flex-direction: row;
        }

        .event-date-badge-wrapper {
            width: 120px;

            .event-date-badge {
                a {
                    @media (max-width: 1260px) {
                        aspect-ratio: 1 / 1;
                    }
                }
            }
        }

        .entry-content-wrapper {
            width: 100%;
        }
    }

    .featured-image {
        object-fit: cover;

        img {
            aspect-ratio: 1 / 1;
        }
    }
}

.event-date-badge-wrapper {
    position: relative;
    align-content: flex-start;
    width: 15%;
    min-width: 15%;
    height: fit-content;

    @media (max-width: 1260px) {
        width: 100%;
    }

    &.featured-image-bg .event-date-badge {
        position: absolute;
        inset: 0;
        width: 100%;
        pointer-events: none;
        background: var(--brand--secondary--rgba);

        a {
            color: var(--brand--white);
        }
    }
}

.event-date-badge {
    background: var(--brand--subtle-bg);

    a {
        display: flex;
        flex-direction: column;
        aspect-ratio: 1 / 1;
        justify-content: flex-end;
        padding: var(--padding--small);

        @media (max-width: 1260px) {
            aspect-ratio: 16 / 9;
        }
    }

    .event-start-date-date {
        font-size: var(--font-size--grid-entry-title);
        font-weight: 600;
        line-height: normal;
    }

    .event-start-date-month {
        font-size: var(--font-size--sidebar-h2);
        font-weight: 400;
        line-height: normal;
    }
}

.event-date-badge-wrapper:not(.featured-image-bg) .event-date-badge a {
    @media (max-width: 1260px) {
        aspect-ratio: unset;
    }
}

.custom-listing-wrapper {
    .main-content {
        display: flex;
        gap: var(--gap--default);
        margin-top: var(--margin--main-content);

        @media (max-width: 780px) {
            flex-direction: column;
        }

        .custom-listing-filters {
            flex: 25% 0 0;

            @media (max-width: 780px) {
                flex: 1 0 0;
            }

            .filter-group {
                margin-bottom: var(--margin--block-spacing);
            }

            .filter-checkbox {
                label {
                    font-size: var(--font-size--body);
                    font-weight: 400;
                }
            }

            input[type="checkbox"] {
                -webkit-appearance: none;
                appearance: none;
                box-sizing: border-box;
                width: 0px;
                height: 0px;
                padding: 0;
                border: none;
                appearance: none;
                background-color: transparent;
                outline: none;

                & + label:before {
                    content: '';
                    width: 14px;
                    height: 14px;
                    background: url(/wp-content/plugins/facetwp/assets/images/checkbox.png) 0 50% no-repeat; /* Get from FacetWP for consistency */
                    background-size: 14px 14px;
                    margin-bottom: 4px;
                    padding-left: 20px;
                    cursor: pointer;
                }

                &:checked + label:before {
                    background-image: url(/wp-content/plugins/facetwp/assets/images/checkbox-on.png); /* Get from FacetWP for consistency */
                }
            }
        }

        .content-listing {
            width: 100%;
        }
    }

}

/* CiviCRM Overrides */
.page {
    #crm-container {
        min-height: auto;
    }

    .crm-container.crm-public {
        padding: 0;
    }

    .crm-container.crm-public a.button i, .crm-container.crm-public a.button i {
        padding: 0;
    }

    .crm-container.crm-public a.button:link, .crm-container.crm-public a.button:visited {
        border-width: var(--border-width);
        border-color: var(--brand--white);

        &:hover, &:focus {
            border-width: var(--border-width);
            border-color: var(--brand--primary);
        }
    }

    .crm-container.crm-public .ui-dialog-buttonset .ui-button, .crm-container.crm-public .crm-button {
        display: flex;
        height: auto;
        font-weight: normal;

        i {
            padding: 0;
        }
    }

    .crm-container.crm-public #crm-main-content-wrapper {
        margin: 0;
        width: 100%;
    }

    .crm-container.crm-public #crm-main-content-wrapper .crm-section > * {
        margin: 0;
    }

    .crm-container.crm-public .crm-section, .crm-container.crm-public af-field {
        margin: 0;
    }

    .crm-container.crm-public .crm-section.crm-public-form-item {
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;

        fieldset {
            padding: var(--crm-f-form-padding);
        }
    }

    .crm-container.crm-public .crm-public-form-item .label {
        text-align: unset;
        float: none;
        padding-right: var(--padding--form-input);
    }

    .crm-container.crm-public .crm-section .crm-profile .form-item {
        margin: 0;
        padding: var(--padding--form-elements);
    }

    #crm-main-content-wrapper .action-link a {
        i {
            padding-right: var(--padding--form-input);
        }
    }

    .crm-container.crm-public .crm-additional-profile-view-title {
        padding-inline: var(--crm-f-form-padding);
    }

    .crm-container.crm-public #crm-main-content-wrapper .crm-section.crm-socialnetwork > button, 
    .crm-container.crm-public #crm-main-content-wrapper .crm-section.crm-socialnetwork > a.button {
        margin: 0 var(--margin--small) var(--margin--small) 0;
    }
}


/* Search */
.search-form {
    display: flex;
    gap: 8px;

    label {
        display: flex;
        flex: 1;
    }

    input.search-field {
        padding: var(--padding--button);
        height: auto;
    }

    button.search-submit {
        padding: var(--padding--button);
    }
}

/* Document Library and Resources */
.single-resource {
    h1, .wp-block-post-title {
        font-size: var(--font-size--h1-small);
    }
}

.resource-link-listing ul {
    margin: 0 0 1.5em 3em;
}

.resource-link {
    i {
        margin-left: 4px;
    }

    &.button {
        color: var(--brand--secondary);
        background: none;
        border-color: var(--brand--secondary);

        &:hover, &:focus {
            color: var(--brand--white);
            background: var(--brand--secondary);
            border-color: var(--brand--secondary);
        }
    }
}

.resource-details {
    color: var(--font-color--body);
    font-size: var(--font-size--small);
    font-weight: 400;
    filter: var(--font-color--lighten);
    display: block;
}

.resource-details-wrapper > *{
    display: inline-block;
}

.resource-link-wrapper {
    margin-block: 0.5rem;
}

#document-library-listing {
    .content-listing {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--gap--grid-default);

        @media (max-width: 1180px) {
            grid-template-columns: repeat(2, 1fr);
        }

        @media (max-width: 811px) {
            grid-template-columns: 1fr;
        }

        @media (max-width: 780px) {
            grid-template-columns: repeat(2, 1fr);
        }

        @media (max-width: 600px) {
            grid-template-columns: 1fr;
        }
    }
    

    article {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: var(--padding--medium);
        background: var(--brand--subtle-bg);
        
        .entry-content-wrapper {
            width: 100%;

            & > *:last-child {
                margin-bottom: 1.5rem;
            }
        }
    }

    .entry-title {
        a {
            font-weight: 500;
        }
    }

    .entry-excerpt {
        margin-bottom: 0.5rem;
    }

    .tags-and-categories span {
        border: 1px solid var(--brand--primary);
    }
}

/* My Groups */
.my-groups-listing {
    ul li > div {
        & > div {
            width: 100%;
        }

        @media (max-width: 1180px) {
            flex-direction: column;

            figure {
                width: 100% !important;
            }
        }
        
        @media (max-width: 811px) {
            flex-direction: row;
            figure {
                width: 33.33% !important;
            }
        }

        @media (max-width: 780px) {
            flex-direction: column;
            figure {
                width: 100% !important;
            }
        }
    }
}

/* Jobs and Job Listing */

.job-manager .job-type,.job-types .job-type,.job_listing .job-type {
    color: var(--brand--alt--orange);
}

.job-manager .full-time, .job-types .full-time, .job_listing .full-time {
    color: var(--brand--alt--green);
}

.job-manager .part-time,.job-types .part-time,.job_listing .part-time {
    color: var(--brand--alt--orange);
}

.job-manager .temporary,.job-types .temporary,.job_listing .temporary {
    color: var(--brand--alt--teal);
}

.job-manager .freelance,.job-types .freelance,.job_listing .freelance {
    color: var(--brand--alt--sky-blue);
}

.job-manager .internship,.job-types .internship,.job_listing .internship {
    color: var(--brand--alt--purple);
}

.single_job_listing .meta .job-type {
    background-color: var(--brand--alt--orange);
    color: var(--font-color--body);
}

.single_job_listing .meta .full-time {
    background-color: var(--brand--alt--green);
}

.single_job_listing .meta .part-time {
    background-color: var(--brand--alt--orange);
}

.single_job_listing .meta .temporary {
    background-color: var(--brand--alt--teal);
}

.single_job_listing .meta .freelance {
    background-color: var(--brand--alt--sky-blue);
}

.single_job_listing .meta .internship {
    background-color: var(--brand--alt--purple);
}

.single_job_listing .meta .listing-expired,.single_job_listing .meta .position-filled {
    color: var(--brand--alt--coral);
}

/* Member Directory */
#member-directory .search-wrapper {
    display: flex;
    gap: var(--gap--default);

    @media (max-width: 780px) {
        flex-direction: column;
    }

    .search-filters {
        flex: 25% 0 0;

        @media (max-width: 780px) {
            flex: 1 0 0;
        }

        .search-input-wrapper {
            /* Match FacetWP search input filter styling */
            display: block;
            position: relative;
            margin-bottom: var(--gap--grid-default);

            input {
                margin: 0;
                padding-right: 30px;
                min-width: 240px;
            }

            i {
                right: 0;
                height: 100%;
                width: 30px;
                line-height: 1;
                position: absolute;
                cursor: pointer;
                opacity: 0.5;
                align-content: center;
                text-align: center;
            }
        }
    }

    .search-results {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: var(--gap--grid-default);
    }

    .card {
        background: var(--brand--subtle-bg);
        padding: var(--padding--medium);

        .location {
            display: flex;
            gap: var(--gap--grid-small);
            
            .street_address, .supplemental_address_1 {
                display: block;
            }

            i {
                margin-top: 0.2em;
            }
        }

        .links {
            ul {
                display: flex;
                gap: var(--gap--grid-default);
                list-style: none;
                padding: 0;

                @media (max-width: 811px) {
                    flex-direction: column;
                    gap: var(--gap--grid-small);
                }
        
                @media (max-width: 780px) {
                    flex-direction: row;
                    gap: var(--gap--grid-default);
                }
    
                @media (max-width: 544px) {
                    flex-direction: column;
                    gap: var(--gap--grid-small);
                }
            }
        }
    }

    .pagination {
        display: flex;
        gap: var(--gap--grid-small);
        align-items: center;

        button:hover, button:focus {
            color: var(--brand--primary);
            background: var(--brand--white);
        }
    }
}

.contact {
    margin-top: var(--margin--block-spacing);

    h3 {
        margin-bottom: 0.25em;
    }

    .contact-name {
        font-size: var(--font-size--sidebar-h4);
        font-weight: 500;

        @media (max-width: 544px) {
            font-size: var(--font-size--body);
            font-weight: normal;
        }
    }

    .job-title {
        font-style: italic;
    }

    i {
        margin-right: var(--gap--grid-small);
    }
}

.contact-detail-view {
    background: var(--brand--subtle-bg);
    padding: var(--padding--medium);

    .card-body > *:not(:first-child) {
        margin-top: var(--gap--grid-large);
    }

    .location {
        display: flex;
        gap: var(--gap--grid-small);
        
        .street_address, .supplemental_address_1 {
            display: block;
        }

        i {
            margin-top: 0.2em;
        }
    }

    .links {
        ul {
            display: flex;
            gap: var(--gap--grid-default);
            list-style: none;
            padding: 0;
    
            @media (max-width: 780px) {
                flex-direction: column;
                gap: var(--gap--grid-small);
            }
        }
    }

    .related-contacts-wrapper {
        display: grid;
        gap: var(--gap--grid-default);
        grid-template-columns: repeat(3, 1fr);

        @media (max-width: 811px) {
            grid-template-columns: repeat(2, 1fr);
        }

        @media (max-width: 544px) {
            grid-template-columns: 1fr;
        }

        .contact {
            margin-top: 0;
        }
    }

    .card-footer {
        display: flex;
        margin-top: var(--gap--grid-default);
    }
}

/* Self Serve Checksum */

form#ss-cs-form > * {
    margin-bottom: 16px;
}