/* Custom Modern Styles for BA2S Ltd */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

/* Navigation Scroll Effect */
nav.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button Hover Effects */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Image Lazy Loading */
img {
    transition: opacity 0.3s;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Mobile Menu Animation */
#mobileMenu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform;
}

/* Show menu on mobile screens only */
@media (max-width: 1023px) {
    #mobileMenu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    #mobileMenuBackdrop {
        display: block !important;
    }
}

.mobile-menu-closed {
    transform: translateY(100%) !important;
}

.mobile-menu-open {
    transform: translateY(0) !important;
}

/* Ensure mobile menu button and menu are hidden on desktop */
@media (min-width: 1024px) {
    #mobileMenuBtn {
        display: none !important;
    }
    #mobileMenu,
    #mobileMenuBackdrop {
        display: none !important;
    }
}

/* Hamburger Icon Animation */
#hamburgerTop,
#hamburgerMiddle,
#hamburgerBottom {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Mobile Menu Item Stagger Animation */
#mobileMenu.mobile-menu-closed a {
    opacity: 0;
}

#mobileMenu.mobile-menu-open a {
    animation: slideInFromRight 0.4s ease-out forwards;
}

#mobileMenu.mobile-menu-open a:nth-child(1) { animation-delay: 0.1s; }
#mobileMenu.mobile-menu-open a:nth-child(2) { animation-delay: 0.15s; }
#mobileMenu.mobile-menu-open a:nth-child(3) { animation-delay: 0.2s; }
#mobileMenu.mobile-menu-open a:nth-child(4) { animation-delay: 0.25s; }
#mobileMenu.mobile-menu-open a:nth-child(5) { animation-delay: 0.3s; }
#mobileMenu.mobile-menu-open a:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Spacing */
section {
    scroll-margin-top: 80px;
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none;
    }
}
