:root {
    --primary-color: #292929;
    --basic-color: #05a59f;
    --secondary-color: #e74c3c;
    --accent-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #fff;
    --text-light: #777;
    --black: #000;
    --font-primary: 'Tajawal', sans-serif;
    --transition: all 0.3s ease;
}

/* زر القائمة */
#toggle {
    width: 28px;
    height: 30px;
    margin: 10px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    display: none; /* مخفي افتراضيًا */
}

#toggle div {
    width: 100%;
    height: 4px;
    background: #fff;
    margin: 5px auto;
    transition: all 0.3s;
}

/* تأثير الدوران عند فتح القائمة */
#toggle.on .one {
    transform: rotate(45deg) translate(5px, 5px);
}

#toggle.on .two {
    opacity: 0;
}

#toggle.on .three {
    transform: rotate(-45deg) translate(7px, -8px);
}

/* القائمة الجانبية */
#menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 90%;
    height: 100vh;
    background: var(--basic-color);
    color: white;
    padding-right: 20px;
    padding-top: 60px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

#menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#menu ul li {
    margin: 15px 0;
    transition: background-color 0.3s ease; /* إضافة انتقال سلس */
}

#menu ul li a {
    text-decoration: none;
    color: #fff;
    font-size: 18px;
    transition: color 0.3s ease;
}

#menu ul li:hover {
    width: 100%;
    background-color: #292929;
}

#menu ul li a:hover {
    color: #fff;
    padding-right: 30px;
}

/* القائمة الرئيسية (main-nav) للشاشات الكبيرة */
.main-nav {
    display: flex; /* عرض القائمة افتراضيًا */
    justify-content: flex-end;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 20px;
}

.main-nav .nav-link {
    text-decoration: none;
    color: var(--basic-color);
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav .nav-link:hover {
    background-color: var(--primary-color);
}

/* تحسين العرض للشاشات الصغيرة */
@media (max-width: 768px) {
    #toggle {
        display: block; /* إظهار زر القائمة على الشاشات الصغيرة */
    }

    .main-nav {
        display: none; /* إخفاء القائمة الرئيسية */
    }

    #menu {
        display: block; /* إظهار القائمة الجانبية */
        right: -100%; /* أخفي القائمة خارج الشاشة */
        transition: right 0.3s ease;
    }

    #menu.open {
        right: 0; /* إظهار القائمة */
    }
}

