/* 
 * The Holy Kadamiya Tariqa - Animations
 * Created: September 22, 2025
 * Author: GitHub Copilot
 */

/* --------- Fade Animations --------- */
.fade-in {
    animation: fadeIn 1s ease forwards;
}

.fade-in-slow {
    animation: fadeIn 1.5s ease forwards;
}

.fade-in-delayed {
    animation: fadeIn 1s ease 0.5s forwards;
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp 1s ease forwards;
}

.fade-in-down {
    animation: fadeInDown 1s ease forwards;
}

.fade-in-left {
    animation: fadeInLeft 1s ease forwards;
}

.fade-in-right {
    animation: fadeInRight 1s ease forwards;
}

/* Sequential animations for lists */
.sequential-fade > * {
    opacity: 0;
}

.sequential-fade > *:nth-child(1) {
    animation: fadeInUp 0.6s ease forwards 0.1s;
}

.sequential-fade > *:nth-child(2) {
    animation: fadeInUp 0.6s ease forwards 0.2s;
}

.sequential-fade > *:nth-child(3) {
    animation: fadeInUp 0.6s ease forwards 0.3s;
}

.sequential-fade > *:nth-child(4) {
    animation: fadeInUp 0.6s ease forwards 0.4s;
}

.sequential-fade > *:nth-child(5) {
    animation: fadeInUp 0.6s ease forwards 0.5s;
}

.sequential-fade > *:nth-child(6) {
    animation: fadeInUp 0.6s ease forwards 0.6s;
}

.sequential-fade > *:nth-child(7) {
    animation: fadeInUp 0.6s ease forwards 0.7s;
}

.sequential-fade > *:nth-child(8) {
    animation: fadeInUp 0.6s ease forwards 0.8s;
}

.sequential-fade > *:nth-child(9) {
    animation: fadeInUp 0.6s ease forwards 0.9s;
}

/* --------- Scroll Animations --------- */
/* These are initialized by JavaScript when elements come into view */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 1s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 1s ease;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* --------- Hover Animations --------- */
.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* --------- Pulse Animations --------- */
.pulse {
    animation: pulse 2s infinite;
}

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

/* --------- Spin Animations --------- */
.spin {
    animation: spin 1s linear infinite;
}

.spin-slow {
    animation: spin 3s linear infinite;
}

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

/* --------- Border Animations --------- */
.border-animation {
    position: relative;
    padding: 10px;
}

.border-animation::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-red), var(--color-green));
    transition: width 0.4s ease;
}

.border-animation:hover::after {
    width: 100%;
}

/* --------- Text Animations --------- */
.text-shimmer {
    background: linear-gradient(90deg, 
        var(--color-red), 
        var(--color-green), 
        var(--color-red));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

/* --------- Parallax Effect --------- */
.parallax-container {
    height: 60vh;
    overflow: hidden;
    position: relative;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-position: center;
    background-size: cover;
    z-index: -1;
}

/* --------- Keyframe Definitions --------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* --------- Utility Animation Classes --------- */
.delay-100 {
    animation-delay: 0.1s !important;
}

.delay-200 {
    animation-delay: 0.2s !important;
}

.delay-300 {
    animation-delay: 0.3s !important;
}

.delay-400 {
    animation-delay: 0.4s !important;
}

.delay-500 {
    animation-delay: 0.5s !important;
}

.delay-600 {
    animation-delay: 0.6s !important;
}

.delay-700 {
    animation-delay: 0.7s !important;
}

.delay-800 {
    animation-delay: 0.8s !important;
}

.delay-900 {
    animation-delay: 0.9s !important;
}

.delay-1000 {
    animation-delay: 1s !important;
}

.duration-500 {
    animation-duration: 0.5s !important;
}

.duration-1000 {
    animation-duration: 1s !important;
}

.duration-1500 {
    animation-duration: 1.5s !important;
}

.duration-2000 {
    animation-duration: 2s !important;
}

/* --------- Special Animations for Sacred Elements --------- */
.sacred-glow {
    box-shadow: 0 0 10px rgba(0, 85, 0, 0.2);
    transition: box-shadow 1s ease;
}

.sacred-glow:hover {
    box-shadow: 0 0 30px rgba(179, 0, 0, 0.4), 0 0 50px rgba(0, 85, 0, 0.2);
}

.quran-reveal {
    position: relative;
    overflow: hidden;
}

.quran-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(179, 0, 0, 0.3),
        rgba(0, 85, 0, 0.3));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.quran-reveal:hover::before {
    transform: translateX(0);
}