/* ============================
   VARIABLES (همون توکن‌های صفحه محصولات - برای یکدستی بصری سایت)
============================ */
:root {
  --teal: #00A89E;
  --teal-d: #01887F;
  --teal-l: #E6F7F6;
  --navy: #16222F;
  --text: #22313F;
  --text-m: #5A6B7A;
  --text-s: #8A99A8;
  --bg: #F4F7F8;
  --bdr: #E5EBED;
  --sh1: 0 2px 10px rgba(15,30,40,.06);
  --sh2: 0 8px 28px rgba(15,30,40,.12);
  --r: 12px;
}

/* ============================
   HERO (مشابه pr-hero صفحه محصولات، ولی مستقل تا وابسته به CSS اون صفحه نباشه)
============================ */
.ar-hero {
  padding: 1.6rem 0 1.2rem;
  border-bottom: 1px solid var(--bdr);
}
.ar-hero-title { font-size: 1.65rem; font-weight: 800; color: var(--navy); }

/* ============================
   STICKY SEARCH + TYPE FILTER
   (کپی رفتار .pr-sticky-zone از صفحه محصولات)
============================ */
.ar-sticky-zone {
  position: sticky;
  top: 74px;
  z-index: 400;
  background: #fff;
  border-bottom: 1px solid var(--bdr);
}
.ar-sticky-inner {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .6rem 0;
  flex-wrap: wrap;
}

.ar-type-tabs {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.ar-type-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.2rem;
  border-radius: 50px;
  border: 1.5px solid var(--bdr);
  background: #fff;
  color: var(--text-m);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  white-space: nowrap;
}
.ar-type-tab:hover { border-color: var(--teal); color: var(--teal-d); }
.ar-type-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.ar-search-wrap { flex: 0 0 280px; }
.ar-search {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--bg);
  border: 1.5px solid var(--bdr);
  border-radius: 50px;
  padding: .55rem 1rem;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.ar-search:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 168, 158, .12);
}
.ar-search i { color: var(--text-m); }
.ar-search:focus-within i { color: var(--teal); }
.ar-search input {
  border: none;
  background: transparent;
  outline: none;
  height: 20px;
  font-size: .88rem;
  width: 100%;
  color: var(--text);
}
.ar-search input::placeholder { color: var(--text-m); opacity: .7; }

/* ============================
   نتیجه‌شمار
============================ */
.ar-result-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0 1.2rem;
  color: var(--text-m);
  font-size: .9rem;
}

/* ============================
   گرید کارت مقالات
============================ */
.ar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}
.ar-card {
  display: block;
  background: #fff;
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh1);
  color: inherit;
  transition: .25s;
}
.ar-card:hover { box-shadow: var(--sh2); }
.ar-card-img { position: relative; height: 190px; background: var(--bg); }
.ar-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-card-type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--teal);
  color: #fff;
  padding: .25rem .65rem;
  border-radius: 50px;
  font-size: .7rem;
  font-weight: 700;
}
.ar-card-pin-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--navy);
  color: #fff;
  padding: .25rem .6rem;
  border-radius: 50px;
  font-size: .68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.ar-card-body { padding: 1.1rem 1.3rem; }
.ar-card-date { font-size: .75rem; color: var(--text-s); margin-bottom: .4rem; display: block; }
.ar-card-title { font-size: 1.02rem; font-weight: 800; margin-bottom: .5rem; color: var(--navy); }
.ar-card-summary { font-size: .85rem; color: var(--text-m); margin-bottom: .7rem; }
.ar-card-readmore { color: var(--teal); font-weight: 600; font-size: .85rem; display: inline-flex; align-items: center; gap: .3rem; }

.ar-empty { color: var(--text-s); text-align: center; padding: 3rem 0; grid-column: 1 / -1; }
.ar-pagination { margin-top: 2rem; display: flex; justify-content: center; }

/* ============================
   صفحه تک مقاله
============================ */
.ar-detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}
.ar-detail-main {
  background: #fff;
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  box-shadow: var(--sh1);
  padding: 1.6rem;
}
.ar-detail-img { border-radius: var(--r); overflow: hidden; margin-bottom: 1.4rem; }
.ar-detail-img img { width: 100%; display: block; }
.ar-detail-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }

.ar-detail-actions { display: flex; gap: .6rem; margin-inline-start: auto; }
.ar-action-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #fff;
  border: 1.5px solid var(--bdr);
  color: var(--text-m);
  padding: .4rem .9rem;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}
.ar-action-btn:hover { border-color: var(--teal); color: var(--teal-d); }

/* ============================
   حالت پرینت: فقط محتوای اصلی مقاله چاپ بشه
============================ */
@media print {
  .ar-no-print,
  .rs-header-area, header, footer,
  .ar-sticky-zone, .backtotop-wrap { display: none !important; }

  .ar-detail-layout { grid-template-columns: 1fr !important; }
  .ar-detail-main { box-shadow: none !important; border: none !important; padding: 0 !important; }
  .ar-hero { border-bottom: none !important; }
}
.ar-detail-type-badge {
  background: var(--teal-l);
  color: var(--teal-d);
  padding: .3rem .7rem;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 700;
}
.ar-detail-date { font-size: .82rem; color: var(--text-s); }
.ar-detail-body { font-size: 1rem; line-height: 2; color: var(--text); }
.ar-detail-body img { max-width: 100%; border-radius: 8px; }

.ar-files { margin-top: 2rem; border-top: 1px solid var(--bdr); padding-top: 1.2rem; }
.ar-files h5 { font-weight: 800; color: var(--navy); margin-bottom: .8rem; }
.ar-files ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.ar-files a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--teal-d);
  font-weight: 600;
  background: var(--teal-l);
  padding: .5rem .9rem;
  border-radius: 8px;
  width: fit-content;
}

.ar-sidebar-title { font-weight: 800; color: var(--navy); margin-bottom: 1rem; font-size: 1rem; }
.ar-related-list { display: flex; flex-direction: column; gap: 1rem; }
.ar-related-item {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--bdr);
  border-radius: 10px;
  padding: .7rem;
  color: inherit;
  transition: .2s;
}
.ar-related-item:hover { box-shadow: var(--sh2); }
.ar-related-img { flex: 0 0 80px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--bg); }
.ar-related-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-related-title { font-size: .85rem; font-weight: 700; color: var(--navy); }
.ar-back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--text-m);
  font-size: .9rem;
  margin-bottom: 1rem;
}
.ar-back-link:hover { color: var(--teal); }

/* ============================
   موبایل
============================ */
@media (max-width: 768px) {
  .ar-sticky-inner { flex-wrap: wrap; }

  .ar-search-wrap { flex: 1 1 100%; order: 1; }
  .ar-type-tabs {
    order: 2;
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .ar-type-tabs::-webkit-scrollbar { display: none; }
  .ar-type-tab { flex: 0 0 auto; padding: .5rem .9rem; font-size: .8rem; }

  .ar-grid { grid-template-columns: 1fr; gap: 1rem; }
  .ar-card-img { height: 170px; }

  .ar-detail-layout { grid-template-columns: 1fr; }
  .ar-detail-main { padding: 1.1rem; }
  .ar-detail-img { margin-bottom: 1rem; }
  .ar-detail-body { font-size: .95rem; line-height: 1.9; }
}
