/* ============ Community page ============ */
/* Built on the existing token system; page-scoped additions only. */

/* Content bands alternate a light gray with white so each section reads as
   its own block without hard borders. */
:root {
    --community-gray: #F4F5F4;   /* light gray band */
}

/* ---------- Scroll-reveal ----------
   home.css defines .reveal for the home page only, so the Community page
   carries its own copy (theme.js toggles .is-visible). */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
}

/* ---------- Hero extras ---------- */
.community-hero-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin: var(--space-5) 0 0;
    padding: 0;
}

.community-hero-chips li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.community-hero-chips i { color: var(--orange); font-size: 0.95rem; }

/* ---------- Intro / conservation splits ---------- */
.community-intro { background: var(--bg); }
.community-conservation { background: var(--bg); }

.community-intro .split-media,
.community-conservation .split-media { aspect-ratio: 5 / 4; }

.community-checklist {
    list-style: none;
    margin: var(--space-5) 0 var(--space-6);
    padding: 0;
    display: grid;
    gap: var(--space-3);
}

.community-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: 0.98rem;
    color: var(--text);
}

.community-checklist i {
    color: var(--accent);
    margin-top: 0.32rem;
    flex-shrink: 0;
}

.community-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    align-items: center;
}

.community-textlink {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--brand);
}

.community-textlink:hover { color: var(--accent-dark); }

/* ---------- Pillars (feature cards) ---------- */
.community-pillars { background: var(--community-gray); }

.community-feature .feature-icon i { font-size: 24px; }

.community-feature h3 { color: var(--heading); }

.community-feature p { color: var(--text); }

/* ---------- Projects (cards) ---------- */
.community-projects { background: var(--community-gray); }

.community-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.community-project-card {
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
    padding: var(--space-6);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.community-project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
    border-color: var(--accent);
}

.community-project-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: var(--space-4);
    background: var(--brand-dark);
    color: var(--orange);
    font-size: 22px;
}

.community-project-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

.community-project-card p { margin: 0; font-size: 0.97rem; color: var(--text); }

/* ---------- Commitments (cardless ruled items) ---------- */
.community-commitments { background: var(--bg); }

.community-values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6) var(--space-7);
}

.community-value {
    border-top: 2px solid var(--border);
    padding-top: var(--space-5);
}

.community-value-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: var(--space-4);
    background: var(--bg-alt);
    color: var(--brand);
    font-size: 20px;
}

.community-value h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

.community-value p { margin: 0; font-size: 0.97rem; color: var(--text); }

/* ---------- Charity / community gallery ---------- */
.community-gallery-band { background: var(--community-gray); }

.community-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.community-gallery-item { margin: 0; }

.community-gallery-btn {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.community-gallery-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.community-gallery-btn:hover img,
.community-gallery-btn:focus-visible img { transform: scale(1.06); }

.community-gallery-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.community-gallery-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: var(--space-6) var(--space-4) var(--space-3);
    background: linear-gradient(to top, rgba(21, 48, 36, 0.88), rgba(21, 48, 36, 0));
    color: #fff;
    font-size: var(--fs-small);
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
}

/* Lightbox */
.community-lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-6);
    background: rgba(9, 20, 15, 0.93);
}

.community-lightbox[hidden] { display: none; }

.community-lightbox-figure {
    max-width: min(1100px, 92vw);
    margin: 0;
    text-align: center;
}

.community-lightbox-figure img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    margin-inline: auto;
    object-fit: contain;
}

.community-lightbox-figure figcaption {
    margin-top: var(--space-4);
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--fs-small);
}

.community-lightbox-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-5);
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--dur) var(--ease);
}

.community-lightbox-nav {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background var(--dur) var(--ease);
}

.community-lightbox-close:hover,
.community-lightbox-nav:hover { background: rgba(255, 255, 255, 0.28); }

.community-lightbox-close:focus-visible,
.community-lightbox-nav:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

body.community-lightbox-open { overflow: hidden; }

/* ---------- FAQ accordion ---------- */
.community-faq-band { background: var(--bg); }

.community-faq details { border-bottom: 1px solid var(--border); }

.community-faq details:first-child { border-top: 1px solid var(--border); }

.community-faq summary {
    position: relative;
    list-style: none;
    cursor: pointer;
    padding: var(--space-5) 2.5rem var(--space-5) 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
}

.community-faq summary::-webkit-details-marker { display: none; }

.community-faq summary::after {
    content: "\2b";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--accent);
}

.community-faq details[open] summary::after { content: "\2212"; }

.community-faq-a {
    padding: 0 0 var(--space-5);
    max-width: 72ch;
    color: var(--text);
}

.community-faq-a p:last-child { margin-bottom: 0; }

/* ---------- Closing CTA band ---------- */
.community-cta {
    position: relative;
    background: linear-gradient(120deg, var(--forest), var(--leaf));
    color: #fff;
    text-align: center;
    padding-block: var(--space-8);
}

.community-cta h2 { color: #fff; }

.community-cta p {
    color: rgba(255, 255, 255, 0.86);
    max-width: 56ch;
    margin-inline: auto;
}

.community-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
    margin-top: var(--space-5);
}

/* WhatsApp button (home.css owns .btn-wa; Community needs its own copy). */
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1EA952; color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }

.community-cta .btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.community-cta .btn-ghost:hover {
    background: #fff;
    border-color: #fff;
    color: var(--brand-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .community-projects-grid { grid-template-columns: repeat(2, 1fr); }
    .community-values-grid { grid-template-columns: repeat(2, 1fr); }
    .community-gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .community-projects-grid,
    .community-values-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .community-project-card { padding: var(--space-5); }
    .community-gallery { grid-template-columns: repeat(2, 1fr); }
    .community-lightbox { padding: var(--space-4); }
    .community-lightbox-nav { width: 40px; height: 40px; }
    .community-lightbox-close { top: var(--space-3); right: var(--space-3); }
}
