/* ════════════════════════════════════════════════
   ویجت المنتور آزمون یار دانش — گرید کارت‌های آزمون
   ════════════════════════════════════════════════ */
.vqazw-wrap { width: 100%; }
.vqazw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.vqazw-empty {
  text-align: center; padding: 40px 20px; color: #9ca3af;
  background: #f8fafc; border-radius: 14px; font-size: 15px;
}

/* ── کارت ── */
.vqazw-card {
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(16,24,40,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.vqazw-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(16,24,40,.12); }

/* ── تصویر ── */
.vqazw-card-image {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #f1f5f9;
}
.vqazw-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vqazw-card-image-link { display: block; width: 100%; height: 100%; cursor: pointer; }
.vqazw-card-image-link img { transition: transform .35s ease; }
.vqazw-card-image-link:hover img { transform: scale(1.05); }
.vqazw-noimg {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #e0e7ff, #f1f5f9);
}

/* ── برچسب وضعیت ── */
.vqazw-badge {
  position: absolute;
  top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px; font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  backdrop-filter: blur(2px);
}
.vqazw-badge-soon             { background: #f59e0b; }
.vqazw-badge-running          { background: #10b981; }
.vqazw-badge-ending           { background: #ef4444; }
.vqazw-badge-awaiting_results { background: #6b7280; }
.vqazw-badge-results_ready    { background: #6b7280; }

/* نقطه‌ی متحرک برای «در حال برگزاری» */
.vqazw-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  animation: vqwPulse 1.4s infinite;
}
@keyframes vqwPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.7); }
}

/* ── بدنه ── */
.vqazw-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.vqazw-title {
  font-size: 17px; font-weight: 800; line-height: 1.6;
  color: #1f2937; margin: 0 0 8px;
}
.vqazw-excerpt {
  font-size: 13.5px; line-height: 1.9; color: #6b7280;
  margin: 0 0 14px;
}

/* ── متادیتا ── */
.vqazw-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12.5px; color: #9ca3af;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f3f7;
}
.vqazw-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.vqazw-meta-item svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── شمارنده ── */
.vqazw-countdown-label {
  font-size: 12px; color: #9ca3af; margin-bottom: 8px; text-align: center;
}
.vqazw-countdown {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 14px; margin-top: auto;
}
.vqazw-cd-box {
  background: #fef3c7;
  border-radius: 12px;
  padding: 10px 4px;
  text-align: center;
}
.vqazw-cd-num {
  display: block; font-size: 20px; font-weight: 800; color: #92400e; line-height: 1.2;
}
.vqazw-cd-lbl { display: block; font-size: 11px; color: #b45309; margin-top: 2px; }

/* ── دکمه‌ها ── */
.vqazw-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 30px;
  font-family: inherit; font-size: 14.5px; font-weight: 700;
  border: none; cursor: pointer;
  text-decoration: none;
  margin-top: auto;
  transition: filter .15s ease, opacity .15s ease;
}
.vqazw-btn svg { width: 18px; height: 18px; }

/* دکمه‌ی جزئیات (پیش‌فرض رنگ اصلی المنتور) */
.vqazw-btn-primary {
  background: var(--e-global-color-primary, #16a394);
  color: #fff;
}
.vqazw-btn-primary:hover { filter: brightness(1.08); color: #fff; }

/* دکمه‌ی «در انتظار اعلام نتایج» — متن خاکستری تیره روی پس‌زمینه‌ی خاکستری روشن (کنتراست مناسب) */
.vqazw-btn-awaiting {
  background: #e5e7eb;
  color: #4b5563;
  cursor: default;
}

/* ── آزمون غیرفعال: کارت محو با برچسب ── */
.vqazw-card.vqazw-status-inactive {
  opacity: .55;
  filter: grayscale(.4);
  position: relative;
}
.vqazw-card.vqazw-status-inactive:hover { opacity: .7; }
.vqazw-badge-inactive {
  background: #9ca3af !important;
  color: #fff !important;
}

/* دکمه‌ی «نتایج اعلام شد» — پس‌زمینه‌ی متغیر secondary المنتور، متن رنگ پیش‌فرض */
.vqazw-btn-results {
  background: var(--e-global-color-secondary, #54595f);
  color: var(--e-global-color-text, #fff);
}
.vqazw-btn-results:hover { filter: brightness(1.06); }

/* ── مودال برندگان (طراحی مدرن، پس‌زمینه سفید) ── */
.vqazw-modal {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(3px);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.vqazw-modal-box {
  background: #ffffff;
  color: #1f2937;
  border-radius: 20px;
  width: 100%; max-width: 540px;
  max-height: 86vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.4);
  animation: vqwModalIn .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes vqwModalIn { from { transform: scale(.94) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

/* سربرگ با گرادیان ملایم رنگ secondary */
.vqazw-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--e-global-color-secondary, #54595f), color-mix(in srgb, var(--e-global-color-secondary, #54595f) 80%, #000));
  color: #fff;
}
.vqazw-modal-title { margin: 0; font-size: 19px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 9px; }
.vqazw-modal-title::before { content: "🏆"; font-size: 22px; }
.vqazw-modal-close {
  background: rgba(255,255,255,.2); border: none;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 22px; line-height: 1; cursor: pointer; color: #fff;
  transition: background .15s;
}
.vqazw-modal-close:hover { background: rgba(255,255,255,.35); }
.vqazw-modal-body { padding: 16px 20px 22px; overflow-y: auto; background: #ffffff; }

/* لیست برندگان — کارت‌محور و مدرن */
.vqazw-winners-list { display: flex; flex-direction: column; gap: 10px; }
.vqazw-winner-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  transition: transform .15s, box-shadow .15s;
}
.vqazw-winner-item:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.07); }

/* رتبه — مدال‌مانند */
.vqazw-winner-rank {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-weight: 800; font-size: 16px;
  background: #e2e8f0; color: #475569;
}
.vqazw-winner-item:nth-child(1) .vqazw-winner-rank { background: linear-gradient(135deg,#fde68a,#f59e0b); color: #7c2d12; box-shadow: 0 3px 10px rgba(245,158,11,.4); }
.vqazw-winner-item:nth-child(2) .vqazw-winner-rank { background: linear-gradient(135deg,#e5e7eb,#9ca3af); color: #374151; }
.vqazw-winner-item:nth-child(3) .vqazw-winner-rank { background: linear-gradient(135deg,#fed7aa,#c2814e); color: #7c2d12; }

.vqazw-winner-info { flex: 1; min-width: 0; }
.vqazw-winner-name { font-size: 15px; font-weight: 700; color: #1f2937; margin-bottom: 2px; }
.vqazw-winner-note { font-size: 12.5px; color: #64748b; }
.vqazw-winner-score {
  flex-shrink: 0;
  font-size: 14px; font-weight: 800;
  color: var(--e-global-color-primary, #16a394);
  background: color-mix(in srgb, var(--e-global-color-primary, #16a394) 12%, #fff);
  padding: 5px 12px; border-radius: 20px;
}

.vqazw-winners-empty { text-align: center; padding: 30px; color: #94a3b8; font-size: 14px; }
.vqazw-modal-loading { text-align: center; padding: 30px; color: #64748b; }

/* واکنش‌گرایی پیش‌فرض (وقتی کاربر ستون responsive تنظیم نکرده) */
@media (max-width: 1024px) {
  .vqazw-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .vqazw-grid { grid-template-columns: 1fr; }
  .vqazw-modal-box { max-height: 92vh; }
}
