/* header.css - Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  transition: color 0.2s ease;
  position: relative;
  padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cta-green);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--brand-yellow);
  border-radius: 2px;
}

.header-cta {
  display: flex;
  align-items: center;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 1002;
}

.mobile-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Nav Drawer */
.nav-mobile {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100vh - 70px);
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 20px;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 999;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.nav-mobile.open {
  transform: translateX(0);
}

.nav-mobile .nav-link {
  font-size: 1.15rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

body.menu-open {
  overflow: hidden;
}

@media (max-width: 880px) {
  .header {
    height: 70px;
  }
  .nav-desktop, .header-cta {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
}

/* Language Switcher Styling */
.lang-switcher-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-alt);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-left: 16px;
}

.lang-btn {
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--cta-green);
}

.lang-btn.active {
  background-color: var(--cta-green);
  color: #FFFFFF;
}

/* RTL Support for Arabic Language */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .hero-section::before {
  right: auto;
  left: 0;
}

html[dir="rtl"] .ranking-card.top-1::before {
  left: auto;
  right: 20px;
}

html[dir="rtl"] .ranking-card {
  grid-template-columns: 220px 1fr 180px 60px;
}

html[dir="rtl"] .lang-switcher-wrap {
  margin-left: 0;
  margin-right: 16px;
}

@media (max-width: 920px) {
  html[dir="rtl"] .ranking-card {
    grid-template-columns: 1fr 140px 50px;
  }
}
