/* Prevent horizontal scrollbar and double scrollbar during animations */
html {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    width: 100%;
    height: 100%;
    position: relative;
}

body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Prevent nested containers from creating scrollbars */
.max-w-7xl {
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

.bg-white,
.bg-opacity-95,
.rounded-2xl {
    overflow-x: hidden;
    overflow-y: visible;
}

/* Fix for fixed overlay elements */
.content-overlay,
.login-overlay {
    overflow: hidden !important;
    pointer-events: none;
}

.content-overlay *,
.login-overlay * {
    pointer-events: auto;
}

/* Smooth Page Entry Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Page Load Animation */
.page-content {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    will-change: transform, opacity;
    contain: layout style paint;
}

.page-content.delay-1 {
    animation-delay: 0.1s;
}

.page-content.delay-2 {
    animation-delay: 0.2s;
}

.page-content.delay-3 {
    animation-delay: 0.3s;
}

/* Card Animation */
.animate-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    will-change: transform, opacity;
    contain: layout style paint;
}

.animate-card:nth-child(1) { animation-delay: 0.1s; }
.animate-card:nth-child(2) { animation-delay: 0.2s; }
.animate-card:nth-child(3) { animation-delay: 0.3s; }
.animate-card:nth-child(4) { animation-delay: 0.4s; }
.animate-card:nth-child(5) { animation-delay: 0.5s; }
.animate-card:nth-child(6) { animation-delay: 0.6s; }

/* Navigation Animation */
.nav-animate {
    animation: slideInRight 0.5s ease-out forwards;
    opacity: 0;
    will-change: transform, opacity;
    contain: layout style paint;
}

/* Form Animation */
.form-animate {
    animation: scaleIn 0.5s ease-out forwards;
    opacity: 0;
    will-change: transform, opacity;
    contain: layout style paint;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Loading state */
.page-loading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-loaded {
    opacity: 1;
}

/* Mobile Menu Animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

#mobile-menu.hidden {
    display: none;
}





