/* Yuva Mitra - Official Style System */
:root {
    --primary: #e53935;
    --primary-hover: #c62828;
    --secondary: #0f2847;
    --brand-blue: #2e3192;
    --accent: #F5A623;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fbff;
    --bg-blue-tint: #E8F1F8;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

html {
    overflow-x: clip;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: clip;
    width: 100%;
    position: relative;
}

/* Sticky Header on Scroll */
#mainNav {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease-in-out;
}

#mainNav.header-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px -2px rgba(15, 40, 71, 0.12) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Inner Page Banners */
.page-banner {
    position: relative;
    background: linear-gradient(135deg, #09173b 0%, #0f2847 45%, #183b72 75%, #2E3192 100%) !important;
    color: #ffffff !important;
    padding: 4.5rem 1.5rem !important;
    overflow: hidden;
}
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(245, 166, 35, 0.18) 0%, transparent 45%),
                radial-gradient(circle at 15% 85%, rgba(229, 57, 53, 0.18) 0%, transparent 45%);
    pointer-events: none;
}
.page-banner h1 {
    color: #ffffff !important;
    font-family: var(--font-heading);
    font-weight: 800;
    position: relative;
    z-index: 10;
}
.page-banner nav, .page-banner nav * {
    color: rgba(255, 255, 255, 0.85) !important;
    position: relative;
    z-index: 10;
}
.page-banner nav a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Red underline accent bar */
.accent-bar {
    width: 6rem;
    height: 4px;
    border-radius: 9999px;
    background: linear-gradient(90deg, #e53935 0%, #F5A623 100%);
    margin: 0.75rem auto 0;
}
.accent-bar.left {
    margin-left: 0;
}

/* Buttons */
.btn-donate {
    background-color: #e53935;
    color: #ffffff !important;
    font-weight: 700;
    font-family: var(--font-heading);
    padding: 0.65rem 1.75rem;
    border-radius: 9999px;
    box-shadow: 0 4px 14px 0 rgba(229, 57, 53, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-donate:hover {
    background-color: #c62828;
    box-shadow: 0 6px 20px 0 rgba(229, 57, 53, 0.5);
    transform: translateY(-2px);
}

.btn-donate.btn-sm {
    padding: 0.45rem 1.1rem;
    font-size: 0.8rem;
    box-shadow: 0 3px 10px 0 rgba(229, 57, 53, 0.3);
}

.btn-read-more {
    background-color: #e53935;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.6rem;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-read-more:hover {
    background-color: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 57, 53, 0.45);
}

/* Nav Dropdown Styling */
.nav-item {
    position: relative;
}
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 270px;
    background: #ffffff;
    border-radius: 1rem;
    padding: 0.75rem 0.5rem;
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50;
    border: 1px solid rgba(226, 232, 240, 0.8);
}
.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: #334155;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}
.dropdown-link:hover {
    background-color: #f1f5f9;
    color: #e53935;
    transform: translateX(4px);
}

/* Hero Section Carousel */
.hero-slider {
    position: relative;
    height: 72vh;
    min-height: 480px;
    max-height: 780px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    clip-path: inset(0);
    box-sizing: border-box;
}
@media (max-width: 640px) {
    .hero-slider {
        min-height: 460px;
        height: auto;
    }
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    overflow: hidden;
    clip-path: inset(0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 800ms ease-in-out, visibility 800ms ease-in-out;
    z-index: 1;
    box-sizing: border-box;
}
.hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: none !important;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.50) 45%, rgba(0,0,0,0.18) 75%, transparent 100%);
    z-index: 3;
}
@media (max-width: 640px) {
    .hero-overlay {
        background: linear-gradient(180deg, rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.85) 100%);
    }
}
.hero-content {
    position: relative;
    z-index: 4;
    height: 100%;
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 3rem 1.25rem 4rem;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
}
@media (min-width: 641px) {
    .hero-content {
        padding: 0 1.5rem;
    }
}

/* Impact Section (Dark theme) */
.impact-section {
    background-color: #0c0a09;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(229, 57, 53, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(229, 57, 53, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, #080706 0%, #000000 100%);
    color: #ffffff;
    position: relative;
    padding: 5rem 1.5rem;
}
.impact-card {
    background: #141212;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 2.25rem 1.5rem 1.75rem;
    position: relative;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.impact-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 57, 53, 0.45);
    box-shadow: 0 12px 30px -5px rgba(229, 57, 53, 0.25);
}
.impact-badge {
    position: absolute;
    top: -1.4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    background: #1c1817;
    border: 2px solid #e53935;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4d4d;
    box-shadow: 0 0 16px rgba(229, 57, 53, 0.4);
}

/* Reach Map Animation & Tooltips */
.map-container {
    position: relative;
}
.map-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 20;
    cursor: pointer;
    transition: all 0.25s ease;
}
.map-pin-pulse {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.map-pin-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 10px currentColor;
}
.map-pin-ring {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.75;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.map-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 40, 71, 0.95);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    white-space: nowrap;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    display: none;
}
.map-pin:hover .map-tooltip,
.map-pin.active .map-tooltip {
    display: block;
}

/* State pill items */
.state-pill {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 0.75rem;
}
.state-pill:hover, .state-pill.active {
    border-color: #F5A623;
    transform: translateX(6px);
    box-shadow: 0 6px 16px rgba(245, 166, 35, 0.18);
}
.state-pill.blue:hover, .state-pill.blue.active {
    border-color: #2E6DA4;
    box-shadow: 0 6px 16px rgba(46, 109, 164, 0.18);
}
.state-badge {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: #F5A623;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.state-badge.blue {
    background-color: #2E6DA4;
}

/* Floating Back To Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background-color: #e53935;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 8px 24px rgba(229, 57, 53, 0.45);
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background-color: #c62828;
    transform: translateY(-4px) scale(1.05);
}
@media (max-width: 640px) {
    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1rem;
    }
}

/* Modal styles for video & donation */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-box {
    background: #ffffff;
    border-radius: 1.5rem;
    max-width: 900px;
    width: 100%;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}
.modal-overlay.active .modal-box {
    transform: scale(1);
}

/* Clean scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   EXACT ANIMATION EFFECTS (from yuvamitra.org)
   ========================================================================== */

/* 1. fadeInUp (Hero text, headers, and section reveals) */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fade-in-up {
    animation: 1s ease-out forwards fadeInUp;
}

/* Hero Slide Staggered Animation Triggers */
.hero-slide .hero-anim-1,
.hero-slide .hero-anim-2,
.hero-slide .hero-anim-3,
.hero-slide .hero-anim-4 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.hero-slide.active .hero-anim-1 {
    animation: 1s ease-out 200ms forwards fadeInUp;
}
.hero-slide.active .hero-anim-2 {
    animation: 1s ease-out 400ms forwards fadeInUp;
}
.hero-slide.active .hero-anim-3 {
    animation: 1s ease-out 600ms forwards fadeInUp;
}
.hero-slide.active .hero-anim-4 {
    animation: 1s ease-out 800ms forwards fadeInUp;
}

/* 2. donateBounceHover (Interactive bounce on Donate Now buttons) */
@keyframes donateBounceHover {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}
.hover-bounce:hover,
.btn-donate:hover {
    animation: 0.6s donateBounceHover;
}

/* 3. softBounce (Subtle floating badge bounce) */
@keyframes softBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}
.animate-soft-bounce {
    animation: 2s ease-in-out infinite softBounce;
}

/* 4. pulse-slow (Impact Section statistics & icons breathing) */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.08);
    }
}
.animate-pulse-slow {
    animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    display: inline-block;
}

/* 5. zoomInOutMap (Geographical Reach Map breathing effect) */
@keyframes zoomInOutMap {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}
.animate-zoom-in-out {
    animation: zoomInOutMap 10s ease-in-out infinite;
}

/* 6. floatSlow (SDG Goals floating icons) */
@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}
.animate-float-slow {
    animation: floatSlow 4s ease-in-out infinite;
}

/* 7. storyFadeUp (Stories of Change cards reveal) */
@keyframes storyFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-story-fade-up {
    animation: 0.7s ease-out forwards storyFadeUp;
}

/* 8. Infinite Continuous Tickers */
@keyframes scroll-left {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}
@keyframes scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}
@keyframes scroll-up {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}
@keyframes scroll-down {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}
.animate-scroll-left { animation: 80s linear infinite scroll-left; }
.animate-scroll-right { animation: 60s linear infinite scroll-right; }
.animate-scroll-up { animation: 40s linear infinite scroll-up; }
.animate-scroll-down { animation: 30s linear infinite scroll-down; }

/* ==========================================================================
   FLOATING WHATSAPP BUTTON (Smooth Blinking & Radar Pulse)
   ========================================================================== */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 5.75rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    z-index: 998;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    animation: whatsappBlink 2.4s infinite ease-in-out;
}

.floating-whatsapp-btn:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.7);
    animation: none;
}

.floating-whatsapp-btn .whatsapp-icon {
    font-size: 1.9rem;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    transition: transform 0.3s ease;
}

.floating-whatsapp-btn:hover .whatsapp-icon {
    transform: scale(1.12);
}

/* Radar pulse ripple ring for smooth blinking effect */
.whatsapp-ping-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: whatsappRadar 2.4s infinite cubic-bezier(0.24, 0, 0.38, 1);
    pointer-events: none;
}

/* Tooltip on hover */
.whatsapp-tooltip {
    position: absolute;
    right: 115%;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: #0f172a;
    color: #ffffff;
    padding: 0.45rem 0.85rem;
    border-radius: 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent #0f172a;
}
.floating-whatsapp-btn:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Keyframes for smooth blinking and glowing */
@keyframes whatsappBlink {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 26px rgba(37, 211, 102, 0.8), 0 0 0 8px rgba(37, 211, 102, 0.2);
    }
}

@keyframes whatsappRadar {
    0% {
        transform: scale(0.95);
        opacity: 0.85;
    }
    60% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Mobile responsive placement */
@media (max-width: 640px) {
    .floating-whatsapp-btn {
        bottom: 4.75rem;
        right: 1.25rem;
        width: 3rem;
        height: 3rem;
    }
    .floating-whatsapp-btn .whatsapp-icon {
        font-size: 1.6rem;
    }
    .whatsapp-tooltip {
        display: none;
    }
}
