/*
|--------------------------------------------------------------------------
| MAGICAL HERO SECTION - ENHANCED EFFECTS
|--------------------------------------------------------------------------
*/

/* Enhanced gradient text effects */
.hero-magical-text {
    background: linear-gradient(45deg, #FF6B35, #F7931E, #FFD700, #FFA500);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowFlow 4s ease-in-out infinite;
}

@keyframes rainbowFlow {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

/* Magic cursor trail */
.magic-cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    animation: cursorGlow 1s ease-out forwards;
}

@keyframes cursorGlow {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

/* Floating particles background */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-size: 16px;
    opacity: 0.7;
    animation: particleFloat 6s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Magic circle effect on hover */
.magic-circle {
    position: absolute;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    animation: magicCircleExpand 2s ease-out forwards;
    pointer-events: none;
}

@keyframes magicCircleExpand {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
        border-width: 3px;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
        border-width: 1px;
    }
}

/* Enhanced button magic effects */
.btn-magical {
    position: relative;
    overflow: visible !important;
}

.btn-magical::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FF6B35, #FFD700, #FF6B35);
    background-size: 200% 200%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    animation: borderMagic 3s linear infinite;
    transition: opacity 0.3s ease;
}

.btn-magical:hover::before {
    opacity: 1;
}

@keyframes borderMagic {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Sparkle trail for text */
.sparkle-trail {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkleTrail 1s ease-out forwards;
}

@keyframes sparkleTrail {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
}

/* Magic dust effect */
.magic-dust {
    position: fixed;
    width: 3px;
    height: 3px;
    background: rgba(255, 215, 0, 0.8);
    border-radius: 50%;
    pointer-events: none;
    animation: dustFloat 2s ease-out forwards;
}

@keyframes dustFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--dust-x, 0), var(--dust-y, 0)) scale(0);
    }
}

/* Enhanced text shadow on hover */
.hero-text-enhanced:hover {
    text-shadow: 
        0 0 5px rgba(255, 215, 0, 0.8),
        0 0 10px rgba(255, 165, 0, 0.6),
        0 0 15px rgba(255, 107, 53, 0.4),
        0 0 20px rgba(247, 147, 30, 0.3);
}

/* Responsive magic effects */
@media (max-width: 768px) {
    .hero-text-content h1 {
        font-size: clamp(1.8rem, 4vw, 2.8rem) !important;
    }
    
    .magic-circle {
        animation-duration: 1.5s;
    }
    
    .particle {
        font-size: 12px;
    }
}

/* High contrast mode compatibility */
@media (prefers-contrast: high) {
    .hero-text-content h1 {
        background: none !important;
        -webkit-text-fill-color: initial !important;
        color: #2C3E50 !important;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-text-content h1,
    .particle,
    .magic-circle,
    .sparkle-trail {
        animation: none !important;
        transition: none !important;
    }
    
    .hero-text-content h1:hover {
        transform: none !important;
    }
}