/**
 * Loading States and Animation Styles
 * Moved from inline JavaScript styles to CSS for better separation of concerns
 */

/* Loading State */
body:not(.loaded) {
    overflow: hidden;
}

body:not(.loaded)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--asu-maroon);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

body:not(.loaded)::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid var(--asu-gold);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10000;
}

@keyframes spin {
    0% { 
        transform: translate(-50%, -50%) rotate(0deg); 
    }
    100% { 
        transform: translate(-50%, -50%) rotate(360deg); 
    }
}

/* Hero Content Animation States */
.hero-content > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.loaded .hero-content > * {
    opacity: 1;
    transform: translateY(0);
}

/* Feature and Program Card Animation States */
.feature-item,
.program-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.loaded .feature-item,
.loaded .program-card {
    opacity: 1;
    transform: translateY(0);
}

/* Stat Card Animation States */
.stat-card {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease-out;
}

.loaded .stat-card {
    opacity: 1;
    transform: scale(1);
}

/* Form Error States */
.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Success Message Styles */
.success-message {
    background: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    text-align: center;
}

/* Back to Top Button */
.back-to-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    background: var(--asu-gold) !important;
    color: var(--asu-maroon) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 60px !important;
    height: 60px !important;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.8);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1001 !important;
    box-shadow: 0 4px 20px rgba(255, 198, 39, 0.4);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none;
    font-size: 20px;
}

.back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto;
}

.back-to-top:hover:not(.touch-device) {
    transform: translateY(-2px) scale(1.05) !important;
    background: var(--asu-maroon) !important;
    color: var(--asu-gold) !important;
    box-shadow: 0 6px 25px rgba(140, 29, 64, 0.6);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 18px;
    }
}

