/* ============================================================
   فولاد آریایی — استایل وبلاگ و ویرایشگر مقالات
   ============================================================ */

.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;
}

/* ---------- بخش آخرین مقالات صفحهٔ اصلی ---------- */

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 44px 0 30px;
}

.home-articles {
  padding-bottom: 20px;
}

.home-articles-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 10px;
  background: rgba(201, 162, 39, 0.07);
}

.home-articles-head h2 {
  margin: 0;
  color: var(--primary);
}

/* ---------- کارت مقاله ---------- */

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-card-item {
  display: flex;
  min-width: 0;
}

.article-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.article-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1d1f23, #3a3f47);
}

.article-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.article-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--gold);
}

.article-cover-fallback svg {
  width: 64px;
  height: 64px;
}

.article-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 18px;
  flex: 1;
}

.article-chip {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: #7a600f;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 2px 10px;
  text-decoration: none;
}

.article-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-excerpt {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.article-card-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

@media (hover: hover) {
  .article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow);
    border-color: var(--gold);
  }

  .article-card:hover .article-card-img {
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-card,
  .article-card-img {
    transition: none;
  }

  .article-card:hover {
    transform: none;
  }

  .article-card:hover .article-card-img {
    transform: none;
  }
}

/* ---------- سربرگ صفحه‌های وبلاگ ---------- */

.blog-head {
  padding-top: 28px;
}

.blog-head h1 {
  margin-bottom: 12px;
}

.page-intro {
  color: var(--muted);
  max-width: 760px;
  font-size: 15px;
  line-height: 2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .current {
  color: var(--text);
  font-weight: 600;
}

/* ---------- اسلایدر ویژه ---------- */

.blog-featured {
  max-width: var(--container);
  margin: 24px auto 30px;
  padding: 0 20px;
}

.blog-slider {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #16181c;
  box-shadow: var(--shadow-card);
}

.blog-slide {
  display: block;
}

.blog-slide[hidden] {
  display: none;
}

.blog-slide-link {
  display: block;
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 240px;
  text-decoration: none;
  color: #fff;
}

.blog-slide .article-card-img,
.blog-slide .blog-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-slide .article-cover-fallback {
  position: absolute;
  inset: 0;
  color: var(--gold);
}

.blog-slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 28px 32px 30px;
  background: linear-gradient(to top, rgba(10, 11, 13, 0.92) 8%, rgba(10, 11, 13, 0.55) 45%, rgba(10, 11, 13, 0.05) 85%);
}

.blog-slide-chip {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: #f4e6bf;
  background: rgba(201, 162, 39, 0.22);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 999px;
  padding: 3px 11px;
}

.blog-slide h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(19px, 2.6vw, 30px);
  line-height: 1.5;
  max-width: 780px;
}

.blog-slide-excerpt {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.9;
  max-width: 720px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-slide-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.blog-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(15, 16, 18, 0.5);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.blog-arrow:hover,
.blog-arrow:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.45);
  outline: none;
}

.blog-arrow.prev {
  right: 14px;
}

.blog-arrow.next {
  left: 14px;
}

.blog-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}

.blog-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.blog-dot.active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.6);
}

/* ---------- کاشی دسته‌ها ---------- */

.blog-categories {
  max-width: var(--container);
  margin: 0 auto 26px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-cat-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.blog-cat-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-cat-tile:hover,
.blog-cat-tile.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.14);
}

.blog-cat-media {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 162, 39, 0.1);
  color: #8a6f16;
  overflow: hidden;
  flex-shrink: 0;
}

.blog-cat-media svg {
  width: 18px;
  height: 18px;
}

.blog-cat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-cat-name {
  font-size: 14px;
  font-weight: 600;
}

.blog-cat-count {
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- فهرست مقالات، جستجو و صفحه‌بندی ---------- */

.blog-listing {
  padding-top: 10px;
  padding-bottom: 20px;
}

.blog-listing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.blog-listing-head h2 {
  margin: 0;
  color: var(--primary);
  font-size: clamp(20px, 2.4vw, 26px);
}

.blog-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 266px;
  min-width: 0;
  margin-inline-start: auto;
}

.blog-search input {
  flex: 1 1 auto;
  width: clamp(180px, 22vw, 280px);
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
}

.blog-search .gold-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  white-space: nowrap;
}

.blog-search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.blog-search-clear {
  font-size: 12.5px;
  color: var(--muted);
}

.empty-search {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
}

.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 30px 0 10px;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.page-btn:hover {
  border-color: var(--gold);
  color: var(--primary);
}

.page-btn.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.page-ellipsis {
  color: var(--muted);
  padding: 0 4px;
}

/* ---------- صفحهٔ مقاله ---------- */

.article-page {
  padding-top: 26px;
}

.article-wrap {
  max-width: 860px;
}

.article-header h1 {
  margin: 10px 0 14px;
  font-size: clamp(24px, 3.6vw, 38px);
  line-height: 1.55;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.article-meta > span:not(:last-child)::after {
  content: '•';
  margin-right: 10px;
  color: var(--gold);
}

.article-cover {
  margin: 22px 0 26px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-soft);
}

.article-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-layout {
  display: flex;
  justify-content: center;
}

.article-body {
  width: 100%;
  max-width: 720px;
  font-size: 16.5px;
  line-height: 2;
  color: #1c1c1c;
}

.article-body p {
  margin: 0 0 20px;
}

.article-body h2 {
  font-size: clamp(21px, 2.6vw, 26px);
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
  scroll-margin-top: 90px;
}

.article-body h3 {
  font-size: 19px;
  margin: 28px 0 10px;
  color: var(--text);
  scroll-margin-top: 90px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-right: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body strong {
  font-weight: 700;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: right;
  white-space: nowrap;
}

.article-body th {
  background: var(--surface-soft);
  font-weight: 700;
}

.article-body blockquote {
  margin: 0 0 22px;
  padding: 12px 18px;
  border-right: 4px solid var(--gold);
  background: rgba(201, 162, 39, 0.07);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #333;
}

.article-body figure {
  margin: 0 0 24px;
}

.article-body figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

.article-body figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* فهرست مطالب */

.article-toc {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 30px;
}

.article-toc-title {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--primary);
}

.article-toc ol {
  margin: 0;
  padding-right: 18px;
  font-size: 14px;
  line-height: 1.9;
}

.article-toc li.toc-level-3 {
  margin-right: 14px;
  font-size: 13px;
  color: var(--muted);
}

.article-toc a {
  color: inherit;
  text-decoration: none;
}

.article-toc a:hover {
  color: var(--primary);
}

/* اشتراک‌گذاری و CTA */

.article-share {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 34px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.share-label {
  font-size: 13px;
  color: var(--muted);
}

.share-btn {
  font-family: inherit;
  font-size: 13px;
  padding: 7px 14px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.share-btn:hover {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.35);
}

.copy-status {
  font-size: 12.5px;
  color: var(--success);
}

.article-cta {
  margin: 34px 0 8px;
  padding: 24px;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffdf7, #faf6ea);
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.12);
}

.article-cta h2 {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
  border: 0;
  padding: 0;
}

.article-cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 30px 0 0;
}

.article-nav-link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
}

.article-nav-link span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.article-nav-link strong {
  font-size: 14px;
  line-height: 1.7;
}

.article-nav-link:hover {
  border-color: var(--gold);
}

.article-nav-link.next {
  text-align: left;
}

.article-related {
  margin-top: 46px;
  padding-bottom: 12px;
}

.article-related .section-head {
  margin-bottom: 18px;
}

/* ---------- پنل مدیریت: تب مقالات ---------- */

.admin-blog-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-blog-toolbar input,
.admin-blog-toolbar select {
  font-family: inherit;
  font-size: 13.5px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.blog-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.blog-admin-table th,
.blog-admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 9px 8px;
  text-align: right;
  vertical-align: middle;
}

.blog-admin-table th {
  background: var(--surface-soft);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--muted);
}

.blog-admin-table img {
  width: 68px;
  height: 43px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  background: #eee;
}

.blog-thumb-empty {
  width: 68px;
  height: 43px;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px dashed var(--border);
}

.status-pill {
  display: inline-block;
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
}

.status-pill.published {
  color: var(--success);
  border-color: rgba(31, 122, 68, 0.4);
  background: rgba(31, 122, 68, 0.07);
}

.status-pill.draft {
  color: var(--muted);
}

.status-pill.scheduled {
  color: #8a6f16;
  border-color: var(--gold-soft);
  background: rgba(201, 162, 39, 0.08);
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.row-actions button {
  font-family: inherit;
  font-size: 12px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.row-actions button:hover {
  border-color: var(--gold);
}

.row-actions .danger {
  color: var(--danger);
}

.blog-editor {
  display: none;
}

.blog-editor.open {
  display: block;
}

.blog-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
}

.blog-editor-grid .form-group {
  margin-bottom: 14px;
}

.blog-editor-grid label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.blog-editor-grid input[type="text"],
.blog-editor-grid input[type="datetime-local"],
.blog-editor-grid select,
.blog-editor-grid textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.blog-editor-grid textarea {
  line-height: 1.9;
  resize: vertical;
}

.slug-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.slug-row input {
  direction: ltr;
  text-align: left;
}

.slug-row button {
  white-space: nowrap;
  font-family: inherit;
  font-size: 12px;
  padding: 7px 10px;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}

.field-note {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

.field-note.warn {
  color: var(--danger);
}

.char-counter {
  font-size: 11.5px;
  color: var(--muted);
  text-align: left;
  direction: ltr;
}

.char-counter.ok {
  color: var(--success);
}

.cover-box {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  background: var(--surface-soft);
}

.cover-box img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin-bottom: 8px;
}

.cover-box .empty {
  font-size: 12px;
  color: var(--muted);
  padding: 18px 6px;
}

.editor-toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--surface-soft);
}

.editor-toolbar button {
  font-family: inherit;
  font-size: 12px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.editor-toolbar button:hover {
  border-color: var(--gold);
}

#articleContent {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  min-height: 380px;
  font-size: 14.5px;
}

.seo-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: #fff;
  margin-top: 6px;
}

.seo-preview .seo-url {
  font-size: 11.5px;
  color: var(--success);
  direction: ltr;
  text-align: left;
  margin-bottom: 3px;
}

.seo-preview .seo-title {
  color: #1a0dab;
  font-size: 15px;
  margin-bottom: 3px;
}

.seo-preview .seo-desc {
  font-size: 12.5px;
  color: #555;
  line-height: 1.7;
}

.blog-cat-manager {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  background: var(--surface);
}

.blog-cat-manager h3 {
  margin-top: 0;
}

.blog-cat-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.6fr 90px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.blog-cat-row input {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.blog-cat-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.blog-cat-actions button {
  font-family: inherit;
  font-size: 11.5px;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.editor-save-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}

/* ---------- ریسپانسیو ---------- */

@media (max-width: 1199px) {
  .blog-search {
    flex: 1 0 100%;
    width: 100%;
    margin-inline-start: 0;
  }

  .blog-search input {
    width: auto;
  }
}

@media (max-width: 899px) {
  .blog-categories {
    margin-bottom: 22px;
  }

  .blog-search {
    order: -1;
  }

  .blog-search input {
    font-size: 16px;
  }

  .blog-cat-list {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .blog-cat-list::-webkit-scrollbar {
    display: none;
  }

  .blog-cat-list > li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-editor-grid {
    grid-template-columns: 1fr;
  }

  .blog-slide-link {
    aspect-ratio: 16 / 9;
  }

  .blog-cat-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .article-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-articles-head {
    align-items: flex-start;
  }

  .blog-slide-overlay {
    padding: 18px 16px 62px;
  }

  .blog-slide-excerpt {
    display: none;
  }

  .blog-arrow {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .blog-slide-link {
    min-height: 300px;
    aspect-ratio: auto;
  }

  .article-body {
    font-size: 16px;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav-link.next {
    text-align: right;
  }

  .blog-search input {
    min-width: 0;
    flex: 1;
  }

  .blog-cat-row {
    grid-template-columns: 1fr;
  }
}

.article-body .article-table-wrap {
  overflow-x: auto;
  margin: 0 0 22px;
}

.article-body .article-table-wrap table {
  display: table;
  margin: 0;
  width: 100%;
}
