.elementor-widget-mehrad_latest_articles .elementor-widget-container { overflow: visible; }

.mehrad-latest-articles {
  --mehrad-articles-card-bg: #ffffff;
  --mehrad-articles-border: #dce3ec;
  --mehrad-articles-title: #0b1d3a;
  --mehrad-articles-meta: #5c6b82;
  --mehrad-articles-link: #344963;
  --mehrad-articles-image-bg: #edf2f7;
  --mehrad-articles-gap: 14px;
  --mehrad-articles-per-view: 5;
  width: 100%;
  max-width: 100%;
  direction: rtl;
  overflow-anchor: none;
}

.mehrad-latest-articles__placeholder {
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  color: #64748b;
  text-align: center;
}

.mehrad-latest-articles__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  direction: rtl;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: grab;
  overflow-anchor: none;
}
.mehrad-latest-articles__viewport::-webkit-scrollbar { display: none; }
.mehrad-latest-articles.is-dragging .mehrad-latest-articles__viewport { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }

.mehrad-latest-articles__track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--mehrad-articles-gap);
  min-width: 100%;
  direction: rtl;
}

.mehrad-latest-articles__card {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - (var(--mehrad-articles-gap) * (var(--mehrad-articles-per-view) - 1))) / var(--mehrad-articles-per-view));
  min-width: 0;
  padding: 14px 14px 18px;
  border: 1px solid var(--mehrad-articles-border);
  border-radius: 18px;
  background: var(--mehrad-articles-card-bg);
  scroll-snap-align: start;
  direction: rtl;
  box-sizing: border-box;
}

.mehrad-latest-articles__image-link {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 13px;
  background: var(--mehrad-articles-image-bg);
  text-decoration: none !important;
}
.mehrad-latest-articles__image,
.mehrad-latest-articles__image-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mehrad-latest-articles__image-placeholder { background: linear-gradient(135deg, var(--mehrad-articles-image-bg), color-mix(in srgb, var(--mehrad-articles-image-bg) 70%, #fff)); }

.mehrad-latest-articles__title {
  display: -webkit-box;
  min-height: 3em;
  margin: 16px 0 24px;
  overflow: hidden;
  color: var(--mehrad-articles-title);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
  text-align: right;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mehrad-latest-articles__title a { color: inherit; text-decoration: none !important; }

.mehrad-latest-articles__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--mehrad-articles-meta);
  font-size: 12px;
  font-weight: 500;
}
.mehrad-latest-articles__read-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mehrad-articles-link);
  text-decoration: none !important;
  white-space: nowrap;
  direction: ltr;
}
.mehrad-latest-articles__read-more span { direction: rtl; }
.mehrad-latest-articles__arrow { width: 14px; height: 14px; fill: currentColor; stroke: none; }

html.dark .mehrad-latest-articles {
  --mehrad-articles-card-bg: #1f2937;
  --mehrad-articles-border: #374151;
  --mehrad-articles-title: #f8fafc;
  --mehrad-articles-meta: #a7b4c8;
  --mehrad-articles-link: #d7e0ec;
  --mehrad-articles-image-bg: #111827;
}

@media (max-width: 1024px) {
  .mehrad-latest-articles { --mehrad-articles-per-view: 2.2; }
}

@media (max-width: 767px) {
  .mehrad-latest-articles { --mehrad-articles-per-view: 1.15; --mehrad-articles-gap: 12px; }
  .mehrad-latest-articles__card { padding: 12px 12px 16px; border-radius: 16px; }
  .mehrad-latest-articles__title { font-size: 13px; margin-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .mehrad-latest-articles__viewport { scroll-behavior: auto; }
}

/* Mehrad v1.0.36 — ensure article thumbnails completely fill the image frame. */
.mehrad-latest-articles__image-link {
  position: relative;
  padding: 0;
  line-height: 0;
}

.mehrad-latest-articles__image-link > img.mehrad-latest-articles__image {
  position: absolute;
  inset: 0;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  object-fit: cover !important;
  object-position: center center;
}
