body {
    font-family: 'Beiruti', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.main-header {
    font-family: 'Beiruti', sans-serif;
    background-color: rgba(255, 255, 255, 0.90);
    padding: 15px 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 2px solid #F6F6F5;
}

body.company-logged-in .main-header {
    top: 50px;
    /* Adjusted to make room for the company header */
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1170px;
    margin: 0 auto;
}

.logo img {
    height: 50px;
}

.nav {
    flex-grow: 1;
    margin-left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    margin-right: 20px;
    position: relative;
    font-size: 20px;
}

.nav-list a {
    text-decoration: none;
    color: #626361;
    font-weight: bold;
    padding: 5px 10px;
    transition: color 0.3s ease;
    position: relative;
    transition: color 0.3s ease, border-bottom 0.6s ease;
}


.nav-list a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    /* Start with no underline */
    height: 2px;
    background-color: #7CB138;
    transition: width 0.6s ease, left 0.6s ease;
}

.nav-list a:hover::before {
    width: 100%;
}


:dir(rtl) .nav-list a::before {
    left: auto;
    right: 0;
    transition: width 0.6s ease, right 0.6s ease;
    /* Transition right instead of left */
}

:dir(rtl) .nav-list a:hover::before {
    width: 100%;
}

.nav-list a:hover {
    color: #7CB138;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 130%;
    left: 6%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px;
    margin: 0;
    width: 200px;
    z-index: 1000;
}

:dir(rtl) .dropdown-menu {
    display: none;
    position: absolute;
    top: 130%;
    right: 6%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px;
    margin: 0;
    width: 200px;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 10px 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
}

.dropdown-menu img {
    height: 40px;
    margin-right: 10px;
}

.language-switcher {
    display: flex;
    align-items: center;
    margin-right: 0;
    cursor: pointer;
}

.language-flag {
    height: 22px;
    margin-right: 0;
    display: block;
}

.language-text {
    font-size: 20px;
    margin-right: 10px;
    font-weight: bold;
    color: #626361;
    margin-bottom: 6px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 165px;
    height: 46px;
    background: linear-gradient(90deg, #97C55C 0%, #79AB3D 100%);
    border: 3px solid #FFFFFF;
    box-shadow: 0px 4px 2px rgba(0, 0, 0, 0.25);
    border-radius: 15px;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    margin-left: 20px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    font-size: 19px;
}


html[dir="rtl"] .contact-btn {
    margin-left: 0;
    margin-right: 20px;
}

.contact-btn:hover {
    background: linear-gradient(90deg, #79AB3D 0%, #97C55C 100%);
    box-shadow: 0px 6px 4px rgba(97, 97, 96, 0.35);
}

.contact-icon {
    display: none;
    font-size: 27px;
    color: #7CB138;
    margin-left: 15px;
    margin-right: 15px;
    text-decoration: none;
}

.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 20px;
    z-index: 1200;
}

.burger-menu span {
    height: 3px;
    width: 30px;
    background-color: #616160;
    margin: 4px 0;
    transition: transform 0.3s ease, background-color 0.3s ease;
    position: relative;
}

.burger-menu.open .line1 {
    transform: rotate(-45deg) translate(-6px, 6px);
    background-color: #616160;
}

.burger-menu.open .line3 {
    transform: rotate(45deg) translate(-8px, -8px);
    background-color: #616160;
}

.burger-menu.open .line2 {
    opacity: 0;
}

.nav-links-mobile {
    flex-direction: column;
    gap: 10px;
    background-color: rgba(255, 255, 255, 1);
    position: fixed;
    top: 45px;
    left: 0;
    width: 54%;
    height: calc(100vh - 45px);
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 15px;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.nav-links-mobile.open {
    transform: translateX(0);
}

:dir(rtl) .nav-links-mobile {
    left: auto;
    right: 0;
    border-radius: 14px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    top: 45px;
    /* Start below the header with a margin of 45px for RTL */
    transform: translateX(100%);
}

:dir(rtl) .nav-links-mobile.open {
    transform: translateX(0);
}

.nav-links-mobile ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links-mobile li {
    padding: 10px 0;
}

.nav-links-mobile a {
    color: #626361;
    font-size: 18px;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-links-mobile a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 90%;
    height: 2px;
    background-color: #7CB138;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.nav-links-mobile a:hover::before {
    transform: scaleX(1);
    transform-origin: bottom left;
}

:dir(rtl) .nav-links-mobile a::before {
    left: auto;
    right: 0;
    transform-origin: bottom left;
}

:dir(rtl) .nav-links-mobile a:hover::before {
    transform: scaleX(1);
    transform-origin: bottom right;
}

.nav-links-mobile-dropdown .dropdown-content-mobile {
    background-color: white;
    border-radius: 14px;
    padding: 0;
    list-style: none;
    width: 100%;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.nav-links-mobile-dropdown .dropdown-content-mobile.show {
    max-height: 300px;
    opacity: 1;
}


.dropdown-content-mobile img {
    height: 28px;
    margin-right: 10px;
}



:dir(rtl) .language-switcher {
    flex-direction: row-reverse;
}

/********************** Responsive adjustments ***********************/
@media screen and (max-width: 1200px) {
    .header-container {
        padding: 0 20px;
    }

    .nav-list li {
        margin-right: 15px;
        position: relative;
        font-size: 18px;
    }

    .language-text {
        font-size: 18px;
    }
}

@media screen and (max-width:1025px) {

    .nav-list li {
        margin-right: 12px;
        position: relative;
        font-size: 17px;
    }

    .nav-list a {
        padding: 5px;
    }

    .contact-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 130px;
        height: 38px;
        margin-left: 10px;
        font-size: 15px;
    }

    .logo img {
        height: 42px;
    }
}

@media screen and (max-width:1025px) {

    .nav-list li {
        font-size: 15px;
    }
}


@media screen and (max-width:860px) {
    .header-container {
        padding: 0 10px;
    }

    .nav-list {
        display: none;
    }

    .nav-list.open {
        display: flex;
    }

    .nav-list li {
        margin: 10px 0;
        text-align: right;
    }

    .burger-menu {
        display: flex;
        margin-left: 12px;
        margin-right: 12px;
    }

    .contact-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 135px;
        height: 34px;
        margin-left: 15px;
        font-size: 16px;
        border-radius: 11px;
    }

    .burger-menu.open .line1 {
        transform: rotate(-45deg) translate(-8px, 8px);
    }

    .burger-menu.open .line3 {
        transform: rotate(45deg) translate(-8px, -8px);
    }

}

@media screen and (max-width: 450px) {
    .burger-menu.open .line1 {
        transform: rotate(-45deg) translate(-6px, 6px);
    }

    .burger-menu.open .line3 {
        transform: rotate(45deg) translate(-8px, -8px);
    }

    .header-container {
        padding: 0 10px;
    }

    .contact-btn {
        display: none;
    }

    .contact-icon {
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }

    .burger-menu span {
        height: 2px;
        width: 22px;
    }

    .burger-menu {
        display: flex;
        margin-left: 0;
        margin-right: 0;
    }

    .logo img {
        height: 35px;
    }

    .contact-icon {
        font-size: 23px;
        margin-left: 15px;
    }
}