/* Sidebar widgets: recent posts and categories (theme tokens from main.css :root) */

/* ---- نوشته‌های تازه ---- */
.widget_recent_entries nav ul,
.widget_recent_entries ul {
  list-style: none;
  display: grid;
  gap: 2px;
}
.widget_recent_entries li {
  position: relative;
  padding: 10px 14px 10px 12px;
  border-radius: 14px;
  transition: background .25s ease;
}
.widget_recent_entries li + li {
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.widget_recent_entries li:hover {
  background: var(--blush);
  border-top-color: transparent;
}
.widget_recent_entries li:hover + li {
  border-top-color: transparent;
}
.widget_recent_entries li a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.9;
  color: var(--ink);
  padding-right: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.widget_recent_entries li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--rose);
  opacity: .35;
  transition: opacity .25s ease, transform .25s ease;
}
.widget_recent_entries li:hover::before {
  opacity: 1;
  transform: scale(1.25);
}
.widget_recent_entries li:hover a {
  color: var(--rose-d);
}

/* ---- دسته‌ها ---- */
.widget_categories ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.widget_categories li {
  margin: 0;
}
.widget_categories li a {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  padding: 7px 15px;
  border-radius: 99px;
  background: var(--bg);
  color: var(--ink2);
  border: 1px solid var(--line);
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.widget_categories li a:hover,
.widget_categories li.current-cat > a {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
  transform: translateY(-1px);
}

/* widget title line spacing */
.widget_recent_entries h4,
.widget_categories h4 {
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .widget_recent_entries li a { font-size: 13.5px; }
  .widget_categories li a { font-size: 12.5px; padding: 6px 13px; }
}

/* ---- Desktop main menu: keep every item on one line ---- */
@media (min-width: 1025px) {
  .hd { gap: 18px; }
  .primary-nav { min-width: 0; }
  .primary-nav ul { flex-wrap: nowrap; gap: 0; justify-content: space-between; }
  .primary-nav a {
    white-space: nowrap;
    font-size: 13.5px;
    padding: 6px 8px;
    line-height: 1.6;
  }
  .hd .search { width: 170px; }
  .hd .search:focus-within { width: 200px; }
}

/* ---- Homepage "مطالب بیشتر" button ---- */
.pkm-more-wrap { display: flex; justify-content: center; margin: 28px 0 8px; }
.pkm-more {
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 34px;
  border-radius: 99px;
  border: 1px solid var(--rose);
  background: #fff;
  color: var(--rose-d);
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.pkm-more:hover:not(:disabled) { background: var(--rose); color: #fff; }
.pkm-more:disabled { opacity: .6; cursor: default; }
