/* ألوان وتأثيرات الهوية الملكية الصارمة لـ NEXT DIGITAL */
:root {
    --bg-rich-black: #0A0A0A;    /* أسود غني جداً للخلفيات الفاخرة */
    --gold-bright: #FFD700;      /* ذهبي لامع ومضيء للعناوين والمفاتيح */
    --text-white: #FFFFFF;       /* أبيض ناصع للنصوص */
    --text-silver: #A0A0A0;      /* فضي ناعم للنصوص الثانوية */
    --glass-bg: rgba(20, 20, 20, 0.65);
    --glass-border: rgba(255, 215, 0, 0.15); /* إطار بتوهج ذهبي خفيف جداً */
}

/* تصفير أساسي وبناء القاعدة المريحة للتصفح */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-rich-black);
    color: var(--text-white);
    font-family: 'Cairo', 'Raleway', sans-serif;
    direction: rtl;
    overflow-x: hidden;
}

/* جزيئات جافاسكريبت الذهبية المتساقطة بالخلفية */
.particles-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.particle {
    position: absolute;
    background: var(--gold-bright);
    border-radius: 50%;
    opacity: 0.6;
    animation: fall linear infinite;
}
@keyframes fall {
    to { transform: translateY(105vh) rotate(360deg); }
}

/* زر الفيسبوك العائم الفاخر */
.facebook-floating {
    position: fixed;
    bottom: 25px; left: 25px;
    background-color: #1877F2; /* لون فيسبوك الرسمي الأزرق */
    color: white;
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 1001;
    transition: transform 0.3s;
}
.facebook-floating:hover { transform: scale(1.1) rotate(-10deg); }

/* شريط الهيدر الثابت المطور والمحمي بالكامل من المشاكل البرمجية على الهاتف */
.main-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}
.logo { font-size: 24px; font-weight: 900; color: var(--text-white); letter-spacing: 1px; }
.logo span { color: var(--gold-bright); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-silver); font-weight: 600; font-size: 15px; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold-bright); }

/* زر ابدأ مشروعك المضيء بالذهب */
.hire-me-btn {
    background: linear-gradient(45deg, #FFD700, #B8860B);
    color: var(--bg-rich-black) !important;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: bold !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.hire-me-btn:hover { transform: translateY(-2px); box-shadow: 0 0 25px rgba(255, 215, 0, 0.7); }

.menu-toggle { display: none; background: none; border: none; color: var(--text-white); font-size: 28px; cursor: pointer; }

/* بطاقات الـ Glassmorphism الفاخرة */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 30px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.1);
}

/* حاوية المحتوى الأساسي والـ Hero */
.main-content { padding-top: 100px; }
.hero-section { padding: 60px 8%; min-height: 90vh; display: flex; flex-direction: column; justify-content: center; }
.hero-container { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }

.gradient-text {
    background: linear-gradient(45deg, #FFFFFF, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gold-text { color: var(--gold-bright); }

.hero-text h1 { font-size: 42px; font-weight: 900; margin-bottom: 15px; }
.hero-text h2 { font-size: 24px; font-weight: 700; color: var(--gold-bright); margin-bottom: 20px; letter-spacing: 0.5px; }
.hero-bio { font-size: 16px; color: var(--text-silver); line-height: 1.8; margin-bottom: 30px; max-width: 600px; }

/* أزرار مخصصة عامة */
.btn {
    display: inline-block;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.btn-gold { background-color: var(--gold-bright); color: var(--bg-rich-black); }
.btn-gold:hover { background-color: #FFF; transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--text-silver); color: var(--text-white); margin-right: 15px; }
.btn-outline:hover { border-color: var(--gold-bright); color: var(--gold-bright); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 4px; }
.w-100 { width: 100%; }

.social-icons { margin-top: 30px; display: flex; gap: 20px; }
.social-icons a { color: var(--text-silver); text-decoration: none; font-size: 14px; }
.social-icons a:hover { color: var(--gold-bright); }

/* إطار الصورة والتوهج الدائري */
.hero-avatar-zone { display: flex; justify-content: center; }
.avatar-glow-wrapper {
    width: 260px; height: 260px;
    border-radius: 50%;
    border: 3px solid var(--gold-bright);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
}
.avatar-placeholder { font-size: 64px; font-weight: 900; color: var(--gold-bright); font-family: 'Raleway'; }

/* عدادات الإحصائيات والأرقام الثلاثية */
.counters-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 20px; 
    margin: 60px 0; 
    justify-content: center;
}
.counter-card { text-align: center; padding: 20px; }
.counter-num { font-size: 32px; font-weight: 900; color: var(--gold-bright); margin-bottom: 5px; }
.counter-card p { font-size: 14px; color: var(--text-silver); }

/* أشرطة المهارات التفاعلية المتجاوبة */
.skills-box { max-width: 800px; margin: 0 auto 50px auto; width: 100%; }
.skill-item { margin-bottom: 18px; }
.skill-info { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; font-weight: 600; }
.skill-bar { background: #222; height: 8px; border-radius: 10px; overflow: hidden; }
.skill-progress { background: linear-gradient(90deg, #B8860B, #FFD700); height: 100%; width: 0; transition: width 1.5s cubic-bezier(0.1, 1, 0.1, 1); }

/* عناوين الأقسام العامة */
.section-title { text-align: center; font-size: 32px; font-weight: 800; margin-bottom: 45px; }

/* قسم شبكة الخدمات الهندسية الستة */
.services-section { padding: 60px 8%; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.service-card { text-align: center; }
.srv-icon { font-size: 40px; margin-bottom: 15px; }
.service-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--gold-bright); }
.service-card p { font-size: 14px; color: var(--text-silver); line-height: 1.6; }

/* قسم معرض الأعمال والفلترة الذكية */
.portfolio-section { padding: 60px 8%; }
.filter-buttons { display: flex; justify-content: center; gap: 15px; margin-bottom: 35px; flex-wrap: wrap; }
.filter-btn { background: #111; border: 1px solid var(--glass-border); color: white; padding: 8px 22px; border-radius: 20px; font-weight: bold; cursor: pointer; transition: all 0.2s; }
.filter-btn.active, .filter-btn:hover { background: var(--gold-bright); color: var(--bg-rich-black); border-color: var(--gold-bright); }

/* شبكة الأعمال ثلاثية الأعمدة والكرت الزجاجي الحركي */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.portfolio-item { position: relative; padding: 0; overflow: hidden; height: 240px; border-radius: 12px; }
.port-img-holder { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; background: #151515; }
.port-mock-img { font-size: 28px; font-weight: bold; color: #333; letter-spacing: 1px; }

/* التراكب الحركي عند التمرير بالماوس أو اللمس */
.port-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 10, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 25px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.portfolio-item:hover .port-overlay { opacity: 1; }
.port-overlay h3 { font-size: 18px; color: var(--gold-bright); margin-bottom: 8px; }
.port-overlay p { font-size: 13px; color: var(--text-silver); margin-bottom: 15px; line-height: 1.5; }
.tech-badges { display: flex; gap: 6px; margin-bottom: 15px; flex-wrap: wrap; justify-content: center; }
.tech-badges span { background: #222; font-size: 11px; padding: 3px 8px; border-radius: 4px; border: 1px solid #444; }

/* قسم تواصل معنا والاستمارات الذكية المتجاوبة */
.contact-section { padding: 60px 8%; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.contact-info h3 { font-size: 20px; color: var(--gold-bright); margin-bottom: 15px; }
.contact-info p { font-size: 14px; color: var(--text-silver); line-height: 1.6; margin-bottom: 25px; }
.info-list { display: flex; flex-direction: column; gap: 15px; }
.info-item { font-size: 14px; color: var(--text-white); }
.info-item span { color: var(--text-silver); }

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 13px; font-weight: bold; color: var(--text-silver); }
.form-group input, .form-group select, .form-group textarea {
    background: #111;
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 6px;
    color: white;
    outline: none;
    font-family: 'Cairo', sans-serif;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--gold-bright);
}

/* فوتر الموقع المبسط */
.main-footer { text-align: center; padding: 30px; border-top: 1px solid var(--glass-border); font-size: 13px; color: var(--text-silver); }

/* ================= معالجة التجاوب الشامل للهواتف والشاشات اللوحية ================= */
@media (max-width: 992px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-avatar-zone { order: -1; margin-bottom: 20px; }
    .hero-bio { margin: 0 auto 30px auto; }
    .btn-outline { margin-right: 0; margin-top: 10px; }
    .hero-btns { display: flex; flex-direction: column; gap: 5px; max-width: 300px; margin: 0 auto; }
    .contact-layout { grid-template-columns: 1fr; }
    
    /* حماية الهيدر وتحويله لقائمة همبرغر منبثقة لمنع التداخل المزعج على شاشات الجوال */
    .menu-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: 75px; left: 0; width: 100%;
        background: rgba(10, 10, 10, 0.98);
        border-bottom: 1px solid var(--glass-border);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        display: none; 
    }
    .nav-links.open { display: flex; }
}

/* انيميشن ناعم للتمرير والظهور التدريجي للأقسام */
.fade-in-section { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }

