/* EGYTALHUB Smooth Scroll Animations */
/* Provides smooth scrolling for internal page links */

/* ============================================
   SMOOTH SCROLLING SETTINGS
   ============================================ */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Account for fixed header */
}

/* ============================================
   INTERNAL LINK ANIMATIONS
   ============================================ */

/* Internal link styling */
.internal-link {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    cursor: pointer;
}

.internal-link:hover {
    transform: translateY(-2px);
    text-shadow: 0 2px 8px rgba(255, 136, 25, 0.3);
}

/* Smooth scroll animation for sections */
.section-scroll-target {
    scroll-margin-top: 120px;
    transition: all 0.5s ease-in-out;
}

/* ============================================
   SCROLL ANIMATION EFFECTS
   ============================================ */

/* Fade in animation for sections */
@keyframes fadeInUp {
    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 slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-slide-in-up {
    animation: slideInUp 0.6s ease-out forwards;
}

/* ============================================
   SCROLL TRIGGERED ANIMATIONS
   ============================================ */

/* Elements that animate on scroll */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for lists */
.scroll-animate-stagger {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-stagger.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Specific animations for EGYTALHUB elements */
.glass-card.scroll-animate {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
}

.glass-card.scroll-animate.animate-in {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.btn-primary.scroll-animate,
.btn-secondary.scroll-animate {
    transform: translateY(20px) scale(0.9);
    opacity: 0;
}

.btn-primary.scroll-animate.animate-in,
.btn-secondary.scroll-animate.animate-in {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Service items animation */
.service-item.scroll-animate {
    transform: translateY(25px) rotateX(5deg);
    opacity: 0;
}

.service-item.scroll-animate.animate-in {
    transform: translateY(0) rotateX(0deg);
    opacity: 1;
}

/* Feature cards animation */
.feature-card.scroll-animate {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
}

.feature-card.scroll-animate.animate-in {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Delay classes for staggered animations */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; }
.delay-800 { transition-delay: 0.8s; }

/* ============================================
   SECTION TRANSITIONS
   ============================================ */

/* Smooth section transitions */
section {
    transition: all 0.5s ease-in-out;
}

/* Section highlight on scroll */
.section-highlight {
    position: relative;
}

.section-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF8819, #00C9C4);
    transform: scaleX(0);
    transition: transform 0.5s ease-in-out;
}

.section-highlight.active::before {
    transform: scaleX(1);
}

/* ============================================
   NAVIGATION HIGHLIGHTING
   ============================================ */

/* Active navigation link highlighting */
.nav-link.active {
    color: #FF8819 !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #FF8819, #00C9C4);
    border-radius: 1px;
}

/* ============================================
   SCROLL PROGRESS INDICATOR
   ============================================ */

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #FF8819, #00C9C4);
    z-index: 100000;
    transition: width 0.1s ease-out;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Mobile adjustments */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 80px;
    }
    
    .section-scroll-target {
        scroll-margin-top: 100px;
    }
    
    .scroll-animate {
        transform: translateY(20px);
    }
    
    .scroll-animate-stagger {
        transform: translateY(15px);
    }
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .internal-link,
    .scroll-animate,
    .scroll-animate-stagger,
    section {
        transition: none;
        animation: none;
    }
    
    .internal-link:hover {
        transform: none;
    }
    
    .scroll-progress {
        transition: none;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus indicators for internal links */
.internal-link:focus {
    outline: 2px solid #00C9C4;
    outline-offset: 3px;
    border-radius: 4px;
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .scroll-progress {
        height: 4px;
        background: #FF8819;
    }
    
    .section-highlight::before {
        height: 4px;
        background: #FF8819;
    }
    
    .nav-link.active::after {
        height: 3px;
        background: #FF8819;
    }
}
