/* =========================================================
   GIAI-PHAP.PHP — COMMUNITY / AFFILIATE LANDING PAGE
   Scoped entirely under .community-page to avoid side effects.
   ========================================================= */

.community-page {
    --gp-green: #0B6B35;
    --gp-green-dark: #074d28;
    --gp-green-soft: #eaf6ef;
    --gp-gold: #c8962e;
    --gp-gold-soft: #fff7e2;
    --gp-ink: #17342a;
    --gp-muted: #66766f;
    --gp-line: rgba(11, 107, 53, 0.12);
    --gp-white: #ffffff;
    --gp-surface: #f7faf8;
    --gp-shadow: 0 18px 50px rgba(10, 62, 35, 0.10);
    color: var(--gp-ink);
    background: #fff;
    overflow: hidden;
}

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

.community-page .gp-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.community-page .gp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--gp-green);
    background: var(--gp-green-soft);
    border: 1px solid rgba(11, 107, 53, 0.10);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.community-page .gp-eyebrow i {
    color: var(--gp-gold);
}

.community-page .gp-section-head {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.community-page .gp-section-head h2 {
    margin: 13px 0 12px;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    line-height: 1.18;
    font-weight: 800;
    color: var(--gp-ink);
    letter-spacing: -.025em;
}

.community-page .gp-section-head p {
    margin: 0;
    color: var(--gp-muted);
    font-size: 1.04rem;
    line-height: 1.75;
}

/* HERO */
.community-page .gp-hero {
    position: relative;
    padding: 72px 0 58px;
    background:
        radial-gradient(circle at 8% 14%, rgba(11, 107, 53, .14), transparent 28%),
        radial-gradient(circle at 92% 18%, rgba(200, 150, 46, .13), transparent 25%),
        linear-gradient(180deg, #fbfdfb 0%, #f4f9f6 100%);
}

.community-page .gp-hero::after {
    content: "";
    position: absolute;
    inset: auto -100px -180px auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 1px solid rgba(11, 107, 53, .08);
    box-shadow:
        0 0 0 55px rgba(11, 107, 53, .025),
        0 0 0 110px rgba(11, 107, 53, .018);
    pointer-events: none;
}

.community-page .gp-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 58px;
    align-items: center;
}

.community-page .gp-hero-copy h1 {
    margin: 18px 0 20px;
    max-width: 720px;
    font-size: clamp(2.35rem, 5vw, 4.55rem);
    line-height: 1.03;
    letter-spacing: -.045em;
    font-weight: 850;
    color: var(--gp-ink);
}

.community-page .gp-hero-copy h1 .gp-accent {
    color: var(--gp-green);
    position: relative;
    white-space: nowrap;
}

.community-page .gp-hero-copy h1 .gp-accent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: .04em;
    height: .12em;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(200,150,46,.65), rgba(11,107,53,.12));
    z-index: -1;
}

.community-page .gp-hero-copy > p {
    max-width: 680px;
    margin: 0;
    color: #53665e;
    line-height: 1.85;
    font-size: 1.06rem;
}

.community-page .gp-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.community-page .gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 750;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.community-page .gp-btn:hover {
    transform: translateY(-2px);
}

.community-page .gp-btn-primary {
    color: #fff;
    background: var(--gp-green);
    box-shadow: 0 10px 24px rgba(11, 107, 53, .22);
}

.community-page .gp-btn-primary:hover {
    color: #fff;
    background: var(--gp-green-dark);
}

.community-page .gp-btn-secondary {
    color: var(--gp-green);
    background: #fff;
    border: 1px solid rgba(11, 107, 53, .22);
}

.community-page .gp-btn-secondary:hover {
    color: var(--gp-green-dark);
    border-color: rgba(11, 107, 53, .36);
    box-shadow: 0 8px 20px rgba(11, 107, 53, .08);
}

.community-page .gp-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.community-page .gp-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    color: #50645b;
    background: rgba(255,255,255,.76);
    border: 1px solid rgba(11,107,53,.10);
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 650;
}

.community-page .gp-trust-item i {
    color: var(--gp-green);
}

.community-page .gp-hero-visual {
    position: relative;
    min-height: 520px;
}

.community-page .gp-hero-photo {
    position: absolute;
    inset: 0 20px 0 0;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--gp-shadow);
    border: 1px solid rgba(255,255,255,.8);
    background: #dfe9e3;
}

.community-page .gp-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-page .gp-hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(3, 42, 22, .28) 100%);
    pointer-events: none;
}

.community-page .gp-float-card {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 245px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(11,107,53,.10);
    box-shadow: 0 14px 35px rgba(12,60,37,.14);
    backdrop-filter: blur(10px);
}

.community-page .gp-float-card .icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--gp-green);
    background: var(--gp-green-soft);
}

.community-page .gp-float-card strong {
    display: block;
    color: var(--gp-ink);
    font-size: .92rem;
    line-height: 1.25;
}

.community-page .gp-float-card small {
    color: var(--gp-muted);
    font-size: .76rem;
}

.community-page .gp-float-card--top {
    top: 28px;
    left: -28px;
}

.community-page .gp-float-card--bottom {
    right: -8px;
    bottom: 30px;
}

/* PRINCIPLES */
.community-page .gp-principles {
    position: relative;
    z-index: 2;
    margin-top: -1px;
    padding: 0 0 74px;
    background: linear-gradient(180deg, #f4f9f6 0%, #fff 100%);
}

.community-page .gp-principle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.community-page .gp-principle {
    padding: 22px 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--gp-line);
    box-shadow: 0 9px 24px rgba(13,74,43,.055);
}

.community-page .gp-principle i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 12px;
    color: var(--gp-green);
    background: var(--gp-green-soft);
}

.community-page .gp-principle h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--gp-ink);
}

.community-page .gp-principle p {
    margin: 0;
    color: var(--gp-muted);
    font-size: .9rem;
    line-height: 1.55;
}

/* MODEL CARDS */
.community-page .gp-model-section {
    padding: 78px 0 88px;
    background: #fff;
}

.community-page .gp-model-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.community-page .gp-model-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--gp-line);
    background: #fff;
    box-shadow: 0 12px 32px rgba(10, 67, 38, .065);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.community-page .gp-model-card:hover {
    transform: translateY(-4px);
    border-color: rgba(11,107,53,.23);
    box-shadow: 0 20px 45px rgba(10, 67, 38, .10);
}

.community-page .gp-model-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--gp-green), var(--gp-gold));
}

.community-page .gp-card-head {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 16px;
    padding: 24px 24px 18px 28px;
}

.community-page .gp-card-no {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: var(--gp-green);
    background: linear-gradient(145deg, var(--gp-green-soft), #fff);
    border: 1px solid rgba(11,107,53,.10);
    font-size: 1.08rem;
    font-weight: 850;
}

.community-page .gp-card-head h3 {
    margin: 2px 0 7px;
    color: var(--gp-ink);
    font-size: 1.22rem;
    line-height: 1.35;
    font-weight: 800;
}

.community-page .gp-card-kicker {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--gp-gold);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.community-page .gp-card-head p {
    margin: 0;
    color: var(--gp-muted);
    font-size: .93rem;
    line-height: 1.65;
}

.community-page .gp-card-body {
    padding: 0 24px 24px 102px;
}

.community-page .gp-card-body .content-full {
    padding-top: 7px;
}

.community-page .gp-card-body h5 {
    margin: 18px 0 9px;
    color: var(--gp-green-dark);
    font-size: 1rem;
    font-weight: 800;
}

.community-page .gp-card-body p,
.community-page .gp-card-body li {
    color: #5c6c65;
    line-height: 1.72;
    font-size: .94rem;
}

.community-page .gp-card-body ul {
    margin-bottom: 0;
    padding-left: 1.15rem;
}

.community-page .gp-card-body li + li {
    margin-top: 6px;
}

.community-page .gp-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gp-green);
    font-weight: 800;
    font-size: .91rem;
}

.community-page .gp-toggle i {
    transition: transform .2s ease;
}

.community-page .gp-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Allocation mini visual */
.community-page .gp-allocation {
    display: grid;
    gap: 11px;
    margin: 15px 0 8px;
}

.community-page .gp-allocation-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 2fr 56px;
    gap: 10px;
    align-items: center;
    font-size: .86rem;
}

.community-page .gp-allocation-row span:first-child {
    color: #4d6258;
    font-weight: 650;
}

.community-page .gp-bar {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf3ef;
}

.community-page .gp-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gp-green), #46a96e);
}

.community-page .gp-allocation-row strong {
    color: var(--gp-green-dark);
    text-align: right;
}

/* JOURNEY */
.community-page .gp-journey {
    padding: 84px 0;
    background:
        radial-gradient(circle at 86% 5%, rgba(200,150,46,.10), transparent 23%),
        linear-gradient(180deg, #f8fbf9 0%, #f2f7f4 100%);
}

.community-page .gp-journey-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 10px;
}

.community-page .gp-journey-grid::before {
    content: "";
    position: absolute;
    top: 31px;
    left: 16%;
    right: 16%;
    height: 2px;
    background: linear-gradient(90deg, rgba(11,107,53,.16), rgba(200,150,46,.45), rgba(11,107,53,.16));
}

.community-page .gp-step {
    position: relative;
    z-index: 1;
    padding: 0 12px;
    text-align: center;
}

.community-page .gp-step-no {
    width: 64px;
    height: 64px;
    margin: 0 auto 17px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--gp-green);
    border: 6px solid #f4f8f5;
    box-shadow: 0 0 0 1px rgba(11,107,53,.14), 0 8px 18px rgba(11,107,53,.14);
    font-weight: 850;
}

.community-page .gp-step h3 {
    margin: 0 0 8px;
    color: var(--gp-ink);
    font-size: 1.08rem;
    font-weight: 800;
}

.community-page .gp-step p {
    margin: 0;
    color: var(--gp-muted);
    font-size: .92rem;
    line-height: 1.65;
}

.community-page .gp-note {
    max-width: 860px;
    margin: 34px auto 0;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: 14px;
    color: #4d6258;
    background: #fff;
    border: 1px solid rgba(11,107,53,.10);
}

.community-page .gp-note i {
    margin-top: 3px;
    color: var(--gp-green);
}

/* CTA */
.community-page .gp-cta {
    padding: 84px 0;
    background: #fff;
}

.community-page .gp-cta-box {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    min-height: 365px;
    border-radius: 28px;
    background: linear-gradient(135deg, #073f22 0%, #0b6b35 64%, #0d7a3d 100%);
    box-shadow: 0 24px 60px rgba(7, 65, 34, .18);
}

.community-page .gp-cta-copy {
    position: relative;
    z-index: 2;
    padding: 54px;
    color: #fff;
}

.community-page .gp-cta-copy .gp-eyebrow {
    color: #e8fff0;
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.15);
}

.community-page .gp-cta-copy h2 {
    margin: 16px 0 14px;
    max-width: 560px;
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    font-weight: 850;
    line-height: 1.18;
    letter-spacing: -.025em;
}

.community-page .gp-cta-copy p {
    max-width: 590px;
    margin: 0 0 24px;
    color: rgba(255,255,255,.82);
    line-height: 1.75;
}

.community-page .gp-cta .gp-btn-primary {
    color: var(--gp-green-dark);
    background: #fff;
    box-shadow: none;
}

.community-page .gp-cta .gp-btn-primary:hover {
    color: var(--gp-green-dark);
    background: #f5fff8;
}

.community-page .gp-cta-photo {
    position: relative;
    min-height: 365px;
}

.community-page .gp-cta-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-page .gp-cta-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #0b6b35 0%, rgba(11,107,53,.35) 35%, transparent 72%);
}

/* Reveal motion */
.community-page .gp-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s ease;
}

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

/* RESPONSIVE */
@media (max-width: 991.98px) {
    .community-page .gp-hero {
        padding-top: 54px;
    }

    .community-page .gp-hero-grid,
    .community-page .gp-cta-box {
        grid-template-columns: 1fr;
    }

    .community-page .gp-hero-grid {
        gap: 34px;
    }

    .community-page .gp-hero-copy h1 .gp-accent {
        white-space: normal;
    }

    .community-page .gp-hero-visual {
        min-height: 430px;
    }

    .community-page .gp-hero-photo {
        inset: 0;
    }

    .community-page .gp-float-card--top {
        left: 16px;
    }

    .community-page .gp-float-card--bottom {
        right: 16px;
    }

    .community-page .gp-principle-grid,
    .community-page .gp-model-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .community-page .gp-cta-photo {
        min-height: 300px;
    }

    .community-page .gp-cta-photo::after {
        background: linear-gradient(180deg, rgba(11,107,53,.7) 0%, transparent 36%);
    }
}

@media (max-width: 767.98px) {
    .community-page .gp-container {
        width: min(100% - 24px, 1180px);
    }

    .community-page .gp-hero {
        padding: 40px 0 44px;
    }

    .community-page .gp-hero-copy h1 {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .community-page .gp-hero-copy > p {
        font-size: .98rem;
        line-height: 1.75;
    }

    .community-page .gp-hero-actions .gp-btn {
        width: 100%;
    }

    .community-page .gp-hero-visual {
        min-height: 350px;
    }

    .community-page .gp-float-card {
        max-width: 215px;
        padding: 11px 12px;
    }

    .community-page .gp-float-card--top {
        top: 14px;
        left: 10px;
    }

    .community-page .gp-float-card--bottom {
        right: 10px;
        bottom: 14px;
    }

    .community-page .gp-principles {
        padding-bottom: 52px;
    }

    .community-page .gp-principle-grid,
    .community-page .gp-model-grid,
    .community-page .gp-journey-grid {
        grid-template-columns: 1fr;
    }

    .community-page .gp-principle {
        display: grid;
        grid-template-columns: 44px 1fr;
        column-gap: 13px;
        padding: 17px;
    }

    .community-page .gp-principle i {
        grid-row: 1 / 3;
        margin: 0;
    }

    .community-page .gp-principle h3 {
        align-self: end;
    }

    .community-page .gp-model-section,
    .community-page .gp-journey,
    .community-page .gp-cta {
        padding: 58px 0;
    }

    .community-page .gp-section-head {
        margin-bottom: 30px;
    }

    .community-page .gp-card-head {
        grid-template-columns: 48px 1fr;
        padding: 20px 18px 14px 21px;
    }

    .community-page .gp-card-no {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .community-page .gp-card-body {
        padding: 0 18px 20px 21px;
    }

    .community-page .gp-allocation-row {
        grid-template-columns: 1fr 54px;
    }

    .community-page .gp-allocation-row .gp-bar {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .community-page .gp-journey-grid {
        gap: 30px;
    }

    .community-page .gp-journey-grid::before {
        display: none;
    }

    .community-page .gp-step {
        text-align: left;
        display: grid;
        grid-template-columns: 56px 1fr;
        column-gap: 13px;
    }

    .community-page .gp-step-no {
        width: 52px;
        height: 52px;
        margin: 0;
        grid-row: 1 / 3;
    }

    .community-page .gp-step h3 {
        align-self: end;
    }

    .community-page .gp-cta-copy {
        padding: 34px 24px;
    }
}

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

    .community-page .gp-model-card,
    .community-page .gp-btn {
        transition: none;
    }
}
