/* ============================================================
   PAGES.CSS — صفحات آرشیو، صفحه تکی، جست‌وجو و دسته‌بندی
   بر پایه همان متغیرهای style.css نوشته شده است.
   ============================================================ */

/* ---------- سر صفحه داخلی ---------- */
.page-head {
  padding: 150px 0 40px;
  position: relative;
}
.page-head .container { position: relative; z-index: 2; }
.page-breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; opacity: .6; margin-bottom: 16px;
}
.page-breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.page-head h1 {
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.4; margin: 0 0 14px; font-weight: 800;
}
.page-head .page-desc { max-width: 620px; opacity: .72; line-height: 2.1; font-size: 15px; }

/* ---------- کادر جست‌وجو و فیلترها ---------- */
.archive-tools {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  margin: 26px 0 34px;
}
.search-box {
  position: relative; flex: 1 1 280px; max-width: 420px;
}
.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 40px;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  padding: 13px 46px 13px 18px;
  transition: border-color .2s, background .2s;
}
.search-box input:focus {
  outline: none;
  border-color: var(--accent, #ff5a1f);
  background: rgba(255, 255, 255, .06);
}
.search-box button {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent, #ff5a1f); border: none; color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.search-box .suggest {
  position: absolute; inset-inline: 0; top: calc(100% + 8px);
  background: #12151a; border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px; overflow: hidden; z-index: 30; display: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.search-box .suggest.is-open { display: block; }
.search-box .suggest a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 14px;
}
.search-box .suggest a:last-child { border-bottom: none; }
.search-box .suggest a:hover { background: rgba(255, 255, 255, .05); }
.search-box .suggest img { width: 38px; height: 30px; object-fit: cover; border-radius: 6px; }
.search-box .suggest small { margin-inline-start: auto; opacity: .5; font-size: 12px; }

.cat-chips { display: flex; gap: 9px; flex-wrap: wrap; }
.cat-chips a {
  padding: 8px 16px; border-radius: 30px; font-size: 13px;
  border: 1px solid rgba(255, 255, 255, .12); opacity: .75; transition: .2s;
}
.cat-chips a:hover { opacity: 1; border-color: rgba(255, 255, 255, .3); }
.cat-chips a.is-active {
  background: var(--accent, #ff5a1f); border-color: var(--accent, #ff5a1f);
  color: #fff; opacity: 1; font-weight: 600;
}

.result-count { font-size: 13px; opacity: .55; margin-bottom: 22px; }

/* ---------- شبکه کارت‌های آرشیو ---------- */
.archive-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.a-card {
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px; overflow: hidden;
  transition: transform .3s, border-color .3s;
}
.a-card:hover { transform: translateY(-5px); border-color: rgba(255, 255, 255, .22); }
.a-card .a-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #0f1216; }
.a-card .a-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.a-card:hover .a-thumb img { transform: scale(1.05); }
.a-card .a-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.a-card .a-meta { display: flex; gap: 10px; font-size: 12px; opacity: .55; flex-wrap: wrap; }
.a-card .a-cat { color: var(--accent, #ff5a1f); opacity: 1; }
.a-card h3 { font-size: 17px; line-height: 1.7; margin: 0; }
.a-card p { font-size: 13.5px; opacity: .65; line-height: 2; margin: 0; }
.a-card .a-more { margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--accent, #ff5a1f); display: inline-flex; gap: 6px; align-items: center; }

.empty-state { text-align: center; padding: 70px 20px; opacity: .55; }

/* ---------- صفحه‌بندی ---------- */
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 46px 0 10px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px;
  display: grid; place-items: center; font-size: 14px;
  border: 1px solid rgba(255, 255, 255, .12); opacity: .75;
}
.pager a:hover { opacity: 1; border-color: rgba(255, 255, 255, .3); }
.pager .is-current { background: var(--accent, #ff5a1f); border-color: var(--accent, #ff5a1f); color: #fff; opacity: 1; }

/* ---------- صفحه تکی ---------- */
.single-wrap { padding: 140px 0 80px; }
.single-hero { max-width: 900px; margin: 0 auto 36px; }
.single-hero h1 { font-size: clamp(26px, 4vw, 46px); line-height: 1.45; margin: 14px 0; }
.single-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; opacity: .6; }
.single-meta .dot-sep::before { content: "·"; margin-inline-end: 8px; }
.single-cover {
  max-width: 1040px; margin: 0 auto 44px; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}
.single-cover img, .single-cover video { width: 100%; display: block; }
.single-layout {
  max-width: 1040px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 46px; align-items: start;
}
.single-body { font-size: 16px; line-height: 2.3; }
.single-body p { margin: 0 0 22px; }
.single-body h2 { font-size: 24px; margin: 38px 0 14px; }
.single-body h3 { font-size: 19px; margin: 30px 0 12px; }
.single-body ul, .single-body ol { padding-inline-start: 22px; margin-bottom: 22px; }
.single-body li { margin-bottom: 8px; }
.single-body img { max-width: 100%; border-radius: 14px; margin: 14px 0; }
.single-body blockquote {
  border-inline-start: 3px solid var(--accent, #ff5a1f);
  padding: 4px 18px; margin: 24px 0; opacity: .85;
}
.single-body a { color: var(--accent, #ff5a1f); text-decoration: underline; }

.single-side { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 22px; }
.side-box {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px; padding: 18px 20px;
}
.side-box h4 { font-size: 13px; opacity: .5; margin: 0 0 12px; font-weight: 600; }
.side-box .side-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 7px 0; border-bottom: 1px dashed rgba(255, 255, 255, .08); }
.side-box .side-row:last-child { border-bottom: none; }
.side-box .side-row span { opacity: .55; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-row a, .share-row button {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .12); background: transparent; color: inherit; cursor: pointer;
}
.share-row a:hover, .share-row button:hover { border-color: var(--accent, #ff5a1f); color: var(--accent, #ff5a1f); }

.single-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 34px 0; }
.single-gallery img, .single-gallery video { width: 100%; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .08); }

.single-nav { max-width: 1040px; margin: 50px auto 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.related-section { max-width: 1040px; margin: 70px auto 0; }
.related-section h3 { font-size: 20px; margin-bottom: 22px; }

/* ---------- نتایج جست‌وجو ---------- */
.search-group { margin-bottom: 50px; }
.search-group > h2 {
  font-size: 17px; margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex; align-items: center; gap: 10px;
}
.search-group > h2 small { opacity: .5; font-weight: 400; font-size: 13px; }

/* ---------- مودال جست‌وجوی نوار بالا ---------- */
.nav-search-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: inherit; cursor: pointer;
}
.nav-search-btn:hover { border-color: var(--accent, #ff5a1f); color: var(--accent, #ff5a1f); }
.search-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(6, 8, 10, .92);
  backdrop-filter: blur(6px); display: none; padding: 16vh 20px 20px;
}
.search-overlay.is-open { display: block; }
.search-overlay .inner { max-width: 620px; margin: 0 auto; }
.search-overlay .search-box { max-width: none; }
.search-overlay .hint { text-align: center; margin-top: 18px; font-size: 13px; opacity: .45; }
.search-close {
  position: absolute; top: 26px; inset-inline-end: 26px;
  width: 40px; height: 40px; border-radius: 50%; background: transparent;
  border: 1px solid rgba(255, 255, 255, .15); color: inherit; cursor: pointer;
}

/* ---------- دکمه «مشاهده همه» در صفحه اصلی ---------- */
.section-more { display: flex; justify-content: center; margin-top: 40px; }
.section-more a {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 40px; font-size: 14px;
  border: 1px solid rgba(255, 255, 255, .16); transition: .25s;
}
.section-more a:hover { background: var(--accent, #ff5a1f); border-color: var(--accent, #ff5a1f); color: #fff; }

@media (max-width: 900px) {
  .single-layout { grid-template-columns: 1fr; gap: 30px; }
  .single-side { position: static; }
  .page-head { padding-top: 120px; }
}

/* لینک روی کارت نمونه‌کار در صفحه اصلی */
.proj-card { position: relative; }
.proj-card .proj-link { position: absolute; inset: 0; z-index: 6; }

/* ---------- اعضای تیم درگیر در پروژه (صفحه تکی نمونه‌کار) ---------- */
.project-team-list { display: flex; flex-direction: column; gap: 12px; }
.project-team-item { display: flex; align-items: center; gap: 10px; }
.project-team-item img {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none;
  border: 1px solid rgba(255, 255, 255, .12);
}
.project-team-item .pt-fallback {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--accent, #ff5a1f); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 700;
}
.project-team-item b { display: block; font-size: 13.5px; }
.project-team-item span { display: block; font-size: 12px; opacity: .6; }
