.company-name {
    color: var(--helperColor);
    display: none;
}

.close-container {

    height: fit-content;
    background-color: transparent;
    display: none;

    border-radius: 50%;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    color: var(--white);
    margin-left: var(--space-lg);

}

.close-btn {
    font-size: var(--text-2xl);
    font-weight: bolder;
}

.main-header {
    position: sticky;
    inset: 0 0 auto 0;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    color: var(--white);
    transition: background var(--white) ease, color var(--white) ease, box-shadow var(--transparentColor) ease;
    backdrop-filter: none;
    border-radius: 0 0 15px 15px;

}

.main-header.scrolled {
    color: var(--white);
    box-shadow: var(--shadow-lg);
    background-color: var(--white);
    backdrop-filter: blur(20px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: 100%;
    aspect-ratio: 1/1;
}



.nav-links-list {
    display: flex;
    align-items: center;
    justify-items: center;
    gap: var(--space-md);
}

.nav .nav-links-list a:not(.dropdown-menu li a) {
    display: inline-block;
    width: fit-content;
    text-decoration: none;
    position: relative;
    color: var(--primaryColor);
    font-weight: bold;
    transition: all 0.8s;
}

.nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background-color: var(--helperColor);
    border-radius: 20px;
    transition: width 0.4s ease;
}

.nav a:hover::after {
    width: 100%;
}


.nav a.active ::after {
    width: 100%;
}



.dropdown {
    position: relative;
}

.dropdown button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 200;
    /* font-size: 0.9rem; */
    color: inherit;
    /* يخلي السهم ياخد لون النص */
}

.dropdown-menu {
    width: 200px;
    flex-direction: column;
    background: var(--transparentColor);
    box-shadow: var(--shadow-lg);
    padding: var(--space-md);

    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: var(--space-md);

    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    /* transform: translateX(50%); */
    z-index: 10000;

    height: fit-content;
    overflow: auto;

    clip-path: inset(0 0 100% 0);
    /* مخفي زي ستارة */
    transition: clip-path 0.5s ease-in-out, height 0.5s ease-in-out;
}


/* ----- تحسين عام (Firefox) ----- */
.dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: var(--lightHelper) transparent;
    /* يمنع تحريك المحتوى عند ظهور/اختفاء الشريط */
    scrollbar-gutter: stable;
}

/* ----- WebKit (Chrome / Edge / Safari) ----- */
.dropdown-menu::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 8px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background-image: linear-gradient(180deg, var(--lightHelper) 0%, var(--helperColor) 100%);
    border-radius: 6px;
    min-height: 28px;
    /* مساحة قابلة للسحب أفضل */
    border: 2px solid transparent;
    /* للحفاظ على المساحة من الداخل */
    background-clip: padding-box;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: transform .12s ease, box-shadow .12s ease, background-image .12s ease;
}

/* تفاعل عند المرور بالفأرة / عند السحب */
.dropdown-menu:hover::-webkit-scrollbar-thumb,
.dropdown-menu::-webkit-scrollbar-thumb:hover {
    transform: scale(1.05);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.dropdown-menu::-webkit-scrollbar-thumb:active {
    transform: scale(0.98);
}

/* ----- وصولية: تحديد مرئي عند التنقل بالكيبورد ----- */
.dropdown-menu:focus-visible {
    outline: 3px solid rgba(10, 111, 174, 0.18);
    outline-offset: 2px;
}


.dropdown.open .dropdown-menu {
    clip-path: inset(0 0 0 0);
    /* تنزل لتحت زي الستارة */
}



.dropdown-menu::-webkit-scrollbar {
    display: none;
}

.dropdown-menu li a {
    /* background-color: var(--white); */
    display: block;
    color: var(--helperColor);
    padding-block: var(--space-sm);
    text-decoration: none;
    border-bottom: var(--white) 1px dashed;
    font-weight: 400;
}

.dropdown-menu li a:hover::after {
    width: 0;
}

.dropdown-menu li a:hover {
    color: var(--white);
    border-radius: 0px;
    background-color: var(--helperColor);
}

.header-actions {
    display: none;
    align-items: center;
    gap: 12px;
    width: 70px;
    height: 55px;
    background-color: var(--white);
    border-radius: 50%;
    font-size: 30px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.hamburger {
    display: flex;
    display: none;
    /* مخفي في الحالة العادية */
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100000;
    /* علشان يفضل فوق */
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-image: linear-gradient(90deg, var(--lightHelper) 0%, var(--primaryColor) 100%);
    border-radius: 2px;
    transition: all 0.4s ease;
}

/* عند الضغط (يتحول إلى X) */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    /* يختفي */
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ========== responsive additions for style.css ========== */

/* Medium screens: collapse spacing, branduce header height */
@media (max-width: 1050px) {

    .nav a {
        font-size: 12px;
    }

    .sub-link-none {
        display: none;
    }
}

@media (max-width: 1015px) {

    .nav a {
        font-size: 11px;

    }

    .sub-link-none {
        display: none;
    }
}

/* Small tablets & large phones */
@media (max-width: 945px) {
    .sub-link-none {
        display: block;
    }

    .nav-links-list {

        flex-direction: column;
        gap: var(--space-lg);
        width: 220px;
        background: var(--white);
        color: var(--helperColor);
        height: 100%;
        overflow-y: auto;
        box-sizing: border-box;
        align-items: start;
        justify-content: start;
        padding: var(--space-sm);
        border-radius: 15px 0 0 15px;
    }

    .nav {
        display: flex;
        gap: 0;
        flex-direction: row;
        justify-content: space-between;
        align-items: start;

        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: fit-content;
        background: var(--shadow-color);
        transition: right 0.8s ease-in-out;
        z-index: 999999999;
    }

    .nav.show {
        right: 0;
    }

    .nav.show .close-container {
        display: flex;
    }

    /* .nav .nav-links-list a:not(.dropdown-menu li a),
    .nav .nav-links-list a {
        width: 100%;
    } */

    .nav a {
        border-bottom: 1px dashed var(--primaryColor);
        padding: 1px;
        border-radius: 0;
        color: var(--helperColor);
        display: block;
        text-align: right;
    }

    .hamburger {
        display: flex;
    }

    .logo {
        width: 90px;
        height: 90px;
    }

    .dropdown-menu {
        width: 100%;
        position: static;
        height: 0;
        padding: 0;
    }

    .dropdown.open .dropdown-menu {
        clip-path: inset(0 0 0 0);
        height: fit-content;
        padding: var(--space-md);
    }

    .header-actions {
        display: flex;
    }

    .company-name {

        display: flex;
        width: 500px;
    }
}

/* Phones */
@media (max-width: 576px) {

    .logo {
        width: 60px;
        height: 60px;

    }

    .main-header.scrolled {
        margin-top: 0;
        /* height: 80px; */
    }



    .main-header.scrolled .nav .nav-links-list {
        top: 100%;
        background-color: var(--primaryColor);
    }

    .main-header.scrolled .nav .nav-links-list a:not(.dropdown-menu li a) {
        color: var(--white);
        background-color: none;
        border-bottom: 1px dashed var(--white);

    }

    .dropdown {
        width: 100%;

    }

    .dropdown-menu {
        width: 100%;
    }
}