/* ================================================
   WordPress-specific additions
   ترخیص‌کاری Theme
   ================================================ */

/* ---- Blog post grid / cards: handled by blog.css ---- */
/* (Removed conflicting .post-card / .posts-grid rules — blog.css is authoritative) */

/* ---- Pagination ---- */
.pagination { margin: 32px 0; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 8px; border-radius: var(--radius); border: 1px solid var(--border); margin: 0 3px; font-size: 14px; color: var(--text); text-decoration: none; transition: all .2s; }
.pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .page-numbers:hover:not(.current) { background: var(--bg-soft); }
.pagination ul { list-style: none; padding: 0; margin: 0; display: flex; justify-content: center; gap: 4px; }
.pagination ul li { display: inline; }

/* ---- Post card meta (used in blog cards) ---- */
.post-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.post-meta a { color: var(--primary); }
.no-posts { text-align: center; padding: 60px 0; color: var(--text-muted); }

/* ---- Blog banner ---- */
.blog-banner { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); padding: 56px 0 48px; color: #fff; }
.blog-banner-sm { padding: 28px 0 24px; }
.blog-banner-title { font-size: clamp(28px, 4vw, 46px); font-weight: 800; margin: 0 0 8px; }
.blog-banner-sub { font-size: 16px; color: rgba(255,255,255,0.75); margin: 0 0 20px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.breadcrumb a { color: rgba(255,255,255,0.75); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,0.5); }
.blog-banner .breadcrumb span:last-child { color: rgba(255,255,255,0.85); }

/* ---- WhatsApp button ---- */
.btn-wa { background: #25D366; color: #fff; border-color: #25D366; }
.btn-wa:hover { background: #1ebe5d; }
.btn-full { width: 100%; justify-content: center; display: flex; }

/* ---- Comments ---- */
.comments-area { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 32px; }
.comments-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-body { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-author img { border-radius: 50%; }
.comment-author .fn { font-weight: 600; font-size: 14px; }
.comment-metadata { font-size: 12px; color: var(--text-muted); }
.comment-content p { font-size: 15px; margin: 0; line-height: 1.7; }
.comment-form input, .comment-form textarea, .comment-form select { width: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; font-family: inherit; font-size: 15px; color: var(--text); direction: rtl; transition: border-color .2s; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--primary); }
.comment-reply-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }

/* ---- Util bar WhatsApp ---- */
.util-wa { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; background: #25D366; color: #fff; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; text-decoration: none; transition: background .2s; }
.util-wa svg { width: 14px; height: 14px; }
.util-wa:hover { background: #1ebe5d; }

/* ---- Category filter bar ---- */
.blog-filter-bar { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 64px; z-index: 10; }
.blog-filter-bar .blog-filter-inner { display: flex; gap: 4px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.blog-filter-bar .blog-filter-inner::-webkit-scrollbar { display: none; }
/* blog.css .blog-filter uses its own .blog-filter-inner — don't conflict */
.filter-count { background: rgba(255,255,255,.25); border-radius: 99px; padding: 0 6px; font-size: 11px; }
.filter-btn:not(.is-active) .filter-count { background: var(--border); color: var(--text-muted); }
.post-cat-badge { background: var(--primary); color: #fff; border-radius: var(--radius-pill); padding: 2px 8px; font-size: 11px; font-weight: 600; }

/* ---- Blog single — single-wrap / single-container ---- */
.single-wrap { padding: 60px 0 100px; }
.single-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
.single-sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 1024px) {
  .single-container { grid-template-columns: 1fr; }
  .single-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .single-sidebar .sidebar-widget { flex: 1; min-width: 240px; }
}
@media (max-width: 720px) {
  .single-wrap { padding: 32px 0 70px; }
}

/* ---- Blog preview on homepage (7-post horizontal slider) ---- */
.blog-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.blog-slider-viewport {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.blog-slider-track {
  display: flex;
  gap: 24px;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.blog-slider-track > .post-card {
  flex: 0 0 calc((100% - 48px) / 3);
  min-width: 0;
}
.slider-arrow {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  padding: 0;
  z-index: 2;
}
.slider-arrow svg { width: 18px; height: 18px; }
.slider-arrow:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.05);
}
.slider-arrow:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.blog-preview-more { text-align: center; margin-top: 16px; }

@media (max-width: 1100px) {
  .blog-slider-track > .post-card { flex: 0 0 calc((100% - 24px) / 2); }
}
@media (max-width: 700px) {
  .blog-slider-track > .post-card { flex: 0 0 100%; }
  .slider-arrow { width: 38px; height: 38px; }
}

/* ---- Contact icon WhatsApp variant ---- */
.contact-icon-wa { background: rgba(37,211,102,0.12); color: #25D366; }

/* ---- Contact form wrap & small toggle ---- */
.contact-form-wrap { position: relative; }
.contact-form-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: var(--radius-pill);
  color: var(--primary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.contact-form-toggle:hover { background: var(--primary); color: #fff; }
.contact-form-toggle .toggle-arrow {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  transition: transform .3s;
}
.contact-form-toggle[aria-expanded="true"] .toggle-arrow { transform: rotate(180deg); }
.contact-form-collapsible {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s cubic-bezier(.4,0,.2,1), opacity .3s;
  opacity: 0;
}
.contact-form-collapsible.is-open {
  max-height: 1400px;
  opacity: 1;
}

/* ---- Captcha ---- */
.captcha-group label strong { font-weight: 700; color: var(--primary); font-size: 17px; }
.captcha-group input { max-width: 160px; }

/* ---- Form validation states ---- */
.input-error { border-color: #e53935 !important; }
.field-error { display: block; color: #e53935; font-size: 12px; margin-top: 4px; }
.req { color: #e53935; }

/* ---- Form success message ---- */
.form-success[hidden] { display: none !important; }
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 32px;
  background: #f0fdf4;
  border: 1.5px solid #10A37F;
  border-radius: var(--radius-lg);
  text-align: center;
  animation: fadeInUp .4s ease;
}
.form-success svg { width: 64px; height: 64px; }
.form-success strong { font-size: 20px; color: #10A37F; }
.form-success p { color: var(--text-muted); margin: 0; font-size: 15px; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Util WhatsApp button in top bar ---- */
.util-wa {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; background: #25D366; color: #fff;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 600;
  text-decoration: none; transition: background .2s; margin-left: 8px;
}
.util-wa svg { width: 14px; height: 14px; flex-shrink: 0; }
.util-wa:hover { background: #1aad52; }

@media (max-width: 900px) {
  .single-wrap { grid-template-columns: 1fr; }
  .single-sidebar { position: static; }
  .posts-grid { grid-template-columns: 1fr; }
}

/* ---- Legal page ---- */
.legal-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: 100px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.legal-toc ul { list-style: none; padding: 0; margin: 0; }
.legal-toc li { padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.legal-toc li:last-child { border-bottom: none; }
.legal-toc a { color: var(--text); font-size: 14px; text-decoration: none; }
.legal-toc a:hover { color: var(--primary); }
.legal-content h2 { color: var(--primary); margin-top: 36px; padding-top: 36px; border-top: 1px solid var(--border-soft); }
.legal-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.legal-content ul { padding-right: 1.4em; padding-left: 0; }
.legal-content li { margin-bottom: 8px; }
@media (max-width: 900px) {
  .legal-wrap { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}

/* ---- Hide floating WhatsApp (per user request) ---- */
.floating-wa { display: none !important; }

/* ---- Single post — smaller title ---- */
.single-title { font-size: clamp(20px, 2.4vw, 28px) !important; line-height: 1.4 !important; margin-bottom: 16px !important; }
.single-header { margin-bottom: 24px !important; }
.single-meta { padding: 14px 0 !important; gap: 12px !important; }

/* ---- Single post — make sidebar more compact ---- */
.single-sidebar .sidebar-widget h4 { font-size: 15px; margin-bottom: 8px; }
.single-sidebar .sidebar-widget p { font-size: 13.5px; margin-bottom: 12px; }
.single-sidebar .sidebar-widget { padding: 18px; }

/* ---- WordPress admin bar offset ---- */
.admin-bar .site-header { top: 32px; }
.admin-bar .blog-filter-bar { top: calc(64px + 32px); }
.admin-bar .blog-filter { top: calc(62px + 32px); }
.admin-bar .single-sidebar { top: calc(96px + 32px); }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .blog-filter-bar { top: calc(64px + 46px); }
  .admin-bar .blog-filter { top: calc(62px + 46px); }
}
