*{
    margin: 0;
    padding: 0;
    color: #ffffff;
   
    letter-spacing: 1px;
    font-weight: 300;
}
body{
    overflow-x: hidden;
}
nav{
    height: 4rem;
    width: 100vw;
    background-color: #004d76d8;
    backdrop-filter: blur(1px);
    box-shadow: 0 3px 20px rgba(238, 234, 234, 0.678);
    display: flex;
    position: fixed;
    z-index: 10;
}

/*Styling logo*/

/* Brand next to logo (badge + Arabic name) */
.brand{
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1vh 1vw;
    text-decoration: none;
    direction: rtl; 
}
.brand-logo{
    height: 4.6rem; 
    width: 3.6rem;
    margin-right: 1rem;

    margin-top:  1.5rem;
    object-fit: cover;

}

.brand-wordmark{
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-direction: row-reverse;
}

/* اسم المنظمة */
.brand-name{
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff; 
    letter-spacing: .5px;
    white-space: nowrap;
}

/* تصغير على الشاشات الصغيرة */
@media screen and (max-width: 800px){
    .brand-logo{ height: 4rem; width: 2.8rem; }
    .brand-name{ font-size: 0.95rem; }
    .brand-badge{ font-size: 0.8rem; padding: 0.35rem 0.5rem; border-radius:8px; }
}
/*Styling Links*/
.nav-links{
    display: flex;
    list-style: none; 
    width: 100vw;
    padding: 0 0.7vw;
    margin-left: 10 vm;
    justify-content:space-evenly;
    align-items: center;
    text-transform: uppercase;
}
.nav-links li a{
    text-decoration: none;
    font-size: 20px;
    margin: 0 0.vw;
}
.nav-links li a:hover {
    color: #072033;
}
.nav-links li {
    position: relative;
}
.nav-links li a::before {
    content: "";
    display: block;
    height: 3px;
    width: 0%;
    background-color: #072033;
    position: absolute;
    transition: all ease-in-out 250ms;
    margin: 0 0 0 10%;
}
.nav-links li a:hover::before{
    width: 100%;
}


.nav-buttons{
    display: flex;
    list-style: none; 
    width: 100vw;
    padding: 0 0.7vw;
    margin-left: 10 vm;
    justify-content:center;
    align-items: center;
    text-transform: uppercase;
}
/*Styling Buttons*/
.login-button{
    background-color: transparent;
    border: 1.5px solid #f2f5f7;
    border-radius: 2em;
     justify-content:space-between;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    cursor: pointer;

}
.login-button:hover {
    color: #131418;
    background-color: #f2f5f7;
    border:1.5px solid #f2f5f7;
    transition: all ease-in-out 350ms;
}
.lang-button{
    color: #ffffff;
    background-color: transparent;
    border: 1.5px solid #f2f5f7;
    border-radius: 2em;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    cursor: pointer;
}
.join-button:hover {
    color: #f2f5f7;
    background-color: transparent;
    border:1.5px solid #f2f5f7;
    transition: all ease-in-out 350ms;
}

/* Mirror navbar when html lang="en"*/

html[lang="en"] nav {
  direction: ltr; 
}

/*  الشعار/الاسم على اليسار والأزرار */
html[lang="en"] .brand {
  order: 0;
  margin-left: 1vw;
  margin-right: auto;
  direction: ltr; 
}

html[lang="en"] .brand-logo {
  margin-left: 1rem;
  margin-right: 0;
}

/* في RTL كنا نستخدم row-reverse — عند الإنجليزية نستخدم row */
html[lang="en"] .brand-wordmark {
  flex-direction: row;
}

html[lang="en"] .nav-links {
  order: 1;
  justify-content: space-evenly;
  text-align: left;
  direction: ltr;
}

html[lang="en"] .nav-links li a::before {
  margin: 0 10% 0 0; 
}

/* تحديث مواضع الهامبرغر والشعار في الشاشات الصغيرة */
@media screen and (max-width: 800px) {
  /* ضع الهامبرغر على اليسار بدل اليمين */
  html[lang="en"] .hamburger {
    right: auto;
    left: 5%;
    transform: translate(5%, -50%);
  }

  html[lang="en"] .logo {
    left: auto;
    right: 4%;
    transform: translateY(-50%);
  }

  html[lang="en"] .nav-links {
    clip-path: circle(50px at 10% -20%);
    -webkit-clip-path: circle(50px at 10% -20%);
  }
  html[lang="en"] .nav-links.open {
    clip-path: circle(1000px at 10% -10%);
    -webkit-clip-path: circle(1000px at 10% -10%);
  }

  /* ألوان نفسregels (تكرار من الأصل لكن مخصص للإنجليزية أيضاً) */
  html[lang="en"] .nav-links.open a,
  html[lang="en"] .nav-links.open li,
  html[lang="en"] .nav-links.open .login-button,
  html[lang="en"] .nav-links.open .lang-button {
    color: #ffffff;
  }
}

/*Styling Hamburger Icon*/
.hamburger div{
    width: 30px;
    height:3px;
    background: #ffffff;
    margin: 5px;
    transition: all 0.3s ease;
}
.hamburger{
    display: none;
}

/*Stying for small screens*/
@media screen and (max-width: 800px){
    nav{
        position: fixed;
        z-index: 5;
    }
    .hamburger{
        display:block;
        position: absolute;
        cursor: pointer;
        left: 5%;
        top: 50%;
        transform: translate(-5%, -50%);
        z-index: 2;
        transition: all 0.7s ease;
    }
    .logo{
        position: absolute;
        left: 4%;
        top: 70%;
        transform: translateY(-50%);
        padding: 0;
        z-index: 20; 
    }
    .logo img{
        height: 3.6rem;
    }
    .nav-links{
        position: fixed;
        background: #072033;
        height: 100vh;
        width: 100%;
        flex-direction: column;
        clip-path: circle(50px at 90% -20%);
        -webkit-clip-path: circle(50px at 90% -10%);
        transition: all 1s ease-out;
        pointer-events: none;
    }
    .nav-links.open{
        clip-path: circle(1000px at 90% -10%);
        -webkit-clip-path: circle(1000px at 90% -10%);
        pointer-events: all;
    }
    .nav-links li{
        opacity: 0;
    }
    .nav-links li:nth-child(1){
        transition: all 0.5s ease 0.2s;
    }
    .nav-links li:nth-child(2){
        transition: all 0.5s ease 0.4s;
    }
    .nav-links li:nth-child(3){
        transition: all 0.5s ease 0.6s;
    }
    .nav-links li:nth-child(4){
        transition: all 0.5s ease 0.7s;
    }
    .nav-links li:nth-child(5){
        transition: all 0.5s ease 0.8s;
    }
    .nav-links li:nth-child(6){
        transition: all 0.5s ease 0.9s;
        margin: 0;
    }
    .nav-links li:nth-child(7){
        transition: all 0.5s ease 1s;
        margin: 0;
    }
    li.fade{
        opacity: 1;
    }

.nav-links.open a,
.nav-links.open li,
.nav-links.open .login-button,
.nav-links.open .lang-button {
  color: #ffffff; 
}

/* ألوان الأزرار (حدود ونص) على الخلفية الداكنة */
.nav-links.open .login-button,
.nav-links.open .lang-button {
  border-color: #ffffff;
  background: transparent;
  color: #ffffff;
}

.nav-links.open a {
  color: #ffffff !important;
}

    /* للغة الإنجليزية في وضع الشاشات الصغيرة */
    html[lang="en"] .hamburger {
        left: auto;
        right: 5%;
        transform: translate(5%, -50%); 
    }

    html[lang="en"] .logo {
        left: 4%;
        right: auto;
        transform: translateY(-50%);
    }

    html[lang="en"] .nav-links {
        clip-path: circle(50px at 90% -20%);
        -webkit-clip-path: circle(50px at 90% -10%);
        text-align: right;
        flex-direction: column !important; 
    }

    html[lang="en"] .nav-links.open {
        clip-path: circle(1000px at 90% -10%);
        -webkit-clip-path: circle(1000px at 90% -10%);
        flex-direction: column !important;
    }

    html[lang="en"] .nav-links li:nth-child(1){
        transition: all 0.5s ease 1s;
    }
    html[lang="en"] .nav-links li:nth-child(2){
        transition: all 0.5s ease 0.9s;
    }
    html[lang="en"] .nav-links li:nth-child(3){
        transition: all 0.5s ease 0.8s;
    }
    html[lang="en"] .nav-links li:nth-child(4){
        transition: all 0.5s ease 0.7s;
    }
    html[lang="en"] .nav-links li:nth-child(5){
        transition: all 0.5s ease 0.6s;
    }
    html[lang="en"] .nav-links li:nth-child(6){
        transition: all 0.5s ease 0.4s;
    }
    html[lang="en"] .nav-links li:nth-child(7){
        transition: all 0.5s ease 0.2s;
    }
}
/*Animating Hamburger Icon on Click*/
.toggle .line1{
    transform: rotate(-45deg) translate(-5px,6px);
}
.toggle .line2{
    transition: all 0.7s ease;
    width:0;
}
.toggle .line3{
    transform: rotate(45deg) translate(-5px,-6px);
}


@keyframes fadeNavLinks {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}