:root {
    --primary: #0f8a72;
    --primary-dark: #086454;
    --secondary: #ffb703;
    --accent: #ef476f;
    --ink: #14213d;
    --muted: #667085;
    --bg: #f8fbfa;
    --surface: #ffffff;
    --surface-soft: #edf8f5;
    --border: rgba(20, 33, 61, 0.12);
    --shadow: 0 18px 45px rgba(20, 33, 61, 0.12);
    --radius: 8px;
    --header-height: 76px;
}

body.dark {
    --ink: #f7fafc;
    --muted: #c8d1dc;
    --bg: #0d1720;
    --surface: #132231;
    --surface-soft: #172f3a;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    display: block;
    width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
}

.section {
    padding: 92px 0;
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--primary), #1bbf93);
    color: #fff;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-ring {
    width: 56px;
    height: 56px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

body.dark .site-header {
    background: rgba(13, 23, 32, 0.9);
}

.navbar {
    min-height: var(--header-height);
    width: min(1180px, calc(100% - 30px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 800;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.menu-toggle,
.theme-toggle,
.back-to-top {
    border: 0;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    background: transparent;
    color: var(--ink);
    font-size: 1.45rem;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--ink);
}

.hero {
    min-height: calc(100vh - var(--header-height));
    position: relative;
    display: grid;
    align-items: center;
    background: url("https://images.unsplash.com/photo-1593113598332-cd288d649433?auto=format&fit=crop&w=1800&q=85") center/cover no-repeat;
    color: #fff;
    padding: 120px 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 47, 73, 0.82), rgba(15, 138, 114, 0.5), rgba(20, 33, 61, 0.12));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(760px, calc(100% - 36px));
    margin-left: max(18px, calc((100vw - 1120px) / 2));
}

.eyebrow {
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6.8rem);
    line-height: 0.95;
    margin-bottom: 22px;
}

.hero-text {
    max-width: 680px;
    font-size: 1.18rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #10b981);
    color: #fff;
}

.btn-secondary {
    background: var(--secondary);
    color: #332200;
}

.btn-light {
    background: #fff;
    color: var(--primary-dark);
}

.full-width {
    width: 100%;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 54px;
    align-items: center;
}

.section-media img,
.program-card img,
.gallery-grid img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section-copy h2,
.section-heading h2,
.donate-panel h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
    margin-bottom: 18px;
}

.section-copy p,
.section-heading p,
.donate-panel p {
    color: var(--muted);
}

.feature-list,
.simple-list {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.feature-list span,
.simple-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 700;
}

.feature-list i,
.simple-list i {
    color: var(--primary);
}

.simple-list {
    list-style: none;
}

.mission,
.testimonials,
.faq {
    background: var(--surface-soft);
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 42px;
    text-align: center;
}

.mission-grid,
.testimonial-grid,
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.info-card,
.testimonial-card,
.team-card,
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.info-card,
.testimonial-card {
    padding: 30px;
}

.info-card,
.program-card,
.team-card,
.gallery-grid img {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover,
.program-card:hover,
.team-card:hover,
.gallery-grid img:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(15, 138, 114, 0.18);
}

.info-card i,
.program-card i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    margin-bottom: 16px;
    background: var(--surface-soft);
    color: var(--primary);
    font-size: 1.3rem;
}

.info-card h3,
.program-card h3,
.team-card h3,
.testimonial-card h3,
.form-card h3 {
    margin-bottom: 10px;
}

.info-card p,
.program-card p,
.testimonial-card p,
.team-card p {
    color: var(--muted);
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.program-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.program-card img {
    height: 240px;
    border-radius: 0;
    object-fit: cover;
    box-shadow: none;
}

.program-card div {
    padding: 26px;
}

.impact {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), #1bbf93);
    color: #fff;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat {
    padding: 28px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
}

.stat span {
    display: block;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1;
}

.form-card {
    padding: 28px;
}

.form-card label {
    display: block;
    margin: 16px 0 7px;
    color: var(--ink);
    font-weight: 800;
}

.form-card input,
.form-card select,
.form-card textarea,
.donation-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--ink);
    padding: 13px 14px;
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.donation-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 138, 114, 0.14);
}

.error-message {
    display: block;
    min-height: 18px;
    color: var(--accent);
    font-size: 0.82rem;
}

.form-status {
    min-height: 22px;
    margin-top: 12px;
    color: var(--primary);
    font-weight: 800;
}

.donate-panel {
    display: grid;
    gap: 24px;
    border-radius: var(--radius);
    padding: 46px;
    background: linear-gradient(135deg, #0f8a72, #0d9488, #ffb703);
    color: #fff;
    box-shadow: var(--shadow);
}

.donate-panel p {
    color: rgba(255, 255, 255, 0.88);
}

.donation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.donation-options button {
    min-width: 110px;
    padding: 13px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}

.donation-options button.active {
    background: #fff;
    color: var(--primary-dark);
}

.donation-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.testimonial-card p {
    margin-bottom: 22px;
    font-style: italic;
}

.testimonial-card span {
    color: var(--primary);
    font-weight: 800;
}

.team-grid {
    grid-template-columns: repeat(4, 1fr);
}

.team-card {
    overflow: hidden;
    text-align: center;
}

.team-card img {
    height: 260px;
    object-fit: cover;
}

.team-card h3 {
    margin-top: 18px;
}

.team-card p {
    padding: 0 16px 22px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.gallery-grid img {
    height: 240px;
    object-fit: cover;
    cursor: pointer;
}

.faq-list {
    max-width: 840px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    padding: 20px;
    text-align: left;
    font-weight: 900;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    color: var(--muted);
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.faq-item.open .faq-answer {
    max-height: 160px;
    padding: 0 20px 20px;
}

.faq-item.open i {
    transform: rotate(45deg);
}

.contact-details {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.contact-details p {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-weight: 700;
}

.contact-details i {
    color: var(--primary);
}

.site-footer {
    background: #08131d;
    color: #fff;
    padding-top: 64px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-grid p,
.footer-grid a {
    color: rgba(255, 255, 255, 0.72);
}

.footer-grid h3 {
    margin-bottom: 16px;
}

.footer-grid a {
    display: block;
    margin-bottom: 10px;
}

.footer-grid a:hover {
    color: #fff;
}

.footer-logo {
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.footer-bottom {
    margin-top: 44px;
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        display: grid;
        gap: 0;
        padding: 14px 18px 20px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        transform: translateY(-130%);
        transition: transform 0.25s ease;
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .nav-links a {
        display: block;
        padding: 13px 0;
    }

    .two-column,
    .program-grid,
    .mission-grid,
    .testimonial-grid,
    .team-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .impact-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .section {
        padding: 68px 0;
    }

    .navbar {
        width: min(100% - 24px, 1180px);
    }

    .logo span:last-child {
        font-size: 1rem;
    }

    .hero {
        min-height: 760px;
        padding: 96px 0;
    }

    .hero-content {
        width: min(100% - 30px, 760px);
        margin: 0 auto;
    }

    .hero-actions,
    .donation-form {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

    .two-column,
    .program-grid,
    .mission-grid,
    .testimonial-grid,
    .team-grid,
    .impact-grid,
    .gallery-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .reverse-mobile .section-copy {
        order: -1;
    }

    .donate-panel {
        padding: 30px 20px;
    }

    .donation-options button {
        flex: 1 1 130px;
    }
}

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

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