﻿:root {
    --primary: #3b82f6;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-light: #f8fafc;
    --text-dim: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 40px 20px;
}

/* Navigation */
nav {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

    nav .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

    .logo span {
        color: var(--primary);
    }

.nav-links {
    display: flex;
    list-style: none;
}

    .nav-links li a {
        color: var(--text-light);
        text-decoration: none;
        margin-left: 20px;
        transition: 0.3s;
    }

        .nav-links li a:hover {
            color: var(--primary);
        }

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

    .hero h1 {
        font-size: 3.5rem;
        margin: 10px 0;
    }

    .hero p {
        color: var(--text-dim);
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

/* Buttons */
.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

.btn {
    background: var(--primary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.whatsapp {
    background: #25d366;
    color: white;
    margin-right: 10px;
}

.linkedin {
    background: #0077b5;
    color: white;
}

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

    .section-title::after {
        content: '';
        display: block;
        width: 50px;
        height: 3px;
        background: var(--primary);
        margin: 10px auto;
    }

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--bg-card);
    padding: 20px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

    .skill-card i {
        font-size: 2rem;
        color: var(--primary);
        margin-bottom: 10px;
    }

/* Project Cards */
/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.project-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    /* التعديل الجوهري هنا */
    .project-card img {
        width: 100%;
        height: 250px; /* طول ثابت ومناسب */
        object-fit: cover; /* بيخلي الصورة تملأ المكان من غير تمطيط */
        display: block;
    }

@media (max-width: 768px) {
    .project-card img {
        height: 200px; /* طول أصغر شوية للموبايل */
    }
}
.tags span {
    font-size: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 15px;
    margin-right: 5px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}
/*-----------------------------------------------------------------------------------------*/
/* أضف هذا للجزء القديم أو استبدله */
.page {
    display: none; /* إخفاء الصفحات افتراضياً */
    min-height: 100vh;
    padding-top: 100px;
    animation: fadeIn 0.8s ease-in-out;
}

    .page.active {
        display: block; /* إظهار الصفحة النشطة فقط */
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* صورة الشخصية المحترفة */
.profile-img-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    overflow: hidden;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
    transition: transform 0.5s ease;
}

    .profile-img-container:hover {
        transform: scale(1.1) rotate(5deg);
    }

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* تأثيرات الـ Skill Cards */
.skill-card:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-10px);
}

/* Timeline Styling */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.exp-box {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    margin-top: 10px;
}

/* Testimonials Styling */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.testi-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    font-style: italic;
    position: relative;
    border: 1px dashed var(--primary);
}

    .testi-card h5 {
        margin-top: 15px;
        color: var(--primary);
        font-style: normal;
    }

/* تحديث لتوسيع القائمة قليلاً لتناسب الروابط الجديدة */
.nav-links {
    display: flex;
    list-style: none;
    gap: 15px; /* المسافة بين الكلمات */
    flex-wrap: wrap; /* لكي تنزل الروابط تحت بعضها إذا ضاق المكان بدلاً من الخروج عن الشاشة */
    justify-content: center;
}

    .nav-links li a {
        font-size: 0.95rem; /* صغرنا الخط قليلاً ليتناسب مع العدد الكبير للروابط */
        text-transform: capitalize;
    }

/* Services Styling */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.service-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

    .service-card:hover {
        transform: translateY(-10px);
        border-color: var(--primary);
        box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    }

    .service-card i {
        font-size: 3rem;
        color: var(--primary);
        margin-bottom: 20px;
        display: block;
    }

    .service-card h3 {
        margin-bottom: 15px;
        font-size: 1.3rem;
        color: var(--text-light);
    }

    .service-card p {
        color: var(--text-dim);
        font-size: 0.95rem;
    }
/* تنسيق سكشن الفري لانس */
#freelance {
    padding: 100px 0;
    text-align: center;
}

.freelance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    padding: 20px;
}

.freelance-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-light);
    transition: 0.3s ease;
    display: block;
}

    .freelance-card:hover {
        transform: translateY(-10px);
        border-color: var(--primary);
        background: rgba(59, 130, 246, 0.1);
    }

    .freelance-card i {
        font-size: 40px;
        margin-bottom: 15px;
    }

/* ألوان الأيقونات */
.cart-icon {
    color: #00b140;
}

.kafiil-icon {
    color: #3b5998;
}

.nafazly-icon {
    color: #ff5e00;
}

.mostaql-icon {
    color: #238acb;
}

.upwork-icon {
    color: #14a800;
}

/* تحسين شكل الـ Nav Container */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* زرار المنيو مخفي في الشاشات الكبيرة */
.menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

@media (max-width: 768px) {
    /* 1. منع تداخل المنيو مع المحتوى */
    nav .container {
        padding: 10px 20px;
    }

    .menu-icon {
        display: block !important;
        z-index: 2000; /* رفع الطبقة */
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #0f172a; /* لون سادة عشان يغطي اللي تحته */
        justify-content: center;
        align-items: center;
        z-index: 1500;
        margin: 0;
        padding: 0;
    }

        .nav-links.active {
            display: flex !important;
        }

        .nav-links li {
            margin: 15px 0;
            width: 100%;
            text-align: center;
        }

            .nav-links li a {
                font-size: 1.5rem;
                margin-left: 0;
                display: block;
            }

    /* 2. إصلاح صورة المشروع في الموبايل */
    .projects-grid {
        grid-template-columns: 1fr !important;
        padding: 0 10px;
    }

    .project-card img {
        height: 220px !important; /* طول مناسب جداً للموبايل */
        width: 100%;
        object-fit: cover;
    }

    /* 3. إصلاح الهيرو (الصورة الشخصية) */
    .hero h1 {
        font-size: 2rem;
    }

    .profile-img-container {
        width: 140px; /* تصغير الصورة شوية في الموبايل */
        height: 140px;
    }
}