/*
 * PREMIUM DONATE BUTTON
 * Ultra-eye-catching, animated donate button with premium effects
 */

/* ============================================
   PREMIUM DONATE BUTTON - NAVBAR
   ============================================ */

.navbar .custom-btn.custom-border-btn {
    /* Remove default styles */
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.navbar-nav .nav-item:last-child .nav-link {
    position: relative;
    padding: 14px 35px !important;
    background: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%) !important;
    color: white !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    font-size: 0.95rem !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    box-shadow:
        0 8px 25px rgba(0, 102, 255, 0.4),
        0 0 40px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    overflow: hidden !important;
    animation: donateGlow 3s ease-in-out infinite !important;
    z-index: 1 !important;
    border: none !important;
}

/* Ensure text is visible and above pseudo-elements */
.navbar-nav .nav-item:last-child .nav-link span,
.navbar-nav .nav-item:last-child .nav-link * {
    position: relative !important;
    z-index: 10 !important;
    color: white !important;
}

/* Animated gradient background */
.navbar-nav .nav-item:last-child .nav-link::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: shimmerDonate 3s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes shimmerDonate {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(0deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(360deg);
    }
}

/* Pulsing glow animation */
@keyframes donateGlow {
    0%, 100% {
        box-shadow:
            0 8px 25px rgba(0, 102, 255, 0.4),
            0 0 40px rgba(0, 212, 255, 0.2),
            0 0 0 0 rgba(0, 102, 255, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow:
            0 12px 35px rgba(0, 102, 255, 0.6),
            0 0 60px rgba(0, 212, 255, 0.4),
            0 0 0 20px rgba(0, 102, 255, 0),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Sparkle effect overlay */
.navbar-nav .nav-item:last-child .nav-link::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 1.2rem;
    animation: sparkle 2s ease-in-out infinite;
    opacity: 0;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

/* Hover state */
.navbar-nav .nav-item:last-child .nav-link:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow:
        0 15px 45px rgba(0, 102, 255, 0.6),
        0 0 80px rgba(0, 212, 255, 0.5),
        0 0 0 0 rgba(0, 102, 255, 0),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #00D4FF 0%, #0066FF 100%);
    letter-spacing: 2px;
}

.navbar-nav .nav-item:last-child .nav-link:hover::after {
    animation: sparkle 0.5s ease-in-out infinite;
}

/* Active/Click state */
.navbar-nav .nav-item:last-child .nav-link:active {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(0, 102, 255, 0.5),
        0 0 50px rgba(0, 212, 255, 0.3);
}

/* Heart icon animation */
.navbar-nav .nav-item:last-child .nav-link:hover i {
    animation: heartbeat 0.6s ease infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
}

/* Mobile responsive */
@media (max-width: 991px) {
    .navbar-nav .nav-item:last-child .nav-link {
        margin-top: 15px;
        width: 100%;
        text-align: center;
        padding: 16px 35px !important;
    }
}

/* ============================================
   DONATE BUTTONS IN CONTENT
   ============================================ */

/* Donate buttons on cause cards */
.custom-block .custom-btn,
a.custom-btn[href*="donate"] {
    position: relative;
    background: linear-gradient(135deg, #4C1D95 0%, #00D4FF 100%);
    color: white !important;
    border: none;
    border-radius: 50px;
    padding: 14px 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    box-shadow:
        0 8px 20px rgba(0, 102, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animated background gradient */
.custom-block .custom-btn::before,
a.custom-btn[href*="donate"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.custom-block .custom-btn:hover::before,
a.custom-btn[href*="donate"]:hover::before {
    left: 100%;
}

/* Hover effect */
.custom-block .custom-btn:hover,
a.custom-btn[href*="donate"]:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 12px 30px rgba(0, 102, 255, 0.5),
        0 0 50px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #00D4FF 0%, #0066FF 100%);
}

/* ============================================
   FLOATING DONATE BUTTON 
   ============================================ */

.floating-donate-btn {
    position: fixed;
    bottom: 10px;
    right: 30px;
    z-index: 999;
    padding: 18px 35px;
    background: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 1rem;
    box-shadow:
        0 10px 30px rgba(0, 102, 255, 0.5),
        0 0 60px rgba(0, 212, 255, 0.3);
    cursor: pointer;
    transition: all 0.4s ease;
    animation: floatBounce 3s ease-in-out infinite;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes floatBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating-donate-btn::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(45deg, #0066FF, #00D4FF, #4D5EFF, #00D4FF, #0066FF);
    background-size: 400% 400%;
    border-radius: 50px;
    z-index: -1;
    animation: gradientRotate 4s linear infinite;
    opacity: 0.7;
    filter: blur(5px);
}

@keyframes gradientRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.floating-donate-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow:
        0 15px 40px rgba(0, 102, 255, 0.6),
        0 0 80px rgba(0, 212, 255, 0.5);
}

.floating-donate-btn i {
    font-size: 1.3rem;
    animation: pulse 1.5s ease infinite;
}

/* Hide on mobile */
@media (max-width: 768px) {
    .floating-donate-btn {
        bottom: 20px;
        right: 20px;
        padding: 14px 25px;
        font-size: 0.9rem;
    }
}

/* ============================================
   MEGA DONATE CTA SECTION
   ============================================ */

.donate-mega-cta {
    background: linear-gradient(135deg, #0066FF 0%, #00D4FF 50%, #4D5EFF 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    margin: 60px 0;
}

/* Animated background pattern */
.donate-mega-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: patternMove 10s linear infinite;
}

@keyframes patternMove {
    0% {
        transform: translateX(0) scale(1);
    }
    50% {
        transform: translateX(50px) scale(1.1);
    }
    100% {
        transform: translateX(0) scale(1);
    }
}

.donate-mega-cta .container {
    position: relative;
    z-index: 1;
}

.donate-mega-cta h2 {
    color: white;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.donate-mega-cta p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.4rem;
    margin-bottom: 40px;
}

.donate-mega-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 22px 50px;
    background: white;
    color: #0066FF;
    border: none;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.2rem;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    animation: megaBtnPulse 2s ease-in-out infinite;
}

@keyframes megaBtnPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 15px 40px rgba(0, 0, 0, 0.3),
            0 0 0 0 rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 20px 50px rgba(0, 0, 0, 0.4),
            0 0 0 20px rgba(255, 255, 255, 0);
    }
}

.donate-mega-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.2), rgba(0, 212, 255, 0.2));
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.donate-mega-btn:hover::before {
    width: 400px;
    height: 400px;
}

.donate-mega-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    animation: none;
}

.donate-mega-btn i {
    font-size: 1.5rem;
    transition: transform 0.4s ease;
}

.donate-mega-btn:hover i {
    transform: scale(1.3) rotate(15deg);
}

/* ============================================
   DONATION IMPACT BADGES
   ============================================ */

.donation-impact-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1), rgba(0, 212, 255, 0.1));
    border: 2px solid rgba(0, 102, 255, 0.3);
    border-radius: 50px;
    color: #0066FF;
    font-weight: 700;
    margin: 10px 5px;
    transition: all 0.3s ease;
}

.donation-impact-badge:hover {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.2), rgba(0, 212, 255, 0.2));
    border-color: #0066FF;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 102, 255, 0.2);
}

.donation-impact-badge i {
    font-size: 1.3rem;
    color: #0066FF;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .donate-mega-cta h2 {
        font-size: 2.5rem;
    }

    .donate-mega-cta p {
        font-size: 1.1rem;
    }

    .donate-mega-btn {
        padding: 18px 35px;
        font-size: 1rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.navbar-nav .nav-item:last-child .nav-link:focus,
.custom-btn:focus,
.floating-donate-btn:focus,
.donate-mega-btn:focus {
    outline: 3px solid rgba(0, 102, 255, 0.5);
    outline-offset: 3px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .navbar-nav .nav-item:last-child .nav-link,
    .floating-donate-btn,
    .donate-mega-btn {
        animation: none !important;
    }

    .navbar-nav .nav-item:last-child .nav-link::before,
    .navbar-nav .nav-item:last-child .nav-link::after {
        animation: none !important;
    }
}
