.category main {
  padding: 34px 0 94px;
  background:
    radial-gradient(circle at 18% 0, rgba(57, 210, 192, .07), transparent 31rem),
    var(--paper);
}

.category .archive-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 34px;
  text-align: center;
}

.category .archive-header::before {
  content: "أحدث أدلة القسم";
  display: block;
  margin-bottom: 6px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}

.category .archive-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: 0;
  line-height: 1.25;
}

.category .archive-header h1 span {
  display: block;
  font-size: clamp(32px, 4.4vw, 49px);
}

.category .archive-header h1 span::after {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  margin: 13px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--cyan));
}

.category .archive-header .section-lead {
  max-width: 600px;
  margin: 13px auto 0;
  color: var(--muted);
  font-size: 15px;
}

.category .archive-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
  padding: 0;
  border: 0;
  background: transparent;
}

.category .archive-list .article-row {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 34px rgba(20, 28, 58, .07);
  color: var(--ink);
  isolation: isolate;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.category .archive-list .article-row:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 122, 69, .48);
  box-shadow: 0 20px 48px rgba(20, 28, 58, .13);
}

.category .archive-list .article-row:focus-visible {
  outline: 3px solid rgba(57, 210, 192, .55);
  outline-offset: 4px;
}

.category .archive-list .thumb {
  position: relative;
  order: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef3f8;
}

.category .archive-list .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.category .archive-list .article-row:hover .thumb img {
  transform: scale(1.035);
}

.category .archive-list .thumb::after {
  content: "الدليل";
  position: absolute;
  right: 13px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 10px;
  border: 1px solid rgba(255, 122, 69, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 12px rgba(16, 22, 47, .12);
  color: #d95925;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.4;
  backdrop-filter: blur(8px);
}

body.category-games .archive-list .thumb::after { content: "الألعاب"; }
body.category-android .archive-list .thumb::after { content: "أندرويد"; }
body.category-windows .archive-list .thumb::after { content: "ويندوز"; }
body.category-internet .archive-list .thumb::after { content: "الإنترنت"; }
body.category-software .archive-list .thumb::after { content: "البرامج"; }

.category .archive-list .article-row time {
  order: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.category .archive-list .article-row time::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(57, 210, 192, .14);
}

.category .archive-list .article-copy {
  order: 3;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 7px 18px 0;
}

.category .archive-list .article-copy h2 {
  display: -webkit-box;
  min-height: 4.55em;
  margin: 0 0 9px;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(17px, 1.55vw, 20px);
  font-weight: 900;
  line-height: 1.52;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.category .archive-list .article-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.category .archive-list .article-row::after {
  content: "اقرأ المقال  ←";
  order: 4;
  display: block;
  margin: 16px 18px 18px;
  padding: 9px 13px;
  border: 1px solid rgba(57, 210, 192, .5);
  border-radius: 10px;
  background: rgba(57, 210, 192, .1);
  color: #08776c;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  transition: background .2s ease, color .2s ease;
}

.category .archive-list .article-row:hover::after {
  background: var(--cyan);
  color: #071b25;
}

.home .latest-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.home .latest-list article {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  padding: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 34px rgba(20, 28, 58, .07);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.home .latest-list article:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 122, 69, .48);
  box-shadow: 0 20px 48px rgba(20, 28, 58, .13);
}

.home .latest-list .latest-thumb {
  position: relative;
  order: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef3f8;
}

.home .latest-list .latest-thumb::after {
  content: "دليل جديد";
  position: absolute;
  right: 13px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 10px;
  border: 1px solid rgba(255, 122, 69, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 12px rgba(16, 22, 47, .12);
  color: #d95925;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.4;
}

.home .latest-list .latest-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.home .latest-list article:hover .latest-thumb img {
  transform: scale(1.035);
}

.home .latest-list article > div {
  order: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  padding: 13px 18px 0;
}

.home .latest-list small,
.tb-related-card time {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.home .latest-list small::before,
.tb-related-card time::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(57, 210, 192, .14);
}

.home .latest-list h3 {
  display: -webkit-box;
  min-height: 4.55em;
  margin: 7px 0 9px;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(17px, 1.55vw, 20px);
  font-weight: 900;
  line-height: 1.52;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home .latest-list p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home .latest-list .arrow {
  order: 3;
  display: block;
  width: auto;
  margin: 16px 18px 18px;
  padding: 9px 13px;
  border: 1px solid rgba(57, 210, 192, .5);
  border-radius: 10px;
  background: rgba(57, 210, 192, .1);
  color: #08776c;
  font-size: 0;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
  transition: background .2s ease, color .2s ease;
}

.home .latest-list .arrow::before {
  content: "اقرأ المقال  ←";
  font-size: 12px;
}

.home .latest-list article:hover .arrow {
  background: var(--cyan);
  color: #071b25;
}

.single-post .article-main > .related {
  display: none;
}

.tb-related-cards {
  margin: 46px 0 0;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.tb-related-heading {
  margin-bottom: 21px;
  text-align: center;
}

.tb-related-heading span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
}

.entry-content .tb-related-heading h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: clamp(25px, 3.6vw, 34px);
  line-height: 1.35;
}

.tb-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.tb-related-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 10px 26px rgba(20, 28, 58, .07);
  color: var(--ink);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.tb-related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 69, .48);
  box-shadow: 0 17px 38px rgba(20, 28, 58, .12);
}

.tb-related-card:focus-visible {
  outline: 3px solid rgba(57, 210, 192, .55);
  outline-offset: 4px;
}

.tb-related-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef3f8;
}

.tb-related-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.tb-related-card:hover .tb-related-media > img {
  transform: scale(1.035);
}

.tb-related-media > span {
  position: absolute;
  right: 10px;
  bottom: 9px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 10px rgba(16, 22, 47, .12);
  color: #d95925;
  font-size: 9px;
  font-weight: 900;
}

.tb-related-card time {
  padding: 11px 13px 0;
}

.tb-related-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 6px 13px 0;
}

.tb-related-copy h3 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tb-related-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tb-related-cta {
  display: block;
  margin: 13px;
  padding: 8px 10px;
  border: 1px solid rgba(57, 210, 192, .5);
  border-radius: 9px;
  background: rgba(57, 210, 192, .1);
  color: #08776c;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.tb-related-card:hover .tb-related-cta {
  background: var(--cyan);
  color: #071b25;
}

body.dark-mode.category .archive-list .article-row {
  background: var(--card);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

body.dark-mode.category .archive-list .thumb {
  background: #202944;
}

body.dark-mode.category .archive-list .article-row::after {
  color: #7ce9dc;
}

body.dark-mode.category .archive-list .article-row:hover::after {
  color: #071b25;
}

body.dark-mode.home .latest-list article,
body.dark-mode .tb-related-card {
  background: var(--card);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

body.dark-mode .tb-related-media,
body.dark-mode.home .latest-list .latest-thumb {
  background: #202944;
}

body.dark-mode.home .latest-list .arrow,
body.dark-mode .tb-related-cta {
  color: #7ce9dc;
}

body.dark-mode.home .latest-list article:hover .arrow,
body.dark-mode .tb-related-card:hover .tb-related-cta {
  color: #071b25;
}

@media (max-width: 980px) {
  .category .archive-list,
  .home .latest-list,
  .tb-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .category main {
    padding: 18px 0 64px;
  }

  .category .archive-header {
    padding: 28px 0 26px;
  }

  .category .archive-list,
  .home .latest-list,
  .tb-related-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .category .archive-list .article-copy h2,
  .home .latest-list h3 {
    min-height: auto;
    font-size: 19px;
  }

  .tb-related-copy h3 {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .category .archive-list .article-row,
  .category .archive-list .thumb img,
  .category .archive-list .article-row::after,
  .home .latest-list article,
  .home .latest-list .latest-thumb img,
  .home .latest-list .arrow,
  .tb-related-card,
  .tb-related-media > img {
    transition: none;
  }
}
