/* استيراد خط كايرو العربي */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

:root {
    --primary-color: #0a1a2f;    /* الكحلي العميق */
    --accent-color: #e70505;     /* الأحمر الأساسي */
    --accent-hover: #b40404;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f4f7f6;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
}

/* =======================
   Header & Navigation (نسخة محسنة للجوال)
======================= */
header {
    background: var(--primary-color);
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-height: 75px; /* استخدام min-height بدلاً من height للسماح بالتوسع في الجوال */
    height: auto;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0; /* منع اللوجو من الانضغاط */
}

.header-logo {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background-color: #fff;
}

header h2 {
    color: var(--text-light);
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1.5rem;
    margin: 0;
}

/* التنقل الافتراضي (شاشات الكمبيوتر) */
nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

nav a:hover, nav a.active {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

/* =======================
   تعديلات الجوال (الحل لمشكلة التداخل)
======================= */
@media (max-width: 768px) {
    header {
        flex-direction: column; /* وضع اللوجو فوق الروابط */
        padding: 10px 5%;
        justify-content: center;
        gap: 10px;
    }

    nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap; /* السماح للروابط بالنزول لسطر ثانٍ بدلاً من التداخل */
        gap: 5px;
    }

    nav a {
        font-size: 0.8rem;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.05); /* إضافة تميز بصري للروابط */
    }
}

/* للشاشات الصغيرة جداً (مثل iPhone SE) */
@media (max-width: 480px) {
    header h2 {
        font-size: 1.2rem;
    }

    .header-logo {
        width: 38px !important;
        height: 38px !important;
    }

    nav a {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
}


/* =======================
   Hero Section - النسخة النهائية المحدثة
======================= */
.hero {
    /* تم ضبط المسار والشفافية لإظهار الصورة بوضوح مع الحفاظ على مقروئية النص */
    background: linear-gradient(135deg, rgba(10, 26, 47, 0.8) 0%, rgba(22, 46, 74, 0.7) 100%), 
                url('../images/imgbackground.jpg') center/cover no-repeat !important;
    color: white;
    padding: 60px 20px; /* تقليل الحشو قليلاً لرفع المحتوى */
    text-align: center;
    position: relative;
    min-height: auto; /* ترك الارتفاع يتحدد بناءً على المحتوى لضمان التناسب */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero h2 {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    font-weight: 400;
}


 .video-wrapper {
    position: relative;
    width: 100%;
    /* تقليل العرض الأقصى لكي يبرز الطول */
    max-width: 320px; 
    margin: 0 auto;
    z-index: 2;
}

.video-card video {
    width: 100%;
    /* زيادة الارتفاع ليكون أطول من العرض */
    height: auto;
    max-height: 550px; 
    /* استخدام contain لضمان ظهور كامل محتوى الفيديو الطولي بدون قص */
    object-fit: contain; 
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    background: #000;
}

/* استجابة الجوال لشاشات iPhone وغيرها */
@media (max-width: 768px) {
    .video-wrapper {
        max-width: 280px; /* تصغير العرض أكثر في الجوال ليحافظ على الشكل الطولي */
    }
    .video-card video {
        max-height: 480px;
    }
}

/* ===== زر الانضمام المحدث ===== */
.btn-join {
    background: linear-gradient(135deg, #ff0000, #b40404);
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    margin-bottom: 25px; /* مسافة بين الزر والفيديو */
    box-shadow: 0 10px 20px rgba(231, 5, 5, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-join:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(231, 5, 5, 0.6);
}

/* استجابة الجوال لشاشات iPhone وغيرها */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.7rem; }
    .hero h2 { font-size: 1rem; }
    .video-wrapper { max-width: 95%; }
    .video-card video { max-height: 220px; } /* تصغير الارتفاع أكثر على الجوال */
}
/* =======================
   Stats Section
======================= */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.stats div {
    background: white;
    padding: 30px 15px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-bottom: 5px solid var(--accent-color);
    transition: var(--transition);
}

.stats div:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.stats span {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-color);
    display: block;
    margin-bottom: 5px;
}

.stats p {
    font-weight: 700;
    color: var(--primary-color);
}

/* =======================
   Products Section
======================= */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 30px;
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.product-item {
    text-align: center;
    transition: var(--transition);
}

.image-container {
    width: 160px;
    height: 160px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid white;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.product-item:hover .image-container {
    transform: scale(1.1) rotate(3deg);
    border-color: var(--accent-color);
}

.product-name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: var(--transition);
}

.product-item:hover .product-name {
    color: var(--accent-color);
}

/* =======================
   Earnings Page
======================= */
.earnings {
    padding: 60px 20px;
    min-height: 70vh;
}

.earnings form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 450px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.earnings h2 {
    margin-bottom: 25px;
    color: var(--primary-color);
}

form input {
    width: 100%;
    padding: 14px;
    margin: 12px 0;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
}

form input:focus {
    border-color: var(--accent-color);
    outline: none;
    background: #fffcfc;
}

form button {
    width: 100%;
    padding: 15px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition);
}

/* =======================
   About Page (Accordion)
======================= */
.about {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.accordion-item {
    background: white;
    margin-bottom: 15px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    width: 100%;
    padding: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: right;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fff;
}

.accordion-content p {
    padding: 20px;
    color: #555;
    border-top: 1px solid #eee;
}
/* تنسيق المحتوى داخل الأكورديون */
.content-wrapper {
    display: flex;
    align-items: center; /* محاذاة النص والصورة في المنتصف */
    justify-content: space-between;
    gap: 15px;
    padding: 15px 10px;
}

.text-box {
    flex: 1; /* جعل النص يأخذ أغلب المساحة */
}

/* تنسيق صورة المؤسس (صغيرة ودائرية) */
.founder-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 200px; /* عرض الكرت الصغير */
}

.founder-mini-card img {
    width: 250px !important;  /* حجم الصورة صغير جداً */
    height: 250px !important;
    border-radius: 50%;      /* دائرية تماماً */
    object-fit: cover;
    border: 1px solid var(--accent-color); /* إطار أحمر رقيق */
    margin-bottom: 5px;
}

.founder-label {
    font-size: 0.7rem;
    color: #777;
    margin: 0;
}

.founder-name {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
}

/* للجوال */
@media (max-width: 480px) {
    .content-wrapper {
        flex-direction: column-reverse; /* الصورة فوق النص في الجوال */
        text-align: center;
    }
}


/* =======================
   Footer
======================= */
.site-footer {
    background: var(--primary-color);
    color: white;
    padding: 50px 20px;
    text-align: center;
    margin-top: 60px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 25px 0;
}

.social-icons a {
    color: white;
    font-size: 2rem; /* تم تكبير الحجم قليلاً ليكون أوضح */
    transition: var(--transition);
    text-decoration: none;
}

.social-icons a:hover {
    transform: translateY(-5px);
}

/* ألوان الهوفر المخصصة لكل أيقونة */

/* تلغرام - أزرق فاتح */
#t:hover {
    color: #0088cc;
}

/* واتساب - أخضر */
#w:hover {
    color: #25d366;
}

/* فيسبوك - أزرق غامق */
#f:hover {
    color: #1877f2;
}

/* إنستغرام - متدرج برتقالي وردي */
#i:hover {
    color: #f84c6b;
}
/* يوتيوب - أحمر */
#y:hover {
    color: #FF0000;
}
/* =======================
   Responsive Adjustments
======================= */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 20px;
    }
    
    nav {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    nav a {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    .hero h1 { font-size: 1.7rem; }
    .hero h2 { font-size: 1.1rem; }
    
    .stats {
        grid-template-columns: 1fr 1fr; /* صفين في الجوال */
    }

    .image-container {
        width: 130px;
        height: 130px;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr; /* عمود واحد للجوالات الصغيرة جداً SE */
    }
    
    .earnings form {
        padding: 25px 15px;
    }
}
/* تنسيق زر العودة للرئيسية */
.btn-back {
    display: inline-block;
    background-color: var(--primary-color); /* اللون الكحلي الخاص بك */
    color: white !important;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(10, 26, 47, 0.2);
}

.btn-back:hover {
    background-color: transparent;
    color: var(--primary-color) !important;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(10, 26, 47, 0.3);
}

.get-code-text {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
}

.get-code-text a {
    color: var(--accent-color); /* سيستخدم اللون الأحمر الخاص بموقعك */
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.get-code-text a:hover {
    border-bottom: 1px solid var(--accent-color);
    opacity: 0.8;
}

/* لضمان عدم تداخل النص في الجوال */
@media (max-width: 480px) {
    .get-code-text {
        font-size: 0.8rem;
        padding: 0 10px;
    }
}