/* 
 * Custom Animations and Hover Effects
 * Enhanced animations for Chill Dudez website
 */

/* ===== HOVER EFFECTS ===== */

/* Main Character Image Hover Effect */
.image-wrap img {
    transition: transform 0.3s ease, filter 0.3s ease;
    will-change: transform;
}

.image-wrap img:hover {
    transform: scale(1.05) translateY(-10px);
    filter: brightness(1.1);
}

/* ===== NAVIGATION ANIMATIONS ===== */

/* Navbar links smooth transitions */
.navbar-nav .nav-link {
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease, left 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
    left: 10%;
}

/* ===== BUTTON ANIMATIONS ===== */

/* Enhanced button hover effects */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Ripple effect on click */
.btn::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:active::before {
    width: 300px;
    height: 300px;
}

/* ===== FOOTER ANIMATIONS ===== */

/* Footer items fade in on scroll */
.footer-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.footer-item:nth-child(1) {
    animation-delay: 0.1s;
}

.footer-item:nth-child(2) {
    animation-delay: 0.2s;
}

.footer-item:nth-child(3) {
    animation-delay: 0.3s;
}

/* ===== LINE ANIMATIONS ===== */

/* Enhanced line animations */
.line {
    position: relative;
    overflow: hidden;
}

.line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(134, 220, 81, 0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* ===== SECTION HEADING ANIMATIONS ===== */

/* Title character stagger animation */
.mbr-section-title {
    position: relative;
}

.mbr-section-title::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #86dc51, transparent);
    animation: expandWidth 2s ease-in-out infinite;
}

@keyframes expandWidth {
    0%, 100% {
        width: 100px;
        opacity: 0.5;
    }
    50% {
        width: 200px;
        opacity: 1;
    }
}

/* ===== SCROLL ANIMATIONS ===== */

/* Smooth scroll indicator */
.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===== CONTACT WINDOW ANIMATIONS ===== */

/* Enhanced contact window fade */
.contactwindow {
    transition: opacity 1s ease, transform 0.5s ease;
}

.contactwindow[style*="opacity: 0"] {
    transform: scale(0.95);
}

.contactwindow[style*="opacity: 1"] {
    transform: scale(1);
}

/* ===== CARD ANIMATIONS ===== */

/* Hover effect for any card-like elements */
.card, .card-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover, .card-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ===== TEXT ANIMATIONS ===== */

/* Subtle text link hover */
a.text-white:hover,
a.text-primary:hover {
    transition: all 0.3s ease;
    text-decoration: none;
    filter: brightness(1.2);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Hardware acceleration for smooth animations */
.animate__animated,
.image-wrap img,
.btn,
.nav-link {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .image-wrap img:hover {
        transform: scale(1.02);
    }
    
    .btn:hover {
        transform: none;
    }
}

/* ===== LOADING ANIMATIONS ===== */

/* Page elements progressive reveal */
.progressive-reveal {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MOBILE OPTIMIZATIONS ===== */

@media (max-width: 768px) {
    /* Reduce animation intensity on mobile */
    .image-wrap img:hover {
        transform: scale(1.03) translateY(-5px);
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
}
