/* ===== Header ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.header.scrolled {
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Logo */
.logo img {
  height: 40px;
}

/* Nav */
.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s;
}

.nav a:hover {
  color: #ddd;
}

/* Actions */
.actions {
  display: flex;
  gap: 10px;
}

/* Language Button */
#lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f2f5f2;
  color: #000;
  border: none;
  cursor: pointer;
  font-family: "Cairo";
  transition: all 0.3s ease;
}

#lang-btn span {
  margin-left: 2px;
}

#lang-btn.ar {
  font-family: "Cairo";
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.show {
  display: block;
  opacity: 1;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .header {
    padding: 15px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .actions {
    order: 1;
    justify-self: start;
  }

  .logo {
    order: 2;
    justify-self: center;
  }

  .menu-toggle {
    display: block;
    order: 3;
    justify-self: end;
  }

  .nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: #0f3d24;
    backdrop-filter: none;
    padding: 80px 30px 30px;
    z-index: 1001;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  }

  .nav.show {
    display: flex;
    right: 0;
  }
  
  /* NEW CSS RULE: Change body background when mobile menu is open */
  body.show-nav-body {
    background-color: #0f3d24;
  }

  .nav a {
    color: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 16px;
  }

  .nav a:hover {
    color: #f0f0f0;
    background: rgba(0, 0, 0, 0.1);
    padding: 15px 10px;
  }

  .logo img {
    height: 36px;
  }

  #lang-btn {
    font-size: 12px;
    padding: 5px 10px;
  }
}