.community-page {
    --community-primary: #08807e;
    --community-primary-dark: #055f5d;
    --community-secondary: #0b6f78;
    --community-ink: #14313b;
    --community-muted: #607577;
    --community-line: #d6e8e8;
    --community-soft: #f1fbfa;
    --community-white: #ffffff;
    --community-accent: #08807e;
    overflow: hidden;
    background: var(--community-white);
    color: var(--community-ink);
}

.community-page,
.community-page * {
    box-sizing: border-box;
}

.community-wrap {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.community-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--community-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.community-eyebrow::before {
    width: 28px;
    height: 2px;
    background: currentColor;
    content: "";
}

.community-hero {
    position: relative;
    isolation: isolate;
    min-height: 500px;
    overflow: hidden;
    background: var(--community-primary-dark);
    color: #fff;
}

.community-hero__media,
.community-hero__overlay {
    position: absolute;
    inset: 0;
}

.community-hero__media {
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
}

.community-hero__overlay {
    z-index: -1;
    background: linear-gradient(90deg, rgba(5, 57, 59, 0.97) 0%, rgba(5, 77, 77, 0.9) 46%, rgba(5, 77, 77, 0.48) 74%, rgba(5, 77, 77, 0.2) 100%);
}

.community-hero__content {
    display: flex;
    min-height: 500px;
    max-width: 690px;
    flex-direction: column;
    justify-content: center;
    padding: 70px 0 76px;
}

.community-hero .community-eyebrow {
    color: #8ee4df;
}

.community-hero h1 {
    margin: 0;
    color: #fff;
    font-size: 4.45rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 0.99;
}

.community-hero__lead {
    max-width: 630px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.16rem;
    line-height: 1.75;
}

.community-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.community-btn {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.community-btn:hover,
.community-btn:focus {
    text-decoration: none;
}

.community-btn:focus-visible {
    outline: 3px solid rgba(226, 167, 43, 0.48);
    outline-offset: 3px;
}

.community-btn--hero {
    border-color: #fff;
    background: #fff;
    color: var(--community-primary-dark);
}

.community-btn--hero:hover,
.community-btn--hero:focus {
    border-color: #dff7f5;
    background: #dff7f5;
    color: var(--community-primary-dark);
}

.community-btn--ghost {
    border-color: rgba(255, 255, 255, 0.68);
    background: rgba(5, 63, 64, 0.3);
    color: #fff;
}

.community-btn--ghost:hover,
.community-btn--ghost:focus {
    border-color: #fff;
    background: #fff;
    color: var(--community-primary-dark);
}

.community-btn--primary {
    border-color: var(--community-primary);
    background: var(--community-primary);
    color: #fff;
}

.community-btn--primary:hover,
.community-btn--primary:focus {
    border-color: var(--community-primary-dark);
    background: var(--community-primary-dark);
    color: #fff;
}

.community-btn--outline {
    border-color: var(--community-primary);
    background: transparent;
    color: var(--community-primary);
}

.community-btn--outline:hover,
.community-btn--outline:focus {
    background: var(--community-primary);
    color: #fff;
}

.community-scope {
    border-bottom: 1px solid var(--community-line);
    background: var(--community-white);
}

.community-scope__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.community-scope__item {
    display: grid;
    min-width: 0;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 25px 28px;
    border-left: 1px solid var(--community-line);
}

.community-scope__item:last-child {
    border-right: 1px solid var(--community-line);
}

.community-scope__icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--community-soft);
    color: var(--community-primary);
    font-size: 1.2rem;
}

.community-scope__item > div > strong,
.community-scope__item > div > span {
    display: block;
}

.community-scope__item > div > strong {
    margin-bottom: 4px;
    color: var(--community-ink);
    font-size: 1rem;
    font-weight: 800;
}

.community-scope__item > div > span {
    color: var(--community-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.community-section {
    padding: 82px 0;
}

.community-section--soft {
    border-top: 1px solid var(--community-line);
    background: var(--community-soft);
}

.community-section__head {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
    gap: 72px;
    align-items: end;
    margin-bottom: 38px;
}

.community-section__head h2 {
    margin: 0;
    color: var(--community-ink);
    font-size: 2.65rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.12;
}

.community-section__head p {
    margin: 0;
    color: var(--community-muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.community-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.community-benefit {
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--community-line);
    border-top: 3px solid var(--community-primary);
    border-radius: 4px;
    background: var(--community-white);
    box-shadow: 0 12px 30px rgba(20, 49, 59, 0.05);
}

.community-benefit:nth-child(2) {
    border-top-color: var(--community-secondary);
}

.community-benefit:nth-child(3) {
    border-top-color: var(--community-accent);
}

.community-benefit__icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border-radius: 4px;
    background: var(--community-soft);
    color: var(--community-primary);
    font-size: 1.05rem;
}

.community-benefit:nth-child(2) .community-benefit__icon {
    color: var(--community-secondary);
}

.community-benefit:nth-child(3) .community-benefit__icon {
    color: var(--community-primary);
}

.community-benefit h3 {
    margin: 0 0 11px;
    color: var(--community-ink);
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.3;
}

.community-benefit p {
    margin: 0;
    color: var(--community-muted);
    font-size: 0.96rem;
    line-height: 1.72;
}

.community-access {
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
    gap: 48px;
    align-items: center;
    margin-top: 42px;
    padding-top: 30px;
    border-top: 1px solid var(--community-line);
}

.community-access h3 {
    margin: 0;
    color: var(--community-ink);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.35;
}

.community-access__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.community-access__list li {
    display: flex;
    min-width: 0;
    gap: 11px;
    align-items: flex-start;
    color: var(--community-ink);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.55;
}

.community-access__list i {
    flex: 0 0 auto;
    margin-top: 4px;
    color: var(--community-primary);
}

.community-events-head {
    display: flex;
    gap: 24px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 34px;
}

.community-events-head h2 {
    max-width: 700px;
    margin: 0;
    color: var(--community-ink);
    font-size: 2.65rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.12;
}

.community-events-count {
    flex: 0 0 auto;
    margin: 0 0 4px;
    color: var(--community-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.community-event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.community-event {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--community-line);
    border-radius: 4px;
    background: var(--community-white);
    box-shadow: 0 12px 30px rgba(20, 49, 59, 0.05);
}

.community-event__media {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: #dcebea;
}

.community-event__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.community-event:hover .community-event__media img {
    transform: scale(1.025);
}

.community-event__type {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border-radius: 4px;
    background: rgba(5, 63, 64, 0.92);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.community-event__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.community-event__date {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0 0 12px;
    color: var(--community-primary);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.4;
}

.community-event h3 {
    margin: 0;
    color: var(--community-ink);
    font-size: 1.22rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.35;
}

.community-event__venue {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 13px 0 0;
    color: var(--community-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.community-event__venue i {
    flex: 0 0 auto;
    margin-top: 4px;
    color: var(--community-primary);
}

.community-event__footer {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 22px;
}

.community-event__locked {
    display: flex;
    gap: 7px;
    align-items: center;
    color: var(--community-muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}

.community-event .community-btn {
    min-height: 40px;
    flex: 0 0 auto;
    padding: 0 14px;
    font-size: 0.84rem;
}

.community-join {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--community-primary-dark);
    color: #fff;
}

.community-join__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 48px;
    align-items: center;
    padding: 62px 0;
}

.community-join h2 {
    margin: 0;
    color: #fff;
    font-size: 2.3rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.18;
}

.community-join p {
    max-width: 650px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.7;
}

.community-join__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

html[data-theme="dark"] .community-page {
    --community-ink: #edf8f7;
    --community-muted: #afc4c5;
    --community-line: #2c5054;
    --community-soft: #12363a;
    --community-white: #0e292d;
    background: var(--community-white);
}

@media (max-width: 991.98px) {
    .community-hero__overlay {
        background: linear-gradient(90deg, rgba(5, 57, 59, 0.96) 0%, rgba(5, 77, 77, 0.88) 62%, rgba(5, 77, 77, 0.52) 100%);
    }

    .community-hero h1 {
        font-size: 3.85rem;
    }

    .community-section__head {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .community-benefits,
    .community-event-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .community-event:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .community-wrap {
        width: min(calc(100% - 28px), 680px);
    }

    .community-hero,
    .community-hero__content {
        min-height: 455px;
    }

    .community-hero__media {
        object-position: 58% center;
    }

    .community-hero__overlay {
        background: rgba(5, 64, 65, 0.84);
    }

    .community-hero__content {
        max-width: 560px;
        padding: 52px 0 58px;
    }

    .community-hero h1 {
        font-size: 3.05rem;
    }

    .community-hero__lead {
        margin-top: 18px;
        font-size: 1rem;
        line-height: 1.65;
    }

    .community-hero__actions {
        margin-top: 25px;
    }

    .community-scope__grid,
    .community-benefits,
    .community-access,
    .community-event-grid,
    .community-join__inner {
        grid-template-columns: 1fr;
    }

    .community-scope__item,
    .community-scope__item:last-child {
        padding: 20px 0;
        border-right: 0;
        border-left: 0;
    }

    .community-scope__item + .community-scope__item {
        border-top: 1px solid var(--community-line);
    }

    .community-section {
        padding: 58px 0;
    }

    .community-section__head {
        margin-bottom: 28px;
    }

    .community-section__head h2,
    .community-events-head h2,
    .community-join h2 {
        font-size: 2.08rem;
    }

    .community-access {
        gap: 22px;
    }

    .community-access__list {
        grid-template-columns: 1fr;
    }

    .community-events-head {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 28px;
    }

    .community-event:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .community-event__media {
        height: 240px;
    }

    .community-join__inner {
        gap: 28px;
        padding: 52px 0;
    }
}

@media (max-width: 479.98px) {
    .community-hero h1 {
        font-size: 2.58rem;
    }

    .community-hero__actions,
    .community-join__actions {
        flex-direction: column;
    }

    .community-hero__actions .community-btn,
    .community-join__actions .community-btn {
        width: 100%;
    }

    .community-benefit,
    .community-event__body {
        padding: 20px;
    }

    .community-event__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .community-event .community-btn {
        width: 100%;
    }
}


/* Community motion */
.community-hero__media { animation: communityHeroMedia 1.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.community-hero__content > * { opacity: 0; animation: communityHeroRise 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.community-hero__content > :nth-child(1) { animation-delay: 100ms; }
.community-hero__content > :nth-child(2) { animation-delay: 190ms; }
.community-hero__content > :nth-child(3) { animation-delay: 280ms; }
.community-hero__content > :nth-child(4) { animation-delay: 370ms; }
.community-btn { transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease; }
.community-btn i { transition: transform 180ms ease; }
.community-btn:hover { transform: translateY(-2px); }
.community-btn:hover i { transform: translateX(3px); }
.community-scope__icon, .community-benefit__icon { transition: transform 220ms ease; }
.community-scope__item:hover .community-scope__icon, .community-benefit:hover .community-benefit__icon { transform: translateY(-3px); }
.community-benefit, .community-event { transition: transform 220ms ease, box-shadow 220ms ease; }
.community-benefit:hover, .community-event:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(20, 49, 59, 0.11); }
.community-benefit[data-aos].aos-animate:hover, .community-event[data-aos].aos-animate:hover { transform: translateY(-5px); }
.community-event__media img { transition: transform 320ms ease; }
.community-event:hover .community-event__media img { transform: scale(1.025); }
@keyframes communityHeroMedia { from { opacity: .6; transform: scale(1.035); } to { opacity: 1; transform: scale(1); } }
@keyframes communityHeroRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
    .community-page *, .community-page *::before, .community-page *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .community-hero__content > * { opacity: 1; }
}

/* Complete theme-toggle component coverage. */
html[data-theme="dark"] .community-page{color-scheme:dark}
html[data-theme="dark"] .community-page :is(.community-benefit,.community-event){background:linear-gradient(180deg,#142128,#17262d);border-color:rgba(143,208,205,.16);box-shadow:0 18px 44px rgba(0,0,0,.26)}
html[data-theme="dark"] .community-page :is(.community-scope,.community-section--soft,.community-access,.community-event__footer){border-color:rgba(143,208,205,.16)}
html[data-theme="dark"] .community-page :is(.community-scope__icon,.community-benefit__icon){background:rgba(89,200,195,.14)}
html[data-theme="dark"] .community-page .community-event__media{background:#14252b}
html[data-theme="dark"] .community-page .community-event__type{background:#e4f6f4;color:#075b59}
html[data-theme="dark"] .community-page .community-event__locked{color:#a9c0c6}
html[data-theme="dark"] .community-page .community-btn--hero{background:#fff;border-color:#fff;color:#055f5d!important}
html[data-theme="dark"] .community-page .community-btn--hero:hover,
html[data-theme="dark"] .community-page .community-btn--hero:focus{background:#dff7f5;border-color:#dff7f5;color:#055f5d!important}
html[data-theme="dark"] .community-page .community-btn--ghost{background:rgba(5,63,64,.35);border-color:rgba(255,255,255,.68);color:#fff!important}
html[data-theme="dark"] .community-page .community-btn--ghost:hover,
html[data-theme="dark"] .community-page .community-btn--ghost:focus{background:#fff;border-color:#fff;color:#055f5d!important}
html[data-theme="dark"] .community-page .community-btn--primary{background:#59c8c3;border-color:#59c8c3;color:#09282c!important}
html[data-theme="dark"] .community-page .community-btn--primary:hover,
html[data-theme="dark"] .community-page .community-btn--primary:focus{background:#8ce7e1;border-color:#8ce7e1;color:#09282c!important}
html[data-theme="dark"] .community-page .community-btn--outline{background:transparent;border-color:#7ad7d3;color:#7ad7d3!important}
html[data-theme="dark"] .community-page .community-btn--outline:hover,
html[data-theme="dark"] .community-page .community-btn--outline:focus{background:#59c8c3;color:#09282c!important}
