/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color variables - Blue and white theme for nonprofit */
    --background: #ffffff;
    --foreground: #1e3a8a;
    --card: #f8fafc;
    --card-foreground: #1e3a8a;
    --primary: #1e3a8a;
    --primary-foreground: #ffffff;
    --secondary: #3b82f6;
    --secondary-foreground: #ffffff;
    --muted: #f8fafc;
    --muted-foreground: #64748b;
    --accent: #3b82f6;
    --accent-foreground: #ffffff;
    --border: #e2e8f0;
    --input: #f8fafc;
    --ring: rgba(59, 130, 246, 0.5);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    
    /* Spacing */
    --radius: 0.5rem;
    --container-padding: 1rem;
    --section-padding: 4rem 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Navigation */
.nav {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.nav-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary);
}

.heart-icon {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
}

.brand-text {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--foreground);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--foreground);
}

/* Mobile menu (initial state handled with max-height/opacity to allow transitions) */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--background);
    padding: 1rem;
    border-top: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--foreground);
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--primary);
    background-color: var(--muted);
}

.mobile-btn-container {
    padding: 1rem;
    text-align: center;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* .mobile-menu.active behavior is handled later to enable smooth animation */
}
.nav-link.active {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--foreground);
}

.mobile-menu {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--foreground);
    font-weight: 500;
}

.mobile-btn-container {
    padding: 0.75rem;
}

/* Smooth mobile menu animation (uses max-height + opacity + transform for fluid motion) */
.mobile-menu {
    /* ensure menu sits below the nav and can animate height */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--background);
    border-top: 1px solid var(--border);
    overflow: hidden;
    max-height: 0; /* collapsed */
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: max-height 320ms cubic-bezier(.2,.9,.2,1), opacity 240ms ease, transform 260ms ease;
    will-change: max-height, opacity, transform;
    box-shadow: 0 8px 20px rgba(10, 25, 47, 0.06);
}

.mobile-menu.active {
    max-height: 420px; /* enough to show links and button */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Make mobile links visually separated for the animated state */
.mobile-menu .mobile-nav-link {
    opacity: 0.98;
    transition: background-color 180ms ease, color 180ms ease;
}

/* Eye-catching gradient donate button for mobile */
.btn-gradient {
    background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 100%);
    color: var(--primary-foreground);
    box-shadow: 0 8px 20px rgba(59,130,246,0.18);
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: calc(var(--radius) + 0.15rem);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.btn-gradient:hover,
.btn-gradient:focus {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(59,130,246,0.24);
}

/* Make the mobile donate button full-width and prominent */
.mobile-donate {
    width: 100%;
    text-align: center;
    font-weight: 600;
}

/* Subtle pulsing/attention animation (used sparingly) */
@keyframes subtlePulse {
    0% { transform: translateY(0); box-shadow: 0 8px 20px rgba(59,130,246,0.14); }
    50% { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(59,130,246,0.18); }
    100% { transform: translateY(0); box-shadow: 0 8px 20px rgba(59,130,246,0.14); }
}

.btn-gradient.pulse {
    animation: subtlePulse 3.6s ease-in-out infinite;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    background-color: rgba(30, 58, 138, 0.9);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background-color: var(--muted);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1), rgba(59, 130, 246, 0.1));
    padding: 5rem 0 8rem;
    overflow: hidden;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-circle {
    position: absolute;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    opacity: 0.1;
    animation: pulse 4s infinite;
}

.hero-circle-1 {
    background-color: var(--primary);
    top: -10rem;
    right: -10rem;
}

.hero-circle-2 {
    background-color: var(--accent);
    bottom: -10rem;
    left: -10rem;
    animation-delay: 2s;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Sections */
.section {
    padding: var(--section-padding);
}

.section-muted {
    background-color: rgba(248, 250, 252, 0.5);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 32rem;
    margin: 0 auto;
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.max-width {
    max-width: 64rem;
    margin: 0 auto;
}

/* Cards */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.card-header {
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* Icon circles */
.icon-circle {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.icon-primary {
    background-color: rgba(30, 58, 138, 0.1);
    color: var(--primary);
}

.icon-accent {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

.icon {
    width: 2rem;
    height: 2rem;
}

.card-hover:hover .icon-circle {
    transform: scale(1.1);
}

/* Impact stats */
.impact-stat {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.stat-number:hover {
    transform: scale(1.1);
}

.stat-label {
    color: var(--muted-foreground);
    font-weight: 500;
}

.text-primary {
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

/* Call to Action */
.cta-content {
    text-align: center;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: var(--primary-foreground);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-foreground);
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-description {
    opacity: 0.9;
    font-size: 0.875rem;
}

.footer-heading {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

.footer-list li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--primary-foreground);
    opacity: 0.9;
    text-decoration: none;
    font-size: 0.875rem;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
    font-size: 0.875rem;
}

.contact-icon {
    width: 1rem;
    height: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-foreground);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.social-link:hover {
    opacity: 1;
}

.social-link svg {
    width: 100%;
    height: 100%;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
}

.footer-copyright {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.15;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes count-up {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-delay {
    animation: fade-in 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-delay-2 {
    animation: fade-in 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-fade-in-delay-3 {
    animation: fade-in 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.animate-slide-up {
    animation: slide-up 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slide-up 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slide-up 0.6s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-slide-up-delay-3 {
    animation: slide-up 0.6s ease-out 0.6s forwards;
    opacity: 0;
}

.animate-slide-up-delay-4 {
    animation: slide-up 0.6s ease-out 0.8s forwards;
    opacity: 0;
}

.animate-count-up {
    animation: count-up 0.8s ease-out forwards;
    opacity: 0;
}

.animate-count-up-delay {
    animation: count-up 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-count-up-delay-2 {
    animation: count-up 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-count-up-delay-3 {
    animation: count-up 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-lg {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 0.5rem;
    }
    
    .hero {
        padding: 3rem 0 5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}