@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Poppins:wght@300;400;600;700;900&display=swap');

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

:root {
    --primary-color: #0057a8;
    --secondary-color: #004080;
    --accent-color: #4da1a9;
    --turquoise: #4da1a9;
    --light-bg: #f0f8f9;
    --lighter-bg: #e6f4f5;
    --white: #ffffff;
    --text-dark: #0057a8;
    --text-light: #4da1a9;
}

body {
    font-family: 'Cairo', 'Poppins', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.8;
    overflow-x: hidden;
}

[dir="ltr"] body {
    font-family: 'Poppins', 'Cairo', sans-serif;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 20px rgba(0, 87, 168, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(77, 161, 169, 0.15);
    transition: all 0.3s ease;
}

header.sticky {
    padding: 15px 0;
    box-shadow: 0 4px 30px rgba(0, 87, 168, 0.15);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo a {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: 3px;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.logo span {
    color: var(--accent-color);
    font-weight: 700;
}

.logo a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--turquoise));
    border-radius: 2px;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
}

.main-nav ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--accent-color);
}

.main-nav ul li a:hover::after {
    width: 100%;
}

/* Language Switch Button */
.lang-switch {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 14px 35px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 87, 168, 0.2);
    position: relative;
    overflow: hidden;
}

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

.lang-switch:hover::before {
    left: 100%;
}

.lang-switch:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 87, 168, 0.3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

/* Hero Section */
.hero {
    padding: 140px 0 120px;
    position: relative;
    overflow: hidden;
    background: var(--light-bg);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(230, 244, 245, 0.85) 0%, rgba(240, 248, 249, 0.85) 50%, rgba(230, 244, 245, 0.85) 100%);
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(77, 161, 169, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

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

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, 30px) rotate(5deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero h1 {
    font-size: 68px;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 900;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
    animation: slideDown 1s ease;
}

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

.hero p {
    font-size: 26px;
    color: var(--text-light);
    max-width: 900px;
    margin: 0 auto 50px;
    line-height: 2;
    font-weight: 400;
    animation: slideUp 1s ease 0.2s both;
}

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

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 18px 50px;
    border-radius: 35px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 6px 30px rgba(0, 87, 168, 0.25);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: slideUp 1s ease 0.4s both;
}

.cta-button::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;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 87, 168, 0.35);
}

/* Stats Section */
.stats {
    background: var(--white);
    padding: 80px 0;
    border-top: 1px solid rgba(77, 161, 169, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    text-align: center;
}

.stat-item {
    padding: 30px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-number {
    font-size: 64px;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1;
}

.stat-label {
    font-size: 20px;
    color: var(--text-light);
    font-weight: 600;
}

/* Services Section */
.services {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--white) 100%);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 54px;
    color: var(--primary-color);
    font-weight: 900;
    margin-bottom: 25px;
}

.section-description {
    font-size: 20px;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(77, 161, 169, 0.15);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.service-card:hover::before {
    opacity: 0.03;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 60px rgba(0, 87, 168, 0.2);
    border-color: var(--turquoise);
}

.service-card > * {
    position: relative;
    z-index: 1;
}

.service-icon {
    font-size: 72px;
    margin-bottom: 30px;
    display: inline-block;
    transition: transform 0.4s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
}

.service-card h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.service-card p {
    color: var(--text-light);
    font-size: 17px;
    line-height: 1.8;
}

/* Features Section */
.features {
    padding: 120px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
    margin-top: 70px;
}

.feature-item {
    padding: 40px 30px;
    background: var(--light-bg);
    border-radius: 16px;
    border-left: 5px solid var(--turquoise);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: var(--white);
    border-left-color: var(--primary-color);
    transform: translateX(-5px);
    box-shadow: 0 10px 40px rgba(0, 87, 168, 0.12);
}

[dir="rtl"] .feature-item {
    border-left: none;
    border-right: 5px solid var(--turquoise);
}

[dir="rtl"] .feature-item:hover {
    transform: translateX(5px);
    border-right-color: var(--primary-color);
}

.feature-icon {
    font-size: 42px;
    margin-bottom: 20px;
}

.feature-item h4 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 700;
}

.feature-item p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.7;
}

/* Clients Section */
.clients {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--lighter-bg) 0%, var(--light-bg) 100%);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmin(300px, 1fr));
    gap: 40px;
    margin-top: 70px;
}

.client-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

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

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

.client-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 87, 168, 0.18);
    border-color: rgba(77, 161, 169, 0.3);
}

.client-icon {
    font-size: 64px;
    margin-bottom: 25px;
}

.client-card h4 {
    font-size: 26px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.client-card p {
    color: var(--text-light);
    font-size: 17px;
    line-height: 1.8;
}

/* Tech Stack Section */
.tech-stack {
    padding: 120px 0;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.tech-stack::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(77, 161, 169, 0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.tech-items {
    display: flex;
    justify-content: center;
    gap: 100px;
    flex-wrap: wrap;
    margin-top: 70px;
    position: relative;
    z-index: 2;
}

.tech-item {
    text-align: center;
    padding: 50px;
    background: linear-gradient(135deg, var(--light-bg), var(--white));
    border-radius: 25px;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    min-width: 280px;
}

.tech-item:hover {
    transform: scale(1.08);
    box-shadow: 0 20px 60px rgba(0, 87, 168, 0.2);
    border-color: var(--turquoise);
}

.tech-item-icon {
    font-size: 96px;
    margin-bottom: 25px;
    filter: grayscale(30%);
    transition: filter 0.3s ease;
}

.tech-item:hover .tech-item-icon {
    filter: grayscale(0%);
}

.tech-item h4 {
    font-size: 32px;
    color: var(--primary-color);
    font-weight: 900;
    margin-bottom: 10px;
}

.tech-item p {
    color: var(--text-light);
    font-size: 16px;
    font-weight: 600;
}

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

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    border-radius: 50%;
}

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

.cta-section h2 {
    font-size: 54px;
    color: var(--white);
    margin-bottom: 25px;
    font-weight: 900;
}

.cta-section p {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.cta-button-white {
    display: inline-block;
    background: var(--white);
    color: var(--primary-color);
    padding: 18px 50px;
    border-radius: 35px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 6px 30px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
}

.cta-button-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 80px 0 30px;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-brand h3 {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.8;
    max-width: 400px;
}

.footer-section h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 16px;
}

.footer-links a:hover {
    color: var(--white);
}

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

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
}

/* Scroll Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 87, 168, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(0, 87, 168, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero h1 {
        font-size: 52px;
    }

    .section-title {
        font-size: 44px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .logo a {
        font-size: 32px;
    }

    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 87, 168, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 20px;
    }

    .section-title {
        font-size: 36px;
    }

    .service-grid,
    .clients-grid {
        grid-template-columns: 1fr;
    }

    .tech-items {
        gap: 50px;
    }

    .stat-number {
        font-size: 48px;
    }

    .cta-section h2 {
        font-size: 38px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 18px;
    }

    .section-title {
        font-size: 28px;
    }

    .cta-button,
    .cta-button-white {
        padding: 15px 35px;
        font-size: 16px;
    }
}