/* ═══════════════════════════════════════
   BLOG — Shared styles for archive & single
   ═══════════════════════════════════════ */

.active-nav { color: white !important; }

/* wider container for blog pages */
.container-xl {
  max-width: 1320px;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* ── ARCHIVE HERO ── */
.archive-hero {
  position: relative;
  padding: 90px 0 50px;
  overflow: hidden;
}
.archive-title {
  font-family: var(--heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: .9rem;
}
.archive-sub {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.85;
  max-width: 560px;
  margin: 0 auto 2.2rem;
}
.article-body-section img{
  max-width: 100%;
}

/* search */
.archive-search-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.6rem;
}
.archive-search {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .75rem 1.3rem;
  width: 100%;
  max-width: 520px;
  transition: border-color .25s;
}
.archive-search:focus-within { border-color: rgba(0,212,255,.4); }
.archive-search i { color: var(--text-muted); font-size: 1rem; flex-shrink: 0; }
.archive-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--body);
  font-size: .9rem;
  width: 100%;
}
.archive-search input::placeholder { color: var(--text-muted); }

/* filter tabs */
.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}
.filter-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .35rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .22s;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.filter-btn:hover { color: white; border-color: rgba(255,255,255,.2); }
.filter-btn.active {
  background: rgba(0,212,255,.1);
  border-color: rgba(0,212,255,.35);
  color: var(--accent);
}

/* ── FEATURED ARTICLE (archive) ── */
.archive-featured {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  transition: all .35s;
  color: var(--text-main);
}
.archive-featured:hover { transform: translateY(-5px); border-color: rgba(0,212,255,.25); color: var(--text-main); }

.archive-feat-thumb {
  height: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.archive-feat-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.archive-feat-icon { font-size: 6rem; color: white; opacity: .18; }
.archive-feat-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  background: rgba(0,212,255,.15);
  border: 1px solid rgba(0,212,255,.3);
  border-radius: 100px;
  padding: .22rem .75rem;
  font-size: .72rem; font-weight: 700; color: var(--accent);
}
.archive-feat-body { padding: 2.2rem 2rem; }
.archive-feat-title {
  font-family: var(--heading);
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: .75rem;
  color: var(--text-main);
}
.archive-feat-excerpt {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.85;
  margin: 0;
}

/* ── PAGINATION ── */
.archive-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: 3rem;
}
.page-btn {
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .22s;
}
.page-btn:hover:not(:disabled) { color: white; border-color: rgba(255,255,255,.2); }
.page-btn--active {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-color: transparent;
  color: white;
}
.page-btn:disabled { opacity: .35; cursor: default; }
.page-dots { color: var(--text-muted); font-size: .875rem; padding: 0 .2rem; }

/* ── NEWSLETTER BOX ── */
.newsletter-box {
  background: linear-gradient(135deg, rgba(0,94,255,.1), rgba(124,58,237,.1));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
}
.newsletter-form {
  display: flex;
  gap: .6rem;
}
.newsletter-form input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem 1rem;
  color: var(--text-main);
  font-family: var(--body);
  font-size: .875rem;
  outline: none;
  transition: border-color .25s;
}
.newsletter-form input:focus { border-color: rgba(0,212,255,.4); }
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form .btn-nav-cta { flex-shrink: 0; white-space: nowrap; }

/* ═══════════════════════════════════════
   SINGLE ARTICLE
   ═══════════════════════════════════════ */

/* ── ARTICLE HERO ── */
.article-hero {
  padding: 60px 0 40px;
}
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text-muted);
}
.article-breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.article-breadcrumb a:hover { color: white; }
.article-breadcrumb i { font-size: .65rem; opacity: .6; }

.article-cat {
  display: inline-flex;
  align-items: center;
  background: rgba(0,212,255,.1);
  border: 1px solid rgba(0,212,255,.25);
  border-radius: 100px;
  padding: .22rem .75rem;
  font-size: .72rem; font-weight: 700; color: var(--accent);
}
.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--text-muted);
  font-size: .8rem;
}

.article-title {
  font-family: var(--heading);
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.article-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1.6rem;
}

.article-author-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.article-author-name { font-family: var(--heading); font-weight: 800; font-size: .9rem; }
.article-author-role { color: var(--text-muted); font-size: .78rem; }

/* ── ARTICLE COVER ── */
.article-cover {
  height: 420px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}
/* نسخه با تصویر — ارتفاع از تصویر میاد */
.article-cover--photo {
  height: auto;
  display: block;
  padding: 0;
}
.article-cover-img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  object-position: center top;
  border-radius: 20px;
  display: block;
}
.article-cover-icon { font-size: 8rem; color: white; opacity: .18; }
.article-cover-label {
  position: absolute;
  top: 1.2rem; left: 1.2rem;
  background: rgba(0,212,255,.15);
  border: 1px solid rgba(0,212,255,.3);
  border-radius: 100px;
  padding: .22rem .75rem;
  font-size: .72rem; font-weight: 700; color: var(--accent);
}

/* ── ARTICLE BODY SECTION ── */
.article-body-section { padding: 50px 0 60px; }

/* ── ARTICLE CONTENT ── */
.article-content {
  color: var(--text-main);
  font-size: .96rem;
  line-height: 1.9;
}
.article-content p { margin-bottom: 1.4rem; color: var(--text-muted); }
.article-content h2 {
  font-family: var(--heading);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.5px;
  margin: 2.4rem 0 .9rem;
  color: var(--text-main);
}
.article-content h3 {
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 2rem 0 .75rem;
  color: var(--text-main);
}
.article-content ul, .article-content ol {
  padding-left: 1.3rem;
  margin-bottom: 1.4rem;
  color: var(--text-muted);
}
.article-content li { margin-bottom: .5rem; }
.article-content strong { color: var(--text-main); font-weight: 700; }
.article-content em { color: var(--accent); font-style: normal; }
.article-content a { color: var(--accent); text-decoration: none; }
.article-content a:hover { text-decoration: underline; }

/* callout box */
.article-callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(0,212,255,.06);
  border: 1px solid rgba(0,212,255,.18);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin: 1.8rem 0;
  font-size: .9rem;
  color: var(--text-muted);
}
.article-callout i { color: var(--accent); font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.article-callout--green {
  background: rgba(16,185,129,.06);
  border-color: rgba(16,185,129,.2);
  border-left-color: var(--green);
}
.article-callout--green i { color: var(--green); }

/* mini cards grid */
.article-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.8rem 0;
}
.article-card-mini {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  transition: border-color .25s;
}
.article-card-mini:hover { border-color: rgba(0,212,255,.2); }
.article-card-mini i { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.article-card-mini strong { display: block; font-size: .88rem; margin-bottom: .2rem; color: var(--text-main); }
.article-card-mini p { font-size: .8rem; margin: 0; color: var(--text-muted); line-height: 1.6; }

/* table */
.article-table-wrap {
  overflow-x: auto;
  margin: 1.8rem 0;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.article-table th {
  background: rgba(0,212,255,.07);
  color: var(--accent);
  font-family: var(--heading);
  font-weight: 800;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: .85rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.article-table td {
  padding: .85rem 1.1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.article-table tr:last-child td { border-bottom: none; }
.article-table tr:hover td { background: rgba(255,255,255,.02); color: var(--text-main); }

/* in-article CTA */
.article-cta-box {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(0,94,255,.12), rgba(0,212,255,.08));
  border: 1px solid rgba(0,212,255,.2);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  margin-top: 2.2rem;
}
.article-cta-icon {
  width: 46px; height: 46px; min-width: 46px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: white;
}
.article-cta-title { font-family: var(--heading); font-weight: 800; font-size: .95rem; }
.article-cta-sub { color: var(--text-muted); font-size: .8rem; }

/* tags & share */
.article-tags, .article-share {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
}
.article-tag-label { color: var(--text-muted); font-size: .8rem; font-weight: 700; white-space: nowrap; }

/* author bio */
.author-bio {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.6rem;
  margin-top: 2rem;
}
.author-bio-name { font-family: var(--heading); font-weight: 800; font-size: 1rem; }
.author-bio-role { color: var(--accent); font-size: .78rem; font-weight: 600; margin-bottom: .5rem; }
.author-bio-text { color: var(--text-muted); font-size: .84rem; line-height: 1.75; margin: 0; }

/* ── SIDEBAR ── */
.article-sidebar { display: flex; flex-direction: column; gap: 1.4rem; position: sticky; top: 90px; }

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.4rem;
}
.sidebar-card--cta {
  background: linear-gradient(135deg, rgba(0,94,255,.12), rgba(0,212,255,.08));
  border-color: rgba(0,212,255,.2);
  text-align: center;
}
.sidebar-card-title {
  font-family: var(--heading);
  font-weight: 800;
  font-size: .85rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text-main);
}
.sidebar-card-title i { color: var(--accent); }

.toc-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.toc-list a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .82rem;
  padding: .45rem .6rem;
  border-radius: 8px;
  transition: all .2s;
  line-height: 1.4;
}
.toc-list a:hover { color: white; background: rgba(255,255,255,.05); }

.sidebar-cta-icon {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: white;
  margin: 0 auto .85rem;
  box-shadow: 0 8px 24px rgba(0,94,255,.4);
}
.sidebar-cta-title { font-family: var(--heading); font-weight: 800; font-size: .95rem; margin-bottom: .3rem; }
.sidebar-cta-sub { color: var(--text-muted); font-size: .78rem; }

/* ═══════════════════════════════════════
   COMMENTS SECTION
   ═══════════════════════════════════════ */

.comments-section {
  padding: 20px 0 70px;
}

/* header row: title + sort */
.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.comments-title {
  font-family: var(--heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.4px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.comments-title i { color: var(--accent); }

.comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,212,255,.1);
  border: 1px solid rgba(0,212,255,.22);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  border-radius: 100px;
  padding: .1rem .55rem;
  vertical-align: middle;
}

.comments-sort {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--text-muted);
}
.sort-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .28rem .75rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}
.sort-btn:hover { color: white; border-color: rgba(255,255,255,.15); }
.sort-btn.active {
  background: rgba(0,212,255,.1);
  border-color: rgba(0,212,255,.3);
  color: var(--accent);
}

/* ── COMMENT LIST ── */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* single comment */
.comment {
  display: flex;
  gap: 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }

.comment-avatar {
  flex-shrink: 0;
  margin-top: .1rem;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  margin-bottom: .5rem;
}

.comment-name {
  font-family: var(--heading);
  font-weight: 800;
  font-size: .88rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.comment-badge {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: white;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 100px;
  padding: .08rem .5rem;
  letter-spacing: .3px;
}

.comment-date {
  color: var(--text-muted);
  font-size: .76rem;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.comment-date i { font-size: .7rem; opacity: .7; }

.comment-text {
  color: var(--text-muted);
  font-size: .875rem;
  line-height: 1.85;
  margin: 0 0 .8rem;
}

/* action buttons row */
.comment-actions {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.comment-action-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .28rem .65rem;
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: all .2s;
}
.comment-action-btn:hover {
  background: var(--bg-glass);
  border-color: var(--border);
  color: white;
}
.comment-action-btn i { font-size: .8rem; }

.reply-btn { color: var(--accent); }
.reply-btn:hover {
  background: rgba(0,212,255,.08);
  border-color: rgba(0,212,255,.2);
  color: var(--accent);
}
.comment-action-btn.voted,
.comment-action-btn:disabled {
  opacity: .45;
  cursor: default;
}
.comment-action-btn.voted i { color: var(--accent); }
.smm-no-comments {
  color: var(--text-muted);
  font-size: .875rem;
  padding: 1.5rem 0;
}

/* ── NESTED REPLY ── */
.comment-reply {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem;
  border-bottom: none;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-left: 2px solid rgba(0,212,255,.25);
}
.comment-reply .comment-avatar {
  width: 34px;
  height: 34px;
  font-size: .75rem;
}

/* ── LOAD MORE BUTTON ── */
.btn-load-more {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .65rem 1.6rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  transition: all .25s;
}
.btn-load-more:hover {
  background: var(--bg-glass);
  border-color: rgba(0,212,255,.25);
  color: white;
}

/* ── COMMENT FORM ── */
.comment-form-wrap {
  margin-top: 2.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.comment-form-title {
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.3px;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.comment-form-title i { color: var(--accent); }

.comment-field {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.comment-field label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .2px;
}
.comment-field label span { color: var(--accent); }
.comment-field input,
.comment-field textarea {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem .95rem;
  color: var(--text-main);
  font-family: var(--body);
  font-size: .875rem;
  outline: none;
  resize: vertical;
  transition: border-color .25s, box-shadow .25s;
}
.comment-field input::placeholder,
.comment-field textarea::placeholder { color: var(--text-muted); }
.comment-field input:focus,
.comment-field textarea:focus {
  border-color: rgba(0,212,255,.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,.07);
}

.comment-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.comment-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── RELATED SECTION ── */
.related-section { padding: 0 0 80px; }

/* ── AVATAR ── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--heading);
  font-weight: 800;
  font-size: .85rem;
  color: white;
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}

/* ── WP COMMENT FORM OVERRIDES ── */
#commentform p { margin: 0; }
#commentform .comment-reply-link {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .28rem .65rem;
  font-size: .76rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: all .2s;
  text-decoration: none;
}
#commentform .comment-reply-link:hover {
  background: rgba(0,212,255,.08);
  border-color: rgba(0,212,255,.2);
}
.comment-reply-title { display: none; }
#cancel-comment-reply-link {
  margin-left: .5rem;
  font-size: .78rem;
  color: var(--text-muted);
  text-decoration: none;
}
.comment-list .comment-body p { margin: 0; }
.comment-list .comment-body p.comment-text { color: var(--text-muted); }

/* ── RESPONSIVE ── */
@media (max-width: 767px) {
  .article-grid-2 { grid-template-columns: 1fr; }
  .article-cover { height: 240px; }
  .archive-feat-thumb { min-height: 200px; }
  .newsletter-form { flex-direction: column; }
  .article-author-row .ms-auto { width: 100%; }
  .author-bio { flex-direction: column; }
  .article-cta-box { flex-direction: column; text-align: center; }
  .article-cta-box .ms-auto { margin: 0 auto; }
  .comments-header { flex-direction: column; align-items: flex-start; }
  .comment-form-wrap { padding: 1.3rem; }
  .comment-reply { padding: .8rem; }
}
