/* Premium Custom Styles for Mfuko wa Uinjilishaji */

:root {
    --gold: #d4af37;
    --gold-light: #fdf9c2;
    --catholic-blue: #1e3a8a;
    --slate-dark: #0f172a;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

/* Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.3);
}

/* Typography Enhancements */
h1, h2, h3, .font-outfit {
    letter-spacing: -0.03em;
}

/* Smooth Transitions */
body, nav, .glass-card, button, a {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Parallax Effect */
#hero-img {
    will-change: transform;
}

/* Glow Effects */
.glow-text {
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.glow-box {
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.2);
}

/* Custom Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Scroll Progress Bar */
.scroll-progress {
    transition: width 0.1s ease-out;
}

/* Button Pulse */
.animate-glow-pulse {
    animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Glass Navbar on Scroll */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.dark .nav-scrolled {
    background: rgba(15, 23, 42, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Dynamic Navbar Text Colors for Visual Contrast on Dark Hero Image */
#navbar:not(.nav-scrolled) .font-outfit {
    color: #ffffff !important;
}
#navbar:not(.nav-scrolled) a:not(.bg-gold-500) {
    color: rgba(255, 255, 255, 0.9) !important;
}
#navbar:not(.nav-scrolled) #menu-toggle {
    color: #ffffff !important;
}
#navbar:not(.nav-scrolled) a:not(.bg-gold-500):hover {
    color: var(--gold) !important;
}

.nav-scrolled .font-outfit {
    color: var(--slate-dark) !important;
}
.nav-scrolled a:not(.bg-gold-500) {
    color: #334155 !important;
}
.nav-scrolled #menu-toggle {
    color: var(--slate-dark) !important;
}
.nav-scrolled a:not(.bg-gold-500):hover {
    color: var(--gold) !important;
}

.dark .nav-scrolled .font-outfit {
    color: #ffffff !important;
}
.dark .nav-scrolled a:not(.bg-gold-500) {
    color: rgba(255, 255, 255, 0.9) !important;
}
.dark .nav-scrolled #menu-toggle {
    color: #ffffff !important;
}
.dark .nav-scrolled a:not(.bg-gold-500):hover {
    color: var(--gold) !important;
}

/* Mask for Hero Text Reveal */
.reveal-text {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

/* Custom Masonry Helper (Simple) */
.masonry-grid {
    column-count: 2;
    column-gap: 1.5rem;
}

@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 4;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

/* --- Professional Enhancements --- */

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Impact Stats Section */
.impact-stats {
    background: #f8fafc;
    padding: 80px 0;
}

.dark .impact-stats {
    background: #0f172a;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.stat-card {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark .stat-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark .stat-label {
    color: #94a3b8;
}

/* Professional Mega Footer */
.main-footer {
    background: #020617;
    color: white;
    padding: 100px 0 40px;
    position: relative;
    overflow: hidden;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 60px;
    padding: 0 30px;
    position: relative;
    z-index: 2;
}

.footer-brand {
    grid-column: span 2;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 20px;
    display: block;
}

.footer-brand p {
    color: #94a3b8;
    line-height: 1.8;
    max-width: 400px;
}

.footer-section h4 {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 40px 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #475569;
    font-size: 0.875rem;
}

/* Active Link Indicator */
nav a {
    position: relative;
}

nav a.active::after {
    content: '•';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 1.5rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .footer-brand { grid-column: span 1; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}

/* WhatsApp Pulse Animation */
.whatsapp-pulse {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Back to Top Visible State */
#back-to-top.visible {
    opacity: 1;
    translate: 0 0;
    pointer-events: auto;
}

/* Custom Donation Slider styles */
input[type="range"]#donation-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    outline: none;
    transition: background 0.3s;
}

.dark input[type="range"]#donation-slider {
    background: #334155;
}

/* Chrome/Safari/Opera/Edge WebKit thumb */
input[type="range"]#donation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
    transition: transform 0.2s, background 0.2s;
    border: 2px solid #ffffff;
}

.dark input[type="range"]#donation-slider::-webkit-slider-thumb {
    border-color: #0f172a;
}

input[type="range"]#donation-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #f1c40f;
}

/* Firefox thumb */
input[type="range"]#donation-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
    transition: transform 0.2s, background 0.2s;
    border: 2px solid #ffffff;
}

.dark input[type="range"]#donation-slider::-moz-range-thumb {
    border-color: #0f172a;
}

input[type="range"]#donation-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    background: #f1c40f;
}

/* Universal Status Modal styling */
#status-modal.show {
    opacity: 1;
    pointer-events: auto;
}

#status-modal.show > div:last-child {
    transform: scale(1);
}



