.header-container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 166px;
}
.header {
    position: sticky;
    top: 0;
    background-color: var(--white);
    border-bottom: 1px solid #e6e6e6;
    z-index: 1200; 
}
.logo {
    width: 235px;
    position: relative;
    z-index: 1201; 
}
.logo img {
    height: 100%;
    width: 100%;
    display: block;
}
.navbar {
    position: relative;
}
.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 92px;
}
.nav-main {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 42px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 50px;
    z-index: 1190; 
}
.nav-links a {
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
    color: var(--text-dark);
    transition: color 0.3s;
    display: block;
    width: max-content;
}
.nav-links a:hover {
    color: var(--primary-light);
}
.demo-btn {
    font-size: 16px;
    font-weight: 400;
    line-height: 28px;
    padding: 13px 17px;
    border-radius: 10px;
    color: #064541;
    height: fit-content;
    border: 1px solid #064541;
    transition: 0.3s;
}
.demo-btn:hover {
    background: #115e59;
    color: var(--white);
}

/* Language Selector */
.language-selector {
    position: relative;
    cursor: pointer;
    user-select: none;
}
.language-selector span {
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
    color: var(--text-dark);
}
.language-selector .flag {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}
.language-selector .arrow {
    transition: transform 0.3s;
}
.language-selector.open .arrow {
    transform: rotate(180deg);
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgb(0 0 0 / 10%);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    min-width: 160px;
    z-index: 10;
    border-radius: 6px;

    overflow: hidden;
}
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #374151;
    font-size: 0.875rem;
    width: 100%;
}
.dropdown-menu a:hover {
    background: #f3f4f6;
}
.mobile-menu-button {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    position: relative;
    z-index: 1202; 
}
.mobile-menu-button .bar {
    height: 3px;
    width: 100%;
    background-color: #000000;
    transition: all 0.3s ease;
}
.mobile-menu-button.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-button.active .bar:nth-child(2) {
    opacity: 0;
}
.mobile-menu-button.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 900; 
}
.menu-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.lang-current {
    display: flex;
    align-items: center;
    gap: 10px;
}
html[dir="rtl"] .logo{
    width: 166px;
}

/* ================== Responsive Breakpoints ================== */
@media (max-width: 1560px) {
    .header-container {
        padding: 0 70px;
    }
}
@media (max-width: 1440px) {
    html[dir="rtl"] .logo,
    .logo {
        width: 170px;
    }
    .nav-main,
    .nav-links {
        gap: 26px;
    }
    .language-selector span{
        font-size: 14px;
    }
    .nav-links a {
        font-size: 14px;
    }
    .demo-btn {
        padding: 10px 14px;
    }
    .navbar-content {
        height: 74px;
    }
 
}
@media (min-width: 768px) {
    .language-selector:hover .dropdown-menu {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
     /* ✅ Rotate arrow on hover for desktop */
    .language-selector:hover .arrow {
        transform: rotate(180deg);
    }
}
@media (max-width: 1341px) {
    .header-container {
        padding: 0 40px;
    }
    .nav-links {
        position: fixed; 
        top: 75px; 
        left: -100%; 
        flex-direction: column;
        align-items: flex-start;
        background: var(--white);
        padding:30px;
        gap: 16px;
        height: calc(100vh - 75px); 
        width: 80%;
        max-width: 350px;
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 1195;
    }
    .nav-links.show {
        left: 0;
    }

    .nav-main {
        gap: 24px;
    }
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    .language-selector.open .dropdown-menu {
        opacity: 1;
        max-height: 300px; /* enough space */
        pointer-events: auto;
    }

    .mobile-menu-button {
        display: flex;
    }
}
@media (max-width: 600px) {
    .header-container {
        padding: 0 20px;
    }
    html[dir="rtl"] .logo,
    .logo {
        width: 40%;
    }
    .logo img {
        width: 100%;
    }
    .nav-main {
        gap: 14px;
    }
    .demo-btn {
        font-size: 14px;
        padding: 10px;
    }
}
@media (max-width: 330px) {
    .demo-btn {
        font-size: 13px;
        padding: 8px;
    }
    .nav-main {
        gap: 8px;
    }
}
