/* Modern Dribbble-Inspired Submenu Styles for Nittin Template */

/* Enhanced submenu entrance animation */
@keyframes submenuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes submenuSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
}

/* Staggered fade animation for menu items */
@keyframes itemFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: itemFadeIn 0.2s ease-out forwards;
}

/* Enhanced submenu container animations */
.submenu-enhanced {
    transform-origin: top center;
    will-change: transform, opacity;
}

/* Staggered animation utilities */
.stagger-50 { transition-delay: 50ms; }
.stagger-100 { transition-delay: 100ms; }
.stagger-150 { transition-delay: 150ms; }
.stagger-200 { transition-delay: 200ms; }
.stagger-250 { transition-delay: 250ms; }

/* Submenu cards staggered entrance animation */
.submenu-card-item {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    animation: cardSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
}

/* Full height card hover effect */
.submenu-card-item:hover {
    transform: translateY(-2px) scale(1.02) !important;
}

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Simple submenu items staggered entrance animation */
.submenu-simple-item {
    opacity: 0;
    transform: translateX(-15px);
    animation: simpleSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes simpleSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-15px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced hover states with modern shadows */
.modern-shadow {
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.modern-shadow-lg {
    box-shadow:
        0 20px 40px -12px rgba(0, 0, 0, 0.15),
        0 12px 20px -8px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Glass morphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced micro-interactions */
.micro-bounce {
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.micro-bounce:hover {
    transform: scale(1.02) translateY(-1px);
}

/* Gradient hover effects */
.gradient-hover {
    background: linear-gradient(135deg, rgba(219, 92, 79, 0.05) 0%, rgba(219, 92, 79, 0.1) 100%);
    transition: background 0.3s ease;
}

.gradient-hover:hover {
    background: linear-gradient(135deg, rgba(219, 92, 79, 0.1) 0%, rgba(219, 92, 79, 0.2) 100%);
}

/* Icon animation enhancements */
.icon-float {
    transition: transform 0.3s ease;
}

.group:hover .icon-float {
    transform: translateY(-2px);
}

/* Border glow effect */
.border-glow {
    position: relative;
    overflow: hidden;
}

.border-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(45deg, transparent, rgba(219, 92, 79, 0.3), transparent);
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.border-glow:hover::before {
    opacity: 1;
}

/* Enhanced transitions for better UX */
.smooth-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.focus-ring {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.focus-ring:focus-visible {
    outline: 2px solid rgba(219, 92, 79, 0.6);
    outline-offset: 2px;
}

/* Enhanced backdrop blur support detection */
@supports (backdrop-filter: blur(1px)) {
    .glass-effect {
        background: rgba(255, 255, 255, 0.85);
    }

    .submenu {
        background: rgba(255, 255, 255, 0.40) !important;
        backdrop-filter: blur(24px) saturate(1.4) !important;
        -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
    }
}

@supports not (backdrop-filter: blur(1px)) {
    .glass-effect {
        background: rgba(255, 255, 255, 0.98);
    }

    .submenu {
        background: rgba(255, 255, 255, 0.95) !important;
    }
}