/* إعداد خط تجوال وتصفير الهوامش */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
    scroll-behavior: smooth;
}

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --dark-color: #0f172a;
    --light-bg: #f8fafc;
    --text-color: #334155;
    --white: #ffffff;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* شريط التنقل العلوي وتوسيط القائمة */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-color);
    flex: 1;
}

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

/* كود توسيط القائمة المطلوبة */
.centered-nav {
    flex: 2;
    display: flex;
    justify-content: center;
}

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

.centered-nav ul li {
    margin: 0 20px;
}

.centered-nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    font-size: 1.05rem;
}

.centered-nav ul li a:hover { color: var(--secondary-color); }

.header-spacer {
    flex: 1; /* يضمن بقاء القائمة في السنتر تماماً موازنة مع اللوجو */
}

/* القسم الرئيسي (Hero) */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: var(--white);
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.hero-content h1 { font-size: 3.2rem; margin-bottom: 20px; font-weight: 800; }
.hero-content h1 span { color: var(--secondary-color); }
.hero-content p { font-size: 1.3rem; max-width: 650px; margin: 0 auto 35px auto; color: #cbd5e1; font-weight: 400; }

.hero-buttons .btn {
    display: inline-block;
    padding: 12px 35px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    margin: 10px;
    transition: 0.3s;
}

.btn-primary { background-color: var(--secondary-color); color: var(--white); border: none; cursor: pointer;}
.btn-primary:hover { background-color: #2563eb; }
.btn-secondary { border: 2px solid var(--white); color: var(--white); }
.btn-secondary:hover { background-color: var(--white); color: var(--dark-color); }

/* الأقسام العادية */
section { padding: 80px 8%; text-align: center; }
section h2 { font-size: 2.2rem; margin-bottom: 40px; color: var(--dark-color); position: relative; display: inline-block; font-weight: 800; }
section h2::after { content: ''; width: 50%; height: 4px; background: var(--secondary-color); position: absolute; bottom: -10px; left: 25%; border-radius: 2px; }

/* قسم من أنا والمهارات */
.about-section { background-color: var(--white); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; text-align: right; margin-top: 20px; }
.about-text p { font-size: 1.15rem; color: var(--text-color); text-align: justify; }
.skills-box h3 { margin-bottom: 20px; color: var(--dark-color); font-weight: 700; }
.skill-tag { display: inline-block; background-color: #eff6ff; color: var(--secondary-color); padding: 8px 18px; margin: 6px; border-radius: 20px; font-weight: 700; font-size: 0.95rem; }

/* معرض المشاريع */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 20px; }
.project-card { background: var(--white); padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: 0.3s; text-align: right; }
.project-card:hover { transform: translateY(-5px); }
.project-icon { font-size: 2.5rem; color: var(--secondary-color); margin-bottom: 20px; }
.project-card h3 { margin-bottom: 12px; color: var(--dark-color); font-weight: 700; }
.project-card p { font-size: 1rem; color: var(--text-color); margin-bottom: 20px; }
.project-link { color: var(--primary-color); text-decoration: none; font-weight: 700; font-size: 0.95rem; }

/* تصميم قسم التواصل ونموذج الرسائل الجديد */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
    margin-top: 40px;
    text-align: right;
}

.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.form-group { margin-bottom: 20px; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #f8fafc;
    transition: 0.3s;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--secondary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* تنسيق أيقونات التواصل الاجتماعي المطلوبة */
.contact-socials-box h3 { margin-bottom: 20px; color: var(--dark-color); font-weight: 700; }
.social-icons-wrapper { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 15px; }

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.4rem;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.social-btn.email { background-color: #ea4335; }
.social-btn.whatsapp { background-color: #25d366; }
.social-btn.linkedin { background-color: #0077b5; }
.social-btn.twitter { background-color: #000000; }
.social-btn:hover { transform: scale(1.1); filter: brightness(1.1); }

footer { background-color: var(--dark-color); color: #94a3b8; padding: 25px; font-size: 0.95rem; }

/* تجاوب التصميم للشاشات الصغيرة */
@media (max-width: 768px) {
    header { flex-direction: column; padding: 15px; gap: 15px;}
    .centered-nav { justify-content: center; width: 100%; }
    .centered-nav ul { padding: 0; }
    .centered-nav ul li { margin: 0 10px; }
    .header-spacer { display: none; }
    .hero-content h1 { font-size: 2.3rem; }
    .contact-container { grid-template-columns: 1fr; }
}
