:root {
    --primary: #84b179;
    --primary-dark: #5f8f58;
    --secondary: #a2cb8b;
    --surface: #ffffff;
    --surface-soft: #f7fbf2;
    --surface-alt: #eef7e7;
    --border: #d6e8ca;
    --text: #203024;
    --text-soft: #56705c;
    --accent: #c7eabb;
    --accent-soft: #e8f5bd;
    --danger: #c94f4f;
    --shadow: 0 18px 45px rgba(65, 102, 71, 0.12);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--surface-soft);
    color: var(--text);
    line-height: 1.65;
}
body.body-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; }
h1, h2, h3, h4 { margin: 0 0 1rem; line-height: 1.2; }
small { display: block; }
.container { width: min(1140px, calc(100% - 2rem)); margin: 0 auto; }
.section { padding: 72px 0; }
.alt-bg { background: linear-gradient(180deg, rgba(255,255,255,.25), rgba(255,255,255,.05)); }
.page-main { min-height: 60vh; }
.page-hero {
    padding: 84px 0 36px;
    background: radial-gradient(circle at top right, rgba(255,255,255,.42), rgba(255,255,255,.08)), linear-gradient(135deg, var(--surface-soft), var(--surface-alt));
    border-bottom: 1px solid var(--border);
}
.page-hero.small h1 { font-size: clamp(2rem, 4vw, 3rem); }
.section-tag, .eyebrow, .vision-pill, .org-node-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 16%, white);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: .88rem;
    margin-bottom: 1rem;
}
.lead { font-size: 1.08rem; color: #f0f7ea; max-width: 720px; }
.card {
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .95rem 1.35rem;
    border-radius: 14px;
    font-weight: 700;
    transition: .25s ease;
    border: none;
    cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--primary-dark); border: 1px solid var(--border); }
.btn-danger { background: #fff1f1; color: var(--danger); border: 1px solid rgba(201,79,79,.25); }
.btn-small { padding: .6rem .85rem; border-radius: 10px; font-size: .88rem; }
.full { width: 100%; }
.text-link { color: var(--primary-dark); font-weight: 700; }
.muted { color: var(--text-soft); }
.center { text-align: center; }
.thumb-box {
    width: 96px;
    height: 72px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.thumb-box img { width: 100%; height: 100%; object-fit: cover; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(132,177,121,.18);
}
.nav-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 88px;
    padding: .4rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: .95rem;
    min-width: 0;
}
.brand-mark {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, white);
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
    overflow: visible;
}
.brand-mark-large { width: 72px; height: 72px; }
.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    object-position: center;
    background: transparent;
    border-radius: 0;
    padding: 0;
}
.brand strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.15;
}
.brand span {
    color: var(--text-soft);
    font-size: .9rem;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: .9rem;
}
.main-nav a {
    padding: .72rem .88rem;
    border-radius: 12px;
    color: var(--text-soft);
    font-weight: 600;
}
.main-nav a:hover,
.main-nav a.active,
.main-nav .nav-admin {
    background: color-mix(in srgb, var(--primary) 14%, white);
    color: var(--primary-dark);
}
.nav-toggle { display: none; border: none; background: transparent; font-size: 1.6rem; color: var(--text); }

.flash {
    margin: 1rem auto 0;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    font-weight: 600;
}
.flash-success { background: #edf9ee; color: #23653a; border: 1px solid #c7e5cf; }
.flash-error { background: #fff0f0; color: #9f3030; border: 1px solid #efc2c2; }

.hero {
    position: relative;
    min-height: 84vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #233126;
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(17,33,19,.82), rgba(45,79,52,.58));
}
.hero-content { position: relative; z-index: 1; color: #fff; padding: 4rem 0; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); margin-bottom: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-badges span {
    padding: .65rem 1rem;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.14);
}
.two-column {
    display: grid;
    grid-template-columns: 1.15fr .95fr;
    gap: 2rem;
    align-items: center;
}
.align-start { align-items: start; }
.visual-card img,
.article-cover,
.news-card img {
    width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 6px);
    object-fit: cover;
}
.visual-card { overflow: hidden; }
.visual-card-body { padding: 1.2rem; }
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vision-mission-section { position: relative; overflow: hidden; }
.vision-mission-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
    gap: 1.4rem;
    align-items: stretch;
}
.vision-spotlight {
    padding: 2rem;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--secondary) 36%, white), transparent 42%),
        linear-gradient(145deg, color-mix(in srgb, var(--primary) 20%, white), white 52%);
}
.vision-spotlight h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 12ch; }
.vision-spotlight p { font-size: 1.03rem; color: var(--text-soft); }
.vision-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.5rem;
}
.vision-meta span {
    padding: .65rem .95rem;
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    border: 1px solid var(--border);
    font-weight: 700;
}
.mission-panel-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.mission-panel {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1.35rem;
    min-height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.85));
}
.mission-number {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: var(--primary-dark);
    font-weight: 900;
    font-size: 1rem;
}
.mission-panel h3 { margin-bottom: .45rem; font-size: 1.05rem; }
.mission-panel p { margin-bottom: 0; color: var(--text-soft); }

.program-grid,
.news-grid,
.contact-grid,
.org-list-grid { display: grid; gap: 1.25rem; }
.program-grid { grid-template-columns: repeat(2, 1fr); }
.program-card { padding: 1.5rem; }
.program-icon {
    width: 54px; height: 54px; border-radius: 18px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; color: var(--primary-dark);
    margin-bottom: 1rem;
}
.news-grid { grid-template-columns: repeat(3, 1fr); }
.news-card { overflow: hidden; }
.news-card img { height: 220px; }
.news-card-body { padding: 1.25rem; }
.news-date { color: var(--text-soft); font-size: .92rem; }
.empty-state { padding: 1.75rem; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: var(--shadow);
    margin: 0;
    aspect-ratio: 4 / 3;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15,15,15,.58));
    opacity: 0;
    transition: opacity .25s ease;
}
.gallery-overlay-label {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    color: #fff;
    font-weight: 700;
    text-align: left;
    opacity: 0;
    transform: translateY(10px);
    transition: .25s ease;
}
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.05); }
.gallery-item:hover::after,
.gallery-item:hover .gallery-overlay-label,
.gallery-item:focus-visible::after,
.gallery-item:focus-visible .gallery-overlay-label {
    opacity: 1;
    transform: translateY(0);
}
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(10, 12, 12, .86);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.gallery-lightbox[hidden] { display: none; }
.lightbox-stage {
    max-width: min(1080px, calc(100vw - 9rem));
    max-height: calc(100vh - 6rem);
    display: grid;
    gap: 1rem;
    justify-items: center;
}
.lightbox-stage img {
    max-width: 100%;
    max-height: calc(100vh - 11rem);
    border-radius: 22px;
    box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.lightbox-caption {
    color: #fff;
    font-weight: 600;
    text-align: center;
}
.lightbox-close,
.lightbox-arrow {
    border: none;
    cursor: pointer;
    color: #fff;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
}
.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
}
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 2rem;
}
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

.cta-section { padding-top: 0; }
.cta-box {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    border-radius: 28px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow);
}
.cta-box .section-tag { background: rgba(255,255,255,.14); color: #fff; }

.service-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
.service-card, .service-info, .map-box, .admin-content-card { padding: 1.5rem; }
.service-form, .admin-form, .login-form { display: grid; gap: 1rem; }
.form-row, .admin-form label, .login-form label { display: grid; gap: .45rem; }
.form-row-2 { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
input, select, textarea {
    width: 100%;
    padding: .95rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font: inherit;
}
input[type="color"] {
    min-height: 56px;
    padding: .35rem;
}
textarea { resize: vertical; }
.service-highlight {
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, white), color-mix(in srgb, var(--secondary) 32%, white));
    margin: 1rem 0;
}
.contact-card { padding: 1.25rem; }
.contact-grid { margin-bottom: 1.25rem; }
.map-box iframe {
    margin-top: 1rem;
    width: 100%; height: 380px;
    border: 0; border-radius: 18px;
}
.check-list, .service-info ul, .footer-links {
    margin: 0;
    padding-left: 1.1rem;
}
.article-layout { display: block; }
.article { overflow: hidden; }
.article-cover { max-height: 430px; object-fit: cover; }
.article-body { padding: 1.5rem; }
.article-content { white-space: pre-line; }

.org-page-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.org-overview-card { padding: 1.6rem; position: sticky; top: 104px; }
.org-flow-wrap { min-width: 0; }
.org-flow {
    display: grid;
    gap: 1rem;
    justify-items: center;
}
.org-row {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.org-row-center .org-node { max-width: 360px; }
.org-row-support .org-node { max-width: 320px; }
.org-grid-modern {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.org-node {
    width: 100%;
    padding: 1.35rem;
    position: relative;
    overflow: hidden;
}
.org-node::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.org-node-lead {
    background: linear-gradient(155deg, color-mix(in srgb, var(--primary) 18%, white), white 58%);
}
.org-node-support {
    background: linear-gradient(155deg, color-mix(in srgb, var(--secondary) 22%, white), white 62%);
}
.org-node-division {
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88));
}
.org-node h3 { margin-bottom: .9rem; }
.org-node ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .6rem;
}
.org-node li {
    padding: .7rem .85rem;
    border-radius: 14px;
    background: rgba(255,255,255,.75);
    border: 1px solid var(--border);
    font-weight: 600;
}
.org-connector.vertical {
    width: 2px;
    height: 34px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 999px;
}

.site-footer {
    margin-top: 3rem;
    background: #1f2d22;
    color: #d9ead9;
    padding-top: 2.2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: 1rem;
}
.footer-brand .brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    border-color: rgba(255,255,255,.15);
}
.footer-brand img { width: 42px; height: 42px; object-fit: contain; }
.footer-text { color: #b8d2bb; }
.footer-links li { margin-bottom: .5rem; }
.footer-bottom {
    padding: 1rem 0 1.5rem;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 2rem;
    color: #aac4ad;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top, color-mix(in srgb, var(--secondary) 32%, white), rgba(255,255,255,1));
}
.login-card {
    width: min(460px, calc(100% - 2rem));
    padding: 1.8rem;
}
.login-brand {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}
.login-brand img { width: 54px; height: 54px; object-fit: contain; }

.admin-body { background: color-mix(in srgb, var(--secondary) 22%, white); }
.admin-shell {
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 100vh;
}
.admin-sidebar {
    background: linear-gradient(180deg, #1f2d22, color-mix(in srgb, var(--primary-dark) 72%, #18211a));
    color: #dceadf;
    padding: 1.5rem;
}
.brand-admin { color: #fff; margin-bottom: 2rem; }
.brand-admin .brand-mark {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.14);
    box-shadow: none;
}
.brand-admin .brand-mark img { filter: none; }
.admin-nav { display: grid; gap: .5rem; }
.admin-nav a {
    padding: .95rem 1rem;
    border-radius: 14px;
    color: #dceadf;
    background: rgba(255,255,255,.04);
    transition: .2s ease;
}
.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255,255,255,.14);
    color: #fff;
}
.admin-main { padding: 1.5rem; }
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
.admin-stats-4 { grid-template-columns: repeat(4, 1fr); }
.stat-card { padding: 1.5rem; }
.stat-card h3 { font-size: 2.25rem; margin-bottom: .25rem; }
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.feature-card {
    padding: 1.25rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88));
    border: 1px solid var(--border);
}
.table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th,
.admin-table td {
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.table-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.image-preview-inline img { width: 220px; border-radius: 14px; }
.theme-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.theme-editor-card {
    padding: 1.25rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88));
}
.theme-picker-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: .85rem;
    align-items: center;
    margin-bottom: .75rem;
}
.theme-preview-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.theme-preview-strip span {
    min-width: 160px;
    padding: .95rem 1rem;
    border-radius: 16px;
    color: #fff;
    font-weight: 700;
}

@media (max-width: 1080px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .vision-mission-layout,
    .org-page-layout,
    .feature-grid,
    .theme-editor-grid,
    .org-grid-modern { grid-template-columns: 1fr; }
    .mission-panel-wrap { grid-template-columns: 1fr; }
    .org-overview-card { position: static; }
}

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + .35rem);
        left: 0;
        right: 0;
        background: rgba(255,255,255,.98);
        border: 1px solid var(--border);
        border-radius: 18px;
        box-shadow: var(--shadow);
        padding: .85rem;
        flex-direction: column;
        align-items: stretch;
    }
    .main-nav.open { display: flex; }
    .two-column,
    .program-grid,
    .service-grid,
    .contact-grid,
    .footer-grid,
    .admin-shell,
    .admin-stats,
    .news-grid,
    .theme-editor-grid,
    .feature-grid,
    .form-row-2 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-box,
    .section-heading,
    .admin-toolbar,
    .admin-topbar { flex-direction: column; align-items: flex-start; }
    .admin-sidebar { padding-bottom: 0; }
    .lightbox-stage { max-width: calc(100vw - 3rem); }
    .lightbox-arrow {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }
    .lightbox-prev { left: .75rem; }
    .lightbox-next { right: .75rem; }
}

@media (max-width: 560px) {
    .section { padding: 56px 0; }
    .gallery-grid { grid-template-columns: 1fr; }
    .hero { min-height: 74vh; }
    .hero h1 { font-size: 2.4rem; }
    .brand span { display: none; }
    .brand-mark { width: 56px; height: 56px; }
    .brand img { width: 44px; height: 44px; }
    .lightbox-arrow {
        top: auto;
        bottom: 1rem;
        transform: none;
    }
    .lightbox-prev { left: 1rem; }
    .lightbox-next { right: 1rem; }
    .lightbox-close { top: .75rem; right: .75rem; }
}
