/*
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.3.0
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 {
    margin: 0 0 0.75rem;
    color:
        var(--clc-congregation-accent);
    font-size:
        var(--wp--preset--font-size--small);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.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(--clc-congregation-accent);
    color: #fff;
    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 {
    color: #fff;
    text-decoration: underline;
}

.clc-sunday-information {
    background:
        var(--wp--preset--color--accent-2);
    width: 100%;
    max-width: none;
    padding-left:
        max(
            1.25rem,
            calc((100% - 1200px) / 2)
        );
    padding-right:
        max(
            1.25rem,
            calc((100% - 1200px) / 2)
        );
}

.clc-sunday-information address {
    max-width: 760px;
    font-style: normal;
}

.clc-sunday-venue,
.clc-sunday-location p {
    margin-bottom: 0.25rem;
}

.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-sunday-information {
        width: 100%;
    }
}


/*
 * --------------------------------------------------------------------------
 * 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;
    }
}
