/**
 * social_forestry_activities.css
 * Ultra-premium, state-of-the-art visual styling for the Social Forestry Activities.
 * Scoped under .sfa-page to enforce strict zero-bleed guard.
 */

:root {
    --sfa-shadow: 0 20px 45px rgba(10, 46, 26, 0.05);
    --sfa-emerald: #059669;
    --sfa-gold: #f1c40f;
    --sfa-forest: #0a2e1a;
    --sfa-cream: #f9f6ef;
    --sfa-fog: #e8f0e9;
}

.sfa-page {
    background-color: var(--sfa-cream);
    color: #111827;
    font-family: 'Open Sans', sans-serif;
    min-height: 100vh;
}

/* Page Hero */
.page-hero {
    background: #0a2e1a;
    padding: 50px 0;
    text-align: center;
    color: #fff;
    position: relative;
}
.page-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
    color: #fff;
}
.hero-underline {
    display: block;
    width: 70px;
    height: 4px;
    background: var(--sfa-gold);
    margin: 15px auto 0;
    border-radius: 2px;
}

.sfa-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Section titles */
.sfa-section-title {
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 800;
    color: var(--sfa-forest);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.sfa-section-subtitle {
    font-size: clamp(14px, 1.2vw, 16px);
    color: #4b5563;
    margin-bottom: 24px;
    max-width: 800px;
}

/* ── JFM INTERACTIVE AGREEMENT LEDGER ── */
.sfa-jfm-ledger {
    background: #fff;
    border: 1px solid var(--sfa-fog);
    border-radius: 24px;
    padding: 35px;
    box-shadow: var(--sfa-shadow);
    margin-bottom: 50px;
}
.sfa-jfm-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px dashed rgba(10, 46, 26, 0.1);
    padding-bottom: 20px;
    margin-bottom: 25px;
}
@media (max-width: 768px) {
    .sfa-jfm-header {
        flex-direction: column;
        gap: 15px;
    }
}
.sfa-jfm-badge {
    background: rgba(5, 150, 69, 0.08);
    color: var(--sfa-emerald);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
}
.sfa-jfm-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.sfa-jfm-tab {
    background: var(--sfa-fog);
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--sfa-forest);
    cursor: pointer;
    transition: all 0.3s;
}
.sfa-jfm-tab.active {
    background: var(--sfa-emerald);
    color: #fff;
    box-shadow: 0 10px 20px rgba(5, 150, 69, 0.2);
}
.sfa-jfm-sheet {
    background: var(--sfa-cream);
    border: 1px solid rgba(10, 46, 26, 0.04);
    border-radius: 16px;
    padding: 30px;
    min-height: 160px;
    position: relative;
    overflow: hidden;
}
.sfa-jfm-stamp {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 90px;
    height: 90px;
    border: 3px double var(--sfa-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 900;
    color: var(--sfa-gold);
    transform: rotate(15deg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.2;
}

/* ── ACTIVITIES SELECTOR SYSTEM ── */
.sfa-activities-box {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    margin-bottom: 50px;
}
@media (max-width: 900px) {
    .sfa-activities-box {
        grid-template-columns: 1fr;
    }
}
.sfa-act-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sfa-act-card {
    background: #fff;
    border: 1px solid var(--sfa-fog);
    border-radius: 16px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.01);
}
.sfa-act-card:hover {
    transform: translateY(-2px);
    border-color: var(--sfa-emerald);
}
.sfa-act-card.active {
    background: var(--sfa-forest);
    color: #fff;
    border-color: var(--sfa-forest);
    box-shadow: 0 10px 25px rgba(10, 46, 26, 0.12);
}
.sfa-act-icon {
    font-size: 1.25rem;
    color: var(--sfa-emerald);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(5, 150, 69, 0.08);
}
.sfa-act-card.active .sfa-act-icon {
    background: rgba(255,255,255,0.1);
    color: var(--sfa-gold);
}
.sfa-act-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.sfa-act-display-panel {
    background: #fff;
    border: 1px solid var(--sfa-fog);
    border-radius: 24px;
    padding: 35px;
    box-shadow: var(--sfa-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sfa-act-display-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--sfa-forest);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sfa-act-display-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 30px;
}

/* ── CREMATORIA SAVINGS GRAPHICS ── */
.sfa-crematoria-widget {
    background: var(--sfa-cream);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(10, 46, 26, 0.05);
}
.sfa-crem-bar-row {
    margin-bottom: 15px;
}
.sfa-crem-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.sfa-crem-progress-container {
    width: 100%;
    height: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 5px;
    overflow: hidden;
}
.sfa-crem-progress-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease-out;
}
.sfa-crem-standard { width: 100%; background: #ef4444; }
.sfa-crem-efficient { width: 35%; background: var(--sfa-emerald); }

.sfa-crem-status {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--sfa-emerald);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── DIVISION TERMINALS BOARD ── */
.sfa-divisions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}
@media (max-width: 850px) {
    .sfa-divisions-grid {
        grid-template-columns: 1fr;
    }
}
.sfa-div-card {
    background: #fff;
    border: 1px solid var(--sfa-fog);
    border-radius: 20px;
    padding: 25px 30px;
    box-shadow: var(--sfa-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.sfa-div-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    background: transparent;
    transition: background 0.3s;
}
.sfa-div-card:hover {
    transform: translateY(-2px);
    border-color: var(--sfa-emerald);
}
.sfa-div-card:hover::after {
    background: var(--sfa-emerald);
}
.sfa-div-office {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--sfa-forest);
    line-height: 1.5;
    margin-bottom: 12px;
}
.sfa-div-meta {
    font-size: 0.88rem;
    color: #4b5563;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sfa-div-dial {
    background: var(--sfa-fog);
    color: var(--sfa-forest);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    transition: all 0.3s;
}
.sfa-div-dial:hover {
    background: var(--sfa-forest);
    color: #fff;
}

/* ── HISTORY timeline nodes ── */
.sfa-history-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}
@media (max-width: 800px) {
    .sfa-history-timeline {
        grid-template-columns: 1fr;
    }
}
.sfa-hist-card {
    background: #fff;
    border: 1px solid var(--sfa-fog);
    border-radius: 18px;
    padding: 25px;
    box-shadow: var(--sfa-shadow);
    transition: all 0.3s;
}
.sfa-hist-card:hover {
    transform: translateY(-2px);
    border-color: var(--sfa-gold);
}
.sfa-hist-year {
    font-family: monospace;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--sfa-emerald);
    border-bottom: 2px solid var(--sfa-fog);
    padding-bottom: 6px;
    margin-bottom: 12px;
}
.sfa-hist-title {
    font-weight: 800;
    color: var(--sfa-forest);
    font-size: 0.95rem;
    margin-bottom: 10px;
}
.sfa-hist-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #4b5563;
}


/* ── INTERACTIVE CANVAS ANIMATIONS ── */
.sfa-sprout-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #059669;
    border-radius: 50% 0 50% 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    animation: sfaFloatUp 1.2s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    opacity: 0.8;
}
@keyframes sfaFloatUp {
    0% { transform: translate(-50%, -50%) translateY(0) scale(0.5) rotate(-45deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) translateY(-90px) scale(1.5) rotate(45deg); opacity: 0; }
}

.sfa-ripple-ring {
    position: absolute;
    border: 2.5px solid #059669;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: sfaRipple 1s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    pointer-events: none;
}
@keyframes sfaRipple {
    0% { width: 0; height: 0; opacity: 1; border-width: 3px; }
    100% { width: 180px; height: 180px; opacity: 0; border-width: 0.5px; }
}

.sfa-radar-ring {
    position: absolute;
    border: 2px solid #f1c40f;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: sfaPulse 1.2s cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
    pointer-events: none;
}
@keyframes sfaPulse {
    0% { width: 0; height: 0; opacity: 0.8; }
    100% { width: 220px; height: 220px; opacity: 0; }
}

.sfa-sec-scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #059669, #f1c40f, #059669, transparent);
    box-shadow: 0 0 15px rgba(5, 150, 69, 0.8);
    pointer-events: none;
    transition: top 0.08s ease-out;
}

.sfa-petal-particle {
    position: absolute;
    width: 14px;
    height: 10px;
    background: #ffb7c5;
    border-radius: 50% 0 50% 50%;
    transform: translate(-50%, -50%) rotate(20deg);
    animation: sfaPetalDrift 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    pointer-events: none;
}
@keyframes sfaPetalDrift {
    0% { transform: translate(-50%, -50%) translate(0, 0) rotate(20deg) scale(0.6); opacity: 1; }
    100% { transform: translate(-50%, -50%) translate(100px, 100px) rotate(240deg) scale(1.4); opacity: 0; }
}

