/* Enhanced NGO Loader Styles - Universal for All Pages */
.ngo-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    overflow: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s ease-out;
    will-change: opacity, visibility;
    pointer-events: none !important; /* CRITICAL: Never block scroll events */
}

.ngo-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ngo-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    animation: bgMove 8s ease-in-out infinite;
    will-change: transform, opacity;
}

@keyframes bgMove {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.floating-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-heart {
    position: absolute;
    color: rgba(255, 255, 255, 0.15);
    font-size: 1.5rem;
    animation: heartFloat 5s ease-in-out infinite;
    will-change: transform, opacity;
}

.floating-heart:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.floating-heart:nth-child(2) { top: 20%; left: 85%; animation-delay: 0.7s; }
.floating-heart:nth-child(3) { top: 40%; left: 20%; animation-delay: 1.4s; }
.floating-heart:nth-child(4) { top: 70%; left: 80%; animation-delay: 2.1s; }
.floating-heart:nth-child(5) { top: 80%; left: 15%; animation-delay: 2.8s; }
.floating-heart:nth-child(6) { top: 30%; left: 75%; animation-delay: 0.35s; }
.floating-heart:nth-child(7) { top: 60%; left: 30%; animation-delay: 1.05s; }
.floating-heart:nth-child(8) { top: 15%; left: 60%; animation-delay: 1.75s; }

@keyframes heartFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.15;
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
        opacity: 0.3;
    }
}

.loader-container {
    position: relative;
    text-align: center;
    z-index: 10;
}

/* Optimized Ripple Effect */
.loader-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
}

.loader-ripple div {
    position: absolute;
    border: 3px solid rgba(255, 255, 255, 0.5);
    opacity: 1;
    border-radius: 50%;
    animation: fastRipple 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    will-change: transform, opacity;
}

.loader-ripple div:nth-child(2) {
    animation-delay: -0.9s;
}

@keyframes fastRipple {
    0% {
        top: 60px;
        left: 60px;
        width: 0;
        height: 0;
        opacity: 1;
        transform: scale(0);
    }
    100% {
        top: 0;
        left: 0;
        width: 120px;
        height: 120px;
        opacity: 0;
        transform: scale(1);
    }
}

/* Fast Logo Container */
.logo-loader {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fastLogoBlink 1.2s ease-in-out infinite;
    will-change: transform, box-shadow;
}

.logo-loader img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: contain;
}

.logo-placeholder {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes fastLogoBlink {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }
}

/* Fast Text Animations */
.loader-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fastTextGlow 1.5s ease-in-out infinite;
    will-change: opacity, text-shadow;
}

.loader-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: fastSubtitleFade 2s ease-in-out infinite;
    will-change: opacity;
}

@keyframes fastTextGlow {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        opacity: 1;
    }
    50% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.3);
        opacity: 0.9;
    }
}

@keyframes fastSubtitleFade {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.7; }
}

/* Fast Fade Out */
.ngo-loader.fade-out {
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    .ngo-loader::before,
    .floating-heart,
    .loader-ripple div,
    .logo-loader,
    .loader-text,
    .loader-subtitle {
        animation-duration: 0.01s !important;
        animation-iteration-count: 1 !important;
    }
}

/* Responsive Optimizations */
@media (max-width: 768px) {
    .loader-ripple {
        width: 100px;
        height: 100px;
    }
    
    .loader-ripple div {
        animation: fastRippleMobile 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    }
    
    @keyframes fastRippleMobile {
        0% {
            top: 50px;
            left: 50px;
            width: 0;
            height: 0;
            opacity: 1;
        }
        100% {
            top: 0;
            left: 0;
            width: 100px;
            height: 100px;
            opacity: 0;
        }
    }
    
    .logo-loader {
        width: 70px;
        height: 70px;
    }
    
    .logo-loader img {
        width: 45px;
        height: 45px;
    }
    
    .loader-text {
        font-size: 1.5rem;
    }
    
    .loader-subtitle {
        font-size: 0.9rem;
    }
    
    .floating-heart {
        font-size: 1.2rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-loader {
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
    }
}

/* Enhanced Hero Section Divider */
.hero-section-divider {
    position: relative;
    /* Pull the divider up over the hero so it feels like part of the hero (not a separate section) */
    margin-top: -80px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(248, 250, 252, 0.92) 65%, rgba(248, 250, 252, 1) 100%);
    padding: 28px 0 34px;
    overflow: hidden;
    z-index: 4;
}

@media (max-width: 576px) {
    .hero-section-divider {
        margin-top: -72px;
        padding: 22px 0 28px;
    }
}

.heart-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="rgba(14,165,233,0.1)"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') center/contain no-repeat;
    animation: heartPulse 2s ease-in-out infinite, heartRotate 15s linear infinite;
    z-index: 1;
    will-change: transform;
}

@keyframes heartPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes heartRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.heart-bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.heart-particle {
    position: absolute;
    color: rgba(14, 165, 233, 0.2);
    font-size: 12px;
    animation: floatHeart 10s linear infinite;
    will-change: transform, opacity;
}

.heart-particle:nth-child(odd) {
    animation-delay: -5s;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100px) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(80px) scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

.section-heart-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.4);
    position: relative;
    z-index: 2;
    animation: iconFloat 2s ease-in-out infinite;
    will-change: transform;
}

/* Enhanced Progress Bar */
.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 20px;
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.8));
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 1s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}