/* ============================================================ */
/* fam/css/style.css                                            */
/* ============================================================ */
/*
    SECTIONS INDEX — للتعديل السريع ابحث عن رقم السكشن:
    ─────────────────────────────────────────────────────
    § 01  CSS VARIABLES          — المتغيرات العامة (ألوان، ظلال، إلخ)
    § 02  RESET & BASE           — إعادة ضبط المتصفح والأنماط الأساسية
    § 03  LOGO                   — شعار الموقع وأنيماشن
    § 04  LOGIN PAGE             — صفحة تسجيل الدخول المستقلة
    § 05  HEADER                 — الهيدر العلوي للداشبورد
    § 06  NAVIGATION             — قائمة التنقل العلوية (nav-link)
    § 07  DROPDOWN MENUS         — القوائم المنسدلة
    § 08  SIDEBAR                — الشريط الجانبي + زر التشغيل
    § 09  MAIN CONTENT           — منطقة المحتوى الرئيسية
    § 10  FORMS                  — حقول الإدخال والفورمات العامة
    § 11  BUTTONS                — أزرار (primary, secondary, danger…)
    § 12  MESSAGES & ALERTS      — رسائل النجاح/الخطأ/التحذير
    § 13  STATS CARDS            — بطاقات الإحصائيات
    § 14  MODAL                  — نوافذ المودال
    § 15  FOOTER                 — الفوتر
    § 16  PUBLIC PAGE            — الصفحة العامة (الزوار)
    § 17  WATER CARDS            — البطاقات الزجاجية (water-card)
    § 18  HERO SECTION           — قسم الهيرو ← ★ هنا تعديل margin-bottom
    § 19  PROJECTS SECTION       — قسم المشاريع ← ★ هنا تعديل margin
    § 20  VIDEO & MEDIA          — بطاقات الفيديو
    § 21  PREMIUM / FAQ          — قسمي البريميوم والأسئلة
    § 22  ABOUT & CONTACT        — قسمي عن الموقع والتواصل
    § 23  HOME AUTH FORMS        — فورم الدخول/التسجيل في الصفحة الرئيسية
    § 24  MODAL AUTH             — نافذة المودال الخاصة بالمصادقة
    § 25  RESPONSIVE — TABLET    — استجابة الأجهزة اللوحية (769-1024px)
    § 26  RESPONSIVE — MOBILE    — استجابة الجوال (≤768px)
    § 27  UTILITY CLASSES        — كلاسات مساعدة (text-center, mt-*, mb-*)
    ─────────────────────────────────────────────────────
*/


/* ============================================================ */
/* § 01  CSS VARIABLES                                          */
/* ============================================================ */
:root {
    --primary-color:   #03623a;
    --secondary-color: #f39c12;
    --accent-color:    #2c3e50;
    --danger-color:    #e74c3c;
    --success-color:   #27ae60;
    --info-color:      #3498db;
    --warning-color:   #f1c40f;

    --text-light:   #ffffff;
    --text-dark:    #333333;
    --text-muted:   rgba(255, 255, 255, 0.9);

    --bg-dark:        #2c3e50;
    --bg-light:       #f5f5f5;
    --bg-transparent: rgba(255, 255, 255, 0.1);

    --border-radius:    8px;
    --transition-speed: 0.3s;

    --shadow-light:  0 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-heavy:  0 15px 35px rgba(0, 0, 0, 0.2);

    --blur-intensity: blur(10px);
}


/* ============================================================ */
/* § 02  RESET & BASE                                           */
/* ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: var(--bg-light) url('../image/back.webp') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-dark);
    min-height: 100vh;
}


/* ============================================================ */
/* § 03  LOGO                                                   */
/* ============================================================ */
.logo {
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius);
    object-fit: contain;
    background-color: rgba(214, 214, 200, 0.26);
    border: 3px solid rgb(0, 100, 250);
    box-shadow: var(--shadow-light), 0 0 0 rgb(243, 157, 18);
    transition: all var(--transition-speed) ease;
    animation: logoPulse 3s infinite alternate, logoFloat 6s infinite ease-in-out;
    position: relative;
    cursor: pointer;
}

.logo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: var(--shadow-light),
                0 0 15px rgba(var(--secondary-color-rgb), 0.8),
                0 0 30px rgba(124, 58, 237, 0.4);
    filter: brightness(1.1);
}

@keyframes logoPulse {
    0%   { box-shadow: var(--shadow-light), 0 0 0 rgba(243, 156, 18, 0); }
    100% { box-shadow: var(--shadow-light), 0 0 20px rgba(243, 156, 18, 0.6); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-5px); }
}

/* Logo container */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container .logo {
    animation: logoPulse 3s infinite alternate, logoFloat 6s infinite ease-in-out;
}

.logo-text h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-light);
}
.logo-text h1 span { color: var(--secondary-color); }
.logo-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}


/* ============================================================ */
/* § 04  LOGIN PAGE                                             */
/* ============================================================ */
body.login-page {
    background: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    background: linear-gradient(135deg, rgba(7, 61, 161, 0) 0%, rgba(252, 253, 253, 0.726) 100%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-heavy),
                inset 0 1px 0 rgba(255, 255, 255, 0.6),
                0 0 20px rgba(var(--primary-color-rgb), 0.15);
    width: 420px;
    text-align: center;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

body.login-page .logo {
    height: 72px !important;
    width: auto !important;
    max-width: 100%;
}

.login-container h1 {
    font-size: 22px;
    color: var(--text-light);
    margin-bottom: 25px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(119, 165, 129, 0.1);
}


/* ============================================================ */
/* § 05  HEADER                                                 */
/* ============================================================ */
.dashboard-header {
    background: var(--accent-color);
    color: var(--text-light);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-light);
}

.user-profile { display: flex; align-items: center; gap: 15px; }

.logout-icon {
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: background var(--transition-speed);
}
.logout-icon:hover { background: rgba(var(--danger-color-rgb), 0.3); color: var(--danger-color); }

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 15px;
    background: var(--bg-transparent);
    border-radius: var(--border-radius);
    transition: background var(--transition-speed);
}
.user-info:hover { background: rgba(255, 255, 255, 0.2); }
.user-info i    { font-size: 24px; }
.user-info span { font-weight: bold; }
.user-info small {
    padding: 2px 6px;
    font-size: 9px;
    background: rgb(255, 255, 255) !important;
    border-radius: 10px;
    display: inline-block;
}

.header-right-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    padding-right: 10px;
}

/* إخفاء أيقونات الهيدر العلوية (الأشرطة البيضاء) */
.header-right-section .nav-link i { display: none !important; }
.header-right-section .nav-link   { padding: 8px 15px !important; gap: 0 !important; }


/* ============================================================ */
/* § 06  NAVIGATION                                             */
/* ============================================================ */
.top-navigation {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}

.nav-item { position: relative; }

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
    opacity: 0;
}
.nav-item:hover::after { width: 80%; opacity: 1; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    position: relative;
    z-index: 1;
}
.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.nav-link.active {
    background: rgba(243, 156, 18, 0.3);
    border-color: rgba(243, 156, 18, 0.5);
    font-weight: 600;
}
.nav-link i { font-size: 16px; }

/* إخفاء Mobile Menu Trigger */
.mobile-menu-trigger { display: none !important; }

/* إخفاء Top Navigation على الشاشات الصغيرة */
@media (max-width: 1024px) {
    .top-navigation { display: none !important; }
}


/* ============================================================ */
/* § 07  DROPDOWN MENUS                                         */
/* ============================================================ */
.dropdown {
    position: fixed;
    top: 70px;
    background: var(--bg-transparent);
    backdrop-filter: var(--blur-intensity);
    min-width: 200px;
    border-radius: 10px;
    box-shadow: var(--shadow-heavy);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    visibility: hidden;
    transition: all 0.4s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.dropdown.show { opacity: 1; transform: translateY(0); visibility: visible; }

.dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    color: var(--text-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background var(--transition-speed);
}
.dropdown a:hover     { background: var(--secondary-color); color: var(--text-light); }
.dropdown a i         { width: 20px; }
.dropdown a:last-child { border-bottom: none; }

#menuDropdown { left: 20px; }
#userDropdown { right: 20px; }


/* ============================================================ */
/* § 08  SIDEBAR                                                */
/* ============================================================ */
.sidebar {
    width: 250px;
    background: rgba(105, 121, 143, 0.16);
    padding: 20px;
    backdrop-filter: var(--blur-intensity);
    border-right: 1px solid rgba(248, 245, 245, 0.1);
    position: fixed;
    left: -260px;
    top: 100px;
    height: calc(100vh - 120px);
    z-index: 999;
    transition: left var(--transition-speed);
    overflow-y: auto;
}
.sidebar.show { left: 0; }

.sidebar h3 {
    color: var(--text-light);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}
.sidebar a:hover  { background: var(--secondary-color); color: var(--text-light); }
.sidebar a i      { width: 20px; }
.sidebar a.active {
    background: rgba(243, 156, 18, 0.3);
    color: white;
    border-left: 4px solid #f39c12;
}

.sidebar-divider {
    border: none;
    height: 1px;
    background: rgba(4, 212, 212, 0.1);
    margin: 15px 0;
}

/* Sidebar Trigger Button */
.sidebar-trigger {
    position: fixed;
    left: 0;
    top: 100px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    z-index: 998;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: all var(--transition-speed);
    cursor: pointer;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 2px 0 10px rgba(var(--secondary-color-rgb), 0.3);
    border: 2px solid var(--secondary-color);
    border-left: none;
}
.sidebar-trigger:hover        { background: #e67e22; box-shadow: 3px 0 15px rgba(var(--secondary-color-rgb), 0.5); }
.sidebar-trigger.sidebar-open { left: 250px; background: #e67e22; }
.sidebar-trigger.sidebar-open:hover { background: #d35400; }

/* Menu Lines */
.menu-lines {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 24px;
    height: 24px;
}
.line {
    width: 100%;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all var(--transition-speed);
}


/* ============================================================ */
/* § 09  MAIN CONTENT                                           */
/* ============================================================ */
.container {
    display: flex;
    min-height: calc(100vh - 120px);
}
.main-content {
    flex: 1;
    padding: 30px;
    margin-left: 0;
    transition: margin-left var(--transition-speed);
}
.main-content.sidebar-open { margin-left: 250px; }

/* Welcome Card */
.welcome-card {
    background: var(--bg-transparent);
    backdrop-filter: var(--blur-intensity);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 600px;
    margin: 50px auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-medium);
}
.welcome-card i  { font-size: 60px; color: var(--secondary-color); margin-bottom: 20px; }
.welcome-card h2 { color: var(--text-light); margin-bottom: 15px; text-shadow: 0 2px 5px rgb(0, 166, 216); }
.welcome-card p  { color: var(--text-muted); margin-bottom: 25px; line-height: 1.6; }


/* ============================================================ */
/* § 10  FORMS                                                  */
/* ============================================================ */
.form-group            { margin-bottom: 20px; text-align: left; }
.form-group label      { display: block; margin-bottom: 8px; font-weight: 600; color: #444; }
.required              { color: var(--danger-color); }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 15px;
    box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary-color); }

/* Password Fields */
.password-field          { position: relative; }
.password-field input    { padding-right: 110px !important; }
.show-password-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #f7f7f7;
    border: 1px solid #ccc;
    color: #666666;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    transition: all var(--transition-speed);
    z-index: 10;
}
.show-password-btn:hover { background: #eee; color: var(--primary-color); }

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Password Section */
.password-section          { background: #f9f9f9; padding: 20px; border-radius: var(--border-radius); margin-bottom: 25px; }
.password-section h3       { margin-bottom: 15px; display: flex; align-items: center; gap: 10px; color: var(--accent-color); }

/* Form Actions */
.form-actions { display: flex; gap: 15px; justify-content: flex-end; margin-top: 30px; }


/* ============================================================ */
/* § 11  BUTTONS                                                */
/* ============================================================ */
button, .btn {
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-speed);
    text-decoration: none;
}

.btn-primary   { background: var(--primary-color); color: var(--text-light); }
.btn-primary:hover { background: #024d2e; }

.btn-secondary { background: var(--secondary-color); color: var(--text-light); }
.btn-secondary:hover { background: #e67e22; }

.btn-danger    { background: var(--danger-color); color: var(--text-light); }
.btn-danger:hover { background: #c0392b; }

.btn-success   { background: var(--success-color); color: var(--text-light); }
.btn-success:hover { background: #219653; }

.btn-info      { background: var(--info-color); color: var(--text-light); }
.btn-info:hover { background: #2980b9; }

.btn-admin     { background: var(--accent-color); color: var(--text-light); }
.btn-admin:hover { background: #1a252f; }

.btn-cancel, .btn-close { background: #95a5a6; color: var(--text-light); }
.btn-cancel:hover, .btn-close:hover { background: #7f8c8d; }

.btn-sm { padding: 8px 15px; font-size: 14px; }
.btn-lg { padding: 15px 30px; font-size: 18px; }


/* ============================================================ */
/* § 12  MESSAGES & ALERTS                                      */
/* ============================================================ */
.message {
    padding: 12px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.message i { font-size: 16px; }

.message.error   { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; border-left: 4px solid var(--danger-color); }
.message.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; border-left: 4px solid var(--success-color); }
.message.warning { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; border-left: 4px solid var(--warning-color); }
.message.info    { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; border-left: 4px solid var(--info-color); }

/* ===== رسالة نجاح نموذج الاتصال - برتقالية ===== */
.contact-success-message,
#contact-form .message.success,
.contact-form .alert-success,
div:contains("sent successfully"),
p:contains("successfully") {
    color: #ff8c00 !important;           /* لون النص برتقالي */
    background: #fff4e5 !important;      /* خلفية برتقالية فاتحة */
    border: 1px solid #ffb366 !important; /* حدود برتقالية */
    border-left: 4px solid #ff6600 !important; /* خط جانبي برتقالي غامق */
    font-weight: 600 !important;
    font-size: 16px !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(255, 140, 0, 0.2) !important;
    animation: slideIn 0.3s ease !important;
}

/* ===== رسالة نجاح في الفوتر ===== */
.footer-message.success {
    color: #ff8c00 !important;
    background: transparent !important;
    border: none !important;
    font-weight: 500 !important;
}

/* ===== أيقونة النجاح البرتقالية ===== */
.message.success i,
.contact-success-message i {
    color: #ff8c00 !important;
    font-size: 18px !important;
}

/* Animations */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================ */
/* § 13  STATS CARDS                                            */
/* ============================================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card         { background: #f8f9fa; padding: 20px; border-radius: var(--border-radius); text-align: center; border: 1px solid #eee; }
.stat-card i       { font-size: 30px; color: var(--secondary-color); margin-bottom: 10px; }
.stat-card h3      { font-size: 14px; color: #666; margin-bottom: 5px; }
.stat-card p       { font-size: 18px; font-weight: bold; color: var(--accent-color); }


/* ============================================================ */
/* § 14  MODAL                                                  */
/* ============================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow: auto;
}

.modal-content {
    background: var(--bg-transparent);
    backdrop-filter: blur(15px);
    margin: 50px auto;
    padding: 35px;
    border-radius: 15px;
    max-width: 700px;
    box-shadow: var(--shadow-heavy);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    animation: slideUp 0.3s ease;
}

.modal-content h2 {
    color: var(--text-light) !important;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Modal Auth */
.auth-modal { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-body .input-with-icon {
    display: flex; align-items: center;
    border: 1px solid #ddd; border-radius: 5px;
    padding: 10px; margin-bottom: 15px;
}
.modal-body .input-with-icon i     { margin-right: 10px; color: #666; }
.modal-body .input-with-icon input { flex: 1; border: none; outline: none; font-size: 16px; }
.modal-body .form-actions          { display: flex; gap: 10px; margin-top: 20px; }
.modal-body .form-actions button   { flex: 1; }

.modal-footer {
    margin-top: 20px; padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center; color: #666; font-size: 14px;
}
.modal-footer a           { color: #3498db; text-decoration: none; }
.modal-footer a:hover     { text-decoration: underline; }


/* ============================================================ */
/* § 15  FOOTER                                                 */
/* ============================================================ */
footer {
    background: var(--accent-color);
    color: var(--text-light);
    padding: 20px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
footer p { margin: 0; }

.footer-content p { color: rgba(255, 255, 255, 0.8); }

.user-info,
.user-role,
.server-time { color: #f39c12; font-weight: 500; }

.footer-links    { margin-top: 10px; }
.footer-links a  { color: rgba(255, 255, 255, 0.7); text-decoration: none; margin: 0 10px; transition: color 0.3s; }
.footer-links a:hover { color: #f39c12; }


/* ============================================================ */
/* § 16  PUBLIC PAGE                                            */
/* ============================================================ */
.public-page {
    background: #f5f5f5ff url('../image/back.webp') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    min-height: 100vh;
    position: relative;
}

.public-page .dashboard-header {
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}


/* ============================================================ */
/* § 17  WATER CARDS                                            */
/* ============================================================ */
.water-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}
.water-card h2 { color: white; margin-bottom: 20px; text-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.water-card p  { color: rgba(255,255,255,0.9); line-height: 1.6; }


/* ============================================================ */
/* § 18  HERO SECTION                                           */
/* ★ لتعديل المسافة بين Hero وقسم Projects غيّر margin-bottom  */
/* ============================================================ */
.hero {
    background: linear-gradient(
        135deg,
        rgba(7, 61, 161, 0.8) 0%,
        rgba(40, 53, 147, 0.9) 100%
    );
    padding: 50px 30px;
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 00;          /* ★ كان 40px — غيّره هنا إن أردت مسافة مختلفة */
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 00 auto 300px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}
.stat-number { color: #f39c12 !important; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.stat-label  { color: rgba(255, 255, 255, 0.9) !important; }

.hero-cta    { margin-top: 30px; }

/* الحاوية الرئيسية للهيرو */
.hero-section-with-auth {
    margin: 30px 0 0;          /* ★ margin-bottom = 0 لإلغاء الفراغ تحت الهيرو */
}

.hero-auth-container {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

.hero-content-column {
    flex: 0 0 65%;
    max-width: 65%;
}

.auth-content-column {
    flex: 0 0 30%;
    max-width: 30%;
}


/* ============================================================ */
/* § 19  PROJECTS SECTION                                       */
/* ★ لتعديل المسافة فوق/تحت قسم المشاريع غيّر margin هنا       */
/* ============================================================ */
.projects-section {
    margin: 40px 0 0;          /* ★ فوق = 40px / تحت = 0 (Why Join يتحكم في المسافة بعده) */
    padding-top: 0;
}

.section-header       { margin-bottom: 20px; }
.section-header h2    { color: white !important; text-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.section-description  { color: rgba(255, 255, 255, 0.85) !important; font-size: 1.1rem; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: #f39c12;
}
.project-card h3        { color: white !important; margin-bottom: 15px; font-size: 1.5rem; }
.project-description    { color: rgba(255, 255, 255, 0.85) !important; line-height: 1.7; margin-bottom: 20px; }

.project-meta {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 15px;
    display: inline-flex;
    gap: 15px;
    margin-bottom: 20px;
}

.difficulty,
.duration {
    background: rgba(243, 156, 18, 0.2) !important;
    color: white !important;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-link {
    color: #f39c12 !important;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 25px;
    border: 2px solid rgba(243, 156, 18, 0.3);
    transition: all 0.3s;
}
.project-link:hover {
    background: rgba(243, 156, 18, 0.2);
    border-color: #f39c12;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

/* ============================================================ */
/* § 20  VIDEO & MEDIA                                          */
/* ============================================================ */
.videos-section { margin: 40px 0; }

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.video-card { background: rgba(255,255,255,0.1); border-radius: 10px; padding: 20px; }
.video-card h3      { color: white !important; margin-bottom: 10px; }
.video-description  { color: rgba(255, 255, 255, 0.8) !important; }


/* ============================================================ */
/* § 21  PREMIUM / FAQ                                          */
/* ============================================================ */
.premium-section { margin: 40px 0; }

.premium-card {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    margin-bottom: 20px;
    font-weight: bold;
}

.comparison { display: flex; justify-content: center; align-items: center; gap: 40px; margin: 40px 0; }

.free-tier,
.premium-tier {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    flex: 1;
}
.free-tier h3,
.premium-tier h3  { color: white !important; margin-bottom: 20px; }
.free-tier ul,
.premium-tier ul  { list-style: none; padding: 0; text-align: left; }
.free-tier li,
.premium-tier li  { color: rgba(255, 255, 255, 0.9) !important; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }

.faq-section { margin: 40px 0; }
.faq-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.faq-item    { background: rgba(255,255,255,0.1); padding: 20px; border-radius: 10px; }
.faq-item h3 { color: white !important; margin-bottom: 10px; }
.faq-item p  { color: rgba(255, 255, 255, 0.85) !important; }


/* ============================================================ */
/* § 22  ABOUT & CONTACT                                        */
/* ============================================================ */
.about-section,
.contact-section { margin: 40px 0; }

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.values-list    { list-style: none; padding: 0; margin: 20px 0; }
.values-list li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: rgba(255, 255, 255, 0.85); }
.values-list li i { color: #f39c12; }

.about-stats { display: flex; flex-direction: column; gap: 20px; }
.about-stats .stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.808);
}
.about-stats .stat-card i  { font-size: 2rem; color: #f39c12; margin-bottom: 10px; }
.about-stats .stat-card h4 { color: white; margin: 10px 0 5px; }
.about-stats .stat-card p  { color: rgba(255, 255, 255, 0.85); font-weight: 500; }

.about-text h3 {
    color: #fffffeaf;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.3em;
    position: relative;
    padding-left: 15px;
}

/* Contact */
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 30px; }
.contact-info    { display: flex; flex-direction: column; gap: 25px; }

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}
.contact-item:hover { background: rgba(255, 255, 255, 0.15); transform: translateX(5px); }
.contact-item i     { font-size: 2rem; color: #f39c12; }
.contact-item h4    { color: white; margin-bottom: 5px; }
.contact-item p     { color: rgba(255, 255, 255, 0.85); margin: 0; }

.contact-form    { background: rgba(255, 255, 255, 0.1); padding: 30px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); }
.contact-form h3 { color: white; margin-bottom: 20px; }


/* ============================================================ */
/* § 23  HOME AUTH FORMS (فورم الدخول/التسجيل في الصفحة الرئيسية) */
/* ============================================================ */
.auth-sidebar-card {
    background: rgba(255, 255, 255, 0.151);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    height: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}
.auth-icon         { font-size: 2.5em; color: #32ee90; margin-bottom: 10px; }
.auth-header h3    { color: #32ee90; margin: 0 0 5px 0; font-size: 1.4em; }
.auth-subtitle     { color: #7f8c8d; font-size: 0.9em; margin: 0; }

/* Tabs */
.auth-tabs {
    display: flex;
    background: #ffffffd8;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}
.auth-tab {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: transparent;
    color: #0574cf;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.auth-tab:hover  { color: #495057; background: rgba(0,0,0,0.05); }
.auth-tab.active { background: white; color: #089e02cb; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* Auth Form */
.auth-form        { display: none; animation: fadeIn 0.3s ease; }
.auth-form.active { display: block; }

.auth-form .form-group { margin-bottom: 18px; }
.auth-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #e7f8ff;
    font-size: 0.95em;
}
.auth-form .required { color: #e74c3c; }

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
}
.auth-form input:focus { border-color: #f39c12; outline: none; box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1); }

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}
.show-password       { background: none; border: none; color: #6c757d; cursor: pointer; padding: 5px; font-size: 1em; }
.show-password:hover { color: #f39c12; }

.form-hint { font-size: 0.8em; color: #6c757d; margin-top: 5px; line-height: 1.4; }

/* Terms */
.terms-group { margin-top: 20px; }
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.9em;
    color: #495057;
    line-height: 1.4;
}
.checkbox-label input   { margin-right: 8px; margin-top: 3px; }
.checkbox-label a       { color: #f39c12; text-decoration: none; }
.checkbox-label a:hover { text-decoration: underline; }
.checkbox-label.remember-me { color: #f39c12 !important; font-weight: 500; }

/* Auth Submit Buttons */
.btn-auth-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-success         { background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; }
.btn-success:hover   { background: linear-gradient(135deg, #27ae60, #219653); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3); }
.btn-primary         { background: linear-gradient(135deg, #3498db, #2980b9); color: white; }
.btn-primary:hover   { background: linear-gradient(135deg, #2980b9, #1c6ea4); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(41, 128, 185, 0.3); }
.btn-warning         { background: linear-gradient(135deg, #f39c12, #e67e22); color: white; }
.btn-warning:hover   { background: linear-gradient(135deg, #e67e22, #d35400); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3); }

/* Form Options */
.form-options { display: flex; justify-content: space-between; align-items: center; margin: 15px 0; }
.forgot-password-link       { font-size: 0.9em; color: #f39c12; text-decoration: none; }
.forgot-password-link:hover { text-decoration: underline; }

/* Auth Divider */
.auth-divider { display: flex; align-items: center; margin: 20px 0; color: #6c757d; }
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: #e0e0e0; }
.auth-divider span   { padding: 0 15px; font-size: 0.9em; }

/* Back to Login */
.back-to-login { text-align: center; margin-top: 20px; padding-top: 15px; border-top: 1px solid #eee; }
.back-link       { color: #3498db; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.back-link:hover { text-decoration: underline; }

/* Auth Info */
.auth-info { margin-top: 25px; padding-top: 20px; border-top: 1px solid #eee; }
.info-note   { font-size: 0.85em; color: #6c757d; margin: 8px 0; display: flex; align-items: center; gap: 8px; }
.info-note i { color: #f39c12; }

/* Auth Messages */
.auth-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9em;
    display: none;
    animation: slideIn 0.3s ease;
}
.auth-message.success { display: block; background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.auth-message.error   { display: block; background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.auth-message.info    { display: block; background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Social Auth */
.social-auth       { margin-top: 20px; }
.social-auth-title { text-align: center; color: #6c757d; margin-bottom: 15px; font-size: 0.9em; }
.social-buttons    { display: flex; flex-direction: column; gap: 10px; }

.btn-social {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-social:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 3px 10px rgba(0,0,0,0.1); }
.btn-social:disabled              { opacity: 0.6; cursor: not-allowed; }
.btn-social.google    { color: #db4437; border-color: #db4437; }
.btn-social.microsoft { color: #00a4ef; border-color: #00a4ef; }

.scroll-to-auth { cursor: pointer; }


/* ============================================================ */
/* § 24  RESPONSIVE — TABLET (769px – 1024px)                  */
/* ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    * { box-sizing: border-box; }

    body {
        background-attachment: scroll !important;
        background-position: top center !important;
        min-height: 100vh;
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
    }

    .logo { width: 60px; height: 60px; }

    .dashboard-header { padding: 15px 20px; height: 90px; }

    .user-profile { gap: 10px; }
    .logout-icon  { order: -1; width: 45px; height: 45px; }
    .user-info    { order: 1; padding: 8px 15px; font-size: 13px; min-width: 140px; }

    .sidebar {
        width: 240px;
        top: 90px;
        height: calc(100vh - 90px);
        background: rgba(44, 62, 80, 0.95) !important;
    }
    .sidebar-trigger              { top: 90px; width: 45px; height: 45px; }
    .sidebar-trigger.sidebar-open { left: 240px; }
    .main-content.sidebar-open    { margin-left: 240px; }

    .welcome-card  { max-width: 80%; padding: 35px; background: rgba(44, 62, 80, 0.9) !important; }
    .modal-content { margin: 30px auto; padding: 30px; max-width: 90%; background: rgba(44, 62, 80, 0.95) !important; }
    .stats         { grid-template-columns: repeat(2, 1fr); gap: 20px; }

    .mobile-menu-trigger { display: none !important; }

    .hero-auth-container { flex-direction: column; }
    .hero-content-column,
    .auth-content-column { flex: 0 0 100%; max-width: 100%; }
    .auth-sidebar-card   { margin-top: 20px; }
}


/* ============================================================ */
/* § 25  RESPONSIVE — MOBILE (≤768px)                          */
/* ============================================================ */
@media (max-width: 768px) {
    .logo { width: 50px !important; height: 50px !important; border-radius: 6px; border-width: 2px; }

    body.login-page { padding: 15px; align-items: flex-start; background: #f5f5f5; }
    .login-container { width: 100% !important; max-width: 400px; margin: 20px auto; padding: 25px 20px; }
    body.login-page .logo { height: 60px !important; }

    .dashboard-header {
        padding: 8px 10px !important;
        flex-wrap: wrap;
        gap: 10px;
        min-height: 60px !important;
        height: auto !important;
    }

    .logo-text h1 { font-size: 1.2rem !important; }
    .logo-text p  { font-size: 0.8rem !important; }

    .user-profile {
        gap: 8px;
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    .logout-icon {
        order: -1;
        padding: 6px !important;
        background: rgba(231, 76, 60, 0.2) !important;
        border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        width: 36px !important; height: 36px !important;
    }
    .logout-icon:hover { background: rgba(231, 76, 60, 0.4) !important; }

    .user-info {
        order: 1;
        padding: 6px 10px !important;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.15) !important;
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        min-width: 10px !important;
        height: 36px;
        display: flex; align-items: center;
    }
    .user-info:hover { background: rgba(255, 255, 255, 0.25) !important; }
    .user-info i    { font-size: 16px; margin-right: 5px; }
    .user-info span { display: block; font-weight: 600; margin-bottom: 2px; font-size: 15px; }
    .user-info small {
        padding: 2px 6px;
        font-size: 9px;
        background: rgb(255, 255, 255) !important;
        border-radius: 10px;
        display: inline-block;
    }

    .dropdown {
        min-width: 180px;
        top: 60px !important;
        right: 10px !important;
        background: rgba(44, 62, 80, 0.95) !important;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .sidebar {
        width: 280px;
        top: 80px;
        height: calc(100vh - 80px);
        left: -300px;
        padding: 15px;
        background: rgba(44, 62, 80, 0.95) !important;
        backdrop-filter: blur(15px);
        border-right: 1px solid rgba(255, 255, 255, 0.3);
    }
    .sidebar.show { left: 0; }
    .sidebar h3   { color: white; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #f39c12; font-size: 16px; }
    .sidebar a    {
        padding: 12px 15px; font-size: 14px; margin-bottom: 8px;
        color: rgba(255, 255, 255, 0.9); text-decoration: none; border-radius: 6px;
        background: rgba(255, 255, 255, 0.08); display: flex; align-items: center; gap: 10px; transition: all 0.3s;
    }
    .sidebar a:hover { background: rgba(243, 156, 18, 0.3) !important; color: white; }

    .sidebar-trigger {
        top: 80px;
        width: 40px;
        height: 40px;
        margin-top: 30px;
        background: rgba(243, 156, 18, 0.8) !important;
    }
    .sidebar-trigger.sidebar-open { left: 280px; background: rgba(230, 126, 34, 0.8) !important; }

    .main-content { padding: 20px 15px !important; margin-left: 0 !important; }

    .welcome-card {
        margin: 30px auto;
        padding: 25px;
        max-width: 100%;
        background: rgba(44, 62, 80, 0.9) !important;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 12px;
    }

    .modal-content {
        margin: 10px auto !important;
        padding: 20px !important;
        max-width: 100% !important;
        background: rgba(44, 62, 80, 0.95) !important;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 12px;
    }

    .form-grid   { grid-template-columns: 1fr !important; gap: 12px !important; }
    .stats       { grid-template-columns: 1fr !important; gap: 15px; }

    .form-actions { flex-direction: column-reverse; gap: 10px; }
    .form-actions button { width: 100%; justify-content: center; padding: 12px !important; }

    footer { flex-direction: column; gap: 15px; padding: 15px; text-align: center; background: rgba(44, 62, 80, 0.95) !important; backdrop-filter: blur(10px); }

    .top-navigation      { display: none; }
    .mobile-menu-trigger { display: none !important; }

    .public-page .hero h1 { font-size: 2rem !important; }
    .public-page .hero p  { font-size: 1rem !important; }

    .hero-stats    { flex-direction: column; gap: 20px; }

    .projects-grid,
    .videos-grid,
    .faq-grid      { grid-template-columns: 1fr; }

    .comparison    { flex-direction: column; gap: 20px; }

    .about-content,
    .contact-content { grid-template-columns: 1fr; gap: 30px; }

    .about-stats { flex-direction: row; flex-wrap: wrap; }
    .about-stats .stat-card { flex: 1; min-width: 150px; }

    .contact-item { padding: 15px; }

    .hero-auth-container { flex-direction: column; }
    .hero-content-column,
    .auth-content-column { flex: 0 0 100%; max-width: 100%; }
    .auth-sidebar-card   { margin-top: 20px; padding: 20px; }

    .auth-tab        { padding: 10px; font-size: 0.9em; }
    .btn-auth-submit { padding: 12px; font-size: 15px; }
}

@media (max-width: 400px) {
    .user-info span { font-size: 13px; }
}


/* ============================================================ */
/* § 26  UTILITY CLASSES                                        */
/* ============================================================ */
.hint { font-size: 12px; color: #666; margin-top: 5px; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 25px; }

.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 25px; }

.u-orange { color: var(--secondary-color); }

iframe {
    width: 100%;
    height: calc(100vh - 120px);
    border: none;
    background: var(--text-light);
}

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');