/* 🎨 ADVANCED UX/UI STYLES - MENTORIA TRAVESSIA IA */

/* ============================================
   VARIABLES & THEME
   ============================================ */
:root {
    /* Colors */
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #6d28d9;
    --accent: #ec4899;
    --accent-light: #f472b6;
    --bg-dark: #000000;
    --bg-darker: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --success: #10b981;
    --warning: #f59e0b;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Animation Durations */
    --duration-fast: 0.2s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
    
    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
body {
    cursor: none;
}

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all var(--duration-fast) cubic-bezier(0.23, 1, 0.32, 1);
    mix-blend-mode: difference;
}

.custom-cursor-follower {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.15s cubic-bezier(0.23, 1, 0.32, 1);
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    transform: scale(1.5);
    background: var(--primary);
}

/* ============================================
   GLASSMORPHISM EFFECTS
   ============================================ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all var(--duration-normal) ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px 0 rgba(139, 92, 246, 0.3);
    border-color: var(--primary);
}

/* ============================================
   3D CARD EFFECTS
   ============================================ */
.card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform var(--duration-slow) cubic-bezier(0.23, 1, 0.32, 1);
}

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

.card-3d-inner {
    position: relative;
    transform-style: preserve-3d;
    transition: transform var(--duration-slow) ease;
}

.card-3d:hover .card-3d-inner {
    transform: translateZ(20px);
}

/* ============================================
   GRADIENT ANIMATIONS
   ============================================ */
.gradient-animated {
    background: linear-gradient(
        45deg,
        var(--primary),
        var(--accent),
        var(--primary-light),
        var(--accent-light)
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   FLOATING ANIMATIONS
   ============================================ */
.float {
    animation: float 6s ease-in-out infinite;
}

.float-slow {
    animation: float 8s ease-in-out infinite;
}

.float-delay-1 {
    animation-delay: 1s;
}

.float-delay-2 {
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ============================================
   PULSE EFFECTS
   ============================================ */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.8);
    }
}

/* ============================================
   RIPPLE EFFECT
   ============================================ */
.ripple {
    position: relative;
    overflow: hidden;
}

.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;
}

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

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
}

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

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
}

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

/* ============================================
   PARALLAX LAYERS
   ============================================ */
.parallax-layer {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================
   MAGNETIC HOVER EFFECT
   ============================================ */
.magnetic {
    transition: transform var(--duration-fast) cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================
   NEON GLOW TEXT
   ============================================ */
.neon-text {
    text-shadow: 
        0 0 10px var(--primary),
        0 0 20px var(--primary),
        0 0 30px var(--primary),
        0 0 40px var(--primary);
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        text-shadow: 
            0 0 10px var(--primary),
            0 0 20px var(--primary),
            0 0 30px var(--primary);
    }
    50% {
        text-shadow: 
            0 0 20px var(--primary),
            0 0 30px var(--primary),
            0 0 40px var(--primary),
            0 0 50px var(--primary);
    }
}

/* ============================================
   LOADING SKELETON
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* ============================================
   ENHANCED BUTTONS
   ============================================ */
.btn-advanced {
    position: relative;
    padding: 1rem 2.5rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--duration-normal) cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-advanced::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-advanced:hover::before {
    left: 100%;
}

.btn-advanced:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.btn-advanced:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.timeline-item.active {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 20px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 0.8;
    }
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */
.counter {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   SOCIAL PROOF TICKER
   ============================================ */
.ticker {
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    animation: ticker 30s linear infinite;
}

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

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: transform var(--duration-normal);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--duration-normal);
}

.toast.active {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
}

.toast.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.9));
}

/* ============================================
   PROGRESS INDICATORS
   ============================================ */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}

/* ============================================
   BADGE ANIMATIONS
   ============================================ */
.badge-animated {
    position: relative;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-lg: 1.5rem;
    }
    
    .custom-cursor,
    .custom-cursor-follower {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .counter {
        font-size: 2rem;
    }
    
    .toast {
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
    }
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */
.blur-sm { filter: blur(4px); }
.blur-md { filter: blur(8px); }
.blur-lg { filter: blur(16px); }

.brightness-75 { filter: brightness(0.75); }
.brightness-90 { filter: brightness(0.9); }
.brightness-110 { filter: brightness(1.1); }

.saturate-150 { filter: saturate(1.5); }
.saturate-200 { filter: saturate(2); }

.hue-rotate-45 { filter: hue-rotate(45deg); }
.hue-rotate-90 { filter: hue-rotate(90deg); }

.transition-all { transition: all var(--duration-normal) ease; }
.transition-fast { transition: all var(--duration-fast) ease; }
.transition-slow { transition: all var(--duration-slow) ease; }
