/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
}

body {
  background-color: #f5f5f5;
}

/* Header styles */
.header {
  background-color: #333;
  color: white;
  padding: 1rem;
  position: fixed;
  width: 100%;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Navigation menu */
.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-right: 2rem; /* Changed from margin-left for RTL */
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #f8c630;
}

/* Burger menu */
.burger {
  display: none;
  cursor: pointer;
}

.burger div {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 5px;
  transition: all 0.3s ease;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%; /* Changed from right to left for RTL */
    top: 70px;
    flex-direction: column;
    background-color: #333;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
  }

  .nav-menu.active {
    left: 0; /* Changed from right to left for RTL */
  }

  .nav-menu li {
    margin: 1.5rem 0;
  }

  .burger {
    display: block;
  }
  
  /* Burger animation */
  .toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .toggle .line2 {
    opacity: 0;
  }
  
  .toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
  }
}

/* Main content padding to prevent header overlap */
main {
  margin-top: 80px;
  padding: 20px;
}

/* RTL specific adjustments */
html[dir="rtl"] .nav-menu li {
  margin-left: 0;
  margin-right: 2rem;
}

html[dir="rtl"] .nav-menu li:last-child {
  margin-right: 0;
}

@media screen and (max-width: 768px) {
  html[dir="rtl"] .nav-menu {
    left: auto;
    right: -100%;
  }
  
  html[dir="rtl"] .nav-menu.active {
    left: auto;
    right: 0;
  }
}