/* ============================================================
   قالب حرفه‌ای کشاورزی و آبیاری — AFP (آبگستر فرا پارسیان)
   بازطراحی کامل استایل قالب رویا بلاگ
   ============================================================ */

/* ---------- توکن‌های طراحی ---------- */
:root {
  color-scheme: light;
  --green-900: #14361f;
  --green-700: #1f6b34;
  --green-600: #2e8b45;
  --green-500: #4caf50;
  --lime-500: #8bc34a;
  --lime-100: #eef7e3;
  --amber-500: #f0a72a;
  --ink: #17211c;
  --ink-2: #2b3a33;
  --muted: #5d6f66;
  --line: #e2ebdc;
  --bg: #f6faf4;
  --surface: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(16, 40, 24, .05), 0 6px 18px rgba(16, 40, 24, .05);
  --shadow-2: 0 2px 6px rgba(16, 40, 24, .07), 0 14px 32px rgba(16, 40, 24, .08);
  --font-head: 'Yekan', Tahoma, 'Iranian Sans', sans-serif;
  --font-body: Tahoma, 'Iranian Sans', Arial, sans-serif;
  --wrap: 1200px;
}

/* ---------- پایه ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--green-700); text-decoration: none; transition: color .18s ease; }
a:link, a:visited { color: var(--green-700); }
a:hover, a:focus { color: var(--green-900); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--ink); margin: 0 0 .5em; line-height: 1.5; font-weight: normal; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: 100%; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: right; }
th { background: var(--lime-100); font-family: var(--font-head); }
blockquote { margin: 1em 0; padding: 12px 18px; background: var(--lime-100); border-right: 4px solid var(--lime-500); border-radius: var(--radius-sm); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; right: -9999px; top: 0; z-index: 999; background: var(--green-700); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.skip-link:focus { right: 16px; color: #fff; }
:focus-visible { outline: 3px solid var(--green-600); outline-offset: 2px; border-radius: 4px; }
.fblogo { display: none; }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font-head); font-size: 1rem; line-height: 1.2;
  cursor: pointer; text-align: center; transition: transform .15s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: 0 4px 14px rgba(31, 107, 52, .25); }
.btn-primary:hover { background: var(--green-900); color: #fff; }
.btn-outline { background: #fff; color: var(--green-700); border-color: var(--green-700); }
.btn-outline:hover { background: var(--lime-100); color: var(--green-900); }
.btn-light { background: #fff; color: var(--green-900); border-color: #fff; }
.btn-light:hover { background: var(--lime-100); color: var(--green-900); }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 1.05rem; }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- نوار بالای سایت ---------- */
.topstrip { background: var(--green-900); color: #dff0d8; font-size: .85rem; }
.ts-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px; min-height: 42px; }
.ts-phone a { color: #fff; font-family: var(--font-head); }
.ts-links { display: flex; gap: 16px; }
.ts-links a { color: #cfe6c2; }
.ts-links a:hover { color: #fff; }

/* ---------- سربرگ ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; padding-bottom: 18px; }
.brand { font-size: 1.6rem; margin: 0 0 4px; }
.brand a { color: var(--green-900); }
.brand-tag { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.7; max-width: 60ch; }
.header-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---------- منوی اصلی ---------- */
.site-nav { background: var(--green-700); position: sticky; top: 0; z-index: 60; box-shadow: 0 2px 10px rgba(16, 40, 24, .12); }
.nav-in { display: flex; align-items: center; }
.navbar-toggle { display: none; background: transparent; border: 1px solid rgba(255, 255, 255, .5); border-radius: var(--radius-sm); color: #fff; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; cursor: pointer; }
.resmenu, .resmenu::before, .resmenu::after { display: block; width: 20px; height: 2px; background: #fff; content: ""; position: relative; }
.resmenu::before { position: absolute; top: -6px; }
.resmenu::after { position: absolute; top: 6px; }
.navbar-collapse { display: block; width: 100%; }
.nav { display: flex; flex-wrap: wrap; align-items: center; }
.nav li a { display: block; padding: 14px 16px; color: #eaf6e4; font-family: var(--font-head); font-size: .98rem; min-height: 44px; }
.nav li a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav li a.active, .nav li a.current, .nav li a.menu_active { background: var(--lime-500); color: var(--green-900); }

/* ---------- اسلایدر ---------- */
.slide-box { margin: 22px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); background: var(--surface); }
.slide-box img { display: block; width: 100%; }

/* ---------- دسته‌بندی محصولات ---------- */
.page { padding-bottom: 30px; }
.sec-head { margin: 26px 0 14px; }
.sec-title { font-size: 1.35rem; margin: 0 0 4px; color: var(--green-900); position: relative; padding-right: 14px; }
.sec-title::before { content: ""; position: absolute; right: 0; top: .35em; width: 5px; height: 1.1em; background: var(--lime-500); border-radius: 3px; }
.sec-sub { margin: 0; color: var(--muted); font-size: .92rem; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-1); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--lime-500); }
.cat-name { font-family: var(--font-head); font-size: 1.05rem; color: var(--green-900); }
.cat-desc { font-size: .85rem; color: var(--muted); line-height: 1.8; }

/* ---------- نوار فراخوان ---------- */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin: 26px 0; padding: 24px 26px; border-radius: var(--radius); background: linear-gradient(90deg, var(--green-900), var(--green-700) 65%, var(--green-600)); color: #fff; box-shadow: var(--shadow-2); }
.cta-text h2 { color: #fff; font-size: 1.3rem; margin: 0 0 6px; }
.cta-text p { margin: 0; color: #dcefd6; font-size: .92rem; max-width: 62ch; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- پیام‌های سیستمی ---------- */
.messages-box { margin: 16px 0; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--lime-100); border: 1px solid var(--line); color: var(--green-900); }
.messages-text { margin: 0; }

/* ---------- چیدمان اصلی ---------- */
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.main-col { min-width: 0; }
.side-col { display: flex; flex-direction: column; gap: 16px; }

/* ---------- کارت مطلب ---------- */
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; margin-bottom: 20px; }
.post-thumb { display: block; }
.post-thumb img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.post-body { padding: 20px 22px 22px; }
.post-title { font-size: 1.4rem; margin: 0 0 10px; }
.post-title a { color: var(--green-900); }
.post-title a:hover { color: var(--green-600); }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .84rem; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); }
.post-content { color: var(--ink-2); font-size: 1rem; }
.post-content img { border-radius: var(--radius-sm); margin: 8px 0; }
.post-content a { text-decoration: underline; }
.post-tags { margin-top: 14px; font-size: .85rem; color: var(--muted); }
.post-tags a { display: inline-block; margin: 0 4px 4px 0; padding: 3px 10px; background: var(--lime-100); border-radius: 20px; color: var(--green-900); font-size: .8rem; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.rate { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; color: var(--green-700); }
.rate:hover { background: var(--lime-100); }
.rate-num { margin-left: 8px; }

/* ---------- صفحه‌بندی ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 22px 0; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--green-700); font-family: var(--font-head); }
.pagination a:hover { border-color: var(--green-600); background: var(--lime-100); }
.pagination a.active, .pagination a.current { background: var(--green-700); border-color: var(--green-700); color: #fff; }

/* ---------- نظرات ---------- */
.comments { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-1); }
.no-comment { color: var(--muted); background: var(--lime-100); border-radius: var(--radius-sm); padding: 14px 16px; }
.comment { border-bottom: 1px solid var(--line); padding: 14px 0; }
.comment:last-of-type { border-bottom: 0; }
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.comment-name { font-family: var(--font-head); color: var(--green-900); }
.comment-date { color: var(--muted); font-size: .82rem; }
.comment-text { margin-top: 8px; color: var(--ink-2); }
.comment-reply { margin: 12px 0 4px; padding: 12px 16px; background: var(--lime-100); border-radius: var(--radius-sm); border-right: 3px solid var(--green-600); }
.reply-name { font-family: var(--font-head); color: var(--green-900); }
.reply-date { color: var(--muted); font-size: .8rem; margin-right: 8px; }
.reply-text { margin-top: 6px; }
.comment-form { margin-top: 18px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fcfdfb; }
.comment-form textarea { min-height: 120px; }
.comment-form input[type=submit], .comment-form button { min-height: 44px; padding: 10px 22px; background: var(--green-700); color: #fff; border: 0; border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-head); }
.comment-form input[type=submit]:hover, .comment-form button:hover { background: var(--green-900); }

/* ---------- جعبه‌های کناری ---------- */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; }
.box-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 13px 16px; font-size: 1.02rem; color: #fff; background: var(--green-700); }
.box-title .count { font-size: .78rem; color: #dcefd6; font-family: var(--font-body); }
.box-body { padding: 14px 16px; }
.list li { border-bottom: 1px dashed var(--line); }
.list li:last-child { border-bottom: 0; }
.list li a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; min-height: 40px; color: var(--ink-2); }
.list li a:hover { color: var(--green-700); }
.count { color: var(--muted); font-size: .82rem; }
.sub-list { padding-right: 14px; }
.sub-list li a { font-size: .9rem; }
.thumb-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.thumb-list li:last-child { border-bottom: 0; }
.thumb-list a { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.thumb-list a:hover { color: var(--green-700); }
.thumb-list img { width: 74px; height: 58px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.thumb-list span { font-size: .9rem; line-height: 1.7; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a { display: inline-block; padding: 5px 12px; background: var(--lime-100); border-radius: 20px; color: var(--green-900); font-size: .82rem; min-height: 32px; line-height: 22px; }
.tag-cloud a:hover { background: var(--lime-500); color: var(--green-900); }
.follower-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.follower-list img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.social-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.social-list a { display: block; padding: 8px 10px; background: var(--lime-100); border-radius: var(--radius-sm); font-size: .85rem; color: var(--green-900); text-align: center; min-height: 38px; line-height: 22px; }
.social-list a:hover { background: var(--lime-500); }
.stat-list li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: .88rem; color: var(--muted); }
.stat-list .count { font-family: var(--font-head); color: var(--green-900); font-size: .95rem; }
.about-img { display: block; margin: 0 auto 12px; border-radius: var(--radius-sm); }
.about-text { font-size: .9rem; color: var(--muted); }
.vote-list .poll-question { font-family: var(--font-head); padding: 6px 0 10px; color: var(--green-900); }
.vote-list .poll-answer { padding: 6px 0; font-size: .9rem; }
.vote-list label { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
.clock-body, .music-body { text-align: center; }
.todaytime { margin-top: 10px; color: var(--muted); font-size: .85rem; text-align: center; }
.searchform { display: flex; gap: 8px; }
.searchform .isearch { flex: 1; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fcfdfb; }

/* ---------- پابرگ ---------- */
.site-footer { margin-top: 34px; background: var(--green-900); color: #cfe0c8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 26px; padding-top: 34px; padding-bottom: 26px; }
.f-title { color: #fff; font-size: 1.05rem; margin: 0 0 12px; }
.f-col p { font-size: .88rem; line-height: 1.9; color: #bcd2b4; }
.f-col ul li { padding: 5px 0; }
.f-col ul a { color: #cfe0c8; font-size: .9rem; }
.f-col ul a:hover { color: #fff; }
.f-phone { font-family: var(--font-head); font-size: 1.5rem; margin: 0 0 4px; }
.f-phone a { color: #fff; }
.f-note { color: #a9c2a1; font-size: .82rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.fb-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; padding-bottom: 14px; font-size: .82rem; color: #a9c2a1; }
.copyright a { color: #cfe0c8; }
.dashboard { display: flex; flex-wrap: wrap; gap: 14px; }
.dashboard a { color: #a9c2a1; }
.dashboard a:hover { color: #fff; }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1024px) {
  .main-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .header-in { flex-direction: column; align-items: flex-start; gap: 12px; }
  .header-actions { width: 100%; }
  .header-actions .btn { flex: 1; }
  .navbar-toggle { display: inline-flex; }
  .site-nav .navbar-collapse { display: none; }
  .site-nav .navbar-collapse.in, .site-nav .navbar-collapse.show { display: block; }
  .nav { flex-direction: column; align-items: stretch; width: 100%; }
  .nav li a { border-top: 1px solid rgba(255, 255, 255, .12); }
  .nav-in { padding-top: 8px; padding-bottom: 8px; }
}
@media (min-width: 901px) {
  .site-nav .navbar-collapse { display: block !important; height: auto !important; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .cat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .cta-band { padding: 18px; }
  .cta-actions .btn { width: 100%; }
  .post-body { padding: 16px; }
  .post-title { font-size: 1.2rem; }
  .social-list { grid-template-columns: 1fr; }
  .brand { font-size: 1.35rem; }
  .ts-in { flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 6px; padding-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .btn:hover, .cat-card:hover { transform: none; }
}

/* ---------- هم‌سطح‌سازی با استایل قدیمی قالب ---------- */
.dashboard li a { color: #a9c2a1; font-size: .82rem; }
.dashboard li a:hover { color: #fff; }
.dashboard li a:before { content: none; }
.copyright a:link, .copyright a:visited { color: #cfe0c8; }
.copyright a:hover { color: #fff; }
.nav > li > a { padding: 14px 16px; }

/* ---------- بازنشانی استایل‌های قالب قدیمی (اولویت با این بخش) ---------- */
.post-title { background: none; background-image: none; padding: 0; border-radius: 0; }
.post-title:after { content: none; }
.post-title a:link, .post-title a:visited, .post-title a:hover { color: var(--green-900); }
.post-body { background: none; padding: 20px 22px 22px; }
.post-thumb { overflow: visible; }
.post-thumb img { margin: 0; }
.post-tags a:link, .post-tags a:visited { color: var(--green-900); background: var(--lime-100); }
.post-tags a:hover { color: var(--green-900); background: var(--lime-500); }
.pagination a:link, .pagination a:visited { background: var(--surface); color: var(--green-700); border: 1px solid var(--line); }
.pagination a:hover { background: var(--lime-100); color: var(--green-900); }
.pagination a.active:link, .pagination a.active:visited, .pagination a.current:link, .pagination a.current:visited { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.comment-box, .comment-list, .comment-send-form { border: 0; background: none; }
.comments-cunt-box, .comments-cunt-text { background: none; color: var(--muted); }
.menu-block { background: none; }
.post-info, .post-details { background: none; }
.post-info a:link, .post-info a:visited { color: var(--green-700); }
.searchbox { text-align: right; }
.dashboard li a:link, .dashboard li a:visited { color: #a9c2a1; }
.dashboard li a:hover { color: #fff; }
.footer { background: none; }

/* ---------- دکمه روی زمینه تیره ---------- */
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: #fff; }

/* ---------- متن روشن روی زمینه تیره ---------- */
.ts-phone a:link, .ts-phone a:visited { color: #fff; }
.ts-links a:link, .ts-links a:visited { color: #cfe6c2; }
a.skip-link:link, a.skip-link:visited { color: #fff; }
.btn-primary, a.btn-primary:link, a.btn-primary:visited { color: #fff; }
.btn-light, a.btn-light:link, a.btn-light:visited { color: var(--green-900); }
.btn-outline, a.btn-outline:link, a.btn-outline:visited { color: var(--green-700); }
.btn-ghost-light, a.btn-ghost-light:link, a.btn-ghost-light:visited { color: #fff; border-color: rgba(255, 255, 255, .75); }
.f-col ul a:link, .f-col ul a:visited { color: #cfe0c8; }
.dashboard a:link, .dashboard a:visited { color: #a9c2a1; }
.social-list a:link, .social-list a:visited { color: var(--green-900); }
.tag-cloud a:link, .tag-cloud a:visited { color: var(--green-900); }

/* ---------- کوتاه‌سازی متن درباره وبلاگ ---------- */
.about-text { display: -webkit-box; -webkit-line-clamp: 14; -webkit-box-orient: vertical; overflow: hidden; position: relative; }
.about-text:after { content: ""; position: absolute; bottom: 0; right: 0; left: 0; height: 2.6em; background: linear-gradient(rgba(255,255,255,0), var(--surface)); pointer-events: none; }

/* ---------- اصلاحات صفحه‌های مستقل و جلوگیری از سرریز افقی ---------- */
html { overflow-x: hidden; }
.slide-box:empty { display: none; }
.mce-container, .mce-tinymce, .mce-floatpanel, .mce-panel, .mce-toolbar, .mce-toolbar-grp, .mce-statusbar, .mce-menu, .mce-popupcontainer, .mce-widget.mce-btn { display: none !important; }
.page-content, .static-page, .post-content table { max-width: 100%; overflow-x: auto; }
.post-content { overflow-wrap: break-word; word-wrap: break-word; }

/* ---------- جایگاه محتوای صفحه‌های مستقل ---------- */
.no-comment { color: var(--ink-2); background: none; border-radius: 0; padding: 0; }
.no-comment:empty { display: none; }

.no-comment-text { color: var(--ink-2); }
.no-comment-text:empty { display: none; }

/* ---------- اصلاح اندازه تصاویر ---------- */
.about-img { display: block; margin: 0 auto 12px; border-radius: var(--radius-sm); max-height: 170px; width: auto; max-width: 100%; }
.thumb-list img { width: 84px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; background: var(--lime-100); }

/* ==========================================================================
   AFP — لایه ارتقای ظاهر حرفه‌ای
   سربرگ، منوی اصلی، سایدبار، پابرگ و پرداخت عمومی
   ========================================================================== */

:root {
  --green-50: #f2f8ee;
  --green-100: #e3f0dc;
  --line-2: #d7e5d0;
  --shadow-3: 0 12px 34px rgba(16, 40, 24, .12);
  --ring: 0 0 0 3px rgba(139, 195, 74, .5);
}

/* ---------- پرداخت عمومی ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 10px;
}
::selection { background: var(--lime-500); color: var(--green-900); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* ==========================================================================
   ۱) نوار بالای سایت
   ========================================================================== */
.topstrip {
  background: linear-gradient(90deg, var(--green-900) 0%, #1b4a2a 55%, var(--green-700) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: .82rem;
  color: #cfe4c6;
}
.ts-in { min-height: 40px; gap: 6px 18px; }
.ts-item { display: inline-flex; align-items: center; gap: 7px; }
.ts-item svg { width: 15px; height: 15px; flex: none; opacity: .85; }
.ts-phone { color: #cfe4c6; }
.ts-phone a:link, .ts-phone a:visited { color: #fff; }
.ts-phone a { font-family: var(--font-head); letter-spacing: .2px; }
.ts-phone a:hover { color: var(--lime-500); }
.ts-links { display: flex; align-items: center; gap: 0; }
.ts-links a:link, .ts-links a:visited { color: #cfe4c6; }
.ts-links a { padding: 0 12px; }
.ts-links a + a { border-inline-start: 1px solid rgba(255, 255, 255, .18); }
.ts-links a:hover { color: #fff; }

/* ==========================================================================
   ۲) سربرگ
   ========================================================================== */
.site-header {
  background: var(--surface);
  background-image: linear-gradient(180deg, #ffffff 0%, #fbfdf9 100%);
  border-bottom: 1px solid var(--line);
}
.header-in { gap: 22px; padding-top: 16px; padding-bottom: 16px; }
.brand-box { margin: 0; font-size: 1rem; font-weight: normal; min-width: 0; }
.brand-box .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}
.brand-box .brand:hover .brand-mark { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-700) 0%, var(--green-500) 55%, var(--lime-500) 100%);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.02rem;
  letter-spacing: .5px;
  box-shadow: 0 6px 16px rgba(31, 107, 52, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-name {
  font-family: var(--font-head);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--green-900);
  line-height: 1.5;
}
.brand-sub {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44ch;
}
.header-side { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* جستجوی سربرگ */
.header-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f4f8f1;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px 6px 4px 4px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.header-search:focus-within { background: #fff; border-color: var(--green-500); box-shadow: var(--ring); }
.header-search input[type=text] {
  width: 200px;
  min-height: 38px;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: .88rem;
  color: var(--ink);
}
.header-search input[type=text]::placeholder { color: #93a79a; }
.header-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  cursor: pointer;
  transition: background .18s ease;
}
.header-search button:hover { background: var(--green-900); }
.header-search button svg { width: 17px; height: 17px; }

/* بلوک تماس سربرگ */
.header-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--green-50);
  border: 1px solid var(--line-2);
  transition: border-color .18s ease, background .18s ease;
}
.header-phone:hover { background: var(--green-100); border-color: var(--green-500); }
.hp-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--green-700);
  color: #fff;
}
.hp-ico svg { width: 18px; height: 18px; }
.hp-txt { display: flex; flex-direction: column; gap: 1px; }
.hp-lbl { font-size: .72rem; color: var(--muted); }
.hp-num { font-family: var(--font-head); font-size: 1.02rem; color: var(--green-900); letter-spacing: .3px; }

/* ==========================================================================
   ۳) منوی اصلی
   ========================================================================== */
.site-nav {
  background: linear-gradient(180deg, #1f6b34 0%, #1a5c2d 100%);
  border-top: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 3px 14px rgba(16, 40, 24, .16);
  transition: box-shadow .2s ease;
}
.nav-in { display: flex; align-items: center; gap: 10px; min-height: 54px; }
.site-nav .navbar-collapse { flex: 1; min-width: 0; }
.site-nav .nav > li > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 15px 15px;
  color: #eaf6e4;
  font-family: var(--font-head);
  font-size: .96rem;
  border-radius: 0;
  position: relative;
  transition: background .16s ease, color .16s ease;
}
.site-nav .nav > li > a::after {
  content: "";
  position: absolute;
  inset-inline: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--lime-500);
  transform: scaleX(0);
  transition: transform .18s ease;
}
.site-nav .nav > li > a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.site-nav .nav > li > a:hover::after { transform: scaleX(1); }
.site-nav .nav > li > a.active,
.site-nav .nav > li > a.current,
.site-nav .nav > li > a.menu_active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-weight: 700;
}
.site-nav .nav > li > a.active::after,
.site-nav .nav > li > a.current::after,
.site-nav .nav > li > a.menu_active::after { transform: scaleX(1); }

/* دکمه فراخوان در انتهای منو */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-inline-start: auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--lime-500);
  color: var(--green-900);
  font-family: var(--font-head);
  font-size: .88rem;
  min-height: 40px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(139, 195, 74, .35);
  transition: background .18s ease, transform .18s ease;
}
.nav-cta:link, .nav-cta:visited { color: var(--green-900); }
.nav-cta:hover, .nav-cta:focus { background: #9ed85a; color: var(--green-900); transform: translateY(-1px); }
.nav-cta svg { width: 16px; height: 16px; }

/* مگا منو */
.site-nav .nav > li.has-mega { position: relative; }
.caret {
  width: 0;
  height: 0;
  border-inline-start: 4px solid transparent;
  border-inline-end: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .8;
}
.mega {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  z-index: 90;
  width: min(720px, 92vw);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--lime-500);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  transform: translateY(6px);
}
.site-nav .nav > li.has-mega:hover .mega,
.site-nav .nav > li.has-mega:focus-within .mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.site-nav .nav > li.has-mega:hover > a,
.site-nav .nav > li.has-mega:focus-within > a { background: rgba(255, 255, 255, .14); color: #fff; }
.site-nav .nav > li.has-mega:hover > a::after,
.site-nav .nav > li.has-mega:focus-within > a::after { transform: scaleX(1); }
.mega-title {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: .92rem;
  color: var(--green-900);
}
.mega-col ul { margin: 0; padding: 0; list-style: none; }
.mega-col ul li { padding: 0; }
.mega-col ul li a {
  display: block;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: .87rem;
  transition: background .16s ease, color .16s ease, padding .16s ease;
}
.mega-col ul li a:link, .mega-col ul li a:visited { color: var(--ink-2); }
.mega-col ul li a:hover { background: var(--green-50); color: var(--green-700); padding-inline-start: 14px; }
.mega-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: .8rem;
  line-height: 1.8;
}

/* ==========================================================================
   ۴) جعبه‌های سایدبار
   ========================================================================== */
.side-col { display: flex; flex-direction: column; gap: 16px; }
.side-col .box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.side-col .box:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.side-col .box-title {
  justify-content: flex-start;
  gap: 9px;
  padding: 13px 16px;
  font-family: var(--font-head);
  font-size: .97rem;
  background: linear-gradient(90deg, var(--green-700) 0%, #1a5c2d 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.side-col .box-title::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--lime-500);
  box-shadow: 0 0 0 3px rgba(139, 195, 74, .28);
}
.side-col .box-title .count {
  margin-inline-start: auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f2f8ee;
  color: var(--green-900);
  font-size: .76rem;
  font-weight: 700;
}
.side-col .box-body { padding: 14px 16px; }

/* جستجو */
.side-col .searchform { flex-direction: column; gap: 10px; }
.side-col .searchform .isearch {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fbfdf9;
  font-family: var(--font-body);
  transition: border-color .18s ease, background .18s ease;
}
.side-col .searchform .isearch:focus { background: #fff; border-color: var(--green-500); }
.side-col .searchform .btn { width: 100%; }
.side-col .todaytime {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: .82rem;
}

/* درباره وبلاگ */
.side-col .about-box .about-img {
  width: 100%;
  max-height: 132px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}
.side-col .about-text {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .87rem;
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* فهرست‌ها */
.side-col .list li { border-bottom: 1px solid #f0f5ec; }
.side-col .list li a {
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: .89rem;
  transition: background .16s ease, color .16s ease, padding .16s ease;
}
.side-col .list li a:hover { background: var(--green-50); color: var(--green-700); padding-inline-start: 15px; }
.side-col .list li a .count,
.side-col .list li a span.count { flex: none; color: var(--muted); font-size: .78rem; }
.side-col .sub-list { padding-inline-start: 14px; }
.side-col .sub-list li a { font-size: .85rem; color: var(--muted); }

/* فهرست تصویری */
.side-col .thumb-list li { border-bottom: 1px solid #f0f5ec; padding: 8px 0; }
.side-col .thumb-list a { gap: 11px; }
.side-col .thumb-list img {
  width: 68px;
  height: 60px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.side-col .thumb-list span {
  font-size: .87rem;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* برچسب‌ها */
.side-col .tag-cloud { gap: 7px; }
.side-col .tag-cloud a {
  padding: 6px 13px;
  min-height: 34px;
  line-height: 22px;
  border: 1px solid var(--line-2);
  background: #fbfdf9;
  border-radius: 999px;
  font-size: .81rem;
  color: var(--green-700);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.side-col .tag-cloud a:hover { background: var(--green-700); border-color: var(--green-700); color: #fff; }

/* دنبال‌کنندگان و شبکه‌ها */
.side-col .follower-list img { width: 42px; height: 42px; border: 2px solid #fff; box-shadow: var(--shadow-1); }
.side-col .social-list { gap: 8px; }
.side-col .social-list a {
  border: 1px solid var(--line-2);
  background: #fbfdf9;
  border-radius: 10px;
  font-size: .84rem;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.side-col .social-list a:hover { background: var(--green-700); border-color: var(--green-700); color: #fff; }

/* آمار */
.side-col .stat-list li { padding: 9px 0; border-bottom: 1px solid #f0f5ec; font-size: .87rem; }
.side-col .stat-list .count { font-size: 1rem; }

/* جعبه اعتماد */
.trust-box .box-title { background: linear-gradient(90deg, var(--green-900) 0%, var(--green-700) 100%); }
.trust-list { margin: 0 0 14px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.trust-list li { display: flex; align-items: flex-start; gap: 9px; font-size: .87rem; color: var(--ink-2); line-height: 1.8; }
.trust-list li svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: var(--green-600); }
.trust-box .btn { width: 100%; }

/* ==========================================================================
   ۵) پابرگ
   ========================================================================== */
.site-footer {
  margin-top: 40px;
  background: linear-gradient(180deg, #14361f 0%, #0f2a18 100%);
  color: #c9dcc0;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lime-500) 0%, var(--green-500) 50%, var(--lime-500) 100%);
}
.f-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 26px 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.f-brand { display: flex; align-items: center; gap: 13px; }
.f-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-600) 0%, var(--lime-500) 100%);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1rem;
}
.f-brand-name { display: block; font-family: var(--font-head); font-size: 1.12rem; color: #fff; }
.f-brand-sub { display: block; font-size: .8rem; color: #9fbb96; margin-top: 3px; }
.f-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.f-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .13);
  color: #e6f2df;
  font-size: .83rem;
  transition: background .18s ease, border-color .18s ease;
}
.f-chip:link, .f-chip:visited { color: #e6f2df; }
.f-chip:hover, .f-chip:focus { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; }
.f-chip svg { width: 15px; height: 15px; flex: none; opacity: .9; }

.footer-grid { gap: 28px; padding-top: 30px; padding-bottom: 24px; }
.f-title {
  position: relative;
  margin: 0 0 14px;
  padding-bottom: 10px;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1rem;
}
.f-title::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: var(--lime-500);
}
.f-col p { font-size: .87rem; line-height: 1.95; color: #b6cdae; }
.f-col ul { margin: 0; padding: 0; list-style: none; }
.f-col ul li { padding: 0; }
.f-col ul a {
  display: inline-block;
  padding: 6px 0;
  color: #c9dcc0;
  font-size: .88rem;
  transition: color .16s ease, padding .16s ease;
}
.f-col ul a:link, .f-col ul a:visited { color: #c9dcc0; }
.f-col ul a:hover { color: var(--lime-500); padding-inline-start: 6px; }
.f-phone { margin: 0 0 6px; font-family: var(--font-head); font-size: 1.45rem; }
.f-phone a:link, .f-phone a:visited { color: #fff; }
.f-phone a:hover { color: var(--lime-500); }
.f-note { color: #9fbb96; font-size: .81rem; margin: 0 0 12px; }

.f-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.f-trust-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
}
.f-trust-item svg { width: 22px; height: 22px; flex: none; color: var(--lime-500); }
.f-trust-item b { display: block; color: #fff; font-family: var(--font-head); font-size: .89rem; font-weight: 700; }
.f-trust-item span { display: block; font-size: .78rem; color: #9fbb96; margin-top: 2px; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.fb-in { padding-top: 15px; padding-bottom: 15px; color: #9fbb96; }
.copyright { line-height: 1.9; }
.copyright a:link, .copyright a:visited { color: #c9dcc0; }
.copyright a:hover { color: #fff; }
.dashboard a:link, .dashboard a:visited { color: #9fbb96; }
.dashboard a:hover { color: #fff; }

/* ==========================================================================
   ۷) واکنش‌گرایی
   ========================================================================== */
@media (max-width: 1100px) {
  .header-search input[type=text] { width: 150px; }
  .hp-lbl { display: none; }
}
@media (max-width: 900px) {
  .header-in { flex-direction: column; align-items: stretch; gap: 14px; }
  .header-side { flex-wrap: wrap; }
  .header-search { flex: 1 1 100%; }
  .header-search input[type=text] { width: 100%; flex: 1; }
  .header-phone { flex: 1 1 100%; }
  .nav-in { min-height: 0; padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .nav-cta { margin-inline-start: auto; font-size: .82rem; padding: 8px 13px; }
  .site-nav .nav { width: 100%; }
  .site-nav .nav > li > a {
    padding: 13px 14px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
  }
  .site-nav .nav > li > a::after { display: none; }
  .site-nav .nav > li.has-mega > a { justify-content: space-between; }
  .mega { display: none; }
  .footer-grid { gap: 22px; }
  .f-trust { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .brand-mark { width: 46px; height: 46px; border-radius: 12px; font-size: .92rem; }
  .brand-name { font-size: 1.12rem; }
  .brand-sub { white-space: normal; font-size: .78rem; }
  .ts-in { align-items: flex-start; }
  .ts-links a { padding: 0 9px; }
  .f-top { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .f-phone { font-size: 1.3rem; }
}

/* ---------- پنهان‌سازی جعبه‌های خالی بدون جاوااسکریپت ---------- */
.side-col .box:has(.box-body > ul:empty),
.side-col .box:has(.box-body > .thumb-list:empty),
.side-col .box:has(.box-body > .tag-cloud:empty),
.side-col .box:has(.box-body > .social-list:empty),
.side-col .box:has(.box-body > .follower-list:empty) { display: none; }

/* ==========================================================================
   نمای واید دسکتاپ — هم‌تراز با عرض سایت navar-abyari.ir
   ========================================================================== */
:root { --wrap: 1760px; }

@media (min-width: 1440px) {
  .wrap { padding-left: 24px; padding-right: 24px; }

  /* چیدمان اصلی: ستون محتوا پهن‌تر، ستون کنار کمی عریض‌تر */
  .main-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; }
  .side-col { gap: 18px; }
  .cat-grid { gap: 16px; }
  .post-body { padding: 24px 26px 26px; }
  .cta-band { padding: 26px 30px; }
  .footer-grid { gap: 32px; }

  /* فهرست مطالب یک‌ردیفه است (قاعده کامل در انتهای فایل) */
}


/* ==========================================================================
   فهرست مطالب یک‌ردیفه (جایگزین چیدمان دوستونی قبلی)
   ========================================================================== */
.main-col,
.main-col:has(> .post-card + .post-card) { display: block !important; }
.main-col > .post-card { margin-bottom: 20px; }

/* ==========================================================================
   معرفی و کارت محصولات در صفحه‌های فهرست
   ========================================================================== */
.home-intro { display: none; }
body:has(.main-col > .pagination) .home-intro { display: block; }
.home-intro {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf3 100%);
  border: 1px solid var(--line, #e3ebdd);
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow-1, 0 1px 2px rgba(20, 54, 31, .06));
  padding: 26px 28px 24px;
  margin: 0 0 24px;
}
.hi-kicker { display: inline-block; margin: 0 0 12px; padding: 5px 13px; border-radius: 999px; background: var(--lime-100, #eef7e3); color: var(--green-700, #1f6b34); font-size: .82rem; font-weight: 700; }
.home-intro-title { margin: 0 0 12px; font-size: 1.6rem; line-height: 1.6; color: var(--green-900, #14361f); }
.hi-lead { margin: 0 0 18px; font-size: 1.06rem; line-height: 2.05; color: var(--ink-2, #3a4a3f); }
.hi-body p { margin: 0 0 14px; line-height: 2.05; color: var(--ink-2, #3a4a3f); }
.hi-sub { margin: 24px 0 12px; font-size: 1.1rem; color: var(--green-900, #14361f); }
.hi-sub::before { content: ""; display: inline-block; width: 6px; height: 18px; background: var(--lime-500, #8bc34a); border-radius: 3px; margin-inline-end: 9px; vertical-align: -3px; }
.hi-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.hi-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.95; color: var(--ink-2, #3a4a3f); }
.hi-list svg { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 6px; color: var(--green-600, #1f6b34); }
.hi-facts { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hi-facts li { background: #fff; border: 1px solid var(--line, #e3ebdd); border-radius: var(--radius-sm, 12px); padding: 13px 14px; text-align: center; }
.hi-facts b { display: block; font-size: 1.04rem; color: var(--green-700, #1f6b34); margin-bottom: 5px; }
.hi-facts span { display: block; font-size: .84rem; color: var(--muted, #6b7d70); line-height: 1.75; }
.hi-prod-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hi-prod { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line, #e3ebdd); border-radius: var(--radius-sm, 12px); overflow: hidden; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.hi-prod:hover { border-color: var(--green-600, #1f6b34); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20, 54, 31, .10); }
.hi-prod img { display: block; width: 100%; height: 150px; object-fit: cover; margin: 0; flex: 0 0 auto; }
.hi-prod-body { display: block; padding: 12px 14px 15px; }
.hi-prod-name { display: block; color: var(--green-900, #14361f); font-weight: 700; margin-bottom: 6px; line-height: 1.7; }
.hi-prod-desc { display: block; font-size: .85rem; color: var(--muted, #6b7d70); line-height: 1.8; }
.home-intro-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (max-width: 1100px) {
  .hi-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hi-prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .home-intro { padding: 18px 16px; }
  .home-intro-title { font-size: 1.22rem; }
  .hi-facts, .hi-prod-grid { grid-template-columns: 1fr; }
  .home-intro-actions .btn { width: 100%; text-align: center; }
}

/* ==========================================================================
   AFP — خاموش‌کردن تبلیغات تزریقی (زیگنال)
   نکته مهم: CSP سایت «default-src *» است، پس استایل/اسکریپت درون‌خطی
   (inline) در مرورگر واقعی بلاک می‌شود. بنابراین این قواعد باید در همین
   فایل CSS بیرونی باشند تا واقعاً اعمال شوند.
   ========================================================================== */
[data-zignal-id],
[data-zignal-auto],
[data-zignal-layout],
[data-zignal-size],
[data-zignal-rendered],
[data-zignal-mounted],
iframe[id^="zignal-fr-"],
iframe[src*="zignal.ir"],
iframe[title="زیگنال"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -99999px !important;
  top: auto !important;
}

/* ==========================================================================
   AFP — ابزارهای شناور: بازگشت به بالا، حالت روز/شب، دکمه تماس موبایل
   (هم‌تراز با navar-abyari.ir)
   ========================================================================== */
.afp-dark-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.afp-tools { position: fixed; left: 18px; bottom: 96px; z-index: 150; display: flex; flex-direction: column; gap: 10px; }
.afp-tools a, .afp-tools label {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--surface, #fff); color: var(--green-700, #1f6b34);
  border: 1px solid var(--line, #e2ebdc); border-radius: 14px;
  box-shadow: 0 6px 18px rgba(16, 40, 24, .14); cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.afp-tools a:hover, .afp-tools label:hover { border-color: var(--green-600, #2e8b45); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(16, 40, 24, .18); }
.afp-theme__moon { display: none; }
body:has(.afp-dark-input:checked) .afp-theme__sun { display: none; }
body:has(.afp-dark-input:checked) .afp-theme__moon { display: block; }
.afp-call { display: none; }

html { scroll-behavior: smooth; }

@media (max-width: 900px) {
  .afp-tools { left: 12px; bottom: 86px; gap: 8px; }
  .afp-tools a, .afp-tools label { width: 42px; height: 42px; border-radius: 12px; }
  .afp-call {
    display: grid; place-items: center; position: fixed;
    left: 14px; bottom: 18px; z-index: 150;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--green-700, #1f6b34); color: #fff;
    box-shadow: 0 10px 24px rgba(16, 40, 24, .28); text-decoration: none;
  }
}

/* ---------- حالت شب ---------- */
body:has(.afp-dark-input:checked) {
  color-scheme: dark;
  --bg: #0e1411; --surface: #161e19; --line: #2b3a31;
  --ink: #e9f1ea; --ink-2: #cbd8ce; --muted: #9aab9f;
  --green-900: #a9e3b8; --green-600: #43a35f; --green-500: #5cbf6f;
  --lime-100: #1b2a1f;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .5), 0 14px 32px rgba(0, 0, 0, .4);
}
body:has(.afp-dark-input:checked) .site-header { background: var(--surface); background-image: none; }
body:has(.afp-dark-input:checked) .site-footer { background: linear-gradient(180deg, #0b120d 0%, #080d0a 100%); }
body:has(.afp-dark-input:checked) .post-card,
body:has(.afp-dark-input:checked) .hi-prod,
body:has(.afp-dark-input:checked) .hi-facts li,
body:has(.afp-dark-input:checked) .btn-outline,
body:has(.afp-dark-input:checked) .btn-light { background: var(--surface); color: var(--ink); }
body:has(.afp-dark-input:checked) .home-intro { background: linear-gradient(180deg, #161e19 0%, #121a15 100%); }
body:has(.afp-dark-input:checked) .header-search:focus-within,
body:has(.afp-dark-input:checked) .side-col .searchform .isearch:focus { background: #1d2620; }
body:has(.afp-dark-input:checked) .ts-in,
body:has(.afp-dark-input:checked) .topstrip { background: #0b120d; }
/* AFP theme-fixes v2 — no footer focus jump; readable dark submenu. */
.afp-dark-input { position: fixed !important; top: 0 !important; left: 0 !important; margin: 0 !important; }
.afp-tools button.afp-theme {
  width: 46px; height: 46px; display: grid; place-items: center; padding: 0;
  background: var(--surface, #fff); color: var(--green-700, #1f6b34);
  border: 1px solid var(--line, #e2ebdc); border-radius: 14px;
  box-shadow: 0 6px 18px rgba(16, 40, 24, .14); cursor: pointer; font: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.afp-tools button.afp-theme:hover { border-color: var(--green-600, #2e8b45); transform: translateY(-2px); }
.afp-tools button.afp-theme:focus-visible { outline: 3px solid #74b95b; outline-offset: 3px; }
body:has(.afp-dark-input:checked) .afp-tools button.afp-theme { color: #a9e3b8; }
body:has(.afp-dark-input:checked) .site-nav .mega {
  background: #161e19; color: #e9f1ea; border-color: #2b3a31; border-top-color: #8bc34a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
body:has(.afp-dark-input:checked) .site-nav .mega-title { color: #a9e3b8; border-color: #2b3a31; }
body:has(.afp-dark-input:checked) .site-nav .mega-col ul li a,
body:has(.afp-dark-input:checked) .site-nav .mega-col ul li a:link,
body:has(.afp-dark-input:checked) .site-nav .mega-col ul li a:visited { color: #cbd8ce; }
body:has(.afp-dark-input:checked) .site-nav .mega-col ul li a:hover,
body:has(.afp-dark-input:checked) .site-nav .mega-col ul li a:focus-visible { background: #243b2b; color: #fff; }
body:has(.afp-dark-input:checked) .site-nav .mega-note { background: #1b2a1f; color: #b8d9c1; }
body:has(.afp-dark-input:checked) .site-nav .nav > li > a.active,
body:has(.afp-dark-input:checked) .site-nav .nav > li > a.current,
body:has(.afp-dark-input:checked) .site-nav .nav > li > a.menu_active,
body:has(.afp-dark-input:checked) .nav-cta { color: #14361f; }
@media (max-width: 900px) { .afp-tools button.afp-theme { width: 42px; height: 42px; border-radius: 12px; } }
/* Keep nearby text readable when legacy inline layout sets a white background. */
body:has(.afp-dark-input:checked) .home-intro { background: linear-gradient(180deg, #161e19, #121a15) !important; border-color: #2b3a31 !important; }
body:has(.afp-dark-input:checked) .header-search,
body:has(.afp-dark-input:checked) .header-phone { background: #1b2a1f; border-color: #2b3a31; }
body:has(.afp-dark-input:checked) .header-search:focus-within,
body:has(.afp-dark-input:checked) .header-phone:hover { background: #243b2b; }
body:has(.afp-dark-input:checked) .header-search input[type=text] { color: #e9f1ea; }
body:has(.afp-dark-input:checked) .header-search input[type=text]::placeholder { color: #aabdaf; }
body:has(.afp-dark-input:checked) .cta-band { background: linear-gradient(90deg, #14361f, #1f6b34 65%, #2e8b45); }

/* AFP theme typography — Vazir, from the official rastikerdar/vazir-font release. */
@font-face { font-family: "Vazir"; src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Thin.woff2") format("woff2"); font-style: normal; font-weight: 100; font-display: swap; }
@font-face { font-family: "Vazir"; src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Light.woff2") format("woff2"); font-style: normal; font-weight: 300; font-display: swap; }
@font-face { font-family: "Vazir"; src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Regular.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazir"; src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Medium.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazir"; src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Bold.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazir"; src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Black.woff2") format("woff2"); font-style: normal; font-weight: 900; font-display: swap; }

:root, body {
  --font-head: "Vazir", Tahoma, sans-serif;
  --font-body: "Vazir", Tahoma, sans-serif;
}
body { font-family: var(--font-body); }
h1, h2, h3, h4, h5, h6, th { font-family: var(--font-head); }
button, input, select, textarea { font-family: var(--font-body); }

/* AFP editorial dividers — restrained green accents, RTL, light and dark. */
:root {
  --afp-rule: #d9e6d6;
  --afp-rule-accent: #6fa64c;
  --afp-title-wash: rgba(107, 159, 77, .10);
}
body:has(.afp-dark-input:checked) {
  --afp-rule: #344a3b;
  --afp-rule-accent: #8ecb73;
  --afp-title-wash: rgba(142, 203, 115, .11);
}
.site-header { position: relative; border-bottom: 0; }
.site-header::after {
  content: ""; position: absolute; inset-inline: 24px; bottom: 0; height: 2px;
  background: linear-gradient(to left, transparent, var(--afp-rule-accent) 30%, var(--afp-rule) 75%, transparent);
  pointer-events: none;
}
.site-nav { border-bottom: 2px solid rgba(153, 205, 100, .45); }
.sec-title { display: flex; align-items: center; gap: 12px; padding-right: 0; padding-inline-start: 0; }
.sec-title::before {
  content: ""; position: static; flex: 0 0 5px; width: 5px; height: 24px;
  background: linear-gradient(180deg, #2e8b45, #9bcd66); border-radius: 4px;
}
.sec-title::after {
  content: ""; flex: 1 1 48px; min-width: 24px; height: 1px;
  background: linear-gradient(to left, var(--afp-rule-accent), var(--afp-rule) 40%, transparent);
}
.sec-sub { padding-inline-start: 17px; margin-top: 6px; }
.home-intro-title, .post-title {
  position: relative; padding: 12px 20px 14px; margin-bottom: 16px;
  background: linear-gradient(to left, var(--afp-title-wash), transparent 85%);
  border-radius: 8px; line-height: 1.7;
}
.home-intro-title::before, .post-title::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 12px; bottom: 12px;
  width: 4px; background: linear-gradient(180deg, #2e8b45, #9bcd66); border-radius: 4px;
}
.home-intro-title::after, .post-title::after {
  content: ""; position: absolute; inset-inline-start: 20px; inset-inline-end: 0;
  bottom: 0; height: 1px;
  background: linear-gradient(to left, var(--afp-rule-accent), var(--afp-rule) 45%, transparent);
}
.mega-title { position: relative; border-bottom: 0; padding-bottom: 12px; }
.mega-title::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(to left, var(--afp-rule-accent), var(--afp-rule), transparent);
}
.box-title { position: relative; background: linear-gradient(100deg, #1f6b34, #14361f); padding-bottom: 16px; }
.box-title::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px;
  background: linear-gradient(to left, #9bcd66 0%, #65a750 30%, rgba(155,205,102,0) 85%);
}
.post-meta {
  border-bottom: 0; padding-bottom: 14px;
  background: linear-gradient(to left, var(--afp-rule), transparent) bottom / 100% 1px no-repeat;
}
.post-foot, .footer-bottom {
  border-top: 0;
  background: linear-gradient(to left, var(--afp-rule), transparent) top / 100% 1px no-repeat;
}
.post-content h2 {
  border-inline-start: 3px solid var(--afp-rule-accent); padding-inline-start: 12px;
  margin-top: 28px; margin-bottom: 14px;
}
@media (max-width: 640px) {
  .site-header::after { inset-inline: 16px; }
  .sec-title { gap: 8px; }
  .sec-title::after { flex-basis: 24px; min-width: 16px; }
  .home-intro-title, .post-title { padding: 10px 14px 12px; }
  .home-intro-title::after, .post-title::after { inset-inline-start: 14px; }
}

/* Readable small labels and floating symbols in both color schemes. */
body:has(.afp-dark-input:checked) .hi-kicker { color: #a9e3b8; }
.afp-call:link, .afp-call:visited { color: #fff; }
body:has(.afp-dark-input:checked) .afp-backtop:link,
body:has(.afp-dark-input:checked) .afp-backtop:visited { color: #a9e3b8; }