/* ====================== ROOT & GLOBAL RESET ====================== */
:root {
    --foundation-green: #7ed957;
    --foundation-purple: #3d07a8;
    --foundation-cream: #faf8f2;
    --text-dark: #1f2937;
    --text-gray: #374151;
    --text-light: #f3f4f6;
}

/* Critical Mobile Gap Fix */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden !important;
}

/* Global Container Protection */
.container {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* ====================== HEADER ====================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    width: 100% !important;
}

/* Single Clean Rule for .container.nav */
.container.nav {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0.85rem 1rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-sizing: border-box;
}

/* Mobile - Very Tight Padding */
@media (max-width: 480px) {
    .container.nav {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 1024px) {
    .container.nav {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .container.nav {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

/* ====================== Logo ====================== */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.logo img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    line-height: 1.1;
}

.full-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--foundation-purple);
    margin: 0;
    display: none;
}

.short-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--foundation-purple);
    margin: 0;
    display: block;
}

.logo-text small {
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 600;
    display: block;
    margin-top: 2px;
}

/* Show full name only on very large screens */
@media (min-width: 1280px) {
    .full-name { display: block; }
    .short-name { display: none; }
    .logo img { width: 72px; height: 72px; }
}

/* ====================== Desktop Navigation ====================== */
.nav-links {
    display: none;
    align-items: center;
    gap: 1.6rem;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s;
}

.nav-links a:hover {
    color: var(--foundation-green);
}

/* Donate Button */
.btn-nav {
    background-color: var(--foundation-green);
    color: var(--foundation-purple);
    padding: 0.85rem 1.75rem;
    border-radius: 9999px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

/* ====================== Mobile Menu Button ====================== */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 1.6rem;
    background: none;
    border: none;
    color: var(--foundation-purple);
    cursor: pointer;
    z-index: 1010;
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* ====================== Mobile Menu ====================== */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    gap: 1.1rem;
}

.mobile-menu-content a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    color: #374151;
    text-decoration: none;
}

.mobile-donate-btn {
    background: var(--foundation-green);
    color: var(--foundation-purple);
    text-align: center;
    padding: 1rem;
    border-radius: 9999px;
    font-weight: 700;
    margin-top: 1rem;
}

/* ====================== BASE HERO ====================== */
.hero-section {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    background: var(--foundation-purple);
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 2rem 1.25rem 6rem;
    box-sizing: border-box;
}

.hero-inner {
    color: white;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

/* ====================== PROJECTS HERO ====================== */
.projects-hero .hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(61, 7, 168, 0.88) 0%,
        rgba(61, 7, 168, 0.78) 40%,
        rgba(61, 7, 168, 0.55) 75%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

.projects-hero .hero-tag {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    background: rgba(126, 217, 87, 0.25);
    color: var(--foundation-green);
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 1.8rem;
    font-size: 1.05rem;
}

.projects-hero .hero-title {
    font-size: clamp(2.8rem, 9vw, 5.5rem);
    line-height: 1.05;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.projects-hero .hero-desc {
    font-size: clamp(1.15rem, 4.8vw, 1.4rem);
    line-height: 1.55;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.projects-hero .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-width: 420px;
    margin: 0 auto;
}

/* Buttons */
.projects-hero .hero-btn-primary,
.projects-hero .hero-btn-secondary {
    padding: 1.35rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.4s ease;
    text-align: center;
}

.projects-hero .hero-btn-primary {
    background: var(--foundation-green);
    color: var(--foundation-purple);
}

.projects-hero .hero-btn-primary:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(126, 217, 87, 0.4);
}

.projects-hero .hero-btn-secondary {
    border: 2px solid white;
    color: white;
}

.projects-hero .hero-btn-secondary:hover {
    background: white;
    color: var(--foundation-purple);
}

/* ====================== RESPONSIVE ====================== */
@media (min-width: 768px) {
    .projects-hero .hero-buttons {
        flex-direction: row;
        max-width: none;
        justify-content: center;
    }
    
    .projects-hero .hero-content {
        padding: 8rem 3rem 10rem;
    }
}

@media (max-width: 480px) {
    .projects-hero {
        min-height: 95vh;
    }
    .projects-hero .hero-content {
        padding: 2rem 1rem 5rem;
    }
}

/* ====================== ONGOING PROJECTS SECTION ====================== */
.projects-section {
    padding: 6rem 0;
    background: white;
}

.projects-section.bg-white {
    background: white;
}

/* Header */
.programs-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 4rem;
}

.programs-tag {
    display: inline-block;
    padding: 0.55rem 1.35rem;
    background: rgba(126, 217, 87, 0.15);
    color: var(--foundation-green);
    font-weight: 600;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.programs-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.2rem, 5.5vw, 3.2rem);
    font-weight: 700;
    color: var(--foundation-purple);
    margin-bottom: 1rem;
}

.programs-desc {
    font-size: 1.15rem;
    color: #4b5563;
    line-height: 1.7;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
}

/* Project Card */
.project-card {
    background: var(--foundation-cream);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.project-img-wrapper {
    height: 240px;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-img {
    transform: scale(1.08);
}

.project-info {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Status Badge */
.project-status {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-status.ongoing {
    background: #fef3c7;
    color: #d97706;
}

.project-status.completed {
    background: #d1fae5;
    color: #10b981;
}

/* Progress Bar */
.progress-container {
    margin: 1.5rem 0;
}

.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--foundation-green), #4ade80);
    transition: width 1.5s ease;
}

.progress-text {
    font-size: 0.95rem;
    color: #4b5563;
    font-weight: 500;
}

.project-info h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.45rem;
    color: var(--foundation-purple);
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.project-info p {
    color: #4b5563;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-btn {
    display: inline-block;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--foundation-green);
    color: var(--foundation-purple);
    font-weight: 700;
    text-align: center;
    border-radius: 9999px;
    text-decoration: none;
    margin-top: auto;
    transition: all 0.3s ease;
}

.project-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(126, 217, 87, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .projects-section {
        padding: 4.5rem 0;
    }
    .project-img-wrapper {
        height: 200px;
    }
}

/* ====================== COMPLETED PROJECTS SECTION ====================== */
.completed-projects {
    background: #f8f9fa;
}

.completed-projects .project-status.completed {
    background: #d1fae5;
    color: #10b981;
}

/* Impact Highlight */
.project-impact {
    margin-top: 1.5rem;
    padding: 0.85rem 1.25rem;
    background: rgba(126, 217, 87, 0.15);
    color: var(--foundation-green);
    font-weight: 700;
    border-radius: 9999px;
    display: inline-block;
    font-size: 1.05rem;
}

/* Make sure it matches Ongoing Projects */
.project-card {
    background: white;
}

.project-info {
    padding: 1.8rem;
}

/* Optional: Add subtle checkmark or success feel */
.project-status.completed::before {
    content: "✓ ";
    font-weight: bold;
}

/* ====================== UPCOMING PROJECTS SECTION ====================== */
.upcoming-projects {
    background: #f8f9fa;
}

.upcoming-projects .project-status.upcoming {
    background: #dbeafe;
    color: #1e40af;
}

/* Project Card (consistent with previous sections) */
.project-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.project-img-wrapper {
    height: 240px;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-img {
    transform: scale(1.08);
}

.project-info {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.45rem;
    color: var(--foundation-purple);
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.project-info p {
    color: #4b5563;
    line-height: 1.65;
    margin-bottom: 1.8rem;
    flex-grow: 1;
}

.project-btn {
    display: inline-block;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--foundation-green);
    color: var(--foundation-purple);
    font-weight: 700;
    text-align: center;
    border-radius: 9999px;
    text-decoration: none;
    margin-top: auto;
    transition: all 0.3s ease;
}

.project-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(126, 217, 87, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .projects-section {
        padding: 4.5rem 0;
    }
    .project-img-wrapper {
        height: 200px;
    }
}

/* ====================== GALLERY SECTION ====================== */
.gallery-section {
    padding: 6rem 0;
    background: #f8f9fa;
}

.gallery-section .programs-header {
    margin-bottom: 4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    aspect-ratio: 16 / 11;
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.12);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: white;
    padding: 1.8rem 1.5rem 1.2rem;
    transform: translateY(30%);
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay p {
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 480px) {
    .gallery-section {
        padding: 4.5rem 0;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        gap: 2rem;
    }
}

/* ====================== FINAL CTA SECTION ====================== */
.cta-section {
    padding: 7rem 0;
    background: var(--foundation-purple);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-content {
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.cta-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.cta-desc {
    font-size: 1.2rem;
    line-height: 1.65;
    margin-bottom: 3rem;
    opacity: 0.95;
}

/* Impact Items */
.cta-impact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.impact-item {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    padding: 1.25rem 1.8rem;
    border-radius: 1.25rem;
    min-width: 220px;
    border: 1px solid rgba(255,255,255,0.2);
}

.impact-item strong {
    display: block;
    font-size: 1.55rem;
    color: var(--foundation-green);
    margin-bottom: 0.4rem;
}

/* Buttons */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.cta-section .hero-btn-primary,
.cta-section .hero-btn-secondary {
    padding: 1.3rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 9999px;
    min-width: 260px;
    text-decoration: none;
}

.cta-section .hero-btn-primary {
    background: var(--foundation-green);
    color: var(--foundation-purple);
}

.cta-section .hero-btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(126, 217, 87, 0.5);
}

.cta-section .hero-btn-secondary {
    border: 2px solid white;
    color: white;
}

.cta-section .hero-btn-secondary:hover {
    background: white;
    color: var(--foundation-purple);
}

/* Trust Line */
.trust-line {
    color: rgba(255,255,255,0.8);
    font-size: 1.05rem;
    margin-top: 1rem;
}

.trust-line i {
    color: var(--foundation-green);
}

/* Responsive */
@media (max-width: 480px) {
    .cta-section {
        padding: 5rem 0;
    }
}

/* ====================== Footer ====================== */
.site-footer {
    background: #1f2937;
    color: #e5e7eb;
    padding-top: 4rem;
}

.footer-content {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 640px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1.2fr;
    }
}

.footer-col h3 {
    color: white;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.85rem;
}

.footer-col a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--foundation-green);
}

/* Logo Column */
.logo-col .footer-logo img {
    height: 180px;
    width: auto;
    border-radius: 0.75rem;
    margin-bottom: 0.2rem;
}

.footer-mission {
    line-height: 1.6;
    max-width: 320px;
    margin-bottom: 1.5rem;
    color: #9ca3af;
}

/* Social Links */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--foundation-green);
    color: var(--foundation-purple);
    transform: translateY(-3px);
}

/* Contact Info */
.contact-info i {
    width: 20px;
    color: var(--foundation-green);
    margin-right: 10px;
}

/* Bottom Bar */
.footer-bottom {
    background: #111827;
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: 0.95rem;
    color: #9ca3af;
}

.footer-bottom .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.made-with-love {
    color: var(--foundation-green);
    font-weight: 500;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}