/* Atheer admin article display patch v1 */

/* تحسين بطاقات المقالات في الواجهة والرئيسية */
body.frontend-shell .blog-grid,
body.frontend-shell .articles-grid,
body.frontend-shell .archive-grid,
body.frontend-shell .knowledge-grid,
body.frontend-shell .posts-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:1.25rem;
  align-items:stretch;
}

body.frontend-shell .blog-card,
body.frontend-shell .article-card,
body.frontend-shell .post-card,
body.frontend-shell .archive-card,
body.frontend-shell .knowledge-card,
body.frontend-shell article.card,
body.frontend-shell .card.blog-item{
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:100%;
  overflow:hidden;
  border-radius:1.7rem;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.88));
  border:1px solid rgba(203,213,225,.86);
  box-shadow:0 18px 48px rgba(57,72,112,.08),0 1px 0 rgba(255,255,255,.95) inset;
  transition:transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
body.frontend-shell .blog-card:hover,
body.frontend-shell .article-card:hover,
body.frontend-shell .post-card:hover,
body.frontend-shell .archive-card:hover,
body.frontend-shell .knowledge-card:hover,
body.frontend-shell article.card:hover,
body.frontend-shell .card.blog-item:hover{
  transform:translateY(-7px);
  box-shadow:0 28px 64px rgba(57,72,112,.14);
  border-color:rgba(165,180,252,.95);
}

body.frontend-shell .blog-card .cover,
body.frontend-shell .article-card .cover,
body.frontend-shell .post-card .cover,
body.frontend-shell .archive-card .cover,
body.frontend-shell .knowledge-card .cover,
body.frontend-shell .blog-card .thumb,
body.frontend-shell .article-card .thumb,
body.frontend-shell .post-card .thumb,
body.frontend-shell .archive-card .thumb,
body.frontend-shell .knowledge-card .thumb,
body.frontend-shell .blog-card img:first-child,
body.frontend-shell .article-card img:first-child,
body.frontend-shell .post-card img:first-child,
body.frontend-shell .archive-card img:first-child,
body.frontend-shell .knowledge-card img:first-child{
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  display:block;
}

body.frontend-shell .blog-card .content,
body.frontend-shell .article-card .content,
body.frontend-shell .post-card .content,
body.frontend-shell .archive-card .content,
body.frontend-shell .knowledge-card .content,
body.frontend-shell .blog-card .card-body,
body.frontend-shell .article-card .card-body,
body.frontend-shell .post-card .card-body,
body.frontend-shell .archive-card .card-body,
body.frontend-shell .knowledge-card .card-body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  padding:1.1rem 1.1rem 1.2rem;
}

body.frontend-shell .blog-card .meta,
body.frontend-shell .article-card .meta,
body.frontend-shell .post-card .meta,
body.frontend-shell .archive-card .meta,
body.frontend-shell .knowledge-card .meta,
body.frontend-shell .blog-card time,
body.frontend-shell .article-card time,
body.frontend-shell .post-card time,
body.frontend-shell .archive-card time,
body.frontend-shell .knowledge-card time{
  color:#64748b !important;
  font-size:.92rem;
  font-weight:700;
}

body.frontend-shell .blog-card h2,
body.frontend-shell .blog-card h3,
body.frontend-shell .article-card h2,
body.frontend-shell .article-card h3,
body.frontend-shell .post-card h2,
body.frontend-shell .post-card h3,
body.frontend-shell .archive-card h2,
body.frontend-shell .archive-card h3,
body.frontend-shell .knowledge-card h2,
body.frontend-shell .knowledge-card h3{
  color:#0f172a !important;
  font-size:1.08rem;
  line-height:1.55;
  margin:.45rem 0 .55rem;
  font-weight:900;
}

body.frontend-shell .blog-card p,
body.frontend-shell .article-card p,
body.frontend-shell .post-card p,
body.frontend-shell .archive-card p,
body.frontend-shell .knowledge-card p,
body.frontend-shell .blog-card .excerpt,
body.frontend-shell .article-card .excerpt,
body.frontend-shell .post-card .excerpt,
body.frontend-shell .archive-card .excerpt,
body.frontend-shell .knowledge-card .excerpt{
  color:#475569 !important;
  line-height:1.95;
  margin:0 0 .85rem;
}

body.frontend-shell .blog-card .read-more,
body.frontend-shell .article-card .read-more,
body.frontend-shell .post-card .read-more,
body.frontend-shell .archive-card .read-more,
body.frontend-shell .knowledge-card .read-more{
  margin-top:auto;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.78rem 1rem;
  border-radius:999px;
  background:linear-gradient(135deg,#ffffff,#f5f7ff);
  border:1px solid rgba(203,213,225,.84);
  color:#334155 !important;
  font-weight:800;
  box-shadow:0 10px 24px rgba(57,72,112,.08);
}

/* إبراز العناوين الفرعية داخل المقال */
body.frontend-shell .editor-content,
body.frontend-shell .article-content,
body.frontend-shell .post-content,
body.frontend-shell .entry-content,
body.frontend-shell .prose{
  color:#111827 !important;
  font-size:1.05rem;
  line-height:2.15;
}

body.frontend-shell .editor-content > * + *,
body.frontend-shell .article-content > * + *,
body.frontend-shell .post-content > * + *,
body.frontend-shell .entry-content > * + *,
body.frontend-shell .prose > * + *{
  margin-top:1.05rem;
}

body.frontend-shell .editor-content p,
body.frontend-shell .article-content p,
body.frontend-shell .post-content p,
body.frontend-shell .entry-content p,
body.frontend-shell .prose p{
  color:#111827 !important;
  line-height:2.2;
  margin:0 0 1.1rem !important;
}

body.frontend-shell .editor-content h2,
body.frontend-shell .article-content h2,
body.frontend-shell .post-content h2,
body.frontend-shell .entry-content h2,
body.frontend-shell .prose h2{
  color:#0f172a !important;
  font-weight:900;
  line-height:1.5;
  margin:1.9rem 0 .85rem !important;
  padding:.15rem 0 .75rem;
  position:relative;
  border-bottom:1px solid rgba(203,213,225,.85);
}
body.frontend-shell .editor-content h2::after,
body.frontend-shell .article-content h2::after,
body.frontend-shell .post-content h2::after,
body.frontend-shell .entry-content h2::after,
body.frontend-shell .prose h2::after{
  content:"";
  position:absolute;
  right:0;
  bottom:-1px;
  width:82px;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg,#7c3aed,#06b6d4);
}

body.frontend-shell .editor-content h3,
body.frontend-shell .article-content h3,
body.frontend-shell .post-content h3,
body.frontend-shell .entry-content h3,
body.frontend-shell .prose h3{
  color:#111827 !important;
  font-weight:900;
  line-height:1.55;
  margin:1.55rem 0 .75rem !important;
  padding-right:.9rem;
  border-right:4px solid rgba(79,70,229,.28);
}

body.frontend-shell .editor-content h4,
body.frontend-shell .article-content h4,
body.frontend-shell .post-content h4,
body.frontend-shell .entry-content h4,
body.frontend-shell .prose h4{
  color:#1f2937 !important;
  font-weight:800;
  margin:1.25rem 0 .65rem !important;
}

body.frontend-shell .editor-content ul,
body.frontend-shell .editor-content ol,
body.frontend-shell .article-content ul,
body.frontend-shell .article-content ol,
body.frontend-shell .post-content ul,
body.frontend-shell .post-content ol,
body.frontend-shell .entry-content ul,
body.frontend-shell .entry-content ol{
  margin:0 0 1.15rem !important;
  padding-right:1.45rem !important;
  line-height:2.1;
}
body.frontend-shell .editor-content li,
body.frontend-shell .article-content li,
body.frontend-shell .post-content li,
body.frontend-shell .entry-content li{
  color:#111827 !important;
  margin-bottom:.4rem;
}
body.frontend-shell .editor-content li::marker,
body.frontend-shell .article-content li::marker,
body.frontend-shell .post-content li::marker,
body.frontend-shell .entry-content li::marker{
  color:#7c3aed;
}

/* تحسين عرض صفحة المقال نفسها */
body.frontend-shell .article-shell,
body.frontend-shell .post-shell,
body.frontend-shell .single-article-shell,
body.frontend-shell .single-post-shell,
body.frontend-shell article.glass{
  border-radius:2rem;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.88));
  border:1px solid rgba(203,213,225,.82);
  box-shadow:0 18px 52px rgba(57,72,112,.09),0 1px 0 rgba(255,255,255,.95) inset;
  overflow:hidden;
}

body.frontend-shell .article-hero,
body.frontend-shell .post-hero,
body.frontend-shell .single-article-hero{
  overflow:hidden;
  border-radius:2rem;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(255,255,255,.88));
  border:1px solid rgba(203,213,225,.78);
  box-shadow:0 18px 48px rgba(57,72,112,.08);
}

body.frontend-shell .article-hero img,
body.frontend-shell .post-hero img,
body.frontend-shell .single-article-hero img{
  width:100%;
  max-height:480px;
  object-fit:cover;
  display:block;
}

/* شارة تصنيف بسيطة إذا تم حقنها عبر JS */
.atheer-mini-cat{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.5rem .85rem;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(203,213,225,.78);
  color:#475569;
  font-size:.86rem;
  font-weight:800;
  box-shadow:0 8px 22px rgba(57,72,112,.06);
}

@media (max-width:767px){
  body.frontend-shell .blog-grid,
  body.frontend-shell .articles-grid,
  body.frontend-shell .archive-grid,
  body.frontend-shell .knowledge-grid,
  body.frontend-shell .posts-grid{
    grid-template-columns:1fr;
  }
  body.frontend-shell .blog-card,
  body.frontend-shell .article-card,
  body.frontend-shell .post-card,
  body.frontend-shell .archive-card,
  body.frontend-shell .knowledge-card{
    border-radius:1.35rem;
  }
}