body {
    font-size: var(--wp--preset--font-size--md);
}

a {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 {
    font-size: var(--wp--preset--font-size--2-xl);
    margin: 0 0 0.4rem;
    font-weight: 600;
}

:root :where(.wp-block-heading) {
    line-height: 1.5 !important;
}

ul {
    font-size: var(--wp--preset--font-size--md);
    padding-inline-start: 25px;
}

.jgf-site-header {
    display: contents;
}

.jgf-site-header-inner {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-image: linear-gradient(to right, var(--wp--preset--color--primary), var(--wp--preset--color--secondary-yellow), var(--wp--preset--color--secondary-pink), var(--wp--preset--color--secondary-cyan), var(--wp--preset--color--secondary-purple));
    padding: 0.5rem 2rem;
}

body .is-layout-flow .jgf-site-header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* left grows, middle hugs, right grows */
    align-items: center;
}

.jgf-site-header-inner .wp-block-site-logo {
    justify-self: start;
}

.jgf-site-header-inner .wp-block-navigation {
    color: #fff;
    justify-self: center;
}

.jgf-site-header-inner .wp-block-navigation a {
    padding-bottom: 0.5rem;
    border-bottom: 2px solid transparent;
}

.jgf-site-header-inner .wp-block-navigation a:hover {
    text-decoration: none;
    border-bottom-color: transparent;
}

.jgf-site-header-inner .jgf-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(249, 250, 251, 0.2);
    background: transparent;
    cursor: pointer;
    padding: 0;
    align-items: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.jgf-site-header-inner .jgf-nav-toggle svg {
    display: none;
}

.jgf-site-header-inner .jgf-nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
}

.jgf-site-header-inner .jgf-nav-toggle.is-open {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(249, 250, 251, 0.4);
}

.jgf-site-header-inner .jgf-nav-toggle.is-open .jgf-nav-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
    width: 20px;
}

.jgf-site-header-inner .jgf-nav-toggle.is-open .jgf-nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.jgf-site-header-inner .jgf-nav-toggle.is-open .jgf-nav-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 20px;
}

.jgf-site-header-inner .community-button {
    justify-self: end;
}

.jgf-site-header .jgf-mobile-nav-ondemand {
    display: none;
}

.centered-text {
    text-align: center;
}

.wp-block-buttons {
    justify-content: space-around;
}

.wp-block-button__link {
    box-shadow: 0px 0px 2px #000;
}

.wp-block-button__link:hover {
    opacity: 0.8;
    text-decoration: none;
}

.is-layout-constrained .alignleft {
    float: left;
    margin-inline-start: 0;
    margin-inline-end: 2em;
}

.is-layout-constrained .alignright {
    float: right;
    margin-inline-start: 2em;
    margin-inline-end: 0;
}

.wp-block-term-description img {
    width: 33%;
}

.wc-block-checkout__add-note .jgf-order-note-heading {
    margin: 0;
}

/* Keep checkbox input functional but visually hidden for this specific section. */
.wc-block-checkout__add-note .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: 0;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.wc-block-checkout__add-note .wc-block-components-checkbox .wc-block-components-checkbox__mark,
.wc-block-checkout__add-note .wc-block-components-checkbox .wc-block-components-checkbox__mark svg,
.wc-block-checkout__add-note .wc-block-components-checkbox label > svg {
    display: none !important;
}

/* Remove remaining layout gap from the hidden checkbox row and default textarea top margin. */
.wc-block-checkout__add-note .wc-block-components-checkbox {
    display: none;
}

.wc-block-checkout__add-note .wc-block-components-textarea {
    margin-top: 0;
}

.jgf-program-archive .wp-block-term-description {
    display: flow-root;
}

.jgf-program-archive .wp-block-term-description p {
    margin-block-start: 24px;
    margin-block-end: 0;
}

.jgf-program-archive .wp-block-term-description ul {
    position: relative;
    left: 3em;
    margin-right: 3em;
}

.jgf-site-header .custom-logo,
.jgf-site-header .wp-block-site-logo img {
    width: 120px;
    height: 120px;
    max-width: none;
    transition: width 0.2s ease, height 0.2s ease;
}

.jgf-site-header.is-scrolled .custom-logo,
.jgf-site-header.is-scrolled .wp-block-site-logo img {
    width: 60px;
    height: 60px;
}

.tax-jgf_program_category .wp-block-query-title {
    align-items: center;
    color: #fff;
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    text-shadow: 0px 0px 3px #000;
    text-wrap: balance;
}

.tax-jgf_program_category.term-corefusion .wp-block-query-title,
.page-id-15701 .wp-block-query-title {
    background-color: var(--wp--preset--color--primary);
}

.tax-jgf_program_category.term-corefusion .class-schedule {
    background-color: var(--wp--preset--color--muted-blue);
}

.tax-jgf_program_category.term-corefusion .jgf-program-block,
.jgf-program-block.term-category-corefusion {
    border: 1px solid var(--wp--preset--color--primary);
}

.tax-jgf_program_category.term-strong-fitness .wp-block-query-title,
.page-id-15711 .wp-block-query-title {
    background-color: var(--wp--preset--color--secondary-yellow);
}

.tax-jgf_program_category.term-strong-fitness .class-schedule {
    background-color: var(--wp--preset--color--muted-yellow);
}

.tax-jgf_program_category.term-strong-fitness .jgf-program-block,
.jgf-program-block.term-category-strong-fitness {
    border: 1px solid var(--wp--preset--color--secondary-yellow);
}

.tax-jgf_program_category.term-groove-cardio .wp-block-query-title,
.page-id-15726 .wp-block-query-title {
    background-color: var(--wp--preset--color--secondary-pink);
}

.tax-jgf_program_category.term-groove-cardio .class-schedule {
    background-color: var(--wp--preset--color--muted-pink);
}

.tax-jgf_program_category.term-groove-cardio .jgf-program-block,
.jgf-program-block.term-category-groove-cardio {
    border: 1px solid var(--wp--preset--color--secondary-pink);
}

.tax-jgf_program_category.term-stretch-flow .wp-block-query-title,
.page-id-15716 .wp-block-query-title {
    background-color: var(--wp--preset--color--secondary-cyan);
}

.tax-jgf_program_category.term-stretch-flow .class-schedule {
    background-color: var(--wp--preset--color--muted-cyan);
}

.tax-jgf_program_category.term-stretch-flow .jgf-program-block,
.jgf-program-block.term-category-stretch-flow {
    border: 1px solid var(--wp--preset--color--secondary-cyan);
}

.tax-jgf_program_category.term-mindfulness .wp-block-query-title,
.page-id-15718 .wp-block-query-title {
    background-color: var(--wp--preset--color--secondary-purple);
}

.tax-jgf_program_category.term-mindfulness .class-schedule {
    background-color: var(--wp--preset--color--muted-purple);
}

.tax-jgf_program_category.term-mindfulness .jgf-program-block,
.jgf-program-block.term-category-mindfulness {
    border: 1px solid var(--wp--preset--color--secondary-purple);
}

.jgf-program-schedules .jgf-class-group {
    margin-top: 0;
}

a.button,
button.wp-element-button {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--bg);
    border-radius: 999px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}

a.button:hover,
button:hover,
button.wp-element-button:hover {
    text-decoration: none;
    background-color: rgba(6, 96, 222, 0.8);
}

.program-link img,
.program-link p {
    transition: transform 0.25s ease;
}

.program-link:hover {
    text-decoration: none;
}

.program-link:hover img,
.program-link:hover p {
    transform: scale(1.06);
}

.no-break {
   white-space: nowrap; 
}

@media (max-width: 768px) {
    .jgf-nav-overlay {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(3px);
        pointer-events: auto;
        transition: background 0.25s ease, backdrop-filter 0.25s ease;
        z-index: 900;
    }

    .jgf-site-header-inner .wp-block-navigation {
        position: static;
    }

    .jgf-site-header-inner .jgf-nav-toggle {
        display: inline-flex;
    }

    .jgf-site-header-inner .wp-block-navigation__responsive-container {
        position: absolute;
        top: 100%;
        bottom: auto;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        z-index: 950;
        background: transparent;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .jgf-site-header-inner .wp-block-navigation__responsive-container.is-menu-open {
        background: transparent !important;
        padding: 0;
    }

    .jgf-site-header-inner .wp-block-navigation__responsive-dialog {
        row-gap: 10px;
    }

    .has-modal-open .admin-bar .is-menu-open .wp-block-navigation__responsive-dialog {
        margin-top: 0 !important;
    }

    .jgf-site-header-inner .wp-block-navigation__responsive-container-close {
        display: none;
    }

    .jgf-site-header-inner .wp-block-navigation__responsive-container-content {
        display: block;
        padding: 0.75rem 1rem 1.5rem !important;
        color: #111827;
        background: transparent;
        max-height: calc(100vh - 120px);
        max-height: calc(100dvh - 120px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .jgf-site-header-inner .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content {
        padding-top: 0.75rem;
    }

    .jgf-site-header-inner .wp-block-navigation__container {
        flex-direction: column;
        align-items: stretch;
        color: #111827;
    }

    .jgf-site-header-inner .wp-block-navigation__container > .wp-block-navigation-item {
        position: relative;
        max-width: 1100px;
        margin: 0 auto;
        width: 100%;
        text-align: center;
    }

    .jgf-site-header-inner .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
        display: block;
        padding: 0.75rem 0.75rem;
        margin: 0.1rem 0;
        border-radius: 0.75rem;
        color: #111827;
        text-decoration: none;
        font-size: 1.5rem;
        font-weight: 500;
        width: 100%;
    }

    .jgf-site-header-inner .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
    .jgf-site-header-inner .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:focus {
        outline: none;
        box-shadow: none;
        background: transparent;
        text-decoration: none;
    }

    .jgf-site-header .ad-banner {
        z-index: 999;
    }
    body .is-scrolled .wp-block-navigation .jgf-mobile-nav-ondemand {
        display: block;
    }

    body .is-layout-flow .jgf-site-header-inner {
        display: flex;
    }
    .jgf-site-header-inner.is-layout-flex {
        gap: 10px;
    }
    .jgf-site-header.is-scrolled .jgf-site-header-inner.is-layout-flex {
        gap: 0;
    }

    .jgf-site-header-inner .wp-block-buttons {
        text-align: center;
        width: 100%;
    }

    .jgf-site-header .wp-block-buttons {
        opacity: 1;
        pointer-events: auto;
        transition: opacity 0.2s ease, max-height 0.2s ease;
        max-height: 80px;
        overflow: hidden;
    }

    .jgf-site-header.is-scrolled .wp-block-buttons {
        opacity: 0;
        pointer-events: none;
        max-height: 0;
        margin: 0;
        padding: 0;
    }

    .jgf-site-header-inner .wp-block-navigation {
        justify-self: end;
        margin-left: auto;
    }

    .jgf-site-header-inner .wp-block-navigation__container {
        justify-content: center;
        margin-left: 0;
    }

    .jgf-program-archive .wp-block-term-description img {
        float: none;
        margin: 0 auto;
        width: 100%;
    }

    .jgf-program-inner {
        align-items: center;
    }

    .ad-banner {
        font-size-adjust: 0.35;
    }

    .mobile-fix {
        margin-block-start: 24px !important;
    }
}
