/* ==========================================================
   Theme tokens and base page setup
   ========================================================== */
:root {
    --bs-success: #315d49;
    --bs-success-rgb: 49, 93, 73;
    --bs-light-rgb: 247, 246, 241;
    --lystra-ink: #202b25;
    --lystra-muted: #68746c;
    --lystra-green: #315d49;
    --lystra-green-dark: #203e31;
    --lystra-surface: #f7f6f1;
    --lystra-border: #e8e4d8;
    --lystra-gold: #c2a36c;
    --lystra-radius: 0.8rem;
    --lystra-shadow: 0 1.25rem 3rem rgba(28, 43, 34, 0.11);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--lystra-ink);
    background: #fffefa;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

::selection {
    color: #fff;
    background: var(--lystra-green);
}

a {
    text-underline-offset: 0.2em;
}

a:not(.btn) {
    transition: color 180ms ease;
}

a:not(.btn):hover {
    color: var(--lystra-green-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(40, 122, 75, 0.35);
    outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: Montserrat, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--lystra-ink);
    line-height: 1.18;
    letter-spacing: -0.018em;
}

.text-muted {
    color: var(--lystra-muted) !important;
}

/* ==========================================================
   Header navigation and branding
   ========================================================== */
.navbar {
    border-bottom: 1px solid rgba(194, 163, 108, 0.28);
    padding-top: 2.15rem;
    padding-bottom: 2.15rem;
    background: rgba(255, 254, 250, 0.97) !important;
    box-shadow: 0 0.35rem 1.5rem rgba(28, 43, 34, 0.055) !important;
    backdrop-filter: blur(14px);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 1.5rem;
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-brand img {
    display: block;
    width: auto;
    max-width: min(15rem, 60vw);
    height: 3.5rem;
    object-fit: contain;
}

.navbar-nav {
    gap: 0.35rem;
}

.navbar .nav-link {
    position: relative;
    padding: 0.6rem 0.75rem !important;
    border-radius: 0.25rem;
    color: #4e5a52;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.015em;
    line-height: 1.35;
    white-space: nowrap;
    transition: color 180ms ease, background-color 180ms ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--lystra-green-dark) !important;
    background-color: rgba(49, 93, 73, 0.06);
}

.navbar .nav-link.active {
    color: var(--lystra-green-dark) !important;
    background: transparent;
    font-weight: 650;
}

.navbar .nav-link.active::after {
    position: absolute;
    right: 0.75rem;
    bottom: 0.25rem;
    left: 0.75rem;
    height: 2px;
    background: var(--lystra-gold);
    content: "";
}

.navbar-toggler {
    border-color: var(--lystra-border);
    padding: 0.45rem 0.65rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 122, 75, 0.14);
}

/* ==========================================================
   Main hero banner layout
   ========================================================== */
.navbar-nav .btn {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    border-color: var(--bs-btn-border-color, transparent);
    white-space: nowrap;
}

.btn {
    border-radius: 0.35rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn-success {
    --bs-btn-bg: var(--lystra-green-dark);
    --bs-btn-border-color: var(--lystra-green-dark);
    --bs-btn-hover-bg: #172f25;
    --bs-btn-hover-border-color: #172f25;
    --bs-btn-active-bg: #172f25;
    --bs-btn-active-border-color: #172f25;
}

.btn-outline-success {
    --bs-btn-color: var(--lystra-green-dark);
    --bs-btn-border-color: rgba(49, 93, 73, 0.42);
    --bs-btn-hover-bg: var(--lystra-green-dark);
    --bs-btn-hover-border-color: var(--lystra-green-dark);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.55rem 1.2rem rgba(28, 43, 34, 0.15);
}

/* ==========================================================
   Hero banners and section headings
   ========================================================== */
/* ==========================================================
   Standard page header banners
   ========================================================== */
body > header.bg-dark,
body > header.bg-success {
    position: relative;
    overflow: hidden;
}

body > header.bg-dark {
    display: flex;
    min-height: clamp(38rem, 78vh, 54rem);
    align-items: center;
    background-position: center;
}

/* ==========================================================
   Homepage hero header
   ========================================================== */
.home-hero {
    isolation: isolate;
    min-height: clamp(45rem, 99vh, 63rem) !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    background-color: #18291f;
}

.home-hero::before {
    position: absolute;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(14, 29, 21, 0.82), rgba(14, 29, 21, 0.48)),
        linear-gradient(0deg, rgba(14, 29, 21, 0.24), transparent 68%);
    content: "";
    inset: 0;
}

.home-hero .hero-image {
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    inset: 0;
    object-fit: cover;
    object-position: center 48%;
}

.home-hero .container {
    position: relative;
    z-index: 1;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.home-hero .container::before {
    display: block;
    width: 3.5rem;
    height: 2px;
    margin: 0 auto 1.5rem;
    background: var(--lystra-gold);
    content: "";
}

body > header.bg-dark h1 {
    max-width: 1000px;
    margin-right: auto;
    margin-left: auto;
    color: #fff;
    font-size: clamp(2.75rem, 5.6vw, 4.75rem);
    font-weight: 600 !important;
    letter-spacing: -0.035em;
    text-wrap: balance;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.28);
}

body > header.bg-dark p {
    max-width: 690px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

body > header.bg-success {
    isolation: isolate;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: 1px solid rgba(194, 163, 108, 0.55);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(194, 163, 108, 0.15), transparent 62%),
        linear-gradient(135deg, #274b39 0%, #1c352a 100%) !important;
}

body > header.bg-success .container {
    padding-top: 5.9rem !important;
    padding-bottom: 5.9rem !important;
}

body > header.bg-success h1 {
    color: #fff;
    font-size: clamp(2.8rem, 5.5vw, 4rem);
    font-weight: 600 !important;
    letter-spacing: -0.025em;
}

body > header.bg-success p {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
}

body > header.bg-success h1::after {
    display: block;
    width: 2.75rem;
    height: 2px;
    margin: 1.25rem auto 0;
    background: var(--lystra-gold);
    content: "";
}

section h2 {
    font-size: clamp(2rem, 3.5vw, 2.85rem);
    font-weight: 600;
}

/* ==========================================================
   Cards, program sections, and gallery layout
   ========================================================== */
section.py-5 {
    padding-block: clamp(3.25rem, 6vw, 5rem) !important;
}

section.bg-light {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(194, 163, 108, 0.08), transparent 58%),
        var(--lystra-surface) !important;
}

.container > .text-center.mb-5 {
    max-width: 48rem;
    margin-right: auto;
    margin-left: auto;
}

.container > .text-center.mb-5 h2 {
    margin-bottom: 0.85rem;
}

.container > .text-center.mb-5 h2::after {
    display: block;
    width: 2.5rem;
    height: 2px;
    margin: 1rem auto 0;
    background: var(--lystra-gold);
    content: "";
}

.container > .text-center.mb-5 p {
    max-width: 42rem;
    margin-right: auto;
    margin-left: auto;
}

.bg-success {
    --bs-success-rgb: 49, 93, 73;
}

section.bg-success {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(194, 163, 108, 0.14), transparent 68%),
        linear-gradient(135deg, #274b39 0%, #1c352a 100%) !important;
}

section.bg-success h2 {
    color: #fff;
}

section.bg-success .lead {
    color: rgba(255, 255, 255, 0.84);
}

.card {
    border: 1px solid rgba(194, 163, 108, 0.22) !important;
    border-radius: var(--lystra-radius);
    background-color: #fffefa;
    box-shadow: 0 0.45rem 1.5rem rgba(29, 43, 35, 0.045) !important;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(194, 163, 108, 0.5) !important;
    box-shadow: var(--lystra-shadow) !important;
}

.card .card-body {
    padding: 1.5rem;
}

.card .card-body p:last-child {
    margin-bottom: 0;
}

.card h4,
.card h5 {
    color: var(--lystra-green-dark) !important;
}

.program-area {
    position: relative;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 1px solid rgba(194, 163, 108, 0.3);
    border-radius: 0.85rem;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(194, 163, 108, 0.08), transparent 48%),
        #fffefa;
    box-shadow: 0 0.65rem 2rem rgba(29, 43, 35, 0.055);
}

.program-area h2 {
    margin-top: 0.35rem;
}

.program-area ul {
    padding-left: 1.25rem;
}

.program-area li::marker {
    color: var(--lystra-gold);
}

.program-area .bg-light {
    border-color: var(--lystra-border) !important;
    background: rgba(247, 246, 241, 0.8) !important;
}

.project-gallery {
    margin-top: 0.25rem;
}

.project-gallery figure {
    overflow: hidden;
    padding: 0.75rem 0.75rem 0.9rem;
    border: 1px solid rgba(194, 163, 108, 0.25);
    border-radius: 0.75rem;
    background: #fffefa;
    box-shadow: 0 0.5rem 1.5rem rgba(29, 43, 35, 0.055);
}

.project-gallery .story-photo {
    transition: transform 350ms ease;
}

.project-gallery figure:hover .story-photo {
    transform: scale(1.015);
}

.rounded-3 {
    border-radius: var(--lystra-radius) !important;
}

.story-photo {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    height: 20rem;
    margin-inline: auto;
    border: 1px solid rgba(194, 163, 108, 0.38);
    border-radius: 0.65rem;
    box-shadow: 0 1rem 2.2rem rgba(29, 43, 35, 0.12);
    object-fit: cover;
}

.field-assessment-photo {
    aspect-ratio: 3 / 4;
    height: auto;
    object-position: center;
}

.project-gallery .story-photo {
    height: 20rem;
}

.story-photo + figcaption {
    text-align: center;
    color: var(--lystra-muted);
    font-size: 0.82rem;
    letter-spacing: 0.015em;
}

.impact-photo {
    display: block;
    width: 100%;
    height: clamp(24rem, 45vw, 32rem);
    margin-inline: auto;
    border: 1px solid rgba(194, 163, 108, 0.45);
    border-radius: 0.75rem;
    box-shadow: var(--lystra-shadow);
    object-fit: cover;
    object-position: center 34%;
}

.impact-figure {
    padding: 0.75rem;
    border: 1px solid rgba(194, 163, 108, 0.28);
    border-radius: 0.9rem;
    background: #fffefa;
    box-shadow: 0 0.75rem 2rem rgba(29, 43, 35, 0.07);
}

.impact-figure figcaption {
    padding: 0.25rem 0.35rem 0;
    text-align: center;
}

.border-start.border-4.border-success {
    border-left-color: var(--lystra-gold) !important;
}

.badge.bg-success {
    border-radius: 999px;
    padding: 0.48rem 0.75rem;
    background-color: #e9eee8 !important;
    color: var(--lystra-green-dark) !important;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

/* ==========================================================
   Forms, footer, and responsive behavior
   ========================================================== */
.form-label {
    color: var(--lystra-ink);
    font-weight: 600;
    font-size: 0.92rem;
}

.form-control {
    min-height: 3rem;
    border-color: #dedfd5;
    border-radius: 0.4rem;
    background-color: #fffefa;
    color: var(--lystra-ink);
}

.form-control:focus {
    border-color: rgba(49, 93, 73, 0.65);
    box-shadow: 0 0 0 0.22rem rgba(49, 93, 73, 0.12);
}

textarea.form-control {
    min-height: auto;
}

footer.bg-dark {
    background:
        radial-gradient(ellipse at 80% 0%, rgba(194, 163, 108, 0.11), transparent 45%),
        #18291f !important;
    border-top: 1px solid rgba(194, 163, 108, 0.5);
}

footer h5,
footer h6 {
    color: #fff;
    letter-spacing: 0;
}

footer .text-success {
    color: #d0b77f !important;
}

footer .text-muted {
    color: #b8c1b8 !important;
}

footer a {
    transition: color 160ms ease;
}

footer a:hover {
    color: #fff !important;
}

.social-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #eaf2ee !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.social-links a:hover,
.social-links a:focus-visible {
    transform: translateY(-2px);
    background: rgba(40, 122, 75, 0.28);
    border-color: rgba(40, 122, 75, 0.6);
    color: #fff !important;
    text-decoration: none;
}

.social-links i {
    font-size: 1.05rem;
    line-height: 1;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 0.75rem;
        padding-top: 0.65rem;
        border-top: 1px solid var(--lystra-border);
    }

    .navbar-nav {
        align-items: stretch !important;
        gap: 0.15rem;
    }

    .navbar .nav-link {
        padding: 0.7rem 0.75rem !important;
    }

    .navbar .nav-link.active::after {
        right: auto;
        bottom: 0.3rem;
        width: 2.25rem;
    }

    .navbar-nav .btn {
        width: 100%;
        margin-top: 0.35rem;
        padding: 0.65rem 0.9rem !important;
    }

    body > header.bg-dark {
        min-height: 32rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand img {
        height: 3rem;
    }

    .home-hero {
        min-height: 49.5rem !important;
    }

    .row.g-5 {
        --bs-gutter-x: 1.5rem;
    }

    body > header.bg-dark {
        min-height: 34rem;
    }

    body > header.bg-dark .container {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    body > header.bg-dark h1 {
        font-size: clamp(2.4rem, 9vw, 3.25rem);
    }

    body > header.bg-dark p {
        font-size: 1rem;
    }

    body > header.bg-dark .d-flex {
        flex-direction: column;
        align-items: center;
    }

    body > header.bg-dark .d-flex .btn {
        width: min(100%, 18rem);
    }

    body > header.bg-success .container {
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }

    .card .card-body {
        padding: 1.25rem;
    }

    .program-area {
        padding: 1.2rem;
    }

    .project-gallery figure {
        padding: 0.6rem 0.6rem 0.8rem;
    }

    footer .container {
        text-align: left !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}