/* =========================================
   1. المتغيرات والأساسيات
   ========================================= */
:root {
    --primary: #0f172a;       /* كحلي داكن - الهيبة والثقة */
    --secondary: #1e293b;     /* كحلي أفتح */
    --accent: #d97706;        /* ذهبي/عمبري - التميز والفخامة */
    --accent-hover: #b45309;
    --text-main: #334155;     /* رمادي داكن للنصوص */
    --text-light: #64748b;    /* رمادي فاتح */
    --bg-main: #ffffff;
    --bg-light: #f8fafc;      /* رمادي مريح جداً للعين */
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.15);
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Tajawal', sans-serif; 
    color: var(--text-main); 
    background-color: var(--bg-main); 
    line-height: 1.8; 
    direction: rtl; 
    overflow-x: hidden;
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
h1, h2, h3, h4 { color: var(--primary); font-weight: 800; line-height: 1.3; }
p { color: var(--text-light); }
a { text-decoration: none; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; border-radius: 8px; }

/* =========================================
   2. الأزرار (Buttons)
   ========================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 30px; border-radius: 6px; font-weight: 700; cursor: pointer;
    transition: var(--transition); border: none; font-size: 1rem;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-outline { border: 2px solid var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: var(--white); }
.w-100 { width: 100%; }

/* =========================================
   3. الناف بار (Navbar)
   ========================================= */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 20px 0; transition: var(--transition);
}
.navbar.scrolled, .solid-nav {
    background: rgba(15, 23, 42, 0.98); backdrop-filter: blur(8px);
    padding: 12px 0; box-shadow: var(--shadow-sm);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--white); font-size: 1.6rem; font-weight: 900; }
.logo i { color: var(--accent); }
.nav-links { display: flex; gap: 30px; }
.nav-links a { color: rgba(255,255,255,0.8); font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.mobile-toggle { display: none; background: none; border: none; color: white; font-size: 1.8rem; }

/* =========================================
   4. الهيرو والترويسات (Hero & Page Header)
   ========================================= */
.hero {
    height: 100vh; 
    background-size: cover; 
    background-position: center;
    background-color: var(--secondary); /* لون احتياطي في حال ضعف النت */
    /* تم تغيير رابط الصورة هنا */
    background-image: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.7)), url('https://images.pexels.com/photos/323705/pexels-photo-323705.jpeg?auto=compress&cs=tinysrgb&w=1920');
    display: flex; 
    align-items: center; 
    color: var(--white);
}
.hero-badge { display: inline-block; background: rgba(217, 119, 6, 0.2); color: var(--accent); padding: 5px 15px; border-radius: 20px; border: 1px solid var(--accent); margin-bottom: 20px; font-weight: 700; }
.hero h1 { color: var(--white); font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 20px; }
.hero p { color: #cbd5e1; max-width: 650px; font-size: 1.1rem; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 20px; }

.page-header { padding: 160px 0 100px; background-size: cover; background-position: center; }
.text-white { color: var(--white) !important; }
.opacity-80 { opacity: 0.8; }

/* =========================================
   5. الأقسام والشبكات (Sections & Grid)
   ========================================= */
.section { padding: 100px 0; }
.bg-light { background-color: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 60px; }
.subtitle { color: var(--accent); font-weight: 800; display: block; margin-bottom: 10px; }
.section-title { font-size: 2.5rem; margin-bottom: 20px; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 50px; align-items: center; }

/* كروت الخدمات والمشاريع */
.service-card, .project-card {
    background: var(--white); padding: 40px 30px; border-radius: 12px;
    box-shadow: var(--shadow-sm); transition: var(--transition); border-bottom: 4px solid transparent;
}
.service-card:hover { transform: translateY(-10px); border-bottom-color: var(--accent); box-shadow: var(--shadow-lg); }
.s-icon { width: 60px; height: 60px; background: var(--bg-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--primary); margin-bottom: 25px; }

.project-card { padding: 0; overflow: hidden; position: relative; }
.p-img { position: relative; height: 250px; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.project-card:hover .p-img img { transform: scale(1.1); }
.p-overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.8); display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.4s; }
.project-card:hover .p-overlay { opacity: 1; }
.p-content { padding: 25px; }
.p-cat { color: var(--accent); font-size: 0.9rem; font-weight: 700; }

/* =========================================
   6. التجاوب مع الهواتف (Media Queries)
   ========================================= */
@media (max-width: 992px) {
    .nav-links { display: none; } /* سيتم تفعيلها في الدفعة القادمة عبر JS */
    .mobile-toggle { display: block; }
    .nav-cta { display: none; }
    .hero-actions { flex-direction: column; }
    .grid-2 { grid-template-columns: 1fr; }
}

/* =========================================
   7. تأثيرات الظهور (Animations)
   ========================================= */
.reveal { opacity: 0; transform: translateY(40px); transition: 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   8. الفوتر
   ========================================= */
.main-footer { background: var(--primary); padding: 40px 0; color: #94a3b8; border-top: 5px solid var(--accent); }
.footer-bottom { text-align: center; }
.fw-bold { font-weight: 800; }

/* =========================================
   9. نماذج التواصل (Forms)
   ========================================= */
.main-form { background: var(--white); padding: 40px; border-radius: 12px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--primary); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 6px; outline: none; font-family: inherit;
}
.form-group input:focus { border-color: var(--accent); }
.success-box { background: var(--white); padding: 50px; border-radius: 12px; color: var(--primary); }
.success-box i { font-size: 4rem; color: var(--accent); margin-bottom: 20px; }