/* ============================================================
   NAJHIN PRO — Custom styles complementing Tailwind
   ============================================================ */

html {
  scroll-behavior: smooth;
}

body {
  font-feature-settings: "tnum";
}

[dir="rtl"] .fa-chevron-left,
[dir="rtl"] .flip-rtl {
  transform: scaleX(-1);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(120, 130, 150, 0.35);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 130, 150, 0.55);
}

/* Nav link */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  color: rgba(255,255,255,0.72);
  font-weight: 600;
  font-size: 0.925rem;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.nav-link.active {
  background: linear-gradient(90deg, rgba(34,168,98,0.9), rgba(21,132,80,0.9));
  color: #fff;
  box-shadow: 0 4px 14px rgba(21,132,80,0.35);
}
.nav-link i {
  width: 1.25rem;
  text-align: center;
}

/* Card hover lift */
.card-hover {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -8px rgba(15, 84, 54, 0.18);
}

/* Option button */
.option-btn {
  transition: all 0.15s ease;
}
.option-btn.selected {
  border-color: #22a862 !important;
  background-color: rgba(34,168,98,0.08) !important;
  box-shadow: 0 0 0 3px rgba(34,168,98,0.15);
}
.option-btn.correct {
  border-color: #22a862 !important;
  background-color: rgba(34,168,98,0.12) !important;
}
.option-btn.incorrect {
  border-color: #c1272d !important;
  background-color: rgba(193,39,45,0.1) !important;
}
.option-btn.dim {
  opacity: 0.55;
}
.option-btn:disabled {
  cursor: default;
}

/* Progress ring animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
  animation: fadeInUp 0.35s ease both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast {
  animation: toastIn 0.25s ease both;
  pointer-events: auto;
}

/* Timer pulse when low */
@keyframes pulseWarn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(193,39,45,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(193,39,45,0); }
}
.timer-warn {
  animation: pulseWarn 1.2s infinite;
}

/* Progress bar */
.progress-track {
  background: rgba(120,130,150,0.18);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #43c67d, #158450);
  transition: width 0.3s ease;
}

/* Print-safe */
img {
  -webkit-user-drag: none;
}

/* RTL font */
[lang="ar"], .font-arabic {
  font-family: 'Tajawal', 'Inter', sans-serif;
}

/* Utility: line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
