/* =========================================
   1. المتغيرات ونظام الألوان
   ========================================= */
:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --text-main: #1a1a1a;
    --text-light: #555555;
    --accent-orange: #FF6A00;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e5e5e5;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

[data-theme="dark"] {
    --primary-bg: #0f0f0f;
    --secondary-bg: #161616;
    --text-main: #f1f1f1;
    --text-light: #a0a0a0;
    --nav-bg: rgba(15, 15, 15, 0.95);
    --border-color: #333;
    --card-bg: #1e1e1e;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html[lang="en"] body { font-family: 'Inter', sans-serif; }
button, input, textarea, select { font-family: inherit; }

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
    overflow-x: hidden;
    font-family: 'Cairo', sans-serif;
}
body.stop-scrolling { overflow: hidden; height: 100vh; }

/* =========================================
   2. INTRO OVERLAY
   ========================================= */
#intro-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999;
    background: #000; display: flex; justify-content: center; align-items: center; flex-direction: column;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}
#intro-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.intro-content { position: relative; z-index: 2; text-align: center; }

/* شعار الانترو: خلفية برتقالية */
.intro-logo {
    width: 150px; height: auto;
    background-color: var(--accent-orange);
    padding: 20px; border-radius: 15px; margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(255, 106, 0, 0.5);
}

.skip-intro-wrapper {
    position: absolute; bottom: -100px; left: 0; width: 100%; display: flex; justify-content: center;
    transition: bottom 0.8s; cursor: pointer; z-index: 3;
}
.skip-intro-wrapper.show { bottom: 0; }
.skip-curve {
    width: 300px; height: 60px; background-color: #0f0f0f;
    border-top-left-radius: 50%; border-top-right-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5); transition: 0.3s;
}
.skip-curve:hover { background-color: var(--accent-orange); }
.skip-curve span { color: #fff; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.9rem; letter-spacing: 1px; display: flex; gap: 10px; align-items: center; }

/* =========================================
   3. Common Animations & Styles
   ========================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; }
.btn-primary {
    background-color: var(--accent-orange); color: #fff; padding: 12px 30px; border-radius: 6px; font-weight: 700;
    transition: 0.3s; display: inline-block; border: 1px solid var(--accent-orange);
}
.btn-primary:hover { background-color: transparent; color: var(--accent-orange); }
.text-orange { color: var(--accent-orange); }

/* =========================================
   4. Navbar
   ========================================= */
.navbar {
    position: fixed; top: 0; width: 100%;
    background-color: var(--nav-bg); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000; height: 80px; display: flex; align-items: center;
    direction: ltr !important; 
}
.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { display: flex; align-items: center; gap: 12px; }
.nav-logo-img { height: 35px; width: auto; }
.logo-text { font-size: 1.4rem; font-weight: 800; color: var(--text-main); letter-spacing: 0.5px; font-family: 'Inter', sans-serif; }
.nav-actions { display: flex; align-items: center; gap: 15px; }

#theme-toggle, #lang-btn {
    background: transparent; border: 1px solid var(--border-color); color: var(--text-main);
    padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; transition: 0.3s;
}
#theme-toggle:hover, #lang-btn:hover { border-color: var(--accent-orange); color: var(--accent-orange); }
.btn-nav { color: var(--text-main); font-weight: 600; font-size: 0.95rem; }
.btn-nav:hover { color: var(--accent-orange); }

/* =========================================
   5. Hero Section
   ========================================= */
.hero { position: relative; height: 85vh; display: flex; align-items: center; margin-top: 80px; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
#bg-video { width: 100%; height: 100%; object-fit: cover; }
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.6) 100%); }
[data-theme="dark"] .overlay { background: linear-gradient(90deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 100%); }
.hero-container { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; align-items: flex-start; }
.hero-content { max-width: 650px; }
.hero-label { display: inline-block; color: var(--accent-orange); font-weight: 700; font-size: 0.9rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.hero-content h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 25px; color: var(--text-main); font-weight: 800; }
.hero-content p { font-size: 1.15rem; color: var(--text-light); margin-bottom: 35px; }

/* =========================================
   6. Sections & Grids
   ========================================= */
.section { padding: 80px 0; }
.bg-secondary { background-color: var(--secondary-bg); }
.section-header { margin-bottom: 50px; }
.section-subtitle { color: var(--accent-orange); font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; text-transform: uppercase; }
.section-title { font-size: 2.2rem; font-weight: 800; color: var(--text-main); margin-bottom: 15px; }
.section-desc { font-size: 1.1rem; color: var(--text-light); max-width: 600px; }
.text-center { text-align: center; margin: 0 auto; }

.vm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.vm-card { background: var(--card-bg); padding: 40px; border-radius: 12px; box-shadow: var(--card-shadow); display: flex; align-items: flex-start; gap: 20px; border: 1px solid transparent; transition: 0.3s; text-align: start; }
.vm-card:hover { border-color: var(--accent-orange); }
.vm-icon { font-size: 1.8rem; color: var(--accent-orange); background: rgba(255, 106, 0, 0.1); width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vm-text h3 { font-size: 1.5rem; margin-bottom: 10px; color: var(--text-main); }
.vm-text p { color: var(--text-light); line-height: 1.6; }

.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 25px; justify-content: center; }
.value-card { background: var(--card-bg); padding: 30px 20px; border-radius: 12px; box-shadow: var(--card-shadow); text-align: center; transition: 0.3s; border-top: 4px solid transparent; }
.value-card:hover { border-top-color: var(--accent-orange); transform: translateY(-5px); }
.val-icon { font-size: 1.8rem; color: var(--accent-orange); margin-bottom: 15px; }
.value-card h4 { font-size: 1.2rem; margin-bottom: 10px; color: var(--text-main); }
.value-card p { font-size: 0.9rem; color: var(--text-light); }

/* Features Grid (Updated for 5 items) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-content: center;
}
.feature-card {
    background: var(--card-bg); padding: 40px 30px; border-radius: 12px; box-shadow: var(--card-shadow);
    transition: all 0.3s ease; border: 1px solid transparent; display: flex; flex-direction: column; align-items: flex-start; text-align: start;
}
.feature-card:hover { transform: translateY(-7px); border-color: var(--accent-orange); }
.icon-box { width: 60px; height: 60px; background: rgba(255, 106, 0, 0.1); color: var(--accent-orange); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 25px; }
.feature-card h4 { font-size: 1.25rem; margin-bottom: 15px; color: var(--text-main); font-weight: 700; }
.feature-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }

/* =========================================
   7. Footer
   ========================================= */
footer { background-color: #0b0b0b; color: #fff; padding: 80px 0 30px; }

.footer-top {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding-bottom: 50px; border-bottom: 1px solid #222; text-align: center;
}

.footer-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 30px; }
.footer-brand p { color: #888; font-size: 0.9rem; }

/* شعار الفوتر: خلفية برتقالية */
.footer-logo-img {
    width: 80px; height: auto;
    background-color: var(--accent-orange);
    padding: 12px; border-radius: 10px; margin-bottom: 15px; display: block;
}

/* تنسيق المعلومات القانونية */
.legal-info {
    margin-top: 20px; padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.legal-info h4 { color: #fff; font-size: 1.1rem; font-weight: 700; }
.legal-numbers { display: flex; gap: 15px; color: #aaa; font-size: 0.9rem; flex-wrap: wrap; justify-content: center; }
.legal-numbers .separator { color: var(--accent-orange); }
.num-font { font-family: 'Inter', sans-serif; letter-spacing: 1px; }

.footer-contact { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; }
.contact-item { display: flex; align-items: center; gap: 12px; color: #ccc; font-size: 0.95rem; }
.contact-item i { color: var(--accent-orange); }
.footer-bottom { text-align: center; padding-top: 30px; font-size: 0.85rem; color: #555; }

/* =========================================
   8. Extras
   ========================================= */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; background: #25d366; color: #fff;
    width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 28px; box-shadow: 0 4px 15px rgba(37,211,102,0.4); z-index: 2000; transition: 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); }

#back-to-top {
    position: fixed; bottom: 30px; left: 30px; width: 50px; height: 50px;
    background-color: var(--accent-orange); color: #fff; border: none; border-radius: 8px;
    cursor: pointer; z-index: 1999; font-size: 20px; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3);
}
#back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background-color: #e65c00; transform: translateY(-3px); }

#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--primary-bg); z-index: 9999; display: flex; justify-content: center; align-items: center;
}
.loader-content img { width: 70px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% {opacity: 0.6;} 50% {opacity: 1;} 100% {opacity: 0.6;} }

@media (max-width: 992px) {
    .features-grid, .vm-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-content h1 { font-size: 2.8rem; }
}
@media (max-width: 768px) {
    .features-grid, .vm-grid { grid-template-columns: 1fr; }
    .hero { height: auto; padding: 100px 0 60px; }
    .hero-container, .feature-card, .vm-card { align-items: center; text-align: center; }
    .vm-card { flex-direction: column; }
    .footer-top { flex-direction: column; gap: 40px; text-align: center; }
    .footer-contact { flex-direction: column; gap: 20px; }
    .btn-nav { display: none; }
    .nav-logo-img { height: 28px; }
    .logo-text { font-size: 1.1rem; }
}

html[dir="ltr"] .overlay { background: linear-gradient(-90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.6) 100%); }
html[dir="ltr"][data-theme="dark"] .overlay { background: linear-gradient(-90deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 100%); }
html[dir="ltr"] .hero-container { align-items: flex-start; }
html[dir="ltr"] .whatsapp-float { left: 30px; right: auto; }
html[dir="ltr"] #back-to-top { right: 30px; left: auto; }