body {
    margin: 0;
    overflow-x: hidden;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

body.disabledScroll {
    overflow: hidden;
}

.nav-content {
    margin: auto;
    padding: 0px 30px;
    width: 87%;
}

.navbar {
    position: fixed;
    top: 0;
    z-index: 5;
    width: 100%;
    padding: 25px 0;
    transition: all 0.3s ease;
}

.navbar.sticky {
    padding: 3px 10px;
    z-index: 999;
    border-radius: 50px;
    margin-top: 1%;
    width: 95%;
    margin-right: 2%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #e3e3e3;
    background: rgba(255, 255, 255, 1) !important;
}

.navbar .nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar .logo a {
    text-decoration: none;
}

.navbar .logo a img {
    width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
}

.navbar .menu-list {
    display: inline-flex;
    margin-top: 1%;
}

.menu-list li {
    list-style: none;
}

.menu-list li a {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin-right: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: sans-serif;
}

.menu-list li a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.navbar.sticky .logo a img {
    filter: brightness(1) invert(0);
    padding-top: 15px;
    padding-bottom: 5px;
    width: 140px;
}

.navbar.sticky .menu-list li a {
    color: #1c8270;
}

.icon {
    color: #fff;
    font-size: 23px;
    cursor: pointer;
    display: none;
}

.menu-list .cancel-btn {
    position: absolute;
    right: 30px;
    top: 20px;
    color: #1c8270;
}

.navbar.sticky .icon {
    color: #1c8270;
}

/* Responsive breakpoints for better spacing */
@media (max-width: 1230px) {
    .nav-content {
        padding: 0 60px;
        width: 90%;
    }
}

@media (max-width: 1100px) {
    .nav-content {
        padding: 0 40px;
        width: 92%;
    }
}

@media (max-width: 900px) {
    .nav-content {
        padding: 0 30px;
        width: 95%;
    }
}

/* FIXED MOBILE NAVIGATION FOR RTL */
@media (max-width: 868px) {
    body.disabledScroll {
        overflow: hidden;
    }
    
    .icon {
        display: block;
    }
    
    .icon.hide {
        display: none;
    }
    
    .navbar .menu-list {
        position: fixed;
        height: 100vh;
        width: 100%;
        max-width: 400px;
        /* Changed: slide from right for RTL */
        right: -100%;
        left: auto;
        top: 0px;
        display: block;
        padding: 40px 0;
        text-align: center;
        background: rgba(224, 224, 224, 1);
        transition: all 0.3s ease;
        z-index: 999;
        direction: rtl;
    }
    
    .navbar.show .menu-list {
        /* Changed: slide to right: 0 for RTL */
        right: 0%;
        left: auto;
        margin-top: 0%;
    }
    
    .navbar .menu-list li {
        margin-top: 45px;
    }
    
    .navbar .menu-list li a {
        font-size: 23px;
        color: #1c8270;
        /* Fixed: Remove problematic margin-right animation */
        margin-right: 0;
        margin-left: 0;
        transition: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        display: block;
        padding: 12px 20px;
        /* Add smooth slide-in effect */
        transform: translateX(100px);
        opacity: 0;
    }
    
    .navbar.show .menu-list li a {
        /* Animate items sliding in */
        transform: translateX(0);
        opacity: 1;
        margin-right: 0px;
        margin-left: 0px;
    }
    
    /* Stagger animation for menu items */
    .navbar.show .menu-list li:nth-child(1) a { transition-delay: 0.1s; }
    .navbar.show .menu-list li:nth-child(2) a { transition-delay: 0.2s; }
    .navbar.show .menu-list li:nth-child(3) a { transition-delay: 0.3s; }
    .navbar.show .menu-list li:nth-child(4) a { transition-delay: 0.4s; }
    .navbar.show .menu-list li:nth-child(5) a { transition-delay: 0.5s; }
    
    /* Fix close button position for RTL */
    .menu-list .cancel-btn {
        position: absolute;
        left: 30px; /* Changed from right to left for RTL */
        right: auto;
        top: 20px;
        color: #1c8270;
    }
}

@media (max-width: 380px) {
    .navbar .logo a img {
        width: 120px;
    }
    
    .navbar.sticky .logo a img {
        width: 110px;
    }
}

/* Demo content */
.content {
    margin-top: 120px;
    padding: 50px;
    text-align: center;
}

.content h1 {
    font-size: 2.5rem;
    color: #1c8270;
    margin-bottom: 20px;
}

.content p {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown > a::after {
    content: " ▼";
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.dropdown:hover > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    margin-top: 8%;
    /* Fixed: Use right instead of left for RTL */
    right: 0;
    left: auto;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    width: 140px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    color: #1c8270 !important;
    text-decoration: none;
    padding: 12px 16px;
    font-size: 16px; /* Fixed: was 1px, now proper size */
    font-weight: 400; /* Fixed: was 100, now readable */
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(28, 130, 112, 0.1);
    margin-right: 0 !important;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: rgba(28, 130, 112, 0.1);
    color: #1c8270 !important;
    padding-right: 20px; /* Changed from padding-left for RTL */
    padding-left: 16px;
}

/* Sticky navbar dropdown styles */
.navbar.sticky .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(28, 130, 112, 0.2);
}

.navbar.sticky .dropdown-menu a {
    color: #1c8270 !important;
}

.navbar.sticky .dropdown-menu a:hover {
    background-color: rgba(28, 130, 112, 0.1);
}

/* FIXED MOBILE RESPONSIVE DROPDOWN */
@media (max-width: 868px) {
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: transparent;
        border-radius: 8px;
        margin-top: 10px;
        margin-bottom: 10px;
        border: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        text-align: center;
        direction: rtl;
        width: auto;
    }
    
    .dropdown:hover .dropdown-menu,
    .dropdown.active .dropdown-menu {
        max-height: 200px;
        background: transparent;
    }
    
    .dropdown-menu a {
        padding: 15px 20px;
        font-size: 20px;
        color: #1c8270 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transition: 0.3s ease;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 400;
    }
    
    .dropdown-menu a:hover {
        background-color: rgba(28, 130, 112, 0.1);
        padding-right: 25px; /* Changed from padding-left for RTL */
        padding-left: 20px;
    }
    
    .dropdown > a::after {
        font-size: 14px;
    }
}

#nav-lang-en {
    font-size: 18px;
}

#nav-lang-ar {
    font-size: 19px;
}