/* ============================================================
   ANIMATIONS.CSS — Premium Animation Suite
   Help For All People | Pathways to Independence
   ============================================================ */

/* ── Scroll Progress Bar (top of page) ── */
.scroll-progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #e29300, #fff3b0, #e29300);
    background-size: 200% auto;
    z-index: 99998;
    transition: width 0.1s linear;
    animation: shimmerMove 2s linear infinite;
    pointer-events: none;
}


/* ── Banner Particles Canvas ── */
.banner-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ── Banner Content 3D Tilt ── */
.banner-content {
    transform-style: preserve-3d;
}

/* ══════════ KEYFRAMES ══════════ */

@keyframes shimmerMove {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0px);   }
    50%       { transform: translateY(-10px); }
}
@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 20px rgba(226,147,0,0.3);  }
    50%       { text-shadow: 0 0 44px rgba(226,147,0,0.75); }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}
@keyframes bannerIn {
    0%   { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0);    }
}
@keyframes ripplePop {
    0%   { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(4); opacity: 0;   }
}

/* ── Typewriter Cursor ── */
.tw-cursor {
    display: inline-block;
    width: 3px;
    height: 0.9em;
    background: currentColor; /* Matches text color automatically */
    margin-left: 3px;
    vertical-align: middle;
    position: relative;
    top: -0.05em;
    animation: blink 0.75s step-end infinite;
}

/* Prevent layout collapse during typing initialization */
.tw-waiting {
    min-height: 1.1em;
    display: inline-block;
    width: 100%;
}

/* ── Banner Description + Button Entrance ── */
.banner-description {
    animation: bannerIn 0.9s cubic-bezier(0.25,0.46,0.45,0.94) 1.2s both;
}
.banner-section .btn-banner {
    animation: bannerIn 0.9s cubic-bezier(0.25,0.46,0.45,0.94) 1.6s both;
}

/* ══════════ SCROLL REVEAL SYSTEM ══════════ */
[data-reveal] {
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity 0.75s cubic-bezier(0.25,0.46,0.45,0.94),
                transform 0.75s cubic-bezier(0.25,0.46,0.45,0.94);
}

[data-reveal="up"]    { transform: translateY(52px);  }
[data-reveal="left"]  { transform: translateX(-58px); }
[data-reveal="right"] { transform: translateX(58px);  }
[data-reveal="scale"] { transform: scale(0.84);       }
[data-reveal].revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* On mobile, convert side-scrolling reveals to vertical to prevent overflow */
@media (max-width: 991.98px) {
    [data-reveal="left"],
    [data-reveal="right"] {
        transform: translateY(40px);
    }
}

/* Clip each major section so reveal animations never bleed outside the viewport */
@media (max-width: 991.98px) {
    .section-about,
    .section-what-we-do,
    .about-what-wrapper,
    .section-program,
    .section-pathways,
    .section-faq,
    .section-donate,
    .section-property,
    .section-testimonial,
    .section-news,
    .section-impact {
        overflow-x: hidden;
    }
}

/* ── Navbar glassmorphism on scroll ── */
.navbar.scrolled {
    background: rgba(255,255,255,0.96) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.09) !important;
    transition: all 0.3s ease;
}

/* ── Label tag animated dot ── */
.label-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.label-tag::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    background: #e29300;
    border-radius: 50%;
    flex-shrink: 0;
    animation: glowPulse 2s ease-in-out infinite;
}

/* ── STAT CARD hover ── */
.stat-card {
    transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e29300, #fff3b0);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s ease;
}
.stat-card:hover                { transform: translateY(-14px) scale(1.025); box-shadow: 0 28px 64px rgba(226,147,0,0.2); }
.stat-card:hover::after         { transform: scaleX(1); }
.stat-card:hover .stat-number   { color: #e29300; animation: glowPulse 1.5s ease-in-out infinite; }

/* ── ABOUT ITEM hover ── */
.about-item {
    border-left: 3px solid transparent;
    padding-left: 10px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.about-item:hover { transform: translateX(8px); border-left-color: #e29300; }

/* ── WHAT WE DO item hover ── */
.what-item {
    border-left: 3px solid transparent;
    padding-left: 0;
    transition: padding-left 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.what-item:hover { border-left-color: #e29300; padding-left: 12px; transform: translateX(4px); }

/* ── STEP NUMBER float animation ── */
.step-num { animation: floatY 3.5s ease-in-out infinite; }
.step-num-1 { animation-delay: 0s;    }
.step-num-2 { animation-delay: 0.5s;  }
.step-num-3 { animation-delay: 1s;    }
.step-num-4 { animation-delay: 1.5s;  }
.step-num-5 { animation-delay: 2s;    }

/* ── STEP CARD hover
     IMPORTANT: NO overflow:hidden — step-num sits at top:-82px outside the card ── */
.step-card {
    transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.4s ease;
    position: relative;
}
.step-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(226,147,0,0.04);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.step-card:hover          { transform: translateY(-12px); }
.step-card:hover::before  { opacity: 1; }
.program-step:nth-child(1) .step-card:hover { box-shadow: 0 24px 50px rgba(192, 57, 43,0.22); }
.program-step:nth-child(2) .step-card:hover { box-shadow: 0 24px 50px rgba( 41,128,185,0.22); }
.program-step:nth-child(3) .step-card:hover { box-shadow: 0 24px 50px rgba( 39,174, 96,0.22); }
.program-step:nth-child(4) .step-card:hover { box-shadow: 0 24px 50px rgba(230,126, 34,0.22); }
.step-5 .step-card:hover                    { box-shadow: 0 24px 50px rgba(200,180,  0,0.22); }

/* ── PATHWAYS image hover ── */
.pathways-tall-img, .pathways-small-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.pathways-tall-img:hover, .pathways-small-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.28);
}
.pathways-tall-img img, .pathways-small-card img { transition: transform 0.55s ease; }
.pathways-tall-img:hover img, .pathways-small-card:hover img { transform: scale(1.07); }

/* ── PARTNER CARD hover ── */
.partner-card { transition: transform 0.4s ease, box-shadow 0.4s ease; }
.partner-card:hover { transform: translateY(-10px); box-shadow: 0 22px 52px rgba(0,0,0,0.22); }
.partner-card-label { transition: background 0.4s ease; }
.partner-card:hover .partner-card-label { background: linear-gradient(180deg, rgba(200,100,0,0.55) 0%, rgba(180,80,0,0.96) 100%); }
.partner-card img { transition: transform 0.55s ease; }
.partner-card:hover img { transform: scale(1.07); }

/* ── DONATE CARD hover ── */
.donate-card { transition: transform 0.4s ease, box-shadow 0.4s ease; }
.donate-card:hover { transform: translateY(-10px); box-shadow: 0 28px 64px rgba(0,0,0,0.3); }

/* ── NEWS CARD image zoom ── */
.news-card .card-img-top { transition: transform 0.55s ease; }
.news-card:hover .card-img-top { transform: scale(1.08); }

/* ── FAQ ITEM hover ── */
.faq-item { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.faq-item:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.12); }
.faq-btn { transition: color 0.25s ease; }
.faq-btn:not(.collapsed) { color: #e29300 !important; }

/* ── BUTTON shine + ripple ── */
.btn-amber, .btn-banner, .btn-donate {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.btn-amber::before, .btn-banner::before, .btn-donate::before {
    content: '';
    position: absolute;
    top: 0; left: -110%;
    width: 65%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.26) 50%, transparent 100%);
    transform: skewX(-18deg);
    transition: left 0.55s ease;
    pointer-events: none;
    z-index: 1;
}
.btn-amber:hover::before, .btn-banner:hover::before, .btn-donate:hover::before { left: 150%; }
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.35);
    transform: scale(0);
    pointer-events: none;
    animation: ripplePop 0.55s ease-out forwards;
}

/* ── PROPERTY GLASS CARD shimmer ── */
.property-glass-card { position: relative; overflow: hidden; isolation: isolate; }
.property-glass-card::after {
    content: '';
    position: absolute;
    top: -60%; left: -60%;
    width: 220%; height: 220%;
    background: linear-gradient(45deg, transparent 38%, rgba(255,255,255,0.05) 50%, transparent 62%);
    background-size: 200% auto;
    animation: shimmerMove 5s linear infinite;
    pointer-events: none;
}

/* ── Contact input focus glow ── */
.form-control-underline:focus {
    border-color: #e29300;
    box-shadow: 0 2px 0 rgba(226,147,0,0.5);
    outline: none;
}

/* ── Footer link underline disabled ── */
.footer-links a { position: relative; display: inline-block; }
.footer-links a::after { display: none; }
.footer-links a:hover::after { display: none; }

/* ── About image hover ── */
.about-image-wrapper { overflow: hidden; border-radius: 16px; transition: box-shadow 0.4s ease; }
.about-image-wrapper:hover { box-shadow: 0 24px 60px rgba(0,0,0,0.18); }
.about-image-wrapper img { transition: transform 0.55s ease; }
.about-image-wrapper:hover img { transform: scale(1.04); }
