/*
 * تنسيقات المدونة (home.php + archive.php + single.php + template-parts/blog/*)
 * كروت مقالات + شارة تصنيف + ميتا بأيقونات + pagination pills + تايبوجرافي المقال المفرد.
 */

/* ============================================================
   كارت المقال (الشبكة + المقالات ذات الصلة)
   ============================================================ */
.nestly-blog-card {
  background-color: var(--White);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}

.nestly-blog-card:hover {
  box-shadow: 0 16px 36px rgba(24, 24, 24, 0.1);
  border-color: transparent;
  transform: translateY(-6px);
}

.nestly-blog-card .article-thumb {
  max-width: 100%;
  margin-bottom: 0;
  border-radius: 0;
}

.nestly-blog-card .article-thumb img {
  aspect-ratio: 4 / 3;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nestly-blog-card:hover .article-thumb img {
  transform: scale(1.05);
}

.nestly-blog-card .article-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: flex-start;
  padding: 22px 24px 24px;
}

/* شارة التصنيف بلون الهوية */
.nestly-blog-card .article-label {
  background-color: var(--main);
  padding: 4px 14px;
  box-shadow: 0 4px 12px rgba(24, 24, 24, 0.1);
}

.nestly-blog-card .article-label a {
  color: var(--White);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
}

/* الميتا بأيقونات */
.nestly-blog-card .meta {
  gap: 18px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.nestly-blog-card .meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--Secondary);
}

.nestly-blog-card .meta li i {
  font-size: 15px;
  color: var(--main);
}

.nestly-blog-card .meta li:not(:last-child)::after {
  top: 50%;
  transform: translateY(-50%);
}

.nestly-blog-card .article-title a:hover {
  color: var(--main);
}

.nestly-blog-card .article-description {
  margin-bottom: 16px;
  line-height: 1.9;
}

/* رابط اقرأ المزيد */
.nestly-blog-card .nestly-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  color: var(--main);
  font-weight: 600;
  transition: gap 0.3s ease, color 0.3s ease;
}

.nestly-blog-card .nestly-readmore i {
  font-size: 13px;
  transition: transform 0.3s ease;
}

.nestly-blog-card .nestly-readmore:hover {
  gap: 10px;
}

/* ============================================================
   ترقيم الصفحات — pills بلون الهوية
   ============================================================ */
.blog-grid-main .wg-pagination {
  margin-top: 8px;
}

.blog-grid-main .wg-pagination .pagination-item {
  border-radius: 99px;
  transition: all 0.3s ease;
}

.blog-grid-main .wg-pagination li:hover .pagination-item,
.blog-grid-main .wg-pagination li.active .pagination-item {
  background-color: var(--main);
  border-color: var(--main);
  color: var(--White);
}

/* ============================================================
   المقال المفرد — تايبوجرافي + ميتا + مشاركة + تعليقات
   ============================================================ */

/* تسلسل العناوين والفقرات داخل المحتوى */
.single-post .blog-detail-wrap .content {
  display: block;
}

.single-post .blog-detail-wrap .content p {
  font-size: 16px;
  line-height: 2;
  margin-bottom: 20px;
  color: var(--Secondary);
}

.single-post .blog-detail-wrap .content h2,
.single-post .blog-detail-wrap .content h3,
.single-post .blog-detail-wrap .content h4 {
  color: var(--Onsurface);
  margin: 36px 0 14px;
}

.single-post .blog-detail-wrap .content h2:first-child,
.single-post .blog-detail-wrap .content h3:first-child,
.single-post .blog-detail-wrap .content h4:first-child {
  margin-top: 0;
}

.single-post .blog-detail-wrap .content h2 {
  font-size: 28px;
  line-height: 1.5;
}

.single-post .blog-detail-wrap .content h3 {
  font-size: 24px;
  line-height: 1.5;
}

.single-post .blog-detail-wrap .content h4 {
  font-size: 20px;
  line-height: 1.55;
}

.single-post .blog-detail-wrap .content ul,
.single-post .blog-detail-wrap .content ol {
  margin: 0 0 20px;
  padding-right: 22px;
  list-style: disc;
}

.single-post .blog-detail-wrap .content ol {
  list-style: decimal;
}

.single-post .blog-detail-wrap .content li {
  line-height: 2;
  color: var(--Secondary);
  margin-bottom: 6px;
}

.single-post .blog-detail-wrap .content blockquote {
  background-color: var(--Surface);
  border-right: 3px solid var(--main);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 0 0 24px;
}

.single-post .blog-detail-wrap .content blockquote p {
  margin-bottom: 0;
  font-weight: 600;
  color: var(--Onsurface);
}

.single-post .blog-detail-wrap .content img {
  border-radius: 16px;
}

.single-post .blog-detail-wrap .content > *:last-child {
  margin-bottom: 0;
}

/* الصورة البارزة بزوايا دائرية */
.single-post .blog-detail-wrap .image-wrap {
  border-radius: 16px;
}

.single-post .blog-detail-wrap .image-wrap img {
  width: 100%;
  display: block;
}

/* عنوان المقال */
.single-post .blog-detail-wrap .heading h3 {
  line-height: 1.5;
}

/* شريط الميتا المنسق */
.single-post .blog-detail-wrap .wrap-meta {
  background-color: var(--Surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 24px;
  margin-top: 4px;
}

.single-post .blog-detail-wrap .wrap-meta .meta i {
  color: var(--main);
  font-size: 18px;
}

/* أزرار المشاركة + التابع: دوائر بلون الهوية بـ hover */
.single-post .blog-detail-wrap .tf-social-icon li a {
  border: 1px solid var(--line);
  color: var(--main);
  transition: all 0.3s ease;
}

.single-post .blog-detail-wrap .tf-social-icon li a:hover {
  background-color: var(--main);
  border-color: var(--main);
  color: var(--White);
  transform: translateY(-3px);
}

/* وسوم المقال */
.single-post .blog-detail-wrap .bot .list-tags.has-bg a:hover {
  background-color: var(--main);
  color: var(--White);
}

/* فورم التعليقات — حقول مدورة موحدة */
.single-post .form-leave-comment input[type="text"],
.single-post .form-leave-comment input[type="email"],
.single-post .form-leave-comment textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.single-post .form-leave-comment input[type="text"]:focus,
.single-post .form-leave-comment input[type="email"]:focus,
.single-post .form-leave-comment textarea:focus {
  border-color: var(--main);
  box-shadow: 0 0 0 3px rgba(40, 43, 87, 0.08);
}

.single-post .leave-comment {
  background-color: var(--Surface);
  border-radius: 16px;
  padding: 32px;
}

.single-post .leave-comment .form-leave-comment input,
.single-post .leave-comment .form-leave-comment textarea {
  background-color: var(--White);
}

.single-post .reply-comment .comment-reply-link {
  color: var(--main);
}

@media (max-width: 767px) {
  .single-post .leave-comment {
    padding: 24px 20px;
  }

  .single-post .blog-detail-wrap .wrap-meta {
    padding: 12px 16px;
  }

  .single-post .blog-detail-wrap .content h2 {
    font-size: 24px;
  }

  .single-post .blog-detail-wrap .content h3 {
    font-size: 21px;
  }
}
