:root {
    --color-ink: #19333a;
    --color-muted: #60757a;
    --color-brand: #14515a;
    --color-brand-deep: #103c44;
    --color-accent: #d3a85e;
    --color-page: #f2f6f4;
    --color-card: #ffffff;
    --shadow-card: 0 12px 35px rgba(24, 55, 59, 0.08);
    --content-max: 1040px;
    --gutter: 16px;
    --card-pad: clamp(22px, 4vw, 48px);
    --radius-card: 18px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

html[lang="zh-CN"] body {
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 17px;
    line-height: 1.9;
}

html[lang="en"] body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.75;
}

body {
    padding-top: 72px;
    background: var(--color-page);
    color: var(--color-ink);
}

img {
    max-width: 100%;
}

[data-language]:not([hidden]) {
    animation: language-enter 220ms ease-out both;
}

[data-language][hidden] {
    display: none !important;
}

@keyframes language-enter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-navbar {
    min-height: 72px;
    background: var(--color-brand-deep) !important;
    box-shadow: 0 4px 18px rgba(12, 39, 43, 0.18);
}

.site-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-right: 28px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.site-navbar .navbar-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.site-navbar .nav-link {
    padding: 0.65rem 0.85rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.96rem;
    transition: color 160ms ease, background-color 160ms ease;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
    color: #fff;
}

.site-navbar .language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.site-navbar .language-switcher button {
    min-width: 62px;
    padding: 0.35rem 0.75rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    line-height: 1.4;
}

.site-navbar .language-switcher button[aria-pressed="true"] {
    background: #fff;
    color: var(--color-brand-deep);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.site-navbar .language-switcher button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ---------- Shared width: navbar, hero, cards and footer share one column ---------- */
.site-navbar > .container,
#main .container {
    max-width: var(--content-max);
    padding-right: var(--gutter);
    padding-left: var(--gutter);
}

/* Nested containers would otherwise indent cards 15px past the hero edge */
#main .container .container {
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

#main {
    padding-top: 26px;
    padding-bottom: 48px;
}

/* ---------- Hero banner ---------- */
.site-hero {
    overflow: hidden;
    margin-bottom: 28px;
    border-radius: var(--radius-card);
    background: var(--color-brand-deep);
    box-shadow: var(--shadow-card);
}

.site-hero .carousel-item {
    height: clamp(320px, 40vw, 460px);
}

.site-hero .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
}

.site-hero .carousel-item::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 33, 38, 0.8), rgba(7, 33, 38, 0.2) 80%),
        linear-gradient(0deg, rgba(7, 33, 38, 0.34), transparent 60%);
    content: "";
}

/* Caption starts at the same inset as card text below it */
.site-hero .carousel-caption {
    z-index: 1;
    top: 50%;
    right: var(--card-pad);
    bottom: auto;
    left: var(--card-pad);
    max-width: 680px;
    padding: 0;
    text-align: left;
    transform: translateY(-50%);
}

.site-hero .carousel-caption h2 {
    margin-bottom: 16px;
    color: #fff !important;
    font-size: clamp(2rem, 4vw, 3.1rem) !important;
    font-weight: 750;
    line-height: 1.25;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.26);
}

.site-hero .carousel-caption h2::before {
    display: block;
    width: 44px;
    height: 4px;
    margin-bottom: 18px;
    border-radius: 2px;
    background: var(--color-accent);
    content: "";
}

.site-hero .carousel-caption p {
    margin: 0;
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.8;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

#lwfbc-features,
#lwfbc-fellowship,
#lwfbc-worship,
#lwfbc-contact {
    scroll-margin-top: 88px;
}

/* ---------- Content cards ---------- */
.site-card,
.section-proclaim {
    margin-bottom: 28px;
    padding: var(--card-pad);
    border: 1px solid rgba(30, 81, 83, 0.07);
    border-radius: var(--radius-card);
    background: var(--color-card);
    box-shadow: var(--shadow-card);
}

.section-heading {
    margin: 0 0 26px;
    color: var(--color-brand);
    font-size: 1.8rem;
    font-weight: 750;
    line-height: 1.35;
    text-align: left;
}

html[lang="en"] .section-heading {
    font-size: 1.9rem;
    letter-spacing: -0.02em;
}

.section-heading::after {
    display: block;
    width: 44px;
    height: 4px;
    margin-top: 12px;
    border-radius: 2px;
    background: var(--color-accent);
    content: "";
}

.site-card p {
    margin-bottom: 20px;
    color: var(--color-ink);
}

.site-card ul {
    margin: 0;
    padding-left: 1.25rem;
}

.site-card li {
    margin: 0.45rem 0;
    padding-left: 0.25rem;
}

.site-card li::marker {
    color: var(--color-accent);
}

/* ---------- Belief statements ---------- */
.section-proclaim {
    margin-bottom: 0;
}

html[lang="zh-CN"] .section-proclaim {
    line-height: 1.95;
}

html[lang="en"] .section-proclaim {
    line-height: 1.8;
}

.belief-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: belief;
}

.belief-item {
    position: relative;
    padding: 22px 0 22px 56px;
    border-top: 1px solid rgba(30, 81, 83, 0.1);
    counter-increment: belief;
}

.belief-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.belief-item::before {
    position: absolute;
    top: 22px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(20, 81, 90, 0.08);
    color: var(--color-brand);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    content: counter(belief);
}

.belief-item:first-child::before {
    top: 0;
}

.belief-text {
    margin: 0 0 10px;
    color: var(--color-ink);
}

.belief-refs {
    margin: 0;
    padding-left: 12px;
    border-left: 3px solid var(--color-accent);
    color: var(--color-muted);
    font-size: 0.88em;
    line-height: 1.7;
}

/* ---------- Sunday worship recordings ---------- */
.recordings-intro {
    margin: -6px 0 28px;
    color: var(--color-muted);
}

.recording-list {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.recording-list .recording-card {
    margin: 0;
    padding: clamp(18px, 3vw, 26px);
    border: 1px solid rgba(30, 81, 83, 0.12);
    border-left: 4px solid rgba(30, 81, 83, 0.12);
    border-radius: 14px;
    background: var(--color-page);
    transition: border-color 160ms ease, background-color 160ms ease;
}

.recording-card.is-playing {
    border-left-color: var(--color-accent);
    background: #fffdf8;
}

.recording-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 6px;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.recording-tag {
    padding: 1px 10px;
    border-radius: 999px;
    background: rgba(20, 81, 90, 0.08);
    color: var(--color-brand);
    font-size: 0.8rem;
    font-weight: 600;
}

.recording-title {
    margin: 0 0 2px;
    color: var(--color-ink);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
}

.recording-scripture {
    margin: 0 0 16px;
    color: var(--color-brand);
    font-size: 0.95rem;
}

.recording-card audio {
    display: block;
    width: 100%;
    height: 44px;
}

.recording-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.recording-foot a {
    color: var(--color-brand);
    font-weight: 600;
}

/* ---------- Footer aligned to the same column ---------- */
footer {
    padding: 38px 0 20px;
    background: var(--color-brand-deep);
    color: rgba(255, 255, 255, 0.84);
}

footer .offset-sm-4 {
    justify-content: center;
    margin-left: 0;
}

footer .footer-heading {
    margin-bottom: 14px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
}

footer .footer-text,
footer .footer-text a {
    color: rgba(255, 255, 255, 0.82);
}

footer .footer-text a:hover {
    color: #fff;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.2);
}

footer > .col-sm-12 {
    max-width: var(--content-max);
    margin: 0 auto;
    padding-right: var(--gutter);
    padding-left: var(--gutter);
}

@media (max-width: 991.98px) {
    .site-navbar .navbar-collapse {
        padding: 10px 0 16px;
    }

    .site-navbar .language-switcher {
        margin: 8px 0 2px;
    }
}

@media (max-width: 575.98px) {
    body {
        padding-top: 64px;
    }

    .site-navbar {
        min-height: 64px;
    }

    .site-navbar .navbar-brand {
        gap: 9px;
        margin-right: 8px;
        font-size: 1rem;
    }

    .site-navbar .navbar-brand img {
        width: 36px;
        height: 36px;
    }

    #main {
        padding-top: 16px;
        padding-bottom: 28px;
    }

    .site-hero {
        margin-bottom: 18px;
        border-radius: 15px;
    }

    .site-hero .carousel-item {
        height: 320px;
    }

    .site-hero .carousel-caption h2 {
        margin-bottom: 10px;
        font-size: 1.75rem !important;
    }

    .site-hero .carousel-caption h2::before {
        margin-bottom: 14px;
    }

    .site-hero .carousel-caption p {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .site-card {
        margin-bottom: 18px;
        border-radius: 15px;
    }

    .section-proclaim {
        border-radius: 15px;
    }

    .section-heading {
        margin-bottom: 20px;
        font-size: 1.5rem;
    }

    html[lang="en"] .section-heading {
        font-size: 1.6rem;
    }

    .belief-item {
        padding-left: 44px;
    }

    .belief-item::before {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
