#header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; 
  padding: 0 5%;
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;
  z-index: 2000;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  direction: ltr;
}

#header.scrolled {
  background: var(--white);
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}


#nav,
.language-selector,


.logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo img {
  height: 60px;   
  width: auto;
  object-fit: contain;
  display: block;
}


#nav { grid-column: 2; justify-self: center; }
.language-selector { grid-column: 3; justify-self: end; }
.logo { grid-column: 1; justify-self: start; font-weight: 700; }


.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
  height: 100%;
}

.nav-links li {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links li a {
  display: flex;
  align-items: center;
  justify-content: center; 
  height: 100%;
  text-decoration: none;
  color: #222;
  font-family: var(--main-font);
  white-space: nowrap;
  padding: 0 5px; 
  line-height: 1;
  font-size: 1rem;
  transition: 0.3s;
}

.nav-links li a:hover { color: var(--primary-orange); }


.lang-btn-clean {
  display: flex;
  align-items: center;
  justify-content: center; 
  height: 100%;           
  gap: 8px;
  padding: 0 10px;        
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: #222;
  line-height: 1;
}


.logo {
  font-size: 1.25rem;
  line-height: 1;
}



body[dir="rtl"] #header {
  
  direction: rtl;
  display: grid;
  grid-template-columns: auto 1fr auto; 
  align-items: center; 
  height: 70px;
}

body[dir="rtl"] .logo {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center; 
}

body[dir="rtl"] #nav {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center; 
}

body[dir="rtl"] .language-selector {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center; 
  height: 100%; 
  margin: 0; 
  padding: 0 10px; 
}



.hamburger {
  display: none; 
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 2001; 
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #002366; 
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}



@media (max-width: 992px) {

  #header { 
    display: flex !important; 
    justify-content: space-between !important; 
    align-items: center !important;
    height: 70px; 
    padding: 0 5% !important;
  }

  .logo {
    display: flex !important;
    z-index: 2002;
    margin-right: auto !important; 
  }
  body[dir="rtl"] .logo {
    margin-right: 0 !important;
    margin-left: auto !important;
  }

  #nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 2rem 0;
    flex-direction: column;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    height: auto;
  }

  #nav.active { 
    display: flex !important; 
  }

  body[dir="rtl"] #nav {
    display: none !important; 
  }
  body[dir="rtl"] #nav.active {
    display: flex !important; 
  }

  .nav-links { 
    flex-direction: column; 
    align-items: center; 
    gap: 1.5rem; 
    height: auto; 
  }
  
  .nav-links li { height: auto; }
  .nav-links li a { height: auto; font-size: 1.1rem; }

  .language-selector { 
    display: flex !important; 
    position: relative;
    z-index: 2010;
    width: fit-content !important; 
    flex-shrink: 0; 
    margin: 0 15px !important;
  }

  .hamburger {
    display: flex !important;
    position: relative;
    z-index: 2010;
    width: 30px !important; 
    flex-shrink: 0;
    margin: 0 !important;
  }
}


@media (max-width: 768px) {
    #header .logo img {
        height: 40px !important; 
        width: auto !important;
        object-fit: contain;
    }

    #header .logo {
        padding: 5px 0;
    }
}

/* =========================================
   ========================================= */

#footer {
  width: 100%;
  height: 100px;
  margin: 0;
  padding: 0; 
  position: relative; 
  z-index: 100;
  background: #f7f7f7;
  border-top: 1px solid #eaeaea;
}

.footer-container {
  padding: 0 5%; 
  height: 100%; 
  direction: ltr;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.footer-logo img.footer-img {
  height: 45px; 
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-logo span {
  font-family: 'Cairo', sans-serif;
  font-weight: 400; 
  font-size: 1.25rem; 
  color: #222;
  margin-left: 10px; 
  line-height: 1;
}

.footer-copy {
  display: flex;
  align-items: center;
  height: 100%;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem; 
  font-weight: 400; 
  color: #222;
  line-height: 1;
}

/* =========================================
   ========================================= */

body[dir="rtl"] .footer-container {
  direction: rtl; 
}

body[dir="rtl"] .footer-logo span {
  margin-left: 0;
  margin-right: 10px;
}



@media (max-width: 992px) {
  #footer {
    height: auto;
    padding: 25px 0; 
  }
  
  .footer-container {
    flex-direction: column; 
    justify-content: center;
    align-items: center; 
    gap: 15px; 
    height: auto;
  }

  .footer-logo {
    justify-content: center; 
    width: 100%;
  }

  .footer-logo span {
    margin: 0 10px; 
  }

  .footer-copy {
    justify-content: center; 
    text-align: center;
    width: 100%;
    font-size: 0.9rem; 
  }
}