
:root {
  --bg-base: #5B5845;          /* رنگ پایه پشت بافت پس‌زمینه */
  --text: #000000;             /* body color */
  --link-hover: #FFDB00;       /* a:hover */
  --box-bg: rgba(128, 114, 79, 0.6);   /* ipsBox / کارت‌ها */
  --box-bg-strong: rgba(128, 114, 79, 0.8); /* ردیف‌های لیست */
  --box-border: #55523f;       /* ipsBox border */
  --row-border: #272727;       /* ipsDataItem border */
  --sticky-bg: #A79875;
  --header-overlay: rgba(0, 0, 0, 0.55);  /* برای خوانا بودن هدر روی بافت */
  --muted: #3a3830;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); line-height: 1.8;
  background-color: var(--bg-base);
  background-image: url('background.jpg'); background-repeat: repeat;
  font-family: "Roboto", Tahoma, "Vazirmatn", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-header {
  background: var(--header-overlay); padding: 14px 24px;
  border-bottom: 3px solid var(--sticky-bg);
}
.site-title {
  color: #ffffff; text-decoration: none;
  font-size: 1.3rem; font-weight: 700; letter-spacing: .3px;
}
.site-logo { max-height: 48px; display: block; }
.breadcrumb {
  padding: 10px 24px; color: #fff; font-size: .9rem;
  background: rgba(128,114,79,.6);
}
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { color: var(--link-hover); }
.search-wrap { max-width: 860px; margin: 14px auto 0; padding: 0 24px; width: 100%; }
.pagefind-ui {
  --pagefind-ui-primary: #4a3f1e;
  --pagefind-ui-text: #1a1a1a;
  --pagefind-ui-background: rgba(255,255,255,0.92);
  --pagefind-ui-border: var(--box-border);
  --pagefind-ui-border-radius: 6px;
  --pagefind-ui-font: "Roboto", Tahoma, "Vazirmatn", sans-serif;
}
.pagefind-ui__form { background: rgba(255,255,255,0.92); border-radius: 6px; }
.pagefind-ui__result {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--box-border);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.pagefind-ui__result-title { color: #4a3f1e; }
.pagefind-ui__result-title a { color: #4a3f1e; text-decoration: none; font-weight: 700; }
.pagefind-ui__result-title a:hover { color: #8a6d00; }
.pagefind-ui__result-excerpt { color: #1a1a1a; }
.pagefind-ui__result-excerpt mark {
  background: #FFDB00; color: #000; padding: 0 2px; border-radius: 2px;
}
.pagefind-ui__message {
  color: #fff; background: rgba(0,0,0,0.35); padding: 6px 12px; border-radius: 6px;
  display: inline-block; margin-bottom: 8px;
}
.pagefind-ui__button {
  background: var(--box-bg-strong); color: #fff; border: 1px solid var(--box-border);
  border-radius: 6px;
}
main { max-width: 860px; margin: 0 auto; padding: 20px 24px 60px; width: 100%; flex: 1 0 auto; }
h1 {
  font-size: 1.5rem; margin-top: .2em; color: #fff;
  border-bottom: 4px solid #333; padding-bottom: 10px;
}
h2 {
  font-size: 1.05rem; color: #fff; background: var(--header-overlay);
  margin: 22px 0 0; padding: 9px 14px; border-radius: 6px 6px 0 0;
}
h2 a { color: #fff; text-decoration: none; display: block; }
h2 a:hover { color: var(--link-hover); }
.list { list-style: none; padding: 0; margin: 0 0 8px; }
.list li {
  background: var(--box-bg-strong); border-bottom: 1px solid var(--row-border);
  margin-bottom: 0; padding: 12px 16px; transition: background .15s;
}
.list li:hover { background: rgba(164, 152, 117, 0.85); }
.list a { color: #fff; text-decoration: none; font-weight: 500; }
.list a:hover { color: var(--link-hover); }
.topic-date { color: #e3e0d2; font-size: .8rem; }
.meta { color: #e3e0d2; font-size: .85rem; }
.post {
  background: var(--box-bg); border: 1px solid var(--box-border);
  border-radius: 4px; padding: 0; margin-bottom: 16px; overflow: hidden;
}
.post-meta {
  background: rgba(0,0,0,0.25); color: #eee;
  font-size: .85rem; padding: 10px 16px; border-bottom: 1px solid var(--box-border);
}
.post-meta strong { color: #fff; }
.post-content { padding: 16px; color: #1a1a1a; background: rgba(255,255,255,0.55); }
.post-content a { color: #4a3f1e; text-decoration: underline; }
.post-content a:hover { color: #8a6d00; }
.post-content img { max-width: 100%; border-radius: 6px; }
.post-content blockquote {
  border-right: 3px solid var(--box-border); margin: 10px 0; padding: 8px 14px;
  background: rgba(0,0,0,0.06); color: #1a1a1a;
}
.post-content details {
  background: rgba(0,0,0,0.06); border: 1px solid var(--box-border);
  border-radius: 6px; padding: 8px 12px; margin: 10px 0;
}
.post-content details summary { cursor: pointer; color: #4a3f1e; font-weight: 500; }
.site-footer {
  text-align: center; color: #eee; background: var(--header-overlay);
  padding: 22px 16px 40px; font-size: .82rem; margin-top: 30px;
  flex-shrink: 0;
}
.site-footer p { margin: 4px 0; }
.site-footer .footer-note { font-size: .75rem; opacity: .75; }
