/* Custom Styles */
* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Arabic/Urdu Font Styles */
.arabic-text {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    direction: rtl;
    line-height: 1.8;
}

.urdu-text {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
    direction: rtl;
    line-height: 2;
}

/* Language Switcher Button */
#lang-toggle,
#lang-toggle-mobile {
    cursor: pointer;
    font-family: 'Noto Nastaliq Urdu', sans-serif;
}

#lang-toggle:hover,
#lang-toggle-mobile:hover {
    transform: scale(1.05);
}

/* RTL Mode Styles */
.rtl-mode [data-ur] {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', sans-serif;
}

/* Smooth language transition */
[data-en][data-ur] {
    transition: all 0.3s ease;
}

/* Navigation Active State */
.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #16a34a;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

/* Stat Counter Animation */
.stat-item {
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery Hover Effect */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(22, 163, 74, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Donation Button Active State */
.donation-btn.active {
    background-color: #16a34a !important;
    color: white;
    transform: scale(1.05);
}

/* Form Focus States */
input:focus, textarea:focus {
    outline: none;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hero Carousel Styles */
.hero-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    z-index: 10;
}

.carousel-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: white !important;
    opacity: 1 !important;
    transform: scale(1.3);
}

/* Hero Text Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-slide.active h1,
.hero-slide.active p,
.hero-slide.active a {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-slide.active p {
    animation-delay: 0.2s;
}

.hero-slide.active a {
    animation-delay: 0.4s;
}

/* Arrow buttons */
.carousel-prev,
.carousel-next {
    opacity: 0.7;
    transition: all 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .carousel-slides img {
        aspect-ratio: 4/3;
    }
}

/* Smooth Transitions */
a, button {
    transition: all 0.3s ease;
}

/* Card Hover Effects */
.hover\:shadow-2xl:hover {
    transform: translateY(-5px);
}

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

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

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

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