


/* زر القائمة - مخفي افتراضياً */
.nav-menu2-btn {
    display: none;
    background: none;
    border: none;
    color: red;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    position: fixed;
    right: 5px;
    transition: color 0.3s ease;
}

/* إظهار زر القائمة على الشاشات الصغيرة */
@media (max-width: 768px) {
    .nav-menu2-btn {
        display: block;
    }
}

/* زر القائمة عند التمرير (لون مختلف) */
.desktop-nav.scrolled .nav-menu2-btn {
    color: var(--primary);
}

/* القائمة الجانبية (تظهر عند التفعيل) */
.nav-menu2 {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.nav-menu2.active {
    right: 0;
}

/* زر إغلاق القائمة */
.nav-menu2-close {
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 1.8rem;
    color: var(--dark);
    cursor: pointer;
}

/* روابط القائمة */
.nav-menu2-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
    position: absolute;
    top: 18%;
    position: fixed;

}

.nav-menu2-links a {
    color: var(--dark);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu2-links a:hover {
    color: var(--secondary);
}

.nav-menu2-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: all 0.3s ease;
}

.nav-menu2-links a:hover::after {
    width: 50%;
}

/* الـ mobile topbar: الحاوية التي تحمل زر الهامبرغر */
.mobile-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 60px;
    display: flex;
    justify-content: space-between; /* توزيع المساحات بين العناصر */
    align-items: center;
    /*
    padding: 0 20px;
    */
    z-index: 1002;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
    background-color: transparent;
    backdrop-filter: none;
    box-shadow: none;
    direction: rtl; /* important for RTL layout */
    position: fixed;
}

/* عند التمرير يصبح خلفية شفافة مع بلور وظل */
.mobile-topbar.scrolled {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* إخفاء الـ mobile topbar على الشاشات الكبيرة */
@media (min-width: 769px) {
    .mobile-topbar {
        display: none;
    }
}

/* زر الهامبرغر */
.nav-menu2-btn {
    order: 1; /* last item */
    background: none;
    border: none;
    color: red;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
    position: relative;
}

/* لغة تغيير */
.lang-switcher {
    order: 1; /* first item */
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

/* استايل زر اللغة بعد التعديل */
.lang-switcher button {
    all: unset; /* reset button styles */
    cursor: pointer;
    color: red;
    font-weight: bold;
    font-size: 1rem;
    padding: 5px 10px;
}

/* ------------------ */
/* LOGO VISIBILITY */
/* في البداية مخفي ومتمركز */
.mobile-topbar .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none; /* so it doesn't block clicks */
    display: flex;
    align-items: center;
    gap: 10px; /* مسافة بين الصور */
    height: 40px; /* optional to control logo height */
}

/* يظهر عند التمرير */
.mobile-topbar.scrolled .logo {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* Initially hidden */
.lang-switcher {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show on scroll */
.mobile-topbar.scrolled .lang-switcher {
    opacity: 1;
    visibility: visible;
}


/* Show sidebar */
.nav-menu2.active {
    right: 0;
}

/* Close button */
.nav-menu2-close {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.8rem;
    color: var(--dark);
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}
.nav-menu2-close:hover {
    color: var(--secondary);
}

/*
!* Links container *!
.nav-menu2-links {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: right;
}
*/

/* Links styling */
.nav-menu2-links a {
    color: var(--dark);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

/* Hover effects */
.nav-menu2-links a:hover {
    color: var(--secondary);
    background-color: rgba(255, 87, 34, 0.1); /* light secondary bg */
}

/* Underline animation */
.nav-menu2-links a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-menu2-links a:hover::after {
    width: 50%;
}

/* Responsive improvements */
@media (max-width: 400px) {
    .nav-menu2 {
        width: 90%;
        padding: 50px 20px 20px 20px;
    }

    .nav-menu2-links a {
        font-size: 1.1rem;
    }
}
/* Overlay covering entire page behind sidebar */
.overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.25); /* semi-transparent dark */
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none; /* prevent clicks when hidden */
    transition: opacity 0.3s ease;
    z-index: 1001; /* below sidebar (1002) */
}

/* Show overlay when sidebar active */
.nav-menu2.active ~ .overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Blur page content when sidebar active */
/* Wrap your main page content in a container with class 'page-content' */
/* Example: <div class="page-content">...</div> */

.page-content {
    transition: filter 0.3s ease;
}

.nav-menu2.active ~ .overlay + .page-content {
    filter: blur(5px);
    user-select: none; /* optional: prevent text selection */
    pointer-events: none; /* optional: prevent clicks on blurred content */
}
/* The sidebar */
.nav-menu2 {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Sidebar active: visible */
.nav-menu2.active {
    right: 0;
}

/* The overlay behind the sidebar */
.overlay {
    position: fixed;
    inset: 0; /* top, right, bottom, left 0 */
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1001; /* below sidebar */
}

/* Show overlay when sidebar active */
.nav-menu2.active ~ .overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Your main content container */
.page-content {
    transition: filter 0.3s ease;
}

/* Blur page content when sidebar active */
.nav-menu2.active ~ .overlay + .page-content {
    filter: blur(5px);
    pointer-events: none; /* prevent clicking */
    user-select: none; /* prevent text selection */
}
.nav-menu2-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark); /* or --primary for blue */
    padding: 0;
    z-index: 1003;
    transition: transform 0.3s ease;
}

.nav-menu2-btn:hover {
    transform: scale(1.1);
    color: var(--primary);
}


.menu-uneven {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bar {
    height: 3px;
    background-color: #800020;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.bar.short {
    width: 15px;
}

.bar.long {
    width: 30px;
}

/* Uneven widths and positions */
.bar1 {
    width: 30px;
    margin-left: 0;
}

.bar2 {
    width: 20px;
    margin-left: 10px;
}

.bar3 {
    width: 30px;
    margin-left: 5px;
}


.bar:hover {
    background-color: #ff6b5a;
}
/* Hover effect on the menu icon container */
.nav-menu2-btn:hover .bar1,
.nav-menu2-btn:hover .bar3 {
    width: 25px;
}

.nav-menu2-btn:hover .bar2 {
    width: 30px;
}
.bar {
    height: 3px;
    background-color: #800020;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, width 0.3s ease; /* Add width transition */
}
.nav-menu2 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 30px;
    padding-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bottom-logo {
    margin-top: auto; /* Push it to the bottom */
}
.nav-menu2  {
    background-color: #FFE8D6; /* light orange shade */
    padding: 15px 10px;
    border-radius: 8px;
    justify-content: center;
}
