/* الألوان والخطوط المستوحاة من سيوة */
:root {
    --primary-color: #5D4037; /* بني غامق (أرض سيوة) */
    --secondary-color: #8D6E63; /* بني فاتح (رمل) */
    --accent-color: #4CAF50; /* أخضر (النخيل) */
    --tertiary-color: #2196F3; /* أزرق (ماء الواحة/السماء) */
    --light-bg: #F5F5DC; /* بيج فاتح (راحة) */
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #D7CCC8; /* بني رملي فاتح للحدود */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background-color: #ffffff;
    direction: rtl; 
    text-align: right;
}

/* التنسيقات العامة */
h1, h2, h3 { color: var(--primary-color); font-family: 'Amiri', serif; }
section { padding: 60px 5%; }
a { text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-color); }

.section-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
    font-size: 1.1em;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------------------------------- */
/* 1. شريط التنقل (Navbar) */
/* ---------------------------------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left .logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 10px;
}

.nav-left i {
    font-size: 1.5em;
    color: var(--accent-color);
}

.nav-center a {
    color: var(--text-light);
    margin: 0 15px;
    padding: 5px 0;
    font-size: 1em;
    font-weight: 400;
    position: relative;
}

.nav-center a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-center a:hover:after {
    width: 100%;
    left: 0;
}

/* CTA Button Styling */
.cta-button {
    background-color: var(--accent-color);
    color: white;
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cta-button:hover {
    background-color: #388E3C; /* أخضر أغمق */
    transform: translateY(-2px);
}

/* قائمة الهامبرغر */
.menu-toggle {
    display: none; 
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--primary-color);
    cursor: pointer;
    order: 3;
}

/* ---------------------------------- */
/* 2. قسم البطل (Hero Section) */
/* ---------------------------------- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 5% 60px;
    background: linear-gradient(to left, var(--light-bg) 50%, #ffffff 50%); /* خلفية مقسمة */
    gap: 50px;
}

.hero-text {
    flex: 1;
    max-width: 55%;
    text-align: right;
}

.hero-text h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-text .slogan {
    font-size: 1.25em;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-end; /* للمحاذاة لليمين */
}

.action-btn {
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-align: center;
    transition: background-color 0.3s, transform 0.2s;
}

.primary-btn {
    background-color: var(--accent-color);
    color: white;
}

.primary-btn:hover {
    background-color: #388E3C;
    transform: translateY(-3px);
}

.secondary-btn {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--accent-color);
}

.secondary-btn:hover {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
}

.hero-image-container {
    flex: 1;
    text-align: center;
}

.personal-img {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 50%; /* لجعل الصورة دائرية */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 8px solid white;
}

/* ---------------------------------- */
/* 3. قسم عن قنوان (About Section) */
/* ---------------------------------- */
.about-section {
    background-color: white;
    padding-top: 40px;
}

.about-section p {
    font-size: 1.1em;
    line-height: 1.8;
}

/* ---------------------------------- */
/* 4. قسم الفيديوهات (Videos Section) */
/* ---------------------------------- */
.videos-section {
    background-color: var(--light-bg);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.video-item {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
}

.video-item h4 {
    font-size: 1.3em;
    margin: 15px 0;
    color: var(--primary-color);
}

/* حاوية جديدة للتحكم في موضع الزر */
.custom-video-wrapper {
    position: relative; 
    width: 100%;
    /* لضمان نسبة عرض إلى ارتفاع 16:9 */
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    background-color: black; /* خلفية سوداء قبل تحميل الفيديو */
}

.intro-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block; 
    cursor: pointer; 
}

/* تنسيق زر التشغيل الدائري الكبير */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    
    background-color: rgba(255, 255, 255, 0.9); 
    color: var(--accent-color);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 2em;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translate(-50%, -50%) scale(1.05);
}

/* إخفاء الزر عندما يكون الفيديو قيد التشغيل (سيتم تطبيق هذا الكلاس بواسطة JS) */
.play-button.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; 
}

/* إظهار الزر على الفيديو المتوقف */
.custom-video-wrapper.paused .play-button {
    opacity: 1;
    visibility: visible;
}


/* ---------------------------------- */
/* 5. قسم المنتجات (Products Section) */
/* ---------------------------------- */
.products-section {
    background-color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    padding-bottom: 20px;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--primary-color);
    padding: 0 15px;
}

.product-card p {
    color: var(--text-light);
    font-size: 0.95em;
    padding: 0 15px;
}

/* ---------------------------------- */
/* 6. الفوتر (Footer) */
/* ---------------------------------- */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding-top: 50px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    padding: 0 5% 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3 {
    color: var(--accent-color);
    font-size: 1.4em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col i {
    color: white;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a, .footer-col p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.footer-col a:hover {
    color: var(--accent-color);
}

.social-icons a {
    color: white;
    font-size: 1.5em;
    margin-left: 15px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding: 18px 5%;
    font-size: 0.95em;
    background-color: #4E342E; /* بني أغمق قليلاً */
}

/* ---------------------------------- */
/* التوافق مع الشاشات الصغيرة (Responsive) */
/* ---------------------------------- */
@media (max-width: 992px) {
    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 40px;
        background: var(--light-bg); /* خلفية موحدة في الجوال */
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
    }
    .hero-text h1 {
        font-size: 2.8em;
    }
    .hero-text .slogan {
        font-size: 1.1em;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
    }
    .action-btn { width: 100%; justify-content: center; }

    .personal-img {
        max-width: 300px;
        margin-bottom: 30px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col h3 {
        justify-content: center;
    }
    .footer-col ul {
        padding-right: 0;
    }
    .social-icons {
        margin-top: 20px;
    }
    .social-icons a {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2em;
    }
    .section-subtitle {
        font-size: 1em;
    }

    /* قائمة الهامبرغر في الجوال */
    .desktop-cta { display: none; }
    .menu-toggle { display: block; }
    
    .nav-center {
        display: none; 
        flex-direction: column;
        width: 100%;
        background-color: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        padding: 10px 0;
        margin-top: 5px;
        order: 4;
    }

    .nav-center a {
        padding: 10px 5%;
        margin: 0;
        text-align: right;
        border-bottom: 1px solid var(--light-bg);
    }
    .nav-center.is-open { display: flex; }
}