/* ===================================================================
   NAVBAR COMPONENT STYLES - MCCII
   Componente reutilizable para navegación desktop, tablet y mobile
   =================================================================== */

/* Android Chrome and Mobile Browser Fixes */
#mainNav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

/* Enhanced navbar styles for premium design */
.nav-link {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link::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.6s ease;
}

.nav-link:hover::before {
    left: 100%;
}

/* Active navigation link styles */
.nav-active {
    background: linear-gradient(135deg, #dc2626, #ef4444, #dc2626) !important;
    color: white !important;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3), 0 0 0 1px rgba(220, 38, 38, 0.2) !important;
    transform: scale(1) !important;
}

.nav-active::before {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

/* Mobile navigation styles */
.mobile-nav-active {
    background: linear-gradient(135deg, #dc2626, #ef4444, #dc2626) !important;
    color: white !important;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.2), 0 0 0 1px rgba(220, 38, 38, 0.2) !important;
}

.mobile-nav-link.nav-active {
    color: #0f172a !important;
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
    border-left: 4px solid #dc2626 !important;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.2), 0 4px 12px rgba(239, 68, 68, 0.15);
    transform: translateX(4px) !important;
}

/* Enhanced hamburger animation */
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Enhanced mobile menu transitions */
.mobile-menu.show {
    transform: translateX(0) !important;
}

.mobile-menu.show .absolute {
    opacity: 1 !important;
}

.mobile-menu.show > div:last-child {
    transform: translateX(0) !important;
}

/* Enhanced hover effects for logo */
.logo-container:hover img {
    filter: brightness(1.1) saturate(1.1);
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .mobile-menu {
        backdrop-filter: blur(20px);
    }
}

/* Enhanced scrollbar styles for mobile menu */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(239, 68, 68, 0.3) rgba(249, 250, 251, 0.5);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(249, 250, 251, 0.5);
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.6), rgba(220, 38, 38, 0.4));
    border-radius: 4px;
    transition: all 0.3s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.8), rgba(220, 38, 38, 0.6));
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* Enhanced navbar styles for desktop */
.navbar-desktop .nav-active {
    color: white !important;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4) !important;
    transform: scale(1.05) !important;
}

/* Ensure mobile menu appears on top */
#mobile-menu {
    z-index: 9999 !important;
}

#mobile-menu-overlay {
    z-index: 9998 !important;
}

/* Mobile menu states */
#mobile-menu.mobile-menu-show {
    transform: translateY(0) !important;
}

#mobile-menu-overlay.mobile-overlay-show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Mobile menu force visibility states */
#mobile-menu[style*="display: flex"] {
    display: flex !important;
}

#mobile-menu-overlay[style*="display: block"] {
    display: block !important;
}

/* Ensure mobile menu transitions work */
#mobile-menu {
    transition: transform 0.5s ease-out !important;
}

#mobile-menu-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

/* Smooth menu transitions */
.transition-transform {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-opacity {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium logo glow effect */
.logo-glow {
    filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.3));
    transition: filter 0.5s ease;
}

.logo-glow:hover {
    filter: drop-shadow(0 0 30px rgba(239, 68, 68, 0.6)) drop-shadow(0 0 60px rgba(239, 68, 68, 0.3));
}

/* Enhanced CTA button gradient with premium effects */
.cta-gradient {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    position: relative;
    overflow: hidden;
}

.cta-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.cta-gradient:hover::before {
    left: 100%;
}

/* Enhanced mobile menu animations */
.mobile-menu-transition {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium backdrop blur support */
@supports not (backdrop-filter: blur(20px)) {
    .backdrop-blur-2xl {
        background-color: rgba(255, 255, 255, 0.9) !important;
    }
}

/* Enhanced gradient animations */
@keyframes enhanced-gradient-x {
    0%, 100% {
        background-position: 0% 50%;
        transform: scale(1);
    }
    25% {
        background-position: 100% 50%;
        transform: scale(1.02);
    }
    50% {
        background-position: 200% 50%;
        transform: scale(1);
    }
    75% {
        background-position: 300% 50%;
        transform: scale(1.02);
    }
}

.animate-enhanced-gradient {
    background-size: 400% 400%;
    animation: enhanced-gradient-x 4s ease infinite;
}

/* Premium floating effects */
@keyframes premium-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(1deg);
    }
    50% {
        transform: translateY(-6px) rotate(0deg);
    }
    75% {
        transform: translateY(-3px) rotate(-1deg);
    }
}

.animate-premium-float {
    animation: premium-float 6s ease-in-out infinite;
}

/* Enhanced glow pulse for interactive elements */
@keyframes enhanced-glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.3), 0 0 40px rgba(239, 68, 68, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(239, 68, 68, 0.6), 0 0 80px rgba(239, 68, 68, 0.2), 0 0 120px rgba(239, 68, 68, 0.1);
    }
}

.animate-enhanced-glow {
    animation: enhanced-glow-pulse 3s ease-in-out infinite;
}

/* Enhanced shimmer effect for premium elements */
@keyframes premium-shimmer {
    0% {
        transform: translateX(-100%) skewX(-15deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) skewX(-15deg);
        opacity: 0;
    }
}

.animate-premium-shimmer {
    animation: premium-shimmer 2s ease-in-out infinite;
}

/* Enhanced text shadow for premium look */
.text-shadow-premium {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Premium backdrop blur effect for glass morphism */
.backdrop-blur-premium {
    backdrop-filter: blur(20px) saturate(180%) brightness(110%);
    -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(110%);
}

/* Enhanced mobile responsivity */
@media (max-width: 375px) {
    .mobile-nav-link {
        padding: 12px 16px !important;
    }
    .mobile-nav-link .text-sm {
        display: none;
    }
    .navbar-mobile-small {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        height: 3.5rem;
    }
}

@media (max-height: 600px) {
    .mobile-nav-link {
        padding: 10px 16px !important;
    }
    .mobile-nav-link div.w-10 {
        width: 32px !important;
        height: 32px !important;
    }
}

@media (max-height: 500px) {
    .mobile-nav-link {
        padding: 8px 16px !important;
    }
}

/* Enhanced scroll behavior for navbar */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    border-bottom: 1px solid rgba(239, 68, 68, 0.1) !important;
}

.navbar-scrolled .nav-link {
    backdrop-filter: blur(10px);
}

/* Enhanced hamburger line transitions */
.hamburger-line {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}