/* Enhanced Animations and Visual Effects for Arwa Group Website */

/* ===== ADVANCED LOADING ANIMATIONS ===== */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0, -30px, 0); }
    70% { transform: translate3d(0, -15px, 0); }
    90% { transform: translate3d(0, -4px, 0); }
}

@keyframes slideInFromLeft {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromTop {
    0% { transform: translateY(-100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideInFromBottom {
    0% { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes rotateIn {
    0% { transform: rotate(-200deg); opacity: 0; }
    100% { transform: rotate(0deg); opacity: 1; }
}

@keyframes flipInX {
    0% { transform: perspective(400px) rotateX(90deg); opacity: 0; }
    40% { transform: perspective(400px) rotateX(-20deg); }
    60% { transform: perspective(400px) rotateX(10deg); opacity: 1; }
    80% { transform: perspective(400px) rotateX(-5deg); }
    100% { transform: perspective(400px) rotateX(0deg); }
}

@keyframes flipInY {
    0% { transform: perspective(400px) rotateY(90deg); opacity: 0; }
    40% { transform: perspective(400px) rotateY(-20deg); }
    60% { transform: perspective(400px) rotateY(10deg); opacity: 1; }
    80% { transform: perspective(400px) rotateY(-5deg); }
    100% { transform: perspective(400px) rotateY(0deg); }
}

/* ===== ENHANCED HOVER EFFECTS ===== */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hover-rotate {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(237, 137, 54, 0.6);
}

.hover-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(237, 137, 54, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.hover-glow:hover::before {
    opacity: 1;
}

/* ===== ADVANCED BUTTON EFFECTS ===== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-shimmer:hover::before {
    left: 100%;
}

/* ===== CARD ENHANCEMENTS ===== */
.card-3d {
    transform-style: preserve-3d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-flip-front, .card-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: inherit;
}

.card-flip-back {
    transform: rotateY(180deg);
}

/* ===== LOADING STATES ===== */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

.loading-pulse {
    animation: pulse 2s infinite;
}

.loading-bounce {
    animation: bounce 2s infinite;
}

/* ===== SCROLL ANIMATIONS ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== PARALLAX EFFECTS ===== */
.parallax-slow {
    transform: translateZ(0);
    will-change: transform;
}

.parallax-fast {
    transform: translateZ(0);
    will-change: transform;
}

/* ===== GRADIENT ANIMATIONS ===== */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background: linear-gradient(-45deg, #1a365d, #2a4365, #ed8936, #f6ad55);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* ===== TEXT EFFECTS ===== */
.text-glow {
    text-shadow: 0 0 10px rgba(237, 137, 54, 0.5);
}

.text-shimmer {
    background: linear-gradient(90deg, #ffffff, #f6ad55, #ffffff);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s infinite;
}

/* ===== RESPONSIVE ANIMATIONS ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

.smooth-scroll {
    scroll-behavior: smooth;
}

/* ===== UTILITY CLASSES ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

.duration-300 { animation-duration: 0.3s; }
.duration-500 { animation-duration: 0.5s; }
.duration-700 { animation-duration: 0.7s; }
.duration-1000 { animation-duration: 1s; }
