/* المتغيرات الأساسية */
:root {
    --primary: #0A2540;
    --primary-light: #17365D;
    --secondary: #3B82F6;
    --secondary-hover: #2563EB;
    --accent: #10B981;
    --danger: #EF4444;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* إعادة ضبط */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* التخطيط (Layout) */
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-padding { padding: 100px 0; }
.bg-light { background-color: var(--bg-light); }

.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(350px, 1fr)); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }

/* العناوين والأزرار */
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.5rem; color: var(--primary); margin-bottom: 15px; }
.section-title p { color: var(--text-muted); font-size: 1.1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 30px; border-radius: 50px; font-weight: 700; font-size: 1.1rem; cursor: pointer; transition: var(--transition); border: 2px solid transparent; }
.btn-primary { background: var(--secondary); color: white; }
.btn-primary:hover { background: var(--secondary-hover); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3); }
.btn-outline { background: transparent; border-color: white; color: white; }
.btn-outline:hover { background: white; color: var(--primary); }
.btn-block { width: 100%; border-radius: 8px; }

.card { background: var(--bg-white); border-radius: 15px; padding: 40px 30px; box-shadow: var(--shadow); transition: var(--transition); border: 1px solid rgba(0,0,0,0.02); }
.card:hover { transform: translateY(-10px); }

/* شريط التنقل */
.navbar { position: fixed; top: 0; right: 0; width: 100%; z-index: 1000; padding: 20px 0; transition: var(--transition); background: transparent; color: white; }
.navbar.scrolled { background: rgba(255, 255, 255, 0.98); padding: 15px 0; box-shadow: 0 5px 20px rgba(0,0,0,0.05); color: var(--primary); backdrop-filter: blur(10px); }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo a { font-size: 2rem; font-weight: 800; }
.logo span { color: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 30px; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--secondary); }
.btn-nav { background: var(--secondary); color: white !important; padding: 8px 25px; border-radius: 50px; }
.btn-nav:hover { background: var(--secondary-hover); }
.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* قسم البطل */
.hero { height: 100vh; display: flex; align-items: center; position: relative; background: url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat; }
.hero-overlay { position: absolute; top: 0; right: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(10,37,64,0.95) 0%, rgba(10,37,64,0.7) 100%); }
.hero-content { position: relative; z-index: 1; color: white; max-width: 700px; }
.hero-content h1 { font-size: 4rem; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.hero-content h1 span { color: var(--secondary); }
.hero-content p { font-size: 1.2rem; margin-bottom: 40px; color: #E2E8F0; }
.hero-buttons { display: flex; gap: 15px; }

/* الخدمات */
.service-card { text-align: center; }
.service-card .icon-box { width: 80px; height: 80px; background: rgba(59, 130, 246, 0.1); color: var(--secondary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; margin: 0 auto 20px; transition: var(--transition); }
.service-card:hover .icon-box { background: var(--secondary); color: white; transform: rotateY(180deg); }
.service-card h3 { color: var(--primary); margin-bottom: 15px; font-size: 1.5rem; }
.service-card p { color: var(--text-muted); }

/* المميزات */
.features-text h2 { font-size: 2.2rem; color: var(--primary); margin-bottom: 20px; }
.features-text p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 30px; }
.features-list li { margin-bottom: 15px; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; color: var(--text-dark); }
.features-list i { color: var(--accent); font-size: 1.3rem; }
.features-image { position: relative; }
.features-image img { width: 100%; border-radius: 20px; box-shadow: var(--shadow); }
.floating-badge { position: absolute; bottom: -20px; right: -20px; background: var(--white); padding: 20px 30px; border-radius: 15px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 15px; font-weight: bold; color: var(--primary); animation: float 3s ease-in-out infinite; }
.floating-badge i { color: #F59E0B; font-size: 1.5rem; }

/* الإحصائيات */
.statistics { background: var(--primary); color: white; }
.stat-item i { font-size: 3.5rem; color: var(--secondary); margin-bottom: 15px; }
.stat-item h3 { font-size: 3.5rem; font-weight: 800; margin-bottom: 5px; }
.stat-item p { font-size: 1.2rem; color: #CBD5E1; }

/* آراء العملاء */
.testimonial-card { position: relative; }
.quote-icon { position: absolute; top: 30px; left: 30px; font-size: 3rem; color: rgba(59, 130, 246, 0.1); }
.testimonial-card p { font-size: 1.1rem; color: var(--text-dark); font-style: italic; margin-bottom: 25px; position: relative; z-index: 1; }
.client-info { display: flex; align-items: center; gap: 15px; border-top: 1px solid #E2E8F0; padding-top: 20px; }
.client-info img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.client-info h4 { color: var(--primary); margin-bottom: 3px; }
.client-info span { font-size: 0.9rem; color: var(--text-muted); }

/* قسم التواصل */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; background: white; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.contact-info { background: var(--primary); color: white; padding: 50px; position: relative; overflow: hidden; }
.contact-info::before { content: ''; position: absolute; width: 200px; height: 200px; background: rgba(255,255,255,0.05); border-radius: 50%; bottom: -50px; left: -50px; }
.contact-info h2 { font-size: 2rem; margin-bottom: 15px; }
.contact-info > p { color: #CBD5E1; margin-bottom: 40px; }
.info-item { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 30px; }
.info-item .icon { width: 50px; height: 50px; background: rgba(255,255,255,0.1); display: flex; justify-content: center; align-items: center; border-radius: 50%; font-size: 1.2rem; color: var(--secondary); }
.info-item h4 { margin-bottom: 5px; }
.info-item p { color: #CBD5E1; font-size: 0.95rem; }

.contact-form-container { padding: 50px; }
.input-group { margin-bottom: 25px; position: relative; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--primary); font-size: 0.95rem; }
.input-group input, .input-group select, .input-group textarea { width: 100%; padding: 15px; border: 2px solid #E2E8F0; border-radius: 8px; font-family: inherit; font-size: 1rem; color: var(--text-dark); transition: var(--transition); background: var(--bg-light); }
.input-group input:focus, .input-group select:focus, .input-group textarea:focus { outline: none; border-color: var(--secondary); background: white; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); }

/* حالات الخطأ والصح */
.input-group.error input, .input-group.error select, .input-group.error textarea { border-color: var(--danger); background: #FEF2F2; }
.error-msg { color: var(--danger); font-size: 0.85rem; display: none; margin-top: 8px; font-weight: 500; }
.input-group.error .error-msg { display: block; animation: shake 0.4s ease; }

.form-status { margin-top: 20px; padding: 15px; border-radius: 8px; display: none; text-align: center; font-weight: bold; }
.form-status.success { display: block; background: #D1FAE5; color: #065F46; border: 1px solid #34D399; }
.form-status.error { display: block; background: #FEE2E2; color: #991B1B; border: 1px solid #F87171; }

/* التذييل */
.footer { background: #051424; color: white; padding: 70px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-about h3 { font-size: 2rem; margin-bottom: 20px; }
.footer-about span { color: var(--secondary); }
.footer-about p { color: #94A3B8; max-width: 350px; }
.footer-links h4, .footer-social h4 { font-size: 1.2rem; margin-bottom: 25px; position: relative; display: inline-block; }
.footer-links h4::after, .footer-social h4::after { content: ''; position: absolute; bottom: -8px; right: 0; width: 30px; height: 3px; background: var(--secondary); border-radius: 5px; }
.footer-links ul li { margin-bottom: 15px; }
.footer-links ul li a { color: #94A3B8; }
.footer-links ul li a:hover { color: var(--secondary); padding-right: 8px; }
.social-icons { display: flex; gap: 15px; }
.social-icons a { width: 45px; height: 45px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; border-radius: 50%; color: white; transition: var(--transition); }
.social-icons a:hover { background: var(--secondary); transform: translateY(-5px); }
.footer-bottom { text-align: center; padding-top: 25px; border-top: 1px solid rgba(255,255,255,0.1); color: #64748B; font-size: 0.9rem; }

/* ================= الحركات والانيميشن (Animations) ================= */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* فئات الإظهار عند التمرير (Scroll Reveal Classes) */
.reveal { opacity: 0; visibility: hidden; transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; visibility: visible; transform: translate(0, 0) scale(1); }

.fade-up { transform: translateY(50px); }
.fade-right { transform: translateX(50px); }
.fade-left { transform: translateX(-50px); }

/* ================= التجاوب (Responsive) ================= */
@media (max-width: 992px) {
    .split-layout, .contact-wrapper { grid-template-columns: 1fr; }
    .features-image { margin-top: 30px; }
    .contact-info { padding: 40px 30px; }
    .contact-form-container { padding: 40px 30px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.8rem; }
    .hero-buttons { flex-direction: column; }
    
    .menu-toggle { display: block; }
    .nav-links { position: absolute; top: 100%; right: 0; width: 100%; background: white; flex-direction: column; padding: 20px 0; box-shadow: 0 10px 15px rgba(0,0,0,0.1); clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transition: var(--transition); }
    .nav-links.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    .nav-links a { color: var(--primary); width: 100%; text-align: center; padding: 10px 0; }
    .navbar.scrolled .menu-toggle { color: var(--primary); }
    
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-links h4::after, .footer-social h4::after { left: 50%; transform: translateX(-50%); right: auto; }
    .social-icons { justify-content: center; }
}