/* ===================================
   SCROLL ANIMATIONS & MICRO-INTERACTIONS
   Award-winning animations and effects
   =================================== */

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Fade-in on Scroll Animation */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Slide from Left */
[data-animate="slide-left"] {
    opacity: 0;
    transform: translateX(-50px);
}

[data-animate="slide-left"].animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from Right */
[data-animate="slide-right"] {
    opacity: 0;
    transform: translateX(50px);
}

[data-animate="slide-right"].animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Scale Up Animation */
[data-animate="scale"] {
    opacity: 0;
    transform: scale(0.8);
}

[data-animate="scale"].animate-in {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Animation for Children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.animate-in > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.animate-in > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.animate-in > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.animate-in > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.animate-in > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.animate-in > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.animate-in > * {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   GLASSMORPHISM EFFECTS
   =================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

/* ===================================
   3D CARD EFFECTS
   =================================== */

.card-3d {
    perspective: 1000px;
    transition: transform 0.3s ease;
}

.card-3d-inner {
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

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

/* ===================================
   HOVER ANIMATIONS
   =================================== */

/* Lift on Hover */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Glow on Hover */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 102, 204, 0.5);
}

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

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

/* Rotate on Hover */
.hover-rotate {
    transition: transform 0.3s ease;
}

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

/* ===================================
   LOADING ANIMATIONS
   =================================== */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

/* ===================================
   TEXT ANIMATIONS
   =================================== */

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated Underline */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066CC, #00d4ff);
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

/* ===================================
   PROGRESS BARS
   =================================== */

.progress-bar {
    position: relative;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066CC, #00d4ff);
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===================================
   CUSTOM CURSOR (Optional)
   =================================== */

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #0066CC;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    transform: scale(1.5);
    background: rgba(0, 102, 204, 0.2);
}

/* ===================================
   RIPPLE EFFECT
   =================================== */

.ripple {
    position: relative;
    overflow: hidden;
}

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

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ===================================
   PARALLAX SECTIONS
   =================================== */

.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    [data-animate] {
        transform: translateY(15px);
    }
    
    .card-3d:hover .card-3d-inner {
        transform: none;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Styles */
*:focus-visible {
    outline: 3px solid #0066CC;
    outline-offset: 3px;
    border-radius: 4px;
}
