header {
    display: flex;
    padding: 24px;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row-reverse;
    position: fixed;
    width: 100%;
    transition: background-color 0.4s ease, box-shadow 0.3s ease,
        transform 0.3s ease-in-out;
    background-color: transparent;
    z-index: 900;
}

header.hide-header {
    transform: translateY(-100%);
}

header.active {
    /* background-color: rgb(248, 242, 235); */
    background-color: var(--color-gray-bg);
    /* background-color: #f5f5f5; */
    /* background-color: #fffcf1; */
    border: 1.3px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

header.animate-slide {
    animation: slideDown 0.4s ease-in-out;
}

nav {
    display: flex;
    gap: 78px;
    align-items: center;
    flex-direction: row-reverse;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header.animate-slide {
    animation: slideDown 0.4s ease-in-out;
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row-reverse;
    position: relative;
    width: 100%;
    padding: 0 24px;
}
/* لوقو في المنتصف */
#logo-link {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

/* أيقونة الخريطة */
.left-slot {
    display: none; /* نخفيها افتراضياً */
}
.left-slot i {
    font-size: 20px;
    color: var(--color-black-light);
}

#nav-logo {
    width: 8rem;
    order: 1;
}

#Hamburger,
#Close {
    font-size: 32px;
    cursor: pointer;
    transition: color 0.3s ease;
    order: 2;
    scroll-margin-top: 0 !important;
    scroll-snap-align: none !important;
    -webkit-tap-highlight-color: transparent;
}
html,
body {
    scroll-behavior: auto !important;
}

#Hamburger:hover,
#Close:hover {
    color: var(--color-cinnabar);
}

#Hamburger {
    display: none;
}

.main-menu {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    order: 3;
}

.main-menu a {
    margin-left: 24px;
    text-decoration: none;
    color: var(--color-black-light);
    font-size: var(--font-size-nav-text);
    font-weight: 600;
    transition: color 0.3s ease;
    text-align: right;
}

.main-menu a:hover,
.main-menu a:focus {
    color: var(--color-cinnabar);
}

.main-menu.show {
    display: flex;
    opacity: 1;
    animation: slideInRight 0.3s;
    justify-content: flex-start;
    padding: 5rem 32px;
    margin: auto;
}

.alert-banner {
    border: 1px solid var(--color-cinnabar);
    border-radius: 2rem;
    font-size: var(--font-size-small);
    padding: 10px;
    max-width: fit-content;
    margin: 0 24px;
    width: 100%;
}

.alert-text {
    font-weight: 500;
    color: var(--color-cinnabar);
    text-decoration: none;
}

#test-v {
    display: none;
    border: 1px solid var(--color-cinnabar);
    color: var(--color-cinnabar);
    border-radius: 2rem;
    line-height: 1;
    font-size: var(--font-size-small);
    padding: 10px;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}
/* Mobile Styles */
@media (max-width: 768px) {
    #Hamburger,
    #test-v {
        display: block;
    }

    body.home #nav-logo {
        display: none;
    }

    .main-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: var(--color-gray-bg);
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        display: none;
        z-index: 1000;
        padding: 32px;
        overflow: hidden;
        height: 100vh;
    }

    .main-menu a {
        margin: 12px 0;
        font-size: var(--font-size-xx-large);
        font-weight: 500;
    }

    .main-menu.show {
        display: flex;
    }

    #Close {
        display: block;
        z-index: 1100;
    }

    .main-menu.show {
        display: flex;
        animation: slideInRight 0.3s;
    }

    header {
        padding: 1.5rem;
        overflow: hidden;
    }
    .Hero {
        padding: auto;
        background-position: right;
    }

    #logo {
        width: 12rem;
        height: auto;
    }
    .alert-banner {
        display: none;
    }

    .nav-bar {
        /* justify-content: space-between; */
        justify-content: end;
        flex-direction: row;
        align-items: center;
    }

    .left-slot {
        display: none; /* تظهر في الجوال فقط */
    }

    /* #logo-link {
            display: block;
        } */
    .mobile-header-logo {
        display: inline-block;
        vertical-align: middle;
        margin-right: 0;
        width: 60px;
        height: auto;
    }
}

@media (min-width: 768px) {
    #logo-link {
        position: static;
        transform: none;
    }

    .left-slot {
        display: none !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}
.main-menu {
    transition: opacity 0.5s ease;
}

.main-menu.show {
    display: flex;
    opacity: 1;
    animation: slideInRight 0.3s;
}

.main-menu.hide {
    opacity: 0;
    animation: slideOutRight 0.3s;
}
