/* الإعدادات الأساسية */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --animation-timing: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

[lang="en"] body {
    font-family: 'Poppins', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* الأنيميشن */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* الهيدر */
header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    position: relative;
    transition: var(--animation-timing);
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--animation-timing);
}

.logo:hover::after {
    width: 100%;
}

/* القائمة */
.desktop-nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.desktop-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: var(--animation-timing);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--animation-timing);
}

.desktop-nav a:hover::after {
    width: 100%;
}

/* القسم الرئيسي */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('pattern.png');
    opacity: 0.1;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.5em;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* البطاقات والشبكات */
.services-grid, .projects-grid, .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.service-card, .project-card, .skill-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform var(--animation-timing);
    animation: scaleIn 0.5s ease-out forwards;
    opacity: 0;
}

.service-card:hover, .project-card:hover, .skill-card:hover {
    transform: translateY(-10px);
}

/* الصور */
.project-image {
    height: 250px;
    overflow: hidden;
    border-radius: 10px;
    margin: -30px -30px 20px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--animation-timing);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.skill-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

/* الأزرار */
.cta-button, .download-btn, .submit-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--animation-timing);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cta-button:hover, .download-btn:hover, .submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* نموذج الاتصال */
.contact form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: fadeInUp 0.5s ease-out;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    transition: all var(--animation-timing);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* التذييل */
footer {
    background: var(--secondary-color);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.social-links a {
    color: white;
    font-size: 24px;
    margin: 0 15px;
    transition: all var(--animation-timing);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* التجاوب مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 30px;
        height: 3px;
        background: var(--secondary-color);
        transition: var(--animation-timing);
    }

    .mobile-menu {
        position: fixed;
        top: 80px;
        right: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        transition: all var(--animation-timing);
    }

    .mobile-menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1.2em;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2em;
    }

    .services-grid, .projects-grid, .skills-grid {
        grid-template-columns: 1fr;
    }

    .project-image {
        height: 200px;
    }
}



/* تعديل القائمة المتحركة */
.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

/* حالة القائمة عند التفعيل */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* القائمة المتحركة */
.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 999;
}

.mobile-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    padding-right: 30px;
}

/* التجاوب مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-menu.active {
        display: block;
        animation: slideDown 0.3s ease forwards;
    }
}

/* أنيميشن للقائمة المتحركة */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* تنسيق صور المشاريع */
.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.project-image {
    position: relative;
    width: 100%;
    height: 300px; /* ارتفاع ثابت */
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* لتغطية المساحة كاملة */
    transition: transform 0.3s ease;
}

/* تأثير التحويم على صور المشاريع */
.project-card:hover .project-image img {
    transform: scale(1.05);
}

/* تنسيق صور المهارات */
.skill-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.skill-card img {
    width: 100px; /* عرض ثابت */
    height: 100px; /* ارتفاع ثابت */
    object-fit: contain; /* للحفاظ على نسب الصورة */
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.skill-card:hover img {
    transform: scale(1.1);
}

/* تنسيق الشبكة للمشاريع */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* تنسيق الشبكة للمهارات */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* تحسينات للصور في الشاشات المتوسطة */
@media (max-width: 992px) {
    .project-image {
        height: 250px;
    }

    .skill-card img {
        width: 80px;
        height: 80px;
    }
}

/* تحسينات للصور في الشاشات الصغيرة */
@media (max-width: 768px) {
    .project-image {
        height: 200px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .skill-card img {
        width: 70px;
        height: 70px;
    }
}

/* تحسينات للصور في الشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .project-image {
        height: 180px;
    }

    .projects-grid, .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-card img {
        width: 60px;
        height: 60px;
    }
}

/* تأثيرات إضافية للصور */
.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::after {
    opacity: 1;
}

/* تحسين عرض الصور في القسم الرئيسي */
.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* تنسيق صور الخدمات */
.service-card i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.service-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* تأثير ظل للصور */
.project-card, .skill-card {
    position: relative;
}

.project-card::before, .skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    z-index: -1;
    margin: 0 auto;
}

.project-card:hover::before, .skill-card:hover::before {
    opacity: 1;
}


/* تنسيق صور المشاريع فقط */
.project-image {
    position: relative;
    width: 100%;
    height: 180px; /* ارتفاع مصغر */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    border-radius: 10px;
}

.project-image img {
    width: 150px; /* عرض مصغر */
    height: 150px; /* ارتفاع مصغر */
    object-fit: contain; /* للحفاظ على نسب الصورة */
    transition: transform 0.3s ease;
}

/* تجاوب الصور مع الشاشات المختلفة */
@media (max-width: 768px) {
    .project-image {
        height: 160px;
    }
    
    .project-image img {
        width: 130px;
        height: 130px;
    }
}

@media (max-width: 480px) {
    .project-image {
        height: 140px;
    }
    
    .project-image img {
        width: 120px;
        height: 120px;
    }
}




/* تنسيق صور المشاريع مع التوسيط */
.project-image {
    position: relative;
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center; /* توسيط أفقي */
    align-items: center; /* توسيط رأسي */
    background: #f5f5f5;
    border-radius: 10px;
    margin: 0 auto; /* توسيط البطاقة نفسها */
    padding: 15px;
}

.project-image img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block; /* لضمان التوسيط الصحيح */
    margin: auto; /* توسيط إضافي */
}

/* تنسيق بطاقة المشروع بالكامل */
.project-card {
    text-align: center; /* توسيط المحتوى النصي */
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-content {
    padding: 15px;
    text-align: center; /* توسيط النص تحت الصورة */
}

/* تجاوب الصور مع الشاشات المختلفة */
@media (max-width: 768px) {
    .project-image {
        height: 160px;
    }
    
    .project-image img {
        width: 130px;
        height: 130px;
    }
}

@media (max-width: 480px) {
    .project-image {
        height: 140px;
    }
    
    .project-image img {
        width: 120px;
        height: 120px;
    }
}


/* تعديل الأنيميشن الأساسي للبطاقات */
.service-card, .project-card, .skill-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform var(--animation-timing);
    opacity: 0;
    transform: translateY(30px);
}

/* إضافة صنف جديد للتحريك */
.animate-in {
    animation: fadeInUp 0.5s ease-out forwards;
}







/* تنسيق قسم الاتصال */
.contact {
    opacity: 0;
    transform: translateY(100px); /* زيادة المسافة من أسفل */
}

.contact.animate-in {
    animation: slideUp 1s ease-out forwards;
}

/* أنيميشن للعناصر الداخلية */
.contact h2 {
    opacity: 0;
    transform: translateY(50px);
}

.contact h2.animate-in {
    animation: slideUp 0.8s ease-out forwards;
}

.contact form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(50px);
}

.contact form.animate-in {
    animation: slideUp 0.8s ease-out 0.2s forwards;
}

.form-group {
    opacity: 0;
    transform: translateY(30px);
}

.form-group.animate-in {
    animation: slideUp 0.5s ease-out forwards;
}

/* أنيميشن جديد للحركة من أسفل */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تأخيرات متتالية للعناصر */
.form-group:nth-child(1) { animation-delay: 0.3s; }
.form-group:nth-child(2) { animation-delay: 0.4s; }
.form-group:nth-child(3) { animation-delay: 0.5s; }
.form-group:nth-child(4) { animation-delay: 0.6s; }

.submit-btn {
    opacity: 0;
    transform: translateY(30px);
}

.submit-btn.animate-in {
    animation: slideUp 0.5s ease-out 0.7s forwards;
}








/* أنيميشن العناوين */
section h2 {
    position: relative;
    opacity: 0;
    transform: translateY(30px); /* تقليل مسافة الحركة */
    margin-bottom: 30px; /* تقليل المسافة أسفل العنوان */
    text-align: center;
    font-size: 2em; /* تصغير حجم الخط */
    color: var(--secondary-color);
    font-weight: 600; /* تخفيف وزن الخط */
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -8px; /* تقليل المسافة بين الخط والنص */
    left: 50%;
    width: 0;
    height: 2px; /* تقليل سمك الخط */
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width 0.6s ease;
}

/* صنف الأنيميشن للعناوين */
section h2.animate-title {
    animation: slideUpTitle 0.6s ease forwards;
}

section h2.animate-title::after {
    width: 60px; /* تقليل طول الخط */
}

/* تعديل الأنيميشن */
@keyframes slideUpTitle {
    from {
        opacity: 0;
        transform: translateY(20px); /* تقليل مسافة الحركة */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تخصيص للشاشات الصغيرة */
@media (max-width: 768px) {
    section h2 {
        font-size: 1.8em; /* حجم أصغر للشاشات الصغيرة */
    }
    
    section h2::after {
        width: 50px; /* خط أقصر للشاشات الصغيرة */
    }
}

@media (max-width: 480px) {
    section h2 {
        font-size: 1.5em; /* حجم أصغر للشاشات الأصغر */
    }
}







 


/* تنسيق قسم التبرع */
.donation-section {
    padding: 40px; /* حشوة داخلية */
    background: white; /* خلفية بيضاء */
    border-radius: 15px; /* زوايا مدورة */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* ظل خفيف */
    margin: 60px auto; /* توسيط القسم */
    max-width: 600px; /* عرض أقصى */
    text-align: center; /* توسيط النص */
    position: relative; /* لجعل الحاوية مرجعية */
}

.donation-section .section-title {
    font-size: 24px; /* حجم الخط */
    color: var(--secondary-color); /* لون العنوان */
    margin-bottom: 10px; /* مسافة أسفل العنوان */
    position: absolute; /* لجعل النص خارج الحاوية */
    top: -30px; /* ضبط المسافة من الأعلى */
    left: 50%; /* توسيط النص */
    transform: translateX(-50%); /* توسيط النص بشكل دقيق */
}

.section-title::after {
    content: ''; /* إضافة خط تحت العنوان */
    display: block; /* جعل الخط كتلة */
    width: 60px; /* عرض الخط */
    height: 2px; /* سمك الخط */
    background: var(--primary-color); /* لون الخط */
    margin: 10px auto; /* توسيط الخط */
}

.donation-section .section-description {
    font-size: 16px; /* حجم النص */
    color: var(--text-color); /* لون النص */
    margin-bottom: 20px; /* مسافة بين النص وزر التبرع */
}

.donation-section .cta-button {
    background-color: var(--primary-color); /* لون الزر */
    color: white; /* لون النص داخل الزر */
    padding: 10px 20px; /* حشوة داخلية */
    border: none; /* إزالة الحدود */
    border-radius: 5px; /* زوايا مدورة */
    font-size: 16px; /* حجم النص داخل الزر */
    cursor: pointer; /* المؤشر عند التمرير */
    transition: background-color 0.3s; /* حركة عند التغيير */
}

.donation-section .cta-button:hover {
    background-color: var(--secondary-color); /* لون عند التمرير */
}





a {
    text-decoration: none;
    color: var(--text-color);
}