/* المتغيرات والأساسيات */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #94a3b8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --font-arabic: 'Tajawal', sans-serif;
    --font-english: 'Poppins', sans-serif;
    
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

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

html[dir="rtl"] {
    font-family: var(--font-arabic);
}

html[dir="ltr"] {
    font-family: var(--font-english);
}

body {
    background-color: #ffffff;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* شريط التنقل */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

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

.nav-link {
    color: var(--dark-color);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

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

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

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-color);
    cursor: pointer;
}

/* القسم الرئيسي */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--dark-color);
}

.hero p {
    font-size: 18px;
    color: var(--dark-color);
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

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

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

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.hero-image {
    flex: 1;
    position: relative;
}

.hero-img {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: float 6s ease-in-out infinite;
}

.circle-animation {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 8s infinite alternate;
}

/* الأقسام العامة */
.section {
    padding: 100px 0;
}

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

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: var(--gray-color);
    max-width: 700px;
    margin: 0 auto;
}

/* قسم ما هو الذكاء الاصطناعي */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.ai-types {
    list-style: none;
    margin-top: 30px;
}

.ai-types li {
    padding: 15px 20px;
    background-color: #f1f5f9;
    margin-bottom: 10px;
    border-radius: 5px;
    font-weight: 500;
    position: relative;
    padding-right: 40px;
    transition: var(--transition);
}

.ai-types li:hover {
    background-color: #e2e8f0;
    transform: translateX(-5px);
}

.ai-types li::before {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.timeline-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="none" stroke="%232563eb" stroke-width="2" stroke-dasharray="5,5" /></svg>');
    background-size: cover;
    border-radius: 10px;
    animation: dash 20s linear infinite;
}

/* قسم كيف يعمل */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.step-icon {
    width: 80px;
    height: 80px;
    background-color: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 30px;
}

.step h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.step p {
    color: var(--gray-color);
    font-size: 15px;
}

/* قسم كيف تصنع نظام ذكاء اصطناعي */
.build-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.code-example {
    flex: 1;
    background-color: #1e293b;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.code-example pre {
    margin: 0;
}

.code-example code {
    display: block;
    padding: 20px;
    color: #f8fafc;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
}

.build-steps {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-card {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateX(10px);
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.step-card p {
    color: var(--gray-color);
    font-size: 14px;
}

/* قسم مستقبل الذكاء الاصطناعي */
.future-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.future-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.future-card:hover {
    transform: translateY(-10px);
}

.future-icon {
    width: 70px;
    height: 70px;
    background-color: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 30px;
}

.future-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.future-card p {
    color: var(--gray-color);
    font-size: 15px;
}

.future-chart {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin-top: 50px;
}

/* قسم الاتصال */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* تذييل الصفحة */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-about .logo {
    color: white;
    margin-bottom: 20px;
    display: inline-block;
}

.footer-about p {
    opacity: 0.8;
    margin-bottom: 20px;
}

.footer-links h3,
.footer-social h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after,
.footer-social h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

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

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

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-right: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #334155;
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #334155;
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 14px;
}

/* تأثيرات الحركة */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
}

@keyframes dash {
    to { stroke-dashoffset: 1000; }
}

/* التصميم المتجاوب */
@media (max-width: 992px) {
    .hero .container,
    .about-content,
    .build-content {
        flex-direction: column;
    }
    
    .hero-content,
    .about-text,
    .about-image,
    .code-example,
    .build-steps {
        max-width: 100%;
    }
    
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .section {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        background-color: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: var(--box-shadow);
        border-radius: 0 0 0 10px;
        transition: var(--transition);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        margin: 10px 0;
        padding: 10px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .future-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 30px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
}