/* Additional Mobile Optimizations and Enhanced Styling */

/* Mobile-first responsive breakpoints */
@media (max-width: 640px) {
    .mobile-container {
        padding: 0 1rem;
    }
    
    .mobile-hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .mobile-hero-subtitle {
        font-size: 1.125rem;
        line-height: 1.5;
    }
    
    .mobile-card {
        margin-bottom: 1.5rem;
    }
    
    .mobile-form {
        padding: 1.5rem;
    }
}

/* Enhanced animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-slide-in {
    animation: slideInUp 0.6s ease-out;
}

.animate-pulse-slow {
    animation: pulse 2s infinite;
}

/* Enhanced button states */
.btn-gradient:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

.btn-gradient:active {
    transform: scale(0.98);
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced form styling */
.form-input:invalid {
    border-color: #ef4444;
}

.form-input:valid {
    border-color: #10b981;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for keyboard navigation */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-gradient {
        border: 2px solid #000;
    }
    
    .card-hover {
        border: 1px solid #000;
    }
}

/* Print styles */
@media print {
    .sticky-footer,
    .language-switcher {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Enhanced mobile navigation */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .desktop-nav {
        display: none;
    }
}

/* Improved table responsiveness */
@media (max-width: 640px) {
    .pricing-table {
        font-size: 0.875rem;
    }
    
    .pricing-table th,
    .pricing-table td {
        padding: 0.5rem;
    }
}

/* Enhanced tooltip positioning */
@media (max-width: 480px) {
    .tooltip-text {
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        white-space: normal;
    }
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Enhanced card shadows */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced form validation */
.form-group {
    position: relative;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-input:invalid + .form-error {
    display: block;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced sticky footer */
.sticky-footer {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Mobile-specific improvements */
@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    .pricing-section {
        padding: 2rem 1rem;
    }
}

/* RTL specific enhancements */
html[lang="he"] .rtl-flip {
    transform: scaleX(-1);
}

html[lang="he"] .rtl-text-align {
    text-align: right;
}

/* Enhanced accessibility for screen readers */
.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;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Enhanced mobile touch targets */
@media (max-width: 768px) {
    button, a, input, select {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-mode-auto {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .dark-mode-auto .bg-white {
        background-color: #374151;
    }
    
    .dark-mode-auto .bg-gray-50 {
        background-color: #4b5563;
    }
} 