/* modules/post-list/assets/module.css */
/* لود فونت ایران‌سنس از CDN داخل خود CSS */
/* --- Local IRANSans (no CDN) --- */
@font-face {
  font-family: 'IRANSans';
  src: url('/modules/header-a/storage/fonts/IRANSans.eot');
  src: url('/modules/header-a/storage/fonts/IRANSans.eot?#iefix') format('embedded-opentype'),
       url('/modules/header-a/storage/fonts/IRANSans.woff2') format('woff2'),
       url('/modules/header-a/storage/fonts/IRANSans.woff') format('woff'),
       url('/modules/header-a/storage/fonts/IRANSans.ttf') format('truetype');
  font-style: normal;
  font-weight: 400; /* اگر وزن‌های جدا دارید، @font-face‌های جدا برای 500/700/800 تعریف کنید */
  font-display: swap;
}

/* اسکوپ فونت برای ماژول پست‌لیست */
.wpl-post-list,
.wpl-post-list * {
  font-family: 'IRANSans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}


/* همه‌چیز اسکوپ‌شده با پیشوند wpl- تا استایل قالب اثری نگذارد */
.wpl-post-list {
  --wpl-gap: 28px;
  --wpl-radius: 16px;
  --wpl-brand: #5b6cff;
  --wpl-brand-2: #7c89ff;
  --wpl-surface: #ffffff;
  --wpl-surface-2: #f5f7ff;
  --wpl-text: #171b2e;
  --wpl-muted: #6d7390;
  --wpl-shadow: 0 10px 24px rgba(23,27,46,.10);
  --wpl-shadow-hover: 0 18px 36px rgba(23,27,46,.16);
  --wpl-badge: linear-gradient(135deg, #5b6cff, #9f85ff);

  direction: rtl;
  text-align: right;

  /* ترتیب فونت: IRANSansX از CDN؛ در صورت عدم دسترسی، به سیستم‌فونت‌ها می‌افتد */
  font-family: "IRANSans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* خنثی‌سازی استایل‌های عمومی قالب */
.wpl-post-list * { box-sizing: border-box; }
.wpl-post-list a { color: inherit; text-decoration: none; }
.wpl-post-list img { max-width: 100%; height: auto; border: none; }

/* Grid 3/2/1 */
.wpl-post-list .wpl-grid { display: grid; gap: var(--wpl-gap);margin-bottom: 15px; }
@media (min-width: 1025px) {
  .wpl-post-list[data-cols-desktop="3"] .wpl-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .wpl-post-list[data-cols-desktop="2"] .wpl-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .wpl-post-list[data-cols-desktop="1"] .wpl-grid { grid-template-columns: repeat(1, minmax(0,1fr)); }
}
@media (min-width: 640px) and (max-width: 1024px) {
  .wpl-post-list[data-cols-tablet="2"] .wpl-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .wpl-post-list[data-cols-tablet="1"] .wpl-grid { grid-template-columns: repeat(1, minmax(0,1fr)); }
}
@media (max-width: 639px) {
  .wpl-post-list[data-cols-mobile="1"] .wpl-grid { grid-template-columns: repeat(1, minmax(0,1fr)); }
  .wpl-post-list[data-cols-mobile="2"] .wpl-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Card */
.wpl-post-list .wpl-card {
  background: var(--wpl-surface) !important;
  border-radius: var(--wpl-radius) !important;
  box-shadow: var(--wpl-shadow) !important;
  overflow: hidden !important;
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .25s ease;
}
.wpl-post-list .wpl-card:hover { transform: translateY(-4px); box-shadow: var(--wpl-shadow-hover); }

/* Thumbnail */
.wpl-post-list .wpl-thumb { position: relative; display: block; overflow: hidden; }
.wpl-post-list .wpl-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease, filter .2s ease, opacity .2s ease;
  filter: none !important; opacity: 1 !important;
}
.wpl-post-list .wpl-thumb:hover img { transform: scale(1.04); }
.wpl-post-list .wpl-ratio-16x9 { aspect-ratio: 16 / 9; }
.wpl-post-list .wpl-ratio-4x3  { aspect-ratio: 4 / 3; }
.wpl-post-list .wpl-ratio-1x1  { aspect-ratio: 1 / 1; }

/* Badge */
.wpl-post-list .wpl-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--wpl-badge); color: #fff;
  padding: 6px 10px; border-radius: 10px;
  font-weight: 700; font-size: 12px; letter-spacing: .2px;
  box-shadow: 0 6px 16px rgba(91,108,255,.35);
  z-index: 2;
}

/* Body */
.wpl-post-list .wpl-meta { padding: 16px 18px 18px; }
.wpl-post-list .wpl-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--wpl-muted); font-size: 12px; font-weight: 500; }
.wpl-post-list .wpl-item { display: inline-flex; align-items: center; gap: 6px; }
.wpl-post-list .wpl-row i { font-size: 13px; }
.wpl-post-list .wpl-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(109,115,144,.5); }

.wpl-post-list .wpl-title { margin: 10px 0 0; font-weight: 800; font-size: 18px; line-height: 1.6; color: var(--wpl-text); }
.wpl-post-list .wpl-title a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wpl-post-list .wpl-excerpt { margin-top: 6px; color: #38405f; font-size: 13px; line-height: 1.9; }

/* Empty */
.wpl-post-list .wpl-empty {
  padding: 24px; border-radius: 12px; text-align: center;
  background: var(--wpl-surface-2); color: var(--wpl-muted);
}

/* Pagination */
.wpl-post-list .wpl-pagination {
  margin-block: 18px; display: flex; align-items: center; justify-content: center; gap: 14px;
  font-weight: 600; font-size: 13px; color: var(--wpl-muted);    padding-block: 10px;
    background: #94cdc03b;
    border-radius: 15px;
}
.wpl-post-list .wpl-pagination a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 12px; text-decoration: none !important;
  background: #eef1ff; color: #3442ff; box-shadow: 0 6px 16px rgba(52,66,255,.14);
}
.wpl-post-list .wpl-pagination a:hover { background: #dee3ff; }

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  .wpl-post-list { --wpl-surface: #151a27; --wpl-surface-2: #1a2030; --wpl-text: #e8ecfb; --wpl-muted: #a1a9bd; }
  .wpl-post-list .wpl-card { box-shadow: 0 12px 28px rgba(0,0,0,.35); }
  .wpl-post-list .wpl-pagination a { background: #2a3352; color: #d7ddff; }
}
