/*
Theme Name: CLC Congregation
Theme URI: https://lutheran.ch/
Author: Confessional Lutheran Church
Description: Shared block theme for congregations of the Confessional Lutheran Church.
Version: 0.7.2
Requires at least: 6.7
Requires PHP: 8.0
Text Domain: clc-congregation
*/


/*
 * --------------------------------------------------------------------------
 * CLC Congregation v0.2
 * --------------------------------------------------------------------------
 */

.clc-congregation-home {
    margin: 0;
}

.clc-congregation-home > .wp-block-post-content {
    margin: 0;
}

.clc-congregation-component {
    box-sizing: border-box;
    width: min(
        calc(100% - 2.5rem),
        1200px
    );
    margin: 0 auto;
    padding-top: clamp(
        2.5rem,
        6vw,
        5rem
    );
    padding-bottom: clamp(
        2.5rem,
        6vw,
        5rem
    );
}

.clc-congregation-component
+ .clc-congregation-component {
    border-top:
        1px solid
        var(--wp--preset--color--accent-6);
}

.clc-congregation-component h2 {
    max-width: 760px;
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size:
        var(--wp--preset--font-size--xx-large);
}

.clc-component-kicker {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.75rem;
    color:
        var(--wp--preset--color--contrast);
    font-size:
        var(--wp--preset--font-size--small);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.clc-component-kicker::before {
    content: "";
    display: block;
    flex: 0 0 auto;
    width: 0.4rem;
    height: 1.15em;
    border-radius: 999px;
    background:
        var(--clc-congregation-accent);
}

.clc-component-meta,
.clc-latest-sermon-passage {
    max-width: 760px;
    margin:
        0.5rem 0;
}

.clc-latest-sermon-passage {
    font-size:
        var(--wp--preset--font-size--large);
    font-weight: 600;
}

.clc-latest-article-summary {
    max-width: 760px;
}

.clc-component-action {
    margin-top: 1.5rem;
}

.clc-component-button {
    display: inline-block;
    padding:
        0.7rem
        1.05rem;
    border-radius: 4px;
    background:
        var(--wp--preset--color--contrast);
    color:
        var(--wp--preset--color--base);
    font-size:
        var(--wp--preset--font-size--medium);
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}

.clc-component-button:hover,
.clc-component-button:focus {
    background:
        color-mix(
            in srgb,
            var(--wp--preset--color--contrast) 88%,
            white
        );
    color:
        var(--wp--preset--color--base);
    text-decoration: underline;
}

.clc-congregation-home
.wp-block-post-content
> .wp-block-group {
    box-sizing: border-box;
}

@media (max-width: 700px) {

    .clc-congregation-component {
        width:
            calc(100% - 2rem);
    }

}


/*
 * --------------------------------------------------------------------------
 * CLC Congregation v0.3 — Branding Integration
 * --------------------------------------------------------------------------
 */

.clc-site-header {
    position: relative;
    z-index: 10;
    background: var(--wp--preset--color--base);
}

.clc-site-header-inner {
    gap: 2rem;
}

.clc-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
}

.clc-brand:hover,
.clc-brand:focus {
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
}

.clc-brand-desktop,
.clc-brand-mobile {
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.clc-brand-desktop {
    display: inline-flex;
}

.clc-brand-mobile {
    display: none;
}

.clc-brand-primary-logo {
    display: block;
    width: auto;
    max-width: min(360px, 42vw);
    height: 58px;
    object-fit: contain;
    object-position: left center;
}

.clc-brand-mark {
    display: block;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.clc-brand-site-name {
    display: block;
    font-size: var(--wp--preset--font-size--large);
    font-weight: 700;
    line-height: 1.15;
}

.clc-brand-mobile-name {
    display: block;
    overflow: hidden;
    max-width: 15rem;
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 700;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clc-primary-navigation {
    flex: 0 0 auto;
}

@media (max-width: 782px) {

    .clc-site-header-inner {
        gap: 1rem;
    }

    .clc-brand-desktop {
        display: none;
    }

    .clc-brand-mobile {
        display: inline-flex;
    }

    .clc-brand-primary-logo {
        max-width: min(240px, 62vw);
        height: 44px;
    }

    .clc-brand-mark {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 420px) {

    .clc-brand-mobile-name {
        max-width: 11rem;
    }
}


/*
 * --------------------------------------------------------------------------
 * CLC Congregation v0.4 — Accessible congregation design system
 * --------------------------------------------------------------------------
 *
 * Congregation accent colours are decorative identity colours. They are not
 * semantic text/link colours. This keeps pale congregation colours usable
 * without sacrificing contrast.
 */

:root {
    --clc-congregation-accent:
        var(--wp--preset--color--accent-1);
    --clc-congregation-accent-ink:
        #ffffff;
    --clc-congregation-surface:
        #f7f6f2;
    --clc-congregation-muted:
        #5c5c5c;
    --clc-congregation-serif:
        ui-serif,
        Georgia,
        Cambria,
        "Times New Roman",
        Times,
        serif;
    --clc-congregation-focus:
        var(--wp--preset--color--contrast);
}


/*
 * Ordinary content links stay dark and visibly identifiable regardless of
 * congregation accent.
 */

body
a:not(.wp-element-button):not(.clc-brand):not(.clc-component-button):not(.wp-block-navigation-item__content) {
    color:
        var(--wp--preset--color--contrast);
    text-decoration-line: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

body
a:not(.wp-element-button):not(.clc-brand):not(.clc-component-button):not(.wp-block-navigation-item__content):hover {
    text-decoration-thickness: 0.14em;
}

:where(
    a,
    button,
    input,
    select,
    textarea
):focus-visible {
    outline:
        3px solid
        var(--clc-congregation-focus);
    outline-offset: 3px;
}


/*
 * Navigation is visually distinct from prose links.
 */

.clc-primary-navigation
.wp-block-navigation-item__content {
    color:
        var(--wp--preset--color--contrast);
    font-weight: 600;
    text-decoration: none;
}

.clc-primary-navigation
.wp-block-navigation-item__content:hover,
.clc-primary-navigation
.wp-block-navigation-item__content:focus {
    color:
        var(--wp--preset--color--contrast);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}


/*
 * Header and footer.
 */

.clc-site-header {
    box-shadow:
        0 1px 0
        rgba(0, 0, 0, 0.03);
}

.clc-site-footer {
    background:
        var(--clc-congregation-surface);
}

.clc-site-footer a {
    color:
        var(--wp--preset--color--contrast);
}


/*
 * General editorial content.
 */

.wp-block-post-content
> :where(
    p,
    ul,
    ol,
    blockquote
) {
    max-width: 720px;
}

.wp-block-post-content
blockquote {
    margin-left: 0;
    padding:
        0.4rem
        0
        0.4rem
        1.25rem;
    border-left:
        0.35rem solid
        var(--clc-congregation-accent);
}

.wp-block-post-content
blockquote cite {
    color:
        var(--clc-congregation-muted);
}


/*
 * Front page hero.
 */

.clc-home-hero {
    min-height:
        clamp(
            34rem,
            68vh,
            44rem
        );
}

.clc-home-hero
.wp-block-cover__image-background {
    object-position:
        center center;
}

.clc-home-hero-card {
    box-sizing: border-box;
    width:
        min(
            100%,
            760px
        );
    margin-right: auto;
    margin-left: auto;
    padding:
        clamp(
            1.75rem,
            4vw,
            3rem
        );
    border-top:
        0.5rem solid
        var(--clc-congregation-accent);
    border-radius: 0.35rem;
    background:
        rgba(255, 255, 255, 0.94);
    box-shadow:
        0 1.25rem 3rem
        rgba(0, 0, 0, 0.13);
    color:
        var(--wp--preset--color--contrast);
    text-align: left;
}

.clc-home-hero-card
> * {
    max-width: 640px;
}

.clc-home-hero-eyebrow {
    margin:
        0
        0
        1rem;
    color:
        var(--clc-congregation-muted);
    font-size:
        var(--wp--preset--font-size--small);
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.clc-home-hero-card h1 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size:
        clamp(
            2.6rem,
            7vw,
            5rem
        );
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.clc-home-hero-lead {
    margin:
        0
        0
        1.65rem;
    font-size:
        clamp(
            1.25rem,
            2.5vw,
            1.65rem
        );
    line-height: 1.35;
}

.clc-home-hero
.wp-block-buttons {
    margin-top: 1.75rem;
}

.clc-home-hero
.wp-element-button {
    background:
        var(--wp--preset--color--contrast);
    color:
        var(--wp--preset--color--base);
}

.clc-home-hero
.wp-block-button.is-style-outline
.wp-element-button {
    border:
        2px solid
        var(--wp--preset--color--contrast);
    background: transparent;
    color:
        var(--wp--preset--color--contrast);
}

.clc-home-hero
.wp-block-button.is-style-outline
.wp-element-button:hover,
.clc-home-hero
.wp-block-button.is-style-outline
.wp-element-button:focus {
    background:
        var(--wp--preset--color--contrast);
    color:
        var(--wp--preset--color--base);
}


/*
 * Front-page editorial sections.
 */

.clc-congregation-home
> .wp-block-post-content {
    margin: 0;
}

.clc-congregation-home
> .wp-block-post-content
> * {
    margin-block-start: 0;
}

.clc-home-intro {
    box-sizing: border-box;
    width:
        min(
            calc(100% - 2.5rem),
            1200px
        );
    margin:
        0 auto;
    padding:
        clamp(
            3rem,
            7vw,
            6rem
        )
        0;
}

.clc-home-intro
> * {
    max-width: 760px;
}

.clc-home-intro h2 {
    margin-top: 0;
}

.clc-home-scripture {
    box-sizing: border-box;
    padding:
        clamp(
            3.5rem,
            8vw,
            6.5rem
        )
        max(
            1.25rem,
            calc((100% - 1200px) / 2)
        );
    background:
        var(--wp--preset--color--contrast);
    color:
        var(--wp--preset--color--base);
}

.clc-home-scripture
> * {
    max-width: 900px;
    margin-right: auto;
    margin-left: auto;
}

.clc-home-scripture h2,
.clc-home-scripture p,
.clc-home-scripture a {
    color:
        var(--wp--preset--color--base);
}

.clc-home-scripture h2 {
    margin-top: 0;
    font-family:
        var(--wp--preset--font-family--system-serif);
    font-size:
        clamp(
            1.8rem,
            4vw,
            3rem
        );
    font-weight: 500;
    line-height: 1.25;
}

.clc-home-scripture a {
    text-decoration: underline;
}


@media (max-width: 782px) {

    .clc-home-hero {
        min-height: 31rem;
    }

    .clc-home-hero-card {
        width:
            calc(100% - 1rem);
        padding:
            1.5rem;
    }

    .clc-home-hero-card h1 {
        font-size:
            clamp(
                2.3rem,
                12vw,
                3.4rem
            );
    }

    .clc-home-intro {
        width:
            calc(100% - 2rem);
    }
}


/*
 * --------------------------------------------------------------------------
 * CLC Congregation v0.5 — Compact congregation homepage
 * --------------------------------------------------------------------------
 */


/*
 * "Start here" belongs directly to the hero message rather than floating
 * beneath the latest-content sections.
 */

.clc-home-start {
    box-sizing: border-box;
    width:
        min(
            calc(100% - 2.5rem),
            1200px
        );
    margin:
        0 auto;
    padding:
        clamp(
            2.5rem,
            5vw,
            4rem
        )
        0;
}

.clc-home-start
> * {
    max-width: 780px;
}

.clc-home-start h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
}

.clc-home-start p {
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
}

.clc-home-start
.wp-block-buttons {
    margin-top: 1.4rem;
}


/*
 * Sunday location section.
 *
 * The shortcode remains responsible for congregation-specific schedule and
 * address data. The page supplies the location map; the theme supplies the
 * reusable two-column composition.
 */

.clc-home-sunday-section {
    box-sizing: border-box;
    padding:
        clamp(
            2.25rem,
            4vw,
            3.5rem
        )
        max(
            1.25rem,
            calc((100% - 1200px) / 2)
        );
    background:
        var(--wp--preset--color--accent-2);
    background:
        color-mix(
            in srgb,
            var(--clc-congregation-accent) 10%,
            white
        );
    color:
        var(--wp--preset--color--contrast);
}

.clc-home-sunday-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(360px, 1.1fr);
    gap:
        clamp(
            2rem,
            5vw,
            4rem
        );
    align-items: stretch;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.clc-home-sunday-grid
.clc-regular-event {
    box-sizing: border-box;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
}

.clc-home-sunday-grid
.clc-regular-event__heading {
    max-width: none;
    margin-bottom: 1rem;
    font-size:
        clamp(
            2rem,
            4vw,
            3rem
        );
}

.clc-home-sunday-grid
.clc-regular-event p {
    margin-top: 0.65rem;
    margin-bottom: 0.65rem;
}

.clc-home-sunday-grid
.clc-regular-event__location {
    margin-top: 1.3rem;
}

.clc-home-sunday-grid
.clc-regular-event__address {
    max-width: 32rem;
    line-height: 1.5;
}

.clc-home-sunday-grid
.clc-regular-event__actions {
    margin-top: 1.4rem;
}


/*
 * Embedded congregation map.
 */

.clc-location-map {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    border:
        1px solid
        var(--wp--preset--color--accent-6);
    border-radius: 8px;
    background:
        var(--wp--preset--color--base);
}

.clc-location-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 330px;
    border: 0;
}

.clc-location-map-link {
    margin:
        0.7rem
        0
        0;
    font-size:
        var(--wp--preset--font-size--small);
}


/*
 * Latest sermon + latest article become compact discovery cards.
 */

.clc-home-media-grid {
    box-sizing: border-box;
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 1.5rem;
    width:
        min(
            calc(100% - 2.5rem),
            1200px
        );
    margin:
        0 auto;
    padding:
        clamp(
            2.5rem,
            5vw,
            4rem
        )
        0;
}

.clc-home-media-grid
.clc-congregation-component {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: none;
    margin: 0;
    padding:
        clamp(
            1.4rem,
            3vw,
            2rem
        );
    border:
        1px solid
        var(--wp--preset--color--accent-6);
    border-top:
        0.35rem solid
        var(--clc-congregation-accent);
    border-radius: 8px;
    background:
        var(--wp--preset--color--base);
}

.clc-home-media-grid
.clc-congregation-component
+ .clc-congregation-component {
    border-top:
        0.35rem solid
        var(--clc-congregation-accent);
}

.clc-home-media-grid
.clc-component-kicker {
    margin-bottom: 0.6rem;
}

.clc-home-media-grid
.clc-congregation-component h2 {
    max-width: none;
    margin:
        0
        0
        0.75rem;
    font-size:
        clamp(
            1.65rem,
            3vw,
            2.25rem
        );
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.clc-home-media-grid
.clc-congregation-component h2 a {
    color:
        var(--wp--preset--color--contrast);
    text-decoration: none;
}

.clc-home-media-grid
.clc-congregation-component h2 a:hover,
.clc-home-media-grid
.clc-congregation-component h2 a:focus {
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.clc-home-media-grid
.clc-latest-sermon-passage {
    max-width: none;
    margin:
        0.25rem
        0;
    font-size:
        var(--wp--preset--font-size--medium);
}

.clc-home-media-grid
.clc-component-meta {
    max-width: none;
    margin:
        0.35rem
        0;
}

.clc-home-media-grid
.clc-latest-article-summary {
    display: -webkit-box;
    overflow: hidden;
    max-width: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.clc-home-media-grid
.clc-component-action {
    margin-top: auto;
    padding-top: 1rem;
}


/*
 * The closing Scripture remains a feature section, but no longer needs the
 * very large vertical padding of the first draft.
 */

.clc-home-scripture {
    padding-top:
        clamp(
            2.75rem,
            5vw,
            4.5rem
        );
    padding-bottom:
        clamp(
            2.75rem,
            5vw,
            4.5rem
        );
}


@media (max-width: 850px) {

    .clc-home-sunday-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .clc-location-map,
    .clc-location-map iframe {
        min-height: 280px;
    }

    .clc-home-media-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 600px) {

    .clc-home-start,
    .clc-home-media-grid {
        width:
            calc(100% - 2rem);
    }

    .clc-home-sunday-section {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}


/*
 * --------------------------------------------------------------------------
 * CLC Congregation v0.6 — Explore
 * --------------------------------------------------------------------------
 */

.clc-explore {
    box-sizing: border-box;
    width:
        min(
            calc(100% - 2.5rem),
            1200px
        );
    margin:
        clamp(2.5rem, 5vw, 4.5rem)
        auto
        clamp(3.5rem, 6vw, 5rem);
}

.clc-explore-header {
    max-width: 760px;
    margin-bottom:
        clamp(2rem, 4vw, 3rem);
}

.clc-explore-header h1 {
    margin:
        0
        0
        0.65rem;
    font-size:
        clamp(
            2.6rem,
            6vw,
            4.5rem
        );
    line-height: 1;
    letter-spacing: -0.035em;
}

.clc-explore-intro {
    margin: 0;
    color:
        var(--clc-congregation-muted);
    font-size:
        var(--wp--preset--font-size--large);
    line-height: 1.5;
}


/*
 * Two-thirds articles / one-third discovery sidebar.
 */

.clc-explore-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 2fr)
        minmax(260px, 1fr);
    gap:
        clamp(
            2.5rem,
            5vw,
            5rem
        );
    align-items: start;
}

.clc-explore-main,
.clc-explore-sidebar {
    min-width: 0;
}


/*
 * Article list.
 */

.clc-explore-card {
    padding:
        0
        0
        clamp(
            2rem,
            4vw,
            3rem
        );
    margin-bottom:
        clamp(
            2rem,
            4vw,
            3rem
        );
    border-bottom:
        1px solid
        var(--wp--preset--color--accent-6);
}

.clc-explore-card:first-child {
    padding-top: 0;
}

.clc-explore-card
.wp-block-post-title {
    margin:
        0.45rem
        0
        0.7rem;
    font-size:
        clamp(
            1.65rem,
            3vw,
            2.35rem
        );
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.clc-explore-card
.wp-block-post-title a {
    color:
        var(--wp--preset--color--contrast);
    text-decoration: none;
}

.clc-explore-card
.wp-block-post-title a:hover,
.clc-explore-card
.wp-block-post-title a:focus {
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.clc-explore-meta {
    display: flex;
    flex-wrap: wrap;
    gap:
        0.45rem
        0.9rem;
    align-items: center;
    color:
        var(--clc-congregation-muted);
    font-size:
        var(--wp--preset--font-size--small);
}

.clc-explore-meta
.wp-block-post-date,
.clc-explore-meta
.wp-block-post-terms {
    margin: 0;
}

.clc-explore-meta
.wp-block-post-terms a {
    color:
        var(--clc-congregation-muted);
}

.clc-explore-card
.wp-block-post-excerpt {
    max-width: 720px;
    margin-top: 0.8rem;
}

.clc-explore-card
.wp-block-post-excerpt__excerpt {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.clc-explore-card
.wp-block-post-excerpt__more-link {
    font-weight: 700;
}


/*
 * Pagination.
 */

.clc-explore-pagination {
    margin-top: 1rem;
}

.clc-explore-pagination
.page-numbers {
    min-width: 2.5rem;
    min-height: 2.5rem;
}


/*
 * Sidebar.
 */

.clc-explore-sidebar {
    position: sticky;
    top: 2rem;
    padding:
        clamp(
            1.25rem,
            3vw,
            1.75rem
        );
    border-top:
        0.35rem solid
        var(--clc-congregation-accent);
    background:
        var(--clc-congregation-surface);
}

.clc-explore-sidebar-section
+ .clc-explore-sidebar-section {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top:
        1px solid
        var(--wp--preset--color--accent-6);
}

.clc-explore-sidebar h2 {
    margin:
        0
        0
        1rem;
    font-size:
        var(--wp--preset--font-size--large);
}

.clc-explore-sidebar
.wp-block-search {
    margin: 0;
}

.clc-explore-sidebar
.wp-block-search__inside-wrapper {
    display: flex;
}

.clc-explore-sidebar
.wp-block-search__input {
    min-width: 0;
    border:
        1px solid
        var(--wp--preset--color--accent-6);
    font-size: 1rem;
}

.clc-explore-sidebar
.wp-block-search__button {
    margin-left: 0.35rem;
    background:
        var(--wp--preset--color--contrast);
    color:
        var(--wp--preset--color--base);
}

.clc-explore-sidebar
.wp-block-categories-list {
    margin:
        0;
    padding: 0;
    list-style: none;
}

.clc-explore-sidebar
.wp-block-categories-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding:
        0.45rem
        0;
    border-bottom:
        1px solid
        color-mix(
            in srgb,
            var(--wp--preset--color--accent-6) 65%,
            transparent
        );
}

.clc-explore-sidebar
.wp-block-categories-list li:last-child {
    border-bottom: 0;
}

.clc-explore-sidebar
.wp-block-categories-list a {
    color:
        var(--wp--preset--color--contrast);
}

.clc-explore-sidebar
.wp-block-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
}

.clc-explore-sidebar
.wp-block-tag-cloud a {
    display: inline-block;
    padding:
        0.35rem
        0.55rem;
    border:
        1px solid
        var(--wp--preset--color--accent-6);
    border-radius: 999px;
    background:
        var(--wp--preset--color--base);
    color:
        var(--wp--preset--color--contrast);
    font-size: 0.9rem !important;
    line-height: 1.2;
    text-decoration: none;
}

.clc-explore-sidebar
.wp-block-tag-cloud a:hover,
.clc-explore-sidebar
.wp-block-tag-cloud a:focus {
    border-color:
        var(--wp--preset--color--contrast);
    text-decoration: underline;
}


/*
 * Responsive Explore layout.
 */

@media (max-width: 820px) {

    .clc-explore {
        width:
            calc(100% - 2rem);
    }

    .clc-explore-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .clc-explore-sidebar {
        position: static;
    }
}


/*
 * --------------------------------------------------------------------------
 * CLC Congregation v0.7 — Sermon library
 * --------------------------------------------------------------------------
 */

.clc-sermon-archive {
    box-sizing: border-box;
    width:
        min(
            calc(100% - 2.5rem),
            1200px
        );
    margin:
        clamp(2.5rem, 5vw, 4.5rem)
        auto
        clamp(3.5rem, 6vw, 5rem);
}

.clc-sermon-archive-header {
    max-width: 800px;
    margin-bottom:
        clamp(2rem, 4vw, 3rem);
}

.clc-sermon-archive-header h1 {
    margin:
        0
        0
        0.7rem;
    font-size:
        clamp(
            2.6rem,
            6vw,
            4.5rem
        );
    line-height: 1;
    letter-spacing: -0.035em;
}

.clc-sermon-archive-intro {
    margin: 0;
    color:
        var(--clc-congregation-muted);
    font-size:
        var(--wp--preset--font-size--large);
    line-height: 1.5;
}

.clc-sermon-archive-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 2fr)
        minmax(270px, 1fr);
    gap:
        clamp(
            2.5rem,
            5vw,
            5rem
        );
    align-items: start;
}

.clc-sermon-archive-main,
.clc-sermon-archive-sidebar {
    min-width: 0;
}


/*
 * Sermon entries.
 */

.clc-sermon-card {
    margin: 0;
    padding:
        0
        0
        clamp(
            1.8rem,
            4vw,
            2.6rem
        );
    margin-bottom:
        clamp(
            1.8rem,
            4vw,
            2.6rem
        );
    border-bottom:
        1px solid
        var(--wp--preset--color--accent-6);
}

.clc-sermon-card
.wp-block-post-title {
    margin:
        0
        0
        0.65rem;
    font-size:
        clamp(
            1.6rem,
            3vw,
            2.2rem
        );
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.clc-sermon-card
.wp-block-post-title a {
    color:
        var(--wp--preset--color--contrast);
    text-decoration: none;
}

.clc-sermon-card
.wp-block-post-title a:hover,
.clc-sermon-card
.wp-block-post-title a:focus {
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.clc-sermon-card
.clc-sermon-archive-meta {
    margin:
        0
        0
        0.75rem;
    color:
        var(--clc-congregation-muted);
    font-size:
        var(--wp--preset--font-size--small);
    line-height: 1.5;
}

.clc-sermon-card
.wp-block-post-excerpt {
    max-width: 720px;
    margin-top: 0.75rem;
}

.clc-sermon-card
.wp-block-post-excerpt__excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 0.75rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-height: 1.6;
}

.clc-sermon-card
.wp-block-post-excerpt__more-link {
    font-weight: 700;
}


/*
 * Filter sidebar.
 *
 * Deliberately not sticky: the Explore review showed that a tall sticky
 * sidebar can produce an awkward scrolling experience.
 */

.clc-sermon-archive-sidebar {
    padding:
        clamp(
            1.25rem,
            3vw,
            1.75rem
        );
    border-top:
        0.35rem solid
        var(--clc-congregation-accent);
    background:
        var(--clc-congregation-surface);
}

.clc-sermon-filters h2 {
    margin:
        0
        0
        1.25rem;
    font-size:
        var(--wp--preset--font-size--x-large);
}

.clc-sermon-filter-form {
    margin: 0;
}

.clc-sermon-filter-field {
    margin:
        0
        0
        1.25rem;
}

.clc-sermon-filter-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size:
        var(--wp--preset--font-size--small);
    font-weight: 700;
}

.clc-sermon-filter-field input,
.clc-sermon-filter-field select {
    box-sizing: border-box;
    width: 100%;
    min-height: 3rem;
    padding:
        0.65rem
        0.75rem;
    border:
        1px solid
        var(--wp--preset--color--accent-6);
    border-radius: 3px;
    background:
        var(--wp--preset--color--base);
    color:
        var(--wp--preset--color--contrast);
    font: inherit;
}

.clc-sermon-filter-field input:focus,
.clc-sermon-filter-field select:focus {
    outline:
        2px solid
        var(--clc-congregation-accent);
    outline-offset: 2px;
}

.clc-sermon-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap:
        0.75rem
        1rem;
    align-items: center;
    margin-top: 1.5rem;
}

.clc-sermon-filter-submit {
    min-height: 3rem;
    padding:
        0.7rem
        1rem;
    border: 0;
    border-radius: 4px;
    background:
        var(--wp--preset--color--contrast);
    color:
        var(--wp--preset--color--base);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.clc-sermon-filter-submit:hover,
.clc-sermon-filter-submit:focus {
    text-decoration: underline;
}

.clc-sermon-filter-reset {
    font-weight: 650;
}


/*
 * Pagination.
 */

.clc-sermon-pagination {
    margin-top: 1rem;
}


/*
 * Responsive sermon archive.
 */

@media (max-width: 820px) {

    .clc-sermon-archive {
        width:
            calc(100% - 2rem);
    }

    .clc-sermon-archive-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .clc-sermon-archive-sidebar {
        grid-row: 1;
    }
}
