:root {
    --primary: #22c55e;
    --primary-dark: #15803d;
    --primary-light: #86efac;
    --dark-bg: #0b0b0b;
    --dark-card: #111111;
    --dark-card-hover: #1a1a1a;
    --dark-border: #222222;
    --dark-border-hover: #333333;
    --text-light: #ffffff;
    --text-muted: #999999;
    --text-muted-light: #bbbbbb;
    --text-body: #212529;
}

*, *::before, *::after { box-sizing: border-box; }

img { border-radius: 0; }

body {
    margin: 0;
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.site-logo {
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-light);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}
.site-logo .brace { color: var(--primary); font-size: 2.2rem; display: inline-block; vertical-align: middle; line-height: 1; }

.navbar img[alt="CodeLeo Foundation"] {
    vertical-align: middle;
}

.navbar {
    background: var(--dark-bg);
    border-bottom: 1px solid var(--dark-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a { color: var(--text-light); font-weight: 600; font-size: 0.9rem; transition: color 0.2s; white-space: nowrap; }
.nav-links a:hover { color: var(--primary); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-light);
    z-index: 1001;
}
.nav-toggle svg { width: 28px; height: 28px; display: block; }

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-radius: 0 !important;
}
.btn-primary { background: var(--primary); color: var(--dark-bg); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); color: var(--dark-bg); }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--dark-bg); }

.hero {
    padding: 100px 0 80px;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1a1a 100%);
    text-align: center;
}
.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 20px; }
.hero h1 mark { color: var(--primary); background: none; }
.hero p { color: var(--text-muted); font-size: 1.2rem; max-width: 600px; margin: 0 auto 30px; }

.card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    padding: 30px;
    transition: all 0.3s ease;
}
.card:hover { background: var(--dark-card-hover); transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }

.section { padding: 80px 0; }
.section-title { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.section-subtitle { color: var(--text-muted); margin-bottom: 40px; }

.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .hero h1, .hero-image h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    [style*="grid-template-columns:repeat(2,1fr)"],
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns:2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    [style*="grid-template-columns:repeat(4,1fr)"],
    [style*="grid-template-columns:repeat(3,1fr)"] {
        grid-template-columns: 1fr !important;
    }

    .nav-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: rgba(11,11,11,0.98);
        border-left: 1px solid var(--dark-border);
        flex-direction: column;
        gap: 0;
        padding: 80px 30px 30px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    .nav-links.open { transform: translateX(0); }
    .nav-links li { width: 100%; }
    .nav-links a {
        display: block;
        padding: 14px 0;
        font-size: 1rem;
        border-bottom: 1px solid var(--dark-border);
    }
    .nav-links .btn { margin-top: 10px; text-align: center; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero h1, .hero-image h1 { font-size: 2rem; }
    .hero-image { min-height: 70vh !important; }
    .hero-image p { font-size: 1rem; }
    .impact-strip { grid-template-columns: 1fr; }
    .impact-strip img { min-height: 200px; max-height: 250px; }
    .impact-strip .impact-content { padding: 30px 25px; }
    .stat-image-strip { background-attachment: scroll; }
    .img-hero-banner { height: 200px; }

    .section { padding: 50px 0; }
    .section-title { font-size: 1.5rem; }
    .page-header h1 { font-size: 1.8rem; }
    .page-header { padding: 40px 0; }

    .card { padding: 20px; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

    .cat-filter { gap: 8px; }
    .cat-filter a { padding: 6px 14px; font-size: 0.8rem; }

    .donor-wall { flex-direction: column; }

    .project-hero { min-height: 40vh; padding: 60px 0 40px; }
    .project-hero h1 { font-size: 2rem; }
    .project-stats-bar { gap: 20px; }
    .project-stat-value { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .hero h1, .hero-image h1 { font-size: 1.6rem; }
    .hero { padding: 60px 0 50px; }
    .hero-image { min-height: 60vh !important; }
    .section { padding: 35px 0; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-grid a, .footer-bottom { text-align: center; }
    .price { font-size: 1.5rem; }
    .page-header h1 { font-size: 1.5rem; }
    .page-header { padding: 30px 0; }
    .cat-filter { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; }
    .cat-filter a { white-space: nowrap; }
    .float-buttons { bottom: 16px; right: 16px; gap: 12px; }
    .float-btn { width: 48px; height: 48px; }
    .float-btn svg { width: 22px; height: 22px; }
    .float-btn:hover { width: auto; padding: 0 14px 0 12px; gap: 6px; }
    .float-btn:hover .btn-label { font-size: 0.8rem; }
    .impact-strip img { min-height: 180px; max-height: 200px; }
    .impact-strip .impact-content { padding: 20px; }
    .img-card { min-height: 180px; padding: 20px; }
    .img-hero-banner { height: 150px; }
}

.hero-lime { color: var(--primary); }

.price { color: var(--primary); font-size: 2rem; font-weight: 800; }
.price-usd { font-size: 0.9rem; color: var(--text-muted); }
.price-ugx { font-size: 0.8rem; color: var(--text-muted); }

.progress-bar {
    height: 8px;
    background: var(--dark-border);
    margin: 15px 0;
    border-radius: 0;
}
.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.5s ease;
}

.badge {
    display: inline-block;
    background: var(--primary);
    color: var(--dark-bg);
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--dark-bg);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 16px;
    z-index: 2;
}

.footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--dark-border);
    padding: 60px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer h4 { color: var(--text-light); font-size: 1rem; margin-bottom: 20px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { color: #888; font-size: 0.85rem; }
.footer ul li a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--dark-border); margin-top: 40px; padding-top: 20px; text-align: center; color: #666; font-size: 0.8rem; }

.tag { display: inline-block; padding: 2px 8px; background: rgba(34, 197, 94, 0.15); color: var(--primary); font-size: 0.75rem; font-weight: 600; margin-right: 5px; margin-bottom: 5px; }

.page-header {
    padding: 60px 0;
    border-bottom: 1px solid var(--dark-border);
}
.page-header h1 { font-size: 2.5rem; font-weight: 800; margin: 0; }
.page-header p { color: var(--text-muted); margin-top: 10px; }

.hero-image {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-image .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    z-index: 0;
    transition: opacity 1s ease;
}
.hero-image .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 40%, rgba(11,11,11,0.92) 100%);
    z-index: 1;
}
.hero-image h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.hero-image h1 mark { color: var(--primary); background: none; }
.hero-image p { color: var(--text-muted-light); font-size: 1.2rem; max-width: 650px; margin: 0 auto 30px; }
.hero-image .container {
    position: relative;
    z-index: 2;
}

.hero-slider {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    opacity: 0;
    transition: opacity 1.2s ease;
    z-index: 0;
}
.hero-slide.active {
    opacity: 1;
}
.hero-slider .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.45) 40%, rgba(11,11,11,0.92) 100%);
    z-index: 1;
}
.hero-slider h1 { font-size: 4rem; font-weight: 800; margin-bottom: 24px; line-height: 1.15; text-shadow: 0 2px 30px rgba(0,0,0,0.6); }
.hero-slider h1 mark { color: var(--primary); background: none; }
.hero-slider p { color: rgba(255,255,255,0.85); font-size: 1.25rem; max-width: 700px; margin: 0 auto 30px; line-height: 1.7; text-shadow: 0 1px 15px rgba(0,0,0,0.4); }
.hero-slider .container { position: relative; z-index: 2; padding: 80px 20px; width: 100%; }
.hero-slider .hero-subtitle { color: var(--primary); font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 16px; }
.hero-content { width: 100%; }
.hero-split {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
}
.hero-text {
    flex: 1;
    text-align: left;
}
.hero-text h1 { font-size: 3.5rem; }
.hero-text p { margin-left: 0; margin-right: 0; }
.hero-text .hero-buttons { justify-content: flex-start; }
.hero-video {
    flex: 0 0 420px;
    max-width: 100%;
}
.hero-video .video-embed {
    border: 1px solid var(--dark-border);
}
.hero-video .video-embed img {
    aspect-ratio: 16/9;
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}
.hero-video .video-embed:hover img {
    transform: scale(1.05);
}
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 3;
}
.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}
.hero-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(34,197,94,0.6);
}
.hero-dot:hover {
    background: rgba(255,255,255,0.7);
}

@media (max-width: 1024px) {
    .hero-slider { min-height: 85vh; }
    .hero-slider h1 { font-size: 3rem; }
    .hero-text h1 { font-size: 2.8rem; }
    .hero-video { flex: 0 0 340px; }
}
@media (max-width: 768px) {
    .hero-slider { min-height: auto; padding: 100px 0 60px; }
    .hero-slider h1 { font-size: 2.2rem; }
    .hero-slider p { font-size: 1rem; }
    .hero-slider .hero-subtitle { font-size: 0.8rem; }
    .hero-slider .container { padding: 60px 16px; }
    .hero-split { flex-direction: column; gap: 30px; }
    .hero-text { text-align: center; }
    .hero-text h1 { font-size: 2rem; }
    .hero-text p { margin-left: auto; margin-right: auto; }
    .hero-text .hero-buttons { justify-content: center; }
    .hero-video { flex: 0 0 auto; width: 100%; max-width: 500px; }
    .hero-buttons { gap: 12px; }
    .hero-dots { bottom: 25px; gap: 10px; }
    .hero-dot { width: 10px; height: 10px; }
}
@media (max-width: 480px) {
    .hero-slider { min-height: auto; padding: 80px 0 50px; }
    .hero-slider h1 { font-size: 1.6rem; }
    .hero-slider p { font-size: 0.85rem; }
    .hero-slider .container { padding: 40px 12px; }
    .hero-text h1 { font-size: 1.5rem; }
    .hero-buttons { gap: 10px; }
    .hero-buttons .btn { width: 100%; text-align: center; }
}
.video-embed {
    position: relative;
    cursor: pointer;
    background: #0a0a0a;
    overflow: hidden;
}
.video-embed img {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.video-embed:hover img {
    transform: scale(1.05);
}
.video-embed .play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
    transition: transform 0.2s;
    z-index: 2;
    background: rgba(0,0,0,0.15);
}
.video-embed:hover .play-btn {
    transform: scale(1.15);
}
.video-embed iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    display: block;
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.video-modal.open {
    opacity: 1;
    visibility: visible;
}
.video-modal-inner {
    position: relative;
    width: 90%;
    max-width: 960px;
}
.video-modal-inner iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}
.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
}
.video-modal-close:hover {
    color: var(--primary);
}

.impact-strip {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    overflow: hidden;
}
.impact-strip img, .impact-strip .video-embed {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
    object-position: center 30%;
}
.impact-strip .video-embed img {
    min-height: 0;
}
.impact-strip .impact-content {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 768px) {
    .impact-strip { grid-template-columns: 1fr !important; }
}
.img-card {
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    overflow: hidden;
    border: 1px solid var(--dark-border);
    background: var(--dark-card);
}
.img-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    opacity: 0.3;
    z-index: 0;
    transition: all 0.4s ease;
}
.img-card > * {
    position: relative;
    z-index: 1;
}
.img-card:hover img {
    opacity: 0.45;
    transform: scale(1.05);
}
.img-card h3 { color: var(--primary); font-size: 1rem; margin: 0 0 8px; }
.img-card p { color: #ccc; font-size: 0.85rem; margin: 0; }
.img-hero-banner {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: center 30%;
    border: 1px solid var(--dark-border);
}
.stat-image-strip {
    position: relative;
    background: url('../images/medical/african-doctor-patient.jpg') center/cover fixed;
    padding: 80px 0;
}
.stat-image-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.75) 100%);
    z-index: 0;
}
.stat-image-strip .container { position: relative; z-index: 1; }

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.status-badge.status-active { background: var(--primary); color: var(--dark-bg); }
.status-badge.status-maintained { background: #2563eb; color: #fff; }
.status-badge.status-completed { background: #6b7280; color: #fff; }
.status-badge.status-archived { background: #dc2626; color: #fff; }

.img-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.project-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: flex-end;
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #0b0b0b 0%, #1a1a1a 100%);
    background-size: cover;
    background-position: center 30%;
    overflow: hidden;
}
.project-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 50%, rgba(11,11,11,0.95) 100%);
    z-index: 0;
}
.project-hero h1 { font-size: 2.8rem; font-weight: 800; margin: 0 0 10px; }

.project-stats-bar {
    display: flex;
    gap: 30px;
    margin-top: 25px;
}
.project-stat { text-align: center; }
.project-stat-value { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.project-stat-label { display: block; font-size: 0.8rem; color: #999; text-transform: uppercase; letter-spacing: 0.05em; }

.contributor-list { display: flex; flex-direction: column; gap: 12px; }
.contributor-item { display: flex; align-items: center; gap: 12px; }
.contributor-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--dark-border);
    flex-shrink: 0;
}
.contributor-avatar-fallback {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--dark-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cat-filter { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.cat-filter a {
    padding: 8px 20px;
    border: 1px solid var(--dark-border);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.cat-filter a:hover, .cat-filter a.active { border-color: var(--primary); color: var(--primary); }

.form-input { width: 100%; padding: 12px; background: var(--dark-card); border: 1px solid var(--dark-border); color: var(--text-light); font-size: 0.9rem; margin-bottom: 15px; }
.form-input:focus { outline: none; border-color: var(--primary); }
textarea.form-input { min-height: 120px; resize: vertical; }

.donor-wall { display: flex; flex-wrap: wrap; gap: 20px; }
.donor-card { background: var(--dark-card); border: 1px solid var(--dark-border); padding: 20px; flex: 1; min-width: 250px; }
.donor-card .amount { color: var(--primary); font-size: 1.2rem; font-weight: 700; }
.donor-card .name { color: var(--text-light); font-weight: 600; }
.donor-card .date { color: var(--text-muted); font-size: 0.8rem; }

.float-buttons {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 999;
}
.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
    transition: width 0.3s ease, transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-decoration: none !important;
}
.float-btn .btn-label {
    font-size: 0;
    opacity: 0;
    transition: opacity 0.2s ease, font-size 0.2s ease;
    font-weight: 600;
    margin-left: 0;
    pointer-events: none;
}
.float-btn svg { width: 26px; height: 26px; flex-shrink: 0; }
.float-btn:hover {
    width: auto;
    padding: 0 18px 0 14px;
    gap: 8px;
    border-radius: 28px;
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.15);
}
.float-btn:hover .btn-label {
    font-size: 0.9rem;
    opacity: 1;
}
.float-btn-chat {
    background: #25D366;
    color: white;
    animation: floatPulse 2s ease-in-out infinite;
}
.float-btn-chat:hover { animation: none; }
.float-btn-call {
    background: #F59E0B;
    color: #0b0b0b;
}
@keyframes floatPulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08); }
    50% { box-shadow: 0 6px 28px rgba(37,211,102,0.5), 0 0 0 1px rgba(255,255,255,0.15); }
}
