:root {
    --primary: #8635fd;
    --primary-light: #a855f7;
    --primary-dark: #6b21a8;
    --secondary: #f1f5f9;
    --accent: #0ea5e9;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

body {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Font weights for different elements */
h1, h2, h3, h4, h5, h6, .fw-bold {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
    font-weight: 700;
}

.navbar-brand {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.btn {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
    font-weight: 600;
}

.nav-link {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
    font-weight: 500;
}

/* Bootstrap overrides */
.btn-primary {
    background: var(--gradient);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(134, 53, 253, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(134, 53, 253, 0.4);
    background: var(--primary-dark);
    border: none;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-light {
    background: white;
    color: #8635fd;
    border: none;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: white;
    color: #8635fd;
    transform: translateY(-2px);
}

/* Language Dropdown */
.language-dropdown {
    position: relative;
}

.language-dropdown-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.language-dropdown-btn:hover {
    transform: translateY(-1px);
    background: var(--primary-dark);
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #333;
    text-decoration: none;
}

.language-option:hover {
    background-color: #f8f9fa;
}

.language-option.active {
    background-color: #8635fd;
    color: white;
}

.language-option .fas.fa-check {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.language-option.active .fas.fa-check {
    opacity: 1;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    margin: 0 15px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-toggler {
    border: none;
    padding: 4px 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
}


/* Hero Section */
.hero {
    background: linear-gradient(135deg, #8635fd 0%, #6c28d9 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="1.5" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="white" opacity="0.1"/></svg>');
    animation: float 20s infinite linear;
    z-index: 1;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

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

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p.lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: bounce 3s ease-in-out infinite;
}

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

/* Stats Section */
.stats {
    background: var(--primary);
    color: white;
    padding: 80px 0;
    position: relative;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="0,0 100,0 0,100" fill="rgba(255,255,255,0.05)"/></svg>');
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Stats Swiper Styles */
.stats-swiper {
    padding: 40px 20px;
}

.stats-swiper .swiper-pagination {
    position: static;
    margin-top: 30px;
}

.stats-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 12px;
    height: 12px;
}

.stats-swiper .swiper-pagination-bullet-active {
    background: white;
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(134, 53, 253, 0.1), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(134, 53, 253, 0.2);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

/* Pricing Swiper Styles */
.pricing-swiper {
    padding: 40px 20px;
}

.pricing-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.pricing-swiper .pricing-card {
    width: 100%;
    margin: 0;
}

.pricing-swiper .swiper-pagination {
    position: static;
    margin-top: 30px;
}

.pricing-swiper .swiper-pagination-bullet {
    background: var(--primary);
    opacity: 0.3;
    width: 12px;
    height: 12px;
}

.pricing-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
}

/* Mobile pricing card adjustments */
@media (max-width: 768px) {
    .pricing-swiper .pricing-card.featured::before {
        font-size: 12px;
        padding: 6px 16px;
        top: -12px;
    }
    
    .pricing-swiper .pricing-card.featured {
        transform: none;
    }
}

/* Service Cards */
.service-card {
    background: var(--light);
    padding: 2.5rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    height: 100%;
    margin-bottom: 2rem;
}

.service-card:hover {
    background: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.service-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
    margin-right: 10px;
    width: 20px;
}

/* Pricing Cards */
.pricing-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border);
    height: 100%;
}

.pricing-card.featured {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(134, 53, 253, 0.2);
}

.pricing-card.featured::before {
    content: 'الأكثر شعبية';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    text-align: start;
}

.plan-features li {
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.plan-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
    margin-right: 10px;
    width: 20px;
}

/* CTA Section */
.cta-section {
    background: var(--gradient);
    color: white;
    padding: 100px 0;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="80" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="20" r="1.5" fill="white" opacity="0.1"/></svg>');
    pointer-events: none;
}

/* Contact Form */
.contact-form {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(134, 53, 253, 0.1);
}

.contact-form .form-control {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 12px 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(134, 53, 253, 0.25);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1000;
    background-color: #25D366;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 40px;
    height: 40px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer h5 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    padding: 8px 0;
}

.footer ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer ul li a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    margin-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* RTL Support */
[dir="ltr"] .service-features li::before,
[dir="ltr"] .plan-features li::before {
    margin-right: 10px;
    margin-left: 0;
}

[dir="rtl"] .service-features li::before,
[dir="rtl"] .plan-features li::before {
    margin-left: 10px;
    margin-right: 0;
}

[dir="ltr"] .language-dropdown-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .language-dropdown-menu {
    left: 0;
    right: auto;
}

[dir="ltr"] .whatsapp-float {
    left: 20px;
    right: auto;
}

[dir="rtl"] .whatsapp-float {
    right: 20px;
    left: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding-top: 120px;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .pricing-card.featured {
        transform: none;
        margin-top: 1rem;
    }

    .pricing-card.featured::before {
        content: 'الأكثر شعبية';
    }

    [dir="ltr"] .pricing-card.featured::before {
        content: 'Most Popular';
    }

    .feature-card,
    .service-card,
    .pricing-card {
        margin-bottom: 2rem;
    }

    .navbar-nav {
        text-align: center;
        padding: 20px 0;
    }

    .navbar-nav .nav-link {
        margin: 10px 0;
    }

    .language-dropdown {
        order: 1;
    }

    .navbar-toggler {
        order: 2;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p.lead {
        font-size: 1.1rem;
    }

    .feature-card,
    .service-card {
        padding: 2rem 1.5rem;
    }

    .pricing-card {
        padding: 2rem 1.5rem;
    }

    .stats {
        padding: 60px 0;
    }

    .btn-lg {
        padding: 10px 25px;
        font-size: 1rem;
    }

    .contact-form {
        padding: 2rem 1.5rem !important;
    }

    .stats-swiper,
    .features-swiper {
        padding: 20px 10px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-in;
}

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

.slide-in-right {
    animation: slideInRight 1s ease-out;
}

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

.slide-in-left {
    animation: slideInLeft 1s ease-out;
}

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

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Success and Error Messages */
.success-msg {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.error-msg {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .navbar {
        border-bottom: 2px solid rgb(255, 255, 255);
    }
    
    .feature-card,
    .service-card,
    .pricing-card {
        border: 2px solid var(--primary);
    }
}