/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-wrapper,
[dir="rtl"] .hero-content,
[dir="rtl"] .features-grid,
[dir="rtl"] .solutions-grid,
[dir="rtl"] .steps,
[dir="rtl"] .footer-grid {
    direction: rtl;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .footer-links {
    flex-direction: row-reverse;
}

[dir="rtl"] ul {
    padding-right: 2rem;
    padding-left: 0;
}

[dir="rtl"] .btn {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .hero-stats {
    flex-direction: row-reverse;
}

:root {
    --primary-color: #1976d2;
    --primary-dark: #115293;
    --primary-light: #4791db;
    --secondary-color: #f50057;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --background: #ffffff;
    --background-light: #f5f7fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-large: 0 10px 20px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --border-radius-large: 16px;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.1);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
    border-radius: 10px;
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo img {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.lang-btn {
    padding: 8px 16px;
    background-color: white;
    color: var(--primary-color);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.lang-btn:hover {
    background-color: var(--primary-light);
    color: white;
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.lang-btn:first-child {
    border-right: 1px solid var(--primary-color);
}

[dir="rtl"] .lang-btn:first-child {
    border-right: none;
    border-left: 1px solid var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f0fe 50%, #f5f7fa 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(25, 118, 210, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(25, 118, 210, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero-content {
    max-width: 600px;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    animation: fadeInUp 1s ease 0.6s both;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat h3 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-image {
    margin-top: 3rem;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--background);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(25, 118, 210, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(25, 118, 210, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(25, 118, 210, 0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(25, 118, 210, 0.15);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.1) 0%, rgba(25, 118, 210, 0.05) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.feature-card:hover h3 {
    color: var(--primary-color);
}

/* Solutions Section */
.solutions {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--background-light) 0%, rgba(232, 240, 254, 0.5) 100%);
    position: relative;
}

.solutions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(25, 118, 210, 0.2), transparent);
}

.solutions::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(25, 118, 210, 0.2), transparent);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.solution-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition-slow);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.solution-card:hover::before {
    transform: scaleY(1);
}

.solution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(25, 118, 210, 0.15);
    border-color: rgba(25, 118, 210, 0.2);
}

.solution-card h3 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.solution-card ul {
    list-style: none;
}

.solution-card li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
    transition: var(--transition);
}

.solution-card li:hover {
    color: var(--text-primary);
    padding-left: 2.5rem;
}

.solution-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    background: rgba(25, 118, 210, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.solution-card li:hover::before {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background: linear-gradient(180deg, rgba(232, 240, 254, 0.3) 0%, var(--background) 100%);
    position: relative;
}

.how-it-works::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(25, 118, 210, 0.02) 0%, transparent 70%);
    pointer-events: none;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    position: relative;
}

.step {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
    transition: var(--transition);
    position: relative;
}

.step:hover .step-number {
    transform: scale(1.15) rotate(360deg);
    box-shadow: 0 6px 25px rgba(25, 118, 210, 0.4);
}

.step-number::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    animation: pulse 2s ease-in-out infinite;
}

.step h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.step:hover h3 {
    color: var(--primary-color);
}

.step p {
    transition: var(--transition);
}

.step:hover p {
    color: var(--text-primary);
}

/* CTA Section */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    animation: fadeInUp 0.8s ease;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.demo-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 550px;
    margin: 0 auto 1rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.demo-form input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.demo-form input:focus {
    outline: none;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.demo-form .btn-primary {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
    padding: 16px 32px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.demo-form .btn-primary:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.cta-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    color: white;
    padding: 60px 0 20px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(25, 118, 210, 0.5), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    display: inline-block;
}

.footer-column a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width 0.3s ease;
}

.footer-column a:hover {
    color: white;
    padding-left: 5px;
}

.footer-column a:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero::before,
    .hero::after,
    .cta::before,
    .cta::after {
        animation: none !important;
    }

    .step-number::before {
        animation: none !important;
    }

    .btn::before {
        transition: none !important;
    }
}

/* Browser Compatibility - Backdrop Filter Fallback */
@supports not (backdrop-filter: blur(10px)) {
    .navbar {
        background-color: rgba(255, 255, 255, 0.98) !important;
    }

    .stat {
        background: rgba(255, 255, 255, 0.9) !important;
    }
}

/* Browser Compatibility - Gradient Text Fallback */
@supports not (background-clip: text) or not (-webkit-background-clip: text) {
    .hero h1,
    .stat h3,
    .solution-card h3 {
        background: none !important;
        -webkit-text-fill-color: currentColor !important;
        color: var(--text-primary) !important;
    }

    .stat h3,
    .solution-card h3 {
        color: var(--primary-color) !important;
    }
}

/* Performance Optimization */
.feature-card,
.solution-card,
.step,
.step-number,
.feature-icon {
    will-change: transform, opacity;
}

.feature-card.animate-in,
.solution-card.animate-in,
.step.animate-in {
    will-change: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .nav-links,
    .nav-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .features-grid,
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .demo-form {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .feature-card,
    .solution-card {
        padding: 1.5rem;
    }
}