/**
 * STANDARD NAVBAR - LTR/RTL RESPONSIVE
 * Clean flexbox layout for Desktop, Tablet, Mobile
 */

/* ===========================
   CSS RESET FOR NAVBAR
   =========================== */
.navbar,
.navbar * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===========================
   BASE NAVBAR
   =========================== */
.navbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  width: 100%;
  height: 70px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
}

/* ===========================
   LOGO
   =========================== */
.nav-logo {
  flex-shrink: 0;
  z-index: 10;
  margin-inline-start: 0;
}

.nav-logo a {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 42px;
  width: auto;
}

/* ===========================
   NAVIGATION MENU (DESKTOP)
   =========================== */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

/* ===========================
   LANGUAGE SWITCHER
   =========================== */
.nav-language {
  position: relative;
  z-index: 100;
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  color: #374151;
  transition: all 0.2s ease;
}

.lang-toggle-label {
  display: none;
  font-size: 14px;
  font-weight: 500;
}

.lang-toggle:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.lang-toggle:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 140px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  list-style: none;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.lang-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown li {
  list-style: none;
}

.lang-option {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.lang-option:hover {
  background: #f3f4f6;
  color: #2563eb;
}

/* ===========================
   HAMBURGER BUTTON
   =========================== */
.nav-actions {
  display: none;
  z-index: 10;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 0;
}

.hamburger:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 6px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #374151;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===========================
   TABLET BREAKPOINT (≤ 1024px)
   =========================== */
@media (max-width: 1024px) {
  .nav-actions {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    inset-inline: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: max-height 0.35s ease, padding 0.35s ease;
  }

  .nav-menu.active {
    max-height: calc(100vh - 70px);
    padding: 16px 24px 24px;
    overflow-y: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-links li {
    border-bottom: 1px solid #f3f4f6;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    padding: 16px 0;
    font-size: 16px;
    border-radius: 0;
    text-align: start;
  }

  html[dir="rtl"] .nav-links a {
    text-align: start;
  }

  .nav-links a:hover {
    background: transparent;
    color: #2563eb;
  }

  /* Language Switcher - Mobile */
  .nav-language {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
  }

  .lang-toggle {
    width: 100%;
    height: 48px;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    background: #f9fafb;
  }

  .lang-toggle-label {
    display: inline;
  }

  .lang-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 8px 0 0;
    display: none;
  }

  .lang-dropdown.active {
    display: block;
  }

  .lang-option {
    text-align: center;
    padding: 14px;
    background: #f3f4f6;
    margin-bottom: 8px;
    border-radius: 8px;
  }

  .lang-option:last-child {
    margin-bottom: 0;
  }

  .lang-option:hover {
    background: #e5e7eb;
  }
}

/* ===========================
   MOBILE BREAKPOINT (≤ 768px)
   =========================== */
@media (max-width: 768px) {
  .navbar {
    height: 60px;
  }

  .nav-inner {
    padding-inline: 16px;
  }

  .logo-img {
    height: 36px;
  }

  .nav-menu {
    top: 60px;
  }

  .nav-menu.active {
    max-height: calc(100vh - 60px);
    padding: 12px 16px 20px;
  }

  .nav-links a {
    padding: 14px 0;
    font-size: 15px;
  }

  .hamburger {
    width: 40px;
    height: 40px;
  }

  .hamburger span {
    width: 20px;
  }
}

/* ===========================
   SMALL MOBILE (≤ 480px)
   =========================== */
@media (max-width: 480px) {
  .navbar {
    height: 56px;
  }

  .nav-inner {
    padding-inline: 12px;
  }

  .logo-img {
    height: 32px;
  }

  .nav-menu {
    top: 56px;
  }

  .nav-menu.active {
    max-height: calc(100vh - 56px);
  }
}
