/* Dedicated Schulgemeinschaft hub using the shared school palette. */
.ls-community-hub {
    --community-red: var(--ls-red, #a51f2d);
    --community-red-dark: var(--ls-red-dark, #801722);
    --community-gold: var(--ls-gold, #c8992a);
    --community-ink: var(--ls-ink, #1a1a2e);
    --community-muted: var(--ls-muted, #5a6470);
    --community-paper: var(--ls-paper, #f8f6f2);
    --community-line: var(--ls-line, #e4ded5);
    --community-gutter: clamp(1rem, 2.5vw, 2rem);
    background: var(--community-paper);
}

.ls-community-hero {
    padding: clamp(1rem, 3vw, 2.5rem) var(--community-gutter) 0;
}

.ls-community-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    max-width: 1200px;
    min-height: 36rem;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--community-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(42, 33, 28, 0.09);
}

.ls-community-hero__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.25rem, 4.5vw, 3.75rem);
    background:
        radial-gradient(circle at 12% 8%, rgba(200, 153, 42, 0.14), transparent 38%),
        linear-gradient(145deg, #faf5ed, #fff);
}

.ls-community-hero__copy .ls-breadcrumbs {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--community-muted);
    font-size: 0.88rem;
}

.ls-community-hero__copy .ls-breadcrumbs a {
    color: var(--community-red-dark);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.ls-community-hero__copy > .ls-eyebrow {
    margin-bottom: 0.65rem;
    color: var(--community-red);
}

.ls-community-hero .wp-block-post-title {
    max-width: none;
    margin: 0 0 1rem;
    color: var(--community-ink);
    font-size: clamp(2.1rem, 2.8vw, 2.5rem);
    letter-spacing: -0.05em;
    line-height: 1.03;
    text-wrap: balance;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
}

.ls-community-hero__lead {
    max-width: 48ch;
    margin: 0;
    color: #3f4a52;
    font-size: clamp(1.02rem, 1.35vw, 1.16rem);
    line-height: 1.65;
}

.ls-community-hero__actions {
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.ls-community-hero__actions .wp-block-button__link {
    min-height: 44px;
    padding: 0.7rem 1rem;
    font-weight: 700;
}

.ls-community-hero__actions .is-style-outline .wp-block-button__link {
    border-color: rgba(128, 23, 34, 0.5);
    color: var(--community-red-dark);
}

.ls-community-hero__image {
    min-height: 36rem;
    margin: 0;
    background: #d8d0c4;
}

.ls-community-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 66% 50%;
}

.ls-community-values {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: calc(100% - (2 * var(--community-gutter)));
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0;
    border-radius: 14px;
    background: var(--community-red-dark);
    box-shadow: 0 14px 32px rgba(74, 16, 24, 0.2);
    color: #fff;
    list-style: none;
}

.ls-community-values li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.85rem;
    padding: 1.5rem 1.65rem;
    border-right: 1px solid rgba(255, 255, 255, 0.24);
}

.ls-community-values li:last-child {
    border-right: 0;
}

.ls-community-values li > span {
    grid-row: 1 / 3;
    color: #f3dc94;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.ls-community-values strong {
    font-size: clamp(1rem, 1.6vw, 1.16rem);
    line-height: 1.3;
}

.ls-community-values small {
    color: #f4e9e6;
    font-size: 0.82rem;
    line-height: 1.45;
}

.ls-community-story {
    padding: clamp(4rem, 7vw, 5.5rem) var(--community-gutter) 0 !important;
}

.ls-community-story__inner {
    display: grid;
    grid-template-columns: minmax(13rem, 0.7fr) minmax(0, 1.8fr);
    gap: clamp(2rem, 5vw, 5rem);
    padding: clamp(2rem, 4vw, 3.5rem);
    border: 1px solid var(--community-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.ls-community-story__inner > .ls-eyebrow,
.ls-community-story__inner > h2 {
    grid-column: 1;
}

.ls-community-story__inner > .ls-eyebrow {
    align-self: end;
    margin: 0 0 -1.5rem;
    color: var(--community-red);
}

.ls-community-story h2 {
    align-self: start;
    margin: 0;
    color: var(--community-ink);
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    letter-spacing: -0.035em;
    line-height: 1.08;
    text-wrap: balance;
}

.ls-community-story__content {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.ls-community-story__content > h2:first-child,
.ls-community-story__content > p:empty {
    display: none;
}

.ls-community-story__content p {
    margin: 0 0 1rem;
    color: #46515a;
    line-height: 1.72;
}

.ls-community-story__content p:first-of-type {
    padding: 1rem 1.15rem;
    border-left: 3px solid var(--community-gold);
    background: #faf5e7;
    color: var(--community-red-dark);
    font-style: italic;
}

.ls-community-explore {
    padding: clamp(4rem, 7vw, 6rem) var(--community-gutter) !important;
    scroll-margin-top: 8rem;
}

.ls-community-explore .ls-context-nav {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.ls-community-explore .ls-context-nav__intro {
    max-width: 44rem;
    margin-bottom: 1.75rem;
}

.ls-community-explore .ls-context-nav__description {
    max-width: 40rem;
    margin: 0.75rem 0 0;
    color: var(--community-muted);
    line-height: 1.6;
}

.ls-community-explore .ls-context-nav__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ls-community-nav-group + .ls-community-nav-group {
    margin-top: 2.5rem;
}

.ls-community-nav-group h3 {
    margin: 0 0 1rem;
    color: var(--community-red-dark);
    font-size: 1.18rem;
    letter-spacing: -0.015em;
}

.ls-community-explore .ls-context-card {
    min-height: 10rem;
    border-color: var(--community-line);
    box-shadow: 0 8px 22px rgba(42, 33, 28, 0.04);
}

.ls-community-explore .ls-context-card__icon {
    background: #f7ecee;
    color: var(--community-red-dark);
}

.ls-community-explore .ls-context-card:hover,
.ls-community-explore .ls-context-card:focus-visible {
    border-color: rgba(128, 23, 34, 0.62);
    box-shadow: 0 14px 32px rgba(42, 33, 28, 0.1);
}

.ls-community-explore .ls-context-card:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--community-red-dark), 0 14px 32px rgba(42, 33, 28, 0.1);
}

.ls-community-cta {
    padding: 0 var(--community-gutter) clamp(4rem, 7vw, 6rem) !important;
}

.ls-community-cta__inner {
    position: relative;
    min-height: 22rem;
    overflow: hidden;
    border-radius: 22px;
    background:
        radial-gradient(circle at 86% 25%, rgba(255, 255, 255, 0.11), transparent 22rem),
        linear-gradient(135deg, var(--community-red-dark), #a52231);
    color: #fff;
}

.ls-community-cta__inner::after {
    content: "M";
    position: absolute;
    right: clamp(1rem, 7vw, 5rem);
    bottom: -0.28em;
    color: rgba(255, 255, 255, 0.07);
    font-size: clamp(13rem, 26vw, 21rem);
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
}

.ls-community-cta__copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 48rem;
    min-height: 22rem;
    padding: clamp(2.25rem, 6vw, 4rem);
}

.ls-community-cta .ls-eyebrow {
    color: #f3dc94;
}

.ls-community-cta h2 {
    max-width: 19ch;
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(2.1rem, 4vw, 3rem);
    letter-spacing: -0.035em;
    line-height: 1.08;
    text-wrap: balance;
}

.ls-community-cta p:not(.ls-eyebrow) {
    max-width: 58ch;
    margin: 0 0 1.5rem;
    color: #f8eeee;
    font-size: 1.05rem;
    line-height: 1.65;
}

.ls-community-cta .wp-block-button__link {
    min-height: 44px;
    border-color: #fff !important;
    background: #fff !important;
    color: var(--community-red-dark) !important;
    font-weight: 700;
}

.ls-community-cta .wp-block-button__link:hover {
    background: #f9ecee !important;
}

.ls-community-cta .wp-block-button__link:focus-visible {
    outline: 3px solid #fff !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 7px var(--community-red-dark) !important;
}

.ls-community-hub h1,
.ls-community-hub h2,
.ls-community-hub [id] {
    scroll-margin-top: 9rem;
}

@media (max-width: 1023px) {
    .ls-community-hero__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .ls-community-hero__copy {
        padding: 2rem;
    }

    .ls-community-hero__image {
        min-height: 0;
        height: clamp(17rem, 42vw, 23rem);
    }

    .ls-community-explore .ls-context-nav__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ls-community-story__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .ls-community-story__inner > .ls-eyebrow,
    .ls-community-story__inner > h2,
    .ls-community-story__content {
        grid-column: 1;
        grid-row: auto;
    }

    .ls-community-story__inner > .ls-eyebrow {
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    .ls-community-values,
    .ls-community-explore .ls-context-nav__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ls-community-values li {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    }

    .ls-community-values li:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 639px) {
    .ls-community-hero {
        padding-inline: 1rem;
    }

    .ls-community-hero__inner,
    .ls-community-cta__inner {
        border-radius: 16px;
    }

    .ls-community-hero__copy {
        padding: 1.5rem;
    }

    .ls-community-hero .wp-block-post-title {
        font-size: clamp(1.6rem, 8vw, 2.15rem);
    }

    .ls-community-hero__lead {
        font-size: 0.94rem;
    }

    .ls-community-hero__actions,
    .ls-community-hero__actions .wp-block-button,
    .ls-community-hero__actions .wp-block-button__link {
        width: 100%;
    }

    .ls-community-values {
        width: calc(100% - 2rem);
        margin: 1rem;
        border-radius: 12px;
    }

    .ls-community-explore {
        padding-block: 3.75rem !important;
    }

    .ls-community-cta__copy {
        padding: 2rem 1.5rem;
    }

    .ls-community-cta .wp-block-buttons,
    .ls-community-cta .wp-block-button,
    .ls-community-cta .wp-block-button__link {
        width: 100%;
    }
}

@media (forced-colors: active) {
    .ls-community-hero__inner,
    .ls-community-values,
    .ls-community-cta__inner,
    .ls-community-explore .ls-context-card {
        border: 1px solid CanvasText;
        background: Canvas;
        color: CanvasText;
        box-shadow: none;
    }

    .ls-community-values *,
    .ls-community-cta *,
    .ls-community-hero__copy > .ls-eyebrow,
    .ls-community-hero .wp-block-post-title {
        color: CanvasText;
    }

    .ls-community-explore .ls-context-card__icon {
        border: 1px solid CanvasText;
        background: Canvas;
        color: CanvasText;
    }
}
