/* ===== MOBILE MENU STYLES ===== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== RESPONSIVE NAVIGATION ===== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(11, 20, 38, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 30px;
        padding-top: 50px;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        animation: slideInNav 0.3s ease forwards;
    }
    
    .nav-links.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { animation-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { animation-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { animation-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { animation-delay: 0.5s; }
    
    .nav-links a {
        font-size: 1.2rem;
        padding: 15px 30px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(102, 126, 234, 0.2);
    }
}

@keyframes slideInNav {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FORM LOADING STATES ===== */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

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

/* ===== ENHANCED ANIMATIONS ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== COMPONENT SPECIFIC STYLES ===== */
.component-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    color: rgba(255, 255, 255, 0.6);
}

.component-error {
    padding: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    text-align: center;
}

/* ===== KEYBOARD NAVIGATION ===== */
.keyboard-nav *:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.keyboard-nav .btn:focus {
    outline-offset: 4px;
}

/* ===== IMPROVED ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== FORM ENHANCEMENTS ===== */
.form-group {
    position: relative;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ef4444;
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: #10B981;
}

.field-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 5px;
}

.field-success {
    color: #10B981;
    font-size: 0.875rem;
    margin-top: 5px;
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

/* ===== COMPONENT STATES ===== */
.component-mounted {
    animation: componentFadeIn 0.3s ease;
}

@keyframes componentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ENHANCED RESPONSIVE ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        gap: 15px;
    }
    
    .btn {
        padding: 15px 25px;
        font-size: 14px;
    }
    
    .features-grid {
        gap: 20px;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .mobile-menu-toggle,
    .nav-links,
    .cta-buttons,
    .signup,
    footer {
        display: none;
    }
    
    .hero,
    .page-hero {
        page-break-after: avoid;
    }
    
    .content-section {
        page-break-inside: avoid;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .gradient-text {
        background: #ffffff;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .btn-primary {
        background: #ffffff;
        color: #000000;
        border: 2px solid #ffffff;
    }
    
    .feature-card,
    .faq-item,
    .flow-card {
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
}