/* --- 1. المتغيرات والتأسيس --- */
:root {
    --primary: #2563eb;       /* أزرق ملكي */
    --primary-dark: #1e40af;
    --accent: #06b6d4;        /* سماوي مشرق */
    --dark: #0f172a;          /* كحلي غامق جداً */
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --font-main: 'Alexandria', sans-serif;
    --shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background-color: #f8fafc;
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }

/* --- 2. الهيدر --- */
header {
    position: fixed; top: 0; width: 100%; z-index: 100;
    padding: 15px 0; transition: 0.4s;
}
header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.header-container { display: flex; justify-content: space-between; align-items: center; }

.logo { font-size: 1.5rem; font-weight: 800; color: var(--dark); display: flex; align-items: center; gap: 8px; }
.logo i { color: var(--primary); font-size: 1.6rem; }

.nav-list { display: flex; gap: 30px; }
.nav-list a { font-weight: 600; color: var(--gray); font-size: 0.95rem; }
.nav-list a.active, .nav-list a:hover { color: var(--primary); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 28px; border-radius: 10px; font-weight: 700; cursor: pointer;
}
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-primary {
    background: var(--primary); color: var(--white);
    position: relative; overflow: hidden; z-index: 1;
}
/* تأثير التدرج عند الهوفر */
.btn-primary::before {
    content: ''; position: absolute; top: 0; left: 0; width: 0%; height: 100%;
    background: var(--gradient); transition: 0.4s; z-index: -1;
}
.btn-primary:hover::before { width: 100%; }
.shadow-glow { box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3); }

.hamburger, .nav-close { display: none; cursor: pointer; font-size: 1.5rem; }

/* --- 3. قسم الهيرو --- */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    padding-top: 80px; position: relative;
}

.hero-container {
    display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center;
}

/* النصوص */
.tag {
    background: rgba(37, 99, 235, 0.1); color: var(--primary);
    padding: 6px 15px; border-radius: 30px; font-size: 0.85rem; font-weight: 700;
    display: inline-block; margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; color: var(--dark);
}
.gradient-text {
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-text p { color: var(--gray); font-size: 1.1rem; margin-bottom: 40px; max-width: 500px; }

.hero-actions { display: flex; align-items: center; gap: 30px; }
.rating-box { display: flex; flex-direction: column; font-size: 0.9rem; font-weight: 600; }
.stars { color: #f59e0b; margin-bottom: 5px; }

/* الصور والتأثيرات البصرية */
.hero-visual { position: relative; padding: 20px; }

/* الشكل الانسيابي (Blob) */
.blob-bg {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 120%; height: 120%;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f9ff 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; /* سر الشكل العضوي */
    z-index: -1; animation: blobFloat 10s infinite alternate ease-in-out;
}

.image-wrapper {
    border-radius: 40px 10px 40px 10px; overflow: hidden;
    box-shadow: var(--shadow); border: 5px solid var(--white);
    transform: rotate(-2deg); transition: 0.5s;
}
.image-wrapper:hover { transform: rotate(0deg) scale(1.02); }
.main-img { width: 100%; display: block; }

/* البطاقة العائمة */
.floating-card {
    position: absolute; bottom: 30px; right: -20px;
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px);
    padding: 15px 25px; border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    display: flex; align-items: center; gap: 15px;
    animation: floatCard 4s ease-in-out infinite;
}
.icon-circle {
    width: 45px; height: 45px; background: var(--gradient); color: var(--white);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.floating-card h4 { font-size: 1.1rem; color: var(--dark); }
.floating-card p { font-size: 0.8rem; color: var(--gray); }

/* --- 4. قسم المميزات --- */
.features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; margin-top: 50px; margin-bottom: 50px;
}
.feature-card {
    background: var(--white); padding: 30px; border-radius: 20px;
    text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: 0.3s; border: 1px solid transparent;
}
.feature-card:hover { transform: translateY(-10px); border-color: var(--primary); }
.feature-card i { font-size: 2.5rem; color: var(--primary); margin-bottom: 20px; }

/* --- 5. أنيميشن (Animations) --- */
@keyframes blobFloat { 0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; } 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; } }
@keyframes floatCard { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* كلاسات الظهور (Scroll Reveal Classes) */
.reveal-up, .reveal-left, .reveal-right { opacity: 0; transition: 1s cubic-bezier(0.5, 0, 0, 1); }
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(40px); } /* للعربي */
.reveal-right { transform: translateX(-40px); }
.active-reveal { opacity: 1; transform: translate(0, 0); }
.delay-1 { transition-delay: 0.2s; } .delay-2 { transition-delay: 0.4s; }

/* --- 6. التجاوب (Responsive) --- */
@media (max-width: 991px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero { padding-top: 120px; height: auto; padding-bottom: 50px; }
    .hero-actions { justify-content: center; flex-direction: column; gap: 20px; }
    .hero-text h1 { font-size: 2.5rem; }
    
    /* القائمة في الموبايل */
    .hamburger, .nav-close { display: block; }
    .navbar {
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
        background: var(--white); padding: 20px; z-index: 200;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1); transition: 0.4s;
        display: flex; flex-direction: column;
    }
    .navbar.show { right: 0; }
    .nav-list { flex-direction: column; margin-top: 50px; }
    .nav-close { align-self: flex-end; color: var(--dark); }
    
    .floating-card { right: 0; bottom: -20px; padding: 10px 20px; }
}