/* style.css - ملف التنسيق المنفصل */

/* إعدادات عامة وتصفير الهوامش */
* {
    margin: 1;
    padding: 1;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --hover-color: #2980b9;
    --bg-color: #f4f6f9;
    --text-color: #333;
    --white: #fff;
    --sidebar-width: 260px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* الشريط العلوي */
.top-bar {
    height: 65px;
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.top-bar .logo {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
}

.btn-login {
    background-color: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-login:hover {
    background-color: var(--hover-color);
}

/* الحاوية الرئيسية للموقع */
.main-container {
    display: flex;
    margin-top: 65px; /* مسافة تساوي ارتفاع الشريط العلوي */
    flex: 1;
}

/* القائمة الجانبية اليمنى (الطولية) */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    position: fixed;
    top: 65px;
    right: 0;
    bottom: 0;
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
    z-index: 999;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar-nav ul li a {
    display: block;
    padding: 15px 25px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    border-right: 4px solid transparent;
    transition: all 0.3s ease;
}

.sidebar-nav ul li a:hover, 
.sidebar-nav ul li a.active {
    background-color: #f8fafc;
    color: var(--accent-color);
    border-right-color: var(--accent-color);
}

/* منطقة المحتوى الرئيسي */
.content {
    flex: 1;
    margin-right: var(--sidebar-width); /* إزاحة المحتوى لكي لا يختفي خلف القائمة اليمنى */
    padding: 40px;
}

.card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	text-align: center;
}

.card h1 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.card p {
    line-height: 1.8;
    color: #666;
}

/* التجاوب مع شاشات الجوال والأجهزة اللوحية (Responsive) */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    /* تحويل القائمة الجانبية إلى قائمة علوية منسدلة أو أفقية في الجوال */
    .sidebar {
        width: 100%;
        position: static;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .sidebar-nav ul {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
        justify-content: center;
    }

    .sidebar-nav ul li {
        width: auto;
    }

    .sidebar-nav ul li a {
        padding: 10px 15px;
        border-right: none;
        border-bottom: 3px solid transparent;
    }

    .sidebar-nav ul li a:hover, 
    .sidebar-nav ul li a.active {
        border-right-color: transparent;
        border-bottom-color: var(--accent-color);
    }

    /* إلغاء إزاحة المحتوى في الجوال */
    .content {
        margin-right: 0;
        padding: 20px;
    }
}
