/* 
 * animations.css
 * Purpose: High-quality, Islamic-themed animations and micro-interactions
 */

/* -------------------------------------------------------------------------- */
/* 1. Base States & Observer Classes                                          */
/* -------------------------------------------------------------------------- */

/* Base state for scroll animations */
[data-animate] {
    opacity: 0;
    will-change: opacity, transform;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}

/* -------------------------------------------------------------------------- */
/* 2. Scroll Reveal Animations                                                */
/* -------------------------------------------------------------------------- */

/* Fade Up (The "Barakah" Lift) */
[data-animate="fade-up"] {
    transform: translateY(30px) scale(0.98);
    transition: 
        opacity var(--duration-medium) var(--ease-out-smooth),
        transform var(--duration-medium) var(--ease-out-smooth);
}

.animate-fade-up {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger Delays (Applied via JS or helper classes) */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Geometric Reveal (Horizontal Wipe) */
[data-animate="geo-reveal"] {
    position: relative;
    overflow: hidden;
    opacity: 1; /* Visible, but masked */
}

[data-animate="geo-reveal"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    transform-origin: left;
    transform: scaleX(1);
    transition: transform 0.8s var(--ease-in-out);
    z-index: 2;
}

.animate-geo-reveal::after {
    transform: scaleX(0);
}

/* -------------------------------------------------------------------------- */
/* 3. Component Interactions (Hover/Active)                                   */
/* -------------------------------------------------------------------------- */

/* Glassmorphism Card Hover */
.card {
    transition: 
        transform 0.3s var(--ease-out-smooth),
        box-shadow 0.3s var(--ease-out-smooth),
        border-color 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 109, 91, 0.15); /* Greenish tint shadow */
    border-color: var(--color-secondary); /* Gold border */
}

/* Prayer Time Card Active Pulse */
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(212, 160, 23, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0); }
}

.prayer-card.active {
    animation: pulse-gold 2s infinite;
    background: linear-gradient(135deg, var(--color-secondary) 0%, #b8860b 100%);
    color: #fff;
    border: none;
}

/* Button Micro-interactions */
.btn {
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.96);
}

/* Button Shine Effect on Hover */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    transition: none;
}

.btn-primary:hover::after {
    animation: shine 0.75s;
}

@keyframes shine {
    100% { left: 125%; }
}

/* Arrow Slide */
.link-arrow i {
    transition: transform 0.2s var(--ease-out-smooth);
}
.link-arrow:hover i {
    transform: translateX(5px);
}

/* -------------------------------------------------------------------------- */
/* 4. Booking Animations                                                      */
/* -------------------------------------------------------------------------- */

/* Input Focus Expand */
input.form-control {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input.form-control:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.2);
    outline: none;
}