/* Shared page-banner rules keep the height and typography consistent across parish pages. */
.faith-page {
    padding: 0
}


.faith-welcome {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: center;
    margin-bottom: 0
}

    .faith-welcome h2 {
        font-size: var(--section-heading-size);
        line-height: 1.2;
        color: var(--navy);
        margin: 0 0 1.15rem
    }

    .faith-welcome > div > p:not(.section-eyebrow) {
        font-size: .95rem;
        line-height: 1.8;
        color: #5b6577;
        max-width: 560px;
        margin: 0 0 .8rem
    }

.faith-text-link {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--navy);
    font-size: .85rem;
    font-weight: 700;
    min-height: 44px;
    text-decoration: none;
    border-bottom: 1px solid #b99b60
}

    .faith-text-link:hover {
        text-decoration: underline dotted
    }

.faith-family {
    background: #fff;
    border: 1px solid #dce2ea;
    border-radius: 6px;
    padding: 2rem;
    position: relative;
    overflow: hidden
}

.faith-family-icon {
    position: absolute;
    right: 1.7rem;
    top: 1.2rem;
    font-size: 2.5rem;
    color: #a08653
}

.faith-family h3 {
    font-size: var(--subsection-heading-size);
    color: var(--navy);
    margin: 0 0 .7rem
}

.faith-family > p:not(.section-eyebrow) {
    font-size: .95rem;
    color: #5b6577;
    line-height: 1.7;
    max-width: 350px
}

.faith-family-links {
    display: grid;
    gap: .1rem;
    margin-top: 1.25rem
}

    .faith-family-links a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        min-height: 48px;
        border-top: 1px solid #d2d9e4;
        text-decoration: none;
        color: var(--navy);
        font-weight: 700;
        font-size: .85rem
    }

        .faith-family-links a:hover {
            text-decoration: underline dotted
        }

.faith-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.5rem;
    margin-bottom: 1.6rem
}

    .faith-section-heading h2 {
        font-size: var(--section-heading-size);
        color: var(--navy);
        margin: 0
    }

    .faith-section-heading > p {
        font-size: .8rem;
        color: #5b6577;
        margin: 0 0 .2rem
    }

        .faith-section-heading > p strong {
            color: var(--navy)
        }

.faith-grade-guide {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1rem 1.1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    margin-bottom: 1.5rem
}

    .faith-grade-guide > span {
        font-size: .8rem;
        font-weight: 700;
        color: var(--navy);
        white-space: nowrap
    }

    .faith-grade-guide nav {
        display: flex;
        flex-wrap: wrap;
        --faith-grade-size: 44px;
        --faith-grade-gap: .4rem;
        gap: var(--faith-grade-gap)
    }

    .faith-grade-guide a {
        display: grid;
        place-items: center;
        min-width: var(--faith-grade-size);
        min-height: 44px;
        border: 1px solid #dce2ea;
        border-radius: 4px;
        background: #fff;
        color: var(--navy);
        font-size: .8rem;
        font-weight: 700;
        text-decoration: none
    }

        .faith-grade-guide a.faith-grade-support {
            min-width: calc(var(--faith-grade-size) * 2 + var(--faith-grade-gap))
        }

        .faith-grade-guide a:hover {
            background: #e8e3d5;
            color: var(--navy);
            border-color: #9ba9bd
        }

.faith-teachers, .faith-grade-card {
    scroll-margin-top: 6rem
}

.faith-grade-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 1.3rem
}

.faith-grade-card {
    --grade-accent: #a2854b;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 3px solid var(--grade-accent);
    border-radius: 6px;
    box-shadow: 0 4px 16px #26304d05
}

    .faith-grade-card[data-grade="5"], .faith-grade-card[data-grade="6"], .faith-grade-card[data-grade="7"], .faith-grade-card[data-grade="8"] {
        --grade-accent: #65857b
    }

    .faith-grade-card[data-grade="9"], .faith-grade-card[data-grade="10"], .faith-grade-card[data-grade="11"], .faith-grade-card[data-grade="12"] {
        --grade-accent: #667c9e
    }

    .faith-grade-card[data-grade="13"] {
        --grade-accent: #8a6a86
    }

    .faith-grade-card:target {
        outline: 3px solid #a2854b;
        outline-offset: 3px
    }

.faith-grade-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .8rem;
    padding: 1.25rem 1.4rem;
    background: var(--paper);
    border-bottom: 1px solid #e8ecf1;
    border-radius: 4px 4px 0 0
}

@media (hover: hover) and (pointer: fine) {
    .faith-grade-card:hover {
        --public-card-shadow: var(--public-card-hover-shadow);
    }

    .faith-grade-card:not(:target):hover .faith-grade-heading {
        background-color: #f3f9fd;
    }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .faith-grade-card {
        --public-card-transition: box-shadow 160ms ease-out;
    }

    .faith-grade-heading {
        transition: background-color 160ms ease-out;
    }
}

    .faith-grade-heading p {
        font-size: .61rem;
        text-transform: uppercase;
        letter-spacing: .09em;
        color: #657085;
        margin: 0 0 .5rem;
        font-weight: 700
    }

.faith-grade-card h3 {
    font-size: 1.2rem;
    color: var(--navy);
    margin: 0
}

.faith-grade-number {
    font-family: var(--slab);
    color: var(--grade-accent);
    font-size: 2rem;
    line-height: 1;
    opacity: .9
}

.faith-teacher-list {
    list-style: none;
    margin: 0;
    padding: .35rem 1.4rem .8rem;
    flex: 1
}

    .faith-teacher-list li {
        display: flex;
        align-items: center;
        gap: .8rem;
        min-height: 67px;
        padding: .65rem 0;
        border-bottom: 1px solid #edf0f4
    }

        .faith-teacher-list li:last-child {
            border-bottom: 0
        }

.faith-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: #596b80;
    background: var(--paper);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .02em
}

.faith-teacher-list li > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem
}

.faith-teacher-name {
    font-size: .9rem;
    color: #29384d;
    line-height: 1.4;
    overflow-wrap: anywhere
}

.faith-designation {
    color: #655024;
    background: #f7f0df;
    border: 1px solid #e9dcba;
    font-size: .62rem;
    font-weight: 700;
    padding: .18rem .45rem;
    border-radius: 3px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    max-width: 100%
}

.faith-grade-card > footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 1.4rem;
    padding: .8rem 0;
    border-top: 1px solid #e8ecf1;
    color: #657085;
    font-size: .65rem
}

    .faith-grade-card > footer > span:last-child {
        color: var(--grade-accent);
        font-size: .8rem
    }

.faith-empty {
    padding: 0 1.4rem;
    font-size: .85rem;
    color: #5b6577
}

@media(max-width:1000px) {
    .faith-welcome {
        gap: 2rem
    }

    .faith-grade-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .faith-grade-guide {
        align-items: flex-start;
        flex-direction: column;
        gap: .8rem
    }
}

@media(max-width:600px) {
    .faith-welcome {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 0
    }


    .faith-family {
        padding: 1.5rem
    }

    .faith-section-heading {
        display: block
    }


        .faith-section-heading > p {
            margin-top: .8rem
        }

    .faith-grade-grid {
        grid-template-columns: 1fr;
        gap: 1rem
    }

    .faith-grade-guide {
        padding: 1rem
    }

        .faith-grade-guide nav {
            --faith-grade-gap: .35rem
        }

    .faith-grade-heading {
        padding-block: 1.2rem
    }
}


/* Alternate cream and white after the shared white breadcrumb. Cards use the opposite light
   surface so content remains distinct without changing the page palette. */
.faith-intro-section {
    background: var(--paper);
}

.faith-calendar-section {
    background: #fff;

    border-block: 1px solid var(--line)
}

    .faith-calendar-section :is(.events-filters, .ccd-grid) {
        background: var(--paper)
    }

    .faith-calendar-section .ccd-grid .outside-month {
        background: #fff
    }

    .faith-calendar-section .ccd-shell {
        margin: 0;
        padding: 0;
        border: 0
    }

.faith-teachers {
    background: #fff;
}

    .faith-teachers .faith-grade-guide {
        border-color: #dedbd3;
        box-shadow: 0 3px 12px #47391f04
    }

    .faith-teachers .faith-grade-card {
        border-right-color: #e2dfd8;
        border-bottom-color: #e2dfd8;
        border-left-color: #e2dfd8
    }

.faith-contact-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #222e49;
    color: #fff;
    border-top: 3px solid #b89b62;

    text-align: center;
    scroll-margin-top: 5rem
}

    .faith-contact-cta:before, .faith-contact-cta:after {
        content: "";
        position: absolute;
        z-index: -1;
        border: 1px solid #dac28d18;
        border-radius: 50%;
        width: 520px;
        height: 520px;
        pointer-events: none
    }

    .faith-contact-cta:before {
        left: -300px;
        top: -160px;
        box-shadow: 0 0 0 65px #dac28d08,0 0 0 130px #dac28d05
    }

    .faith-contact-cta:after {
        right: -260px;
        bottom: -280px;
        box-shadow: 0 0 0 65px #dac28d08,0 0 0 130px #dac28d05
    }

.faith-contact-inner {
    display: flex;
    flex-direction: column;
    align-items: center
}

.faith-contact-symbol {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid #d7bb7c65;
    border-radius: 50%;
    color: #e4c993;
    background: #ffffff06;
    margin-bottom: 1.3rem
}

    .faith-contact-symbol .icon {
        width: 23px;
        height: 23px
    }


.faith-contact-cta h2 {
    color: #fff;
    font-size: var(--section-heading-size);
    line-height: 1.25;
    margin: 0 0 1.2rem;
    letter-spacing: -.02em
}

.faith-contact-copy {
    width: 100%;
    max-width: 960px;
    font-size: 1rem;
    line-height: 1.8;
    color: #d9e0ec;
    margin: 0
}

.faith-contact-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.8rem
}

.faith-contact-actions .button {
    min-height: 52px;
    padding: .9rem 1.5rem;
    gap: .75rem;
    border-radius: 5px;
    box-shadow: 0 4px 14px #10182b33;
    font-size: .8rem
}

.faith-contact-primary.button {
    background: #ecd9ac;
    color: #24314b;
    border-color: #ecd9ac
}

    .faith-contact-primary.button:hover {
        background: #f8eacb;
        color: #24314b;
        border-color: #f8eacb
    }

.faith-contact-secondary.button {
    background: transparent;
    color: #fff;
    border-color: #a5afc1
}

    .faith-contact-secondary.button:hover {
        background: #ffffff12;
        color: #fff;
        border-color: #ecd9ac
    }

.faith-contact-actions a:focus-visible {
    outline: 3px solid #ecd9ac;
    outline-offset: 5px
}

@media(max-width:600px) {

    .faith-contact-copy {
        font-size: .92rem;
        max-width: 100%
    }

    .faith-contact-actions {
        flex-direction: column;
        gap: .65rem;
        width: 100%;
        margin-top: 1.5rem
    }

    .faith-contact-actions .button {
        width: 100%;
        max-width: 320px
    }
}

/* The grade selected through the grade guide remains highlighted at its anchor. */
.faith-teachers .faith-grade-card:target {
    border-color: #8e794f;
    outline-color: #b89b62;
    box-shadow: 0 12px 28px #17213926
}

.faith-grade-card:target .faith-grade-heading {
    background: #2c3a56;
    border-bottom-color: #ffffff24
}

.faith-grade-card:target .faith-grade-heading h3 {
    color: #fff
}

.faith-grade-card:target .faith-grade-heading p {
    color: #d2dbea
}

.faith-grade-guide a[aria-current=location] {
    background: #222e49;
    color: #fff;
    border-color: #222e49;
    box-shadow: inset 0 -3px 0 #e4c993
}

/* The Sunday status is a mobile summary; desktop content geometry is unchanged. */
.faith-sunday-mobile { display: none; }
@media(max-width:767.98px) {
    #content .faith-page > .faith-sunday-mobile { display: block; padding-block: 1.5rem; }
    #content .faith-sunday-mobile + .faith-intro-section { padding-block-start: 0; }
    .faith-sunday-summary {
        display: grid;
        grid-template-columns: 24px minmax(0,1fr);
        align-items: start;
        gap: .75rem;
        padding: 1rem;
        border: 1px solid var(--line);
        border-left: 4px solid #b89b62;
        background: #fff;
        color: var(--navy);
        overflow-wrap: anywhere;
    }
    .faith-sunday-content { display: grid; gap: .5rem; min-width: 0; }
    .faith-sunday-no-class { border-left-color: #977126; }
    .faith-sunday-icon { display: flex; align-items: center; min-height: 1.5rem; color: #977126; }
    .faith-sunday-icon .icon { width: 24px; height: 24px; }
    .faith-sunday-summary h2 { font: 700 var(--section-heading-size)/1.3 var(--slab); margin: 0; }
    .faith-sunday-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
    .faith-sunday-badges > * { padding: .2rem .5rem; border: 1px solid #d8c7a6; border-radius: 4px; background: #f7efdc; font-size: .8rem; }
    .faith-sunday-note, .faith-sunday-message { margin: 0; font-size: .9rem; line-height: 1.55; }
    .faith-sunday-message { color: #4c596c; }
    .faith-sunday-summary .faith-text-link { justify-self: start; gap: .5rem; margin: 0; font-size: .9rem; }
}

/* Native public disclosures are enabled only on phones; Bootstrap is admin-scoped. */
@media(max-width:767.98px) {
    .faith-grade-grid.faith-mobile-rosters { grid-template-columns: minmax(0,1fr); gap: .65rem; }
    .faith-mobile-rosters .faith-grade-card { box-shadow: none; }
    .faith-mobile-rosters .faith-grade-heading { display: none; }
    .faith-mobile-rosters .faith-grade-disclosure { margin: 0; padding: 0; border: 0; background: transparent; }
    .faith-grade-disclosure > summary {
        display: grid; grid-template-columns: minmax(0,1fr) auto 16px; align-items: center;
        gap: .65rem; min-height: 60px; padding: 1rem; cursor: pointer; list-style: none;
        color: var(--navy); background: var(--paper); border-radius: 4px;
    }
    .faith-grade-disclosure > summary::-webkit-details-marker { display: none; }
    .faith-grade-disclosure > summary:focus-visible { outline: 3px solid #b1843b; outline-offset: -3px; }
    .faith-grade-disclosure .faith-grade-label { font: 700 1.05rem/1.4 var(--slab); overflow-wrap: anywhere; }
    .faith-grade-disclosure .faith-grade-count { font-size: .8rem; color: #596476; white-space: nowrap; }
    .faith-grade-disclosure > summary .icon { width: 16px; height: 16px; }
    .faith-grade-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
    .faith-grade-disclosure[open] > summary .icon { transform: rotate(90deg); }
    .faith-grade-disclosure > footer { display: none; }
    .faith-grade-disclosure .faith-empty { padding: 1rem; margin: 0; }
    .faith-grade-card:target .faith-grade-disclosure > summary {
        color: #fff;
        background: #2c3a56;
    }
    .faith-grade-card:target .faith-grade-count { color: #d2dbea; }
}
