/**
 * نوار «هاب محتوا» صفحه‌ی اصلی (کدنیم: dl-home-hub)
 *
 * این فایل فقط در صفحه‌ی اصلی بارگذاری می‌شود (inc/home-content-hub.php).
 * دو کار می‌کند: بنر بنفش قدیمی را مخفی می‌کند و نوار تازه را استایل می‌دهد.
 *
 * منطق رنگ
 * ---------
 * زمینه‌ی نوار یک تینتِ بنفشِ خیلی کم‌رنگ است تا بین دو اسلایدر سفیدِ
 * بالا و پایین، «یک بلوک» دیده شود. هر ستون رنگ خودش را دارد:
 * بنفش برای ویدیو، فیروزه‌ای برای پادکست، کهربایی برای مقاله. رنگ سه جا
 * می‌نشیند و نه بیشتر: نوار بالای کارت، آیکن، و متن دکمه — بقیه خنثی
 * می‌ماند تا صفحه شلوغ نشود.
 */

/* بنر قدیمی — مخفی، نه حذف؛ برگرداندنش یک خط کار است. */
body.home .elementor-element.elementor-element-451fb34 {
  display: none !important;
}

.dl-hub {
  --dlhub-ink: #17161f;
  --dlhub-ink-2: #3f3d4d;
  --dlhub-muted: #6c6a7c;
  --dlhub-paper: #ffffff;
  --dlhub-edge: #ece9f8;

  --dlhub-violet: #7c5cf5;
  --dlhub-violet-deep: #5a3fd6;
  --dlhub-violet-tint: #f3efff;
  --dlhub-violet-line: #e0d9fb;

  --dlhub-teal: #12a898;
  --dlhub-teal-deep: #0b8175;
  --dlhub-teal-tint: #e6f7f4;
  --dlhub-teal-line: #c9eae5;

  --dlhub-amber: #f0890f;
  --dlhub-amber-deep: #c96a07;
  --dlhub-amber-tint: #fdf2e4;
  --dlhub-amber-line: #f6dfc2;

  box-sizing: border-box;
  position: relative;
  width: 100%;
  padding-block: 40px 44px;
  border-top: 1px solid var(--dlhub-edge);
  border-bottom: 1px solid var(--dlhub-edge);
  background:
    radial-gradient(70% 120% at 88% 0%, rgba(124, 92, 245, 0.1) 0%, rgba(124, 92, 245, 0) 62%),
    radial-gradient(60% 110% at 6% 100%, rgba(18, 168, 152, 0.08) 0%, rgba(18, 168, 152, 0) 60%),
    linear-gradient(180deg, #faf9ff 0%, #f7f5fe 60%, #fbfaff 100%);
  font-family: inherit;
  color: var(--dlhub-ink);
  direction: rtl;
}

.dl-hub *,
.dl-hub *::before,
.dl-hub *::after {
  box-sizing: border-box;
}

.dl-hub__inner {
  position: relative;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ---------- سربرگ ---------- */

.dl-hub__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.dl-hub__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(124, 92, 245, 0.12);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--dlhub-violet-deep);
}

.dl-hub .dl-hub__h {
  margin: 0;
  padding: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: -0.3px;
  color: var(--dlhub-ink);
}

.dl-hub .dl-hub__sub {
  margin: 5px 0 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--dlhub-muted);
}

.dl-hub .dl-hub__all {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, #8368ff 0%, #6a4bea 100%);
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  box-shadow:
    0 6px 16px rgba(90, 63, 214, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dl-hub .dl-hub__all:hover,
.dl-hub .dl-hub__all:focus-visible {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow:
    0 10px 22px rgba(90, 63, 214, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

/* ---------- ستون‌ها ---------- */

.dl-hub__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dl-hub .dl-hub__card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px 18px 18px;
  border: 1px solid;
  border-radius: 16px;
  background: var(--dlhub-paper);
  color: var(--dlhub-ink);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(28, 22, 60, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* نوار رنگی بالای هر کارت */
.dl-hub .dl-hub__card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 4px;
}

.dl-hub .dl-hub__card:hover,
.dl-hub .dl-hub__card:focus-visible {
  transform: translateY(-4px);
}

.dl-hub__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.dl-hub__ico {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.dl-hub__svg {
  width: 19px;
  height: 19px;
  display: block;
}

.dl-hub__kind {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.dl-hub__count {
  margin-inline-start: auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.dl-hub__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--dlhub-ink);
}

.dl-hub__meta {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--dlhub-muted);
}

/* ردیف پایانی به کف کارت می‌چسبد تا هر سه ستون هم‌تراز بمانند. */
.dl-hub__go {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid;
  font-size: 13.5px;
  font-weight: 700;
}

.dl-hub__meta + .dl-hub__go,
.dl-hub__title + .dl-hub__go {
  margin-top: 16px;
}

.dl-hub__arrow {
  width: 14px;
  height: 14px;
  display: block;
  transition: transform 0.18s ease;
}

.dl-hub .dl-hub__card:hover .dl-hub__arrow,
.dl-hub .dl-hub__all:hover .dl-hub__arrow {
  transform: translateX(-4px);
}

/* ---- بنفش: دوره ویدیویی ---- */

.dl-hub .dl-hub__card--video {
  border-color: var(--dlhub-violet-line);
}

.dl-hub .dl-hub__card--video::before {
  background: linear-gradient(90deg, var(--dlhub-violet-deep), var(--dlhub-violet));
}

.dl-hub .dl-hub__card--video:hover {
  box-shadow: 0 14px 30px rgba(90, 63, 214, 0.16);
}

.dl-hub__card--video .dl-hub__ico {
  background: linear-gradient(145deg, #8b72ff, var(--dlhub-violet-deep));
}

.dl-hub__card--video .dl-hub__kind,
.dl-hub__card--video .dl-hub__go {
  color: var(--dlhub-violet-deep);
}

.dl-hub__card--video .dl-hub__count {
  background: var(--dlhub-violet-tint);
  color: var(--dlhub-violet-deep);
}

.dl-hub__card--video .dl-hub__go {
  border-top-color: var(--dlhub-violet-line);
}

/* ---- فیروزه‌ای: پادکست ---- */

.dl-hub .dl-hub__card--podcast {
  border-color: var(--dlhub-teal-line);
}

.dl-hub .dl-hub__card--podcast::before {
  background: linear-gradient(90deg, var(--dlhub-teal-deep), var(--dlhub-teal));
}

.dl-hub .dl-hub__card--podcast:hover {
  box-shadow: 0 14px 30px rgba(11, 129, 117, 0.16);
}

.dl-hub__card--podcast .dl-hub__ico {
  background: linear-gradient(145deg, #1cc0ad, var(--dlhub-teal-deep));
}

.dl-hub__card--podcast .dl-hub__kind,
.dl-hub__card--podcast .dl-hub__go {
  color: var(--dlhub-teal-deep);
}

.dl-hub__card--podcast .dl-hub__count {
  background: var(--dlhub-teal-tint);
  color: var(--dlhub-teal-deep);
}

.dl-hub__card--podcast .dl-hub__go {
  border-top-color: var(--dlhub-teal-line);
}

/* ---- کهربایی: مقاله ---- */

.dl-hub .dl-hub__card--article {
  border-color: var(--dlhub-amber-line);
}

.dl-hub .dl-hub__card--article::before {
  background: linear-gradient(90deg, var(--dlhub-amber-deep), var(--dlhub-amber));
}

.dl-hub .dl-hub__card--article:hover {
  box-shadow: 0 14px 30px rgba(201, 106, 7, 0.16);
}

.dl-hub__card--article .dl-hub__ico {
  background: linear-gradient(145deg, #fa9f2c, var(--dlhub-amber-deep));
}

.dl-hub__card--article .dl-hub__kind,
.dl-hub__card--article .dl-hub__go {
  color: var(--dlhub-amber-deep);
}

.dl-hub__card--article .dl-hub__count {
  background: var(--dlhub-amber-tint);
  color: var(--dlhub-amber-deep);
}

.dl-hub__card--article .dl-hub__go {
  border-top-color: var(--dlhub-amber-line);
}

/* ---------- موبایل و تبلت ---------- */

@media (max-width: 1024px) {
  .dl-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .dl-hub {
    padding-block: 28px 30px;
  }

  .dl-hub__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dl-hub .dl-hub__h {
    font-size: 20px;
  }

  .dl-hub__head {
    align-items: flex-start;
  }

  .dl-hub .dl-hub__all {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dl-hub .dl-hub__card,
  .dl-hub .dl-hub__all,
  .dl-hub__arrow {
    transition: none;
  }
}
