/* الهيدر العام */
header {
    height: 80px;
    width: 100%;
    background-color: var(--orange2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0px 1px 8px rgba(0,0,0,0.5);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 0 15px;
}

/* ========================================================= */
/* ===================  الديسكتوب ========================== */
/* ========================================================= */

header ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 0px;
    padding: 0px;
}

header ul li {
    list-style: none;
    padding: 10px 14px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
}

header ul li a {
    text-decoration: none;
    color: var(--blue1);
}

/* القائمة الفرعية في الديسكتوب */
.havelist ul {
    position: absolute;
    top: 60px;
    left: 0;
    min-width: 200px;
    background: #ffffffd9;
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: 0.25s;
    z-index: 2000;
}

.havelist:hover ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.havelist ul li {
    display: block;
    padding: 10px;
    white-space: nowrap;
}

/* زر الهامبرجر */
.parentOf3Divs {
    display: none;
    cursor: pointer;
}
.parentOf3Divs .my3divs {
    width: 28px;
    height: 4px;
    background: var(--blue1);
    border-radius: 3px;
    margin: 5px 0;
}

.backbtn button {
    font-weight: bold;
    border-radius: 24px;
    white-space: nowrap;
}

/* ========================================================= */
/* ======================  الجوال  ========================= */
/* ========================================================= */

/* === القوائم في الجوال (تصميم جديد) === */
@media only screen and (max-width: 991px){

    header {
        justify-content: space-between;
        padding: 0 15px;
    }

    /* القائمة مخفية بشكل افتراضي */
    header ul {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        flex-wrap: nowrap;
    }

    /* القائمة عند الفتح */
    header ul.lessThen768px {
        display: flex !important;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100% - 80px);
        background-color: rgba(0, 0, 0, 0.95);
        overflow-y: auto;
        padding: 1rem 0;
        z-index: 200;
    }

    /* عناصر القائمة */
    header ul.lessThen768px > li {
        width: 100%;
        text-align: center;
        font-size: 1.4rem;
        margin: 10px 0;
    }

    header ul.lessThen768px > li > a {
        color: #fff !important;
        width: 100%;
        display: block;
        padding: 10px 0;
    }

    /* إخفاء القوائم الفرعية */
    /* القوائم الفرعية بالجوال تكون مغلقة افتراضياً */
    .havelist{
        color: #fff !important;
    }
    .havelist ul {
        display: none;
        background: #3b3c3d !important;
        box-shadow: none !important;
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 100%;
        padding-left: 0;
        margin-top: 5px;
        color: #fff !important;
    }

    /* العناصر داخل القوائم الفرعية */
    .havelist ul li  {
        display: block;
        padding: 10px 0;
        color: #fff;
        font-size: 1.2rem;
    }

    .havelist ul li a {
        color: #fff;
    }

    /* زر الهامبرجر */
    header .parentOf3Divs {
        display: inline-block;
        cursor: pointer;
    }
    header .parentOf3Divs .my3divs {
        height: 4px;
        width: 28px;
        background-color: var(--blue1);
        border-radius: 3px;
        margin: 5px 0;
    }
}

