/* ==========================================================================
   استایل‌های مخصوص وردپرس
   محتوای مقالات، صفحه‌بندی، دیدگاه‌ها، جستجو و کلاس‌های داخلی وردپرس
   ========================================================================== */

/* ---------- محتوای مقاله (prose) ---------- */
.container--narrow { max-width: 820px; }

.prose { font-size: 1.03rem; line-height: 2.1; color: var(--text-dim); }
.prose > * + * { margin-top: 1.3rem; }

.prose h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--text); margin-top: 2.6rem; }
.prose h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--text); margin-top: 2rem; }
.prose h4 { font-size: 1.1rem; color: var(--text); margin-top: 1.6rem; }

.prose a { color: var(--brand-1); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.prose a:hover { color: var(--brand-2); }

.prose strong, .prose b { color: var(--text); font-weight: 800; }

.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose li { margin-bottom: .55rem; }
.prose ul li::marker { color: var(--brand-2); }
.prose ol li::marker { color: var(--brand-2); font-weight: 700; }

.prose blockquote {
  border-inline-start: 3px solid var(--brand-2);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
  font-size: 1.05rem;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose img,
.prose video,
.prose iframe { max-width: 100%; height: auto; border-radius: var(--radius); }

.prose figure { margin: 2rem 0; }
.prose figcaption { font-size: .85rem; color: var(--text-faint); text-align: center; margin-top: .6rem; }

.prose code {
  background: var(--surface-2);
  padding: .16em .45em;
  border-radius: 6px;
  font-size: .88em;
  direction: ltr;
  display: inline-block;
}
.prose pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}
.prose pre code { background: none; padding: 0; }

.prose table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: .7rem .9rem; text-align: right; }
.prose th { background: var(--surface); color: var(--text); font-weight: 700; }

.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* تصویر شاخص بالای مقاله */
.post-hero { margin-bottom: 2.5rem; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.post-hero img { width: 100%; height: auto; display: block; }

/* اطلاعات مقاله زیر عنوان */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  font-size: .88rem;
  color: var(--text-faint);
  margin-top: 1rem;
}

/* تصویر شاخص روی کارت مقاله */
.post-card__thumb--img { padding: 0; overflow: hidden; }
.post-card__thumb--img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- صفحه‌بندی ---------- */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 3.5rem;
}
.pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 .85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-weight: 700;
  font-size: .92rem;
  transition: all .25s;
}
.pagination .page-numbers:hover { color: var(--text); border-color: var(--border-strong); }
.pagination .page-numbers.current {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(249, 115, 22, .7);
}
.pagination .dots { border: 0; background: none; }

/* ---------- فرم جستجو ---------- */
.search-form { display: flex; gap: .6rem; }
.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
}
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .18);
}
.search-form button { flex-shrink: 0; padding-inline: 1.1rem; }

/* ---------- دیدگاه‌ها ---------- */
.comment-list { list-style: none; padding: 0; display: grid; gap: 1.2rem; }
.comment-list ul.children { list-style: none; padding-inline-start: 1.6rem; margin-top: 1.2rem; display: grid; gap: 1.2rem; }
.comment-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
}
.comment-author { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text); }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .8rem; color: var(--text-faint); margin: .3rem 0 .8rem; }
.comment-reply-link { font-size: .85rem; color: var(--brand-1); font-weight: 700; }

.comment-respond { margin-top: 2.5rem; }
.comment-respond .comment-reply-title { font-size: 1.3rem; color: var(--text); margin-bottom: 1.2rem; }
.comment-form { display: grid; gap: 1rem; }
.comment-form label { display: block; font-size: .88rem; font-weight: 600; color: var(--text-dim); margin-bottom: .4rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
}
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .18);
}
.comment-form .submit {
  justify-self: start;
  padding: .85rem 1.8rem;
  border: 0;
  border-radius: 100px;
  background: var(--gradient);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(249, 115, 22, .65);
}

/* ---------- کلاس‌های استاندارد وردپرس ---------- */
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { width: min(100%, 1100px); margin-inline: auto; }
.alignfull { width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--text-faint); text-align: center; margin-top: .5rem; }
.sticky { position: relative; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.page-links { margin-top: 2rem; font-weight: 700; }
.page-links a { color: var(--brand-1); }

/* لوگوی سفارشی وردپرس */
.logo .custom-logo { max-height: 44px; width: auto; }

/* منوی موبایل از wp_nav_menu */
.mobile-nav__inner { display: contents; }

/* پرش به محتوا */
.skip-link:focus {
  position: fixed;
  top: 1rem;
  inset-inline-start: 1rem;
  width: auto; height: auto;
  clip: auto;
  z-index: 10000;
  padding: .7rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
}

/* نوار مدیریت وردپرس */
.admin-bar .header { top: 32px; }
@media (max-width: 782px) { .admin-bar .header { top: 46px; } }
