/**
 * Custom Styles for CheickAKF Foundation Website
 * Additional styles beyond TailwindCSS
 */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base body styles */
body {
    font-family: 'Open Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #16a34a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Animation classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out forwards;
}

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

.animate-pulse-hover:hover {
    animation: pulse 0.5s ease-in-out;
}

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

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.3);
}

.btn-accent {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Input focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* Navigation styles */
nav {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Hero section gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-gradient {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* Program/News card hover */
.program-card,
.news-card {
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.program-card:hover,
.news-card:hover {
    border-bottom-color: #16a34a;
    transform: translateY(-5px);
}

/* Gallery item hover */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.5s ease;
}

/* FAQ accordion */
.faq-btn i {
    transition: transform 0.3s ease;
}

.faq-btn i.rotate-180 {
    transform: rotate(180deg);
}

.faq-content {
    transition: all 0.3s ease;
}

/* Donation form styles */
.donation-type-btn.active,
.amount-btn.active,
.payment-btn.active {
    border-color: #16a34a !important;
    background-color: rgba(22, 163, 74, 0.05) !important;
    color: #16a34a !important;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #16a34a;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: #16a34a;
    color: white;
}

.toast-error {
    background: #ef4444;
    color: white;
}

/* Impact counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-animate {
    animation: countUp 0.8s ease-out forwards;
}

/* Team member card */
.team-card {
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-10px);
}

.team-card:hover img {
    transform: scale(1.05);
}

/* Lightbox styles */
#lightbox {
    backdrop-filter: blur(5px);
}

#lightbox img {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hero-text {
        font-size: 2.5rem;
    }

    .section-padding {
        padding: 3rem 1rem;
    }
}

/* Form validation styles */
input:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown) {
    border-color: #16a34a;
}

/* Image lazy loading placeholder */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Sticky header shadow on scroll */
nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Selection color */
::selection {
    background: #16a34a;
    color: white;
}

/* Link hover effects */
a {
    transition: color 0.2s ease;
}

/* Footer link hover */
footer a:hover {
    color: #16a34a;
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: underline;
    }

    .bg-primary,
    .bg-accent {
        background: #f3f4f6 !important;
        color: #1f2937 !important;
    }
}

/* Accessibility - Focus visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
