/* ================= HEADER ================= */
.header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
}

.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

/* ================= MOBILE MENU TOGGLE ================= */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #374151;
}

.mobile-menu-toggle:hover {
  color: #2563eb;
}

/* ================= MOBILE MENU ================= */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  z-index: 1000;
  text-align: right; /* because Arabic */
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu .nav-link {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
}

.mobile-menu .nav-link:hover {
  background-color: #f3f4f6;
  color: #2563eb;
}

/* ================= NAV LINKS ================= */
.nav-link {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #2563eb;
  transform: translateY(-2px);
}

.nav-link.active {
  color: #2563eb;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #2563eb;
  border-radius: 1px;
}

/* ================= USAGE COUNTER & CTA ================= */
.usage-counter, .cta-btn {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.cta-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  padding: 10px 25px;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block !important;
  }

  .nav:not(.mobile-menu) {
    display: none;
  }

  /* Hide usage counter and CTA in navbar */
  .usage-counter,
  .cta-btn {
    display: none !important;
  }

  .header-in {
    flex-wrap: wrap;
  }
}

/* ================= FOOTER ================= */
.footer {
  background-color: #1f2937;
  color: #d1d5db;
  padding: 3rem 0 2rem;
}

.footer-brand {
  color: #ffffff;
}

.footer-brand .brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ================= LANGUAGE SWITCHER ================= */
.lang-switcher {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 8px 36px 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
  position: relative;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.lang-switcher:hover {
  border-color: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.lang-switcher:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.lang-switcher:active {
  transform: translateY(1px);
}

.lang-switcher--mobile {
  width: 100%;
  margin: 10px 0 14px;
}

@media (max-width: 768px) {
  .lang-switcher {
    padding: 10px 40px 10px 12px;
  }
}