/* =====================================================
   BLOG LATEST — آخرین مقالات
===================================================== */

:root {
  --br-1: 4px;
  --br-2: 8px;
  --br-3: 12px;
  --br-4: 16px;
  --br-round: 9999px;
  --fs-2: 0.694rem;
  --fs-2-5: 0.722rem;
  --fs-3: 0.833rem;
  --fs-4: 1rem;
  --fs-5: 1.2rem;
  --c-grey-light-8: #f9f9fc;
  --c-grey-light-7: #f3f3f7;
  --c-grey-light-6: #ebebef;
  --c-grey-light-5: #e8e8ec;
  --c-grey-light-4: #d1d1d8;
  --c-grey:         #919199;
  --c-grey-dark-2:  #636369;
  --c-grey-dark-5:  #2d2d33;
  --c-text-1:       #1f1a1e;
  --c-red-3:        #b32a65;
  --white:          #ffffff;
}

/* ═══════════════════════════════════════════════════════
   WRAPPER
═══════════════════════════════════════════════════════ */
.blog-latest {
  padding: 60px 0 80px;
  overflow: hidden;
  background: var(--white);
}

.blog-latest .page-container {
  max-width: 100%;
  overflow: hidden;
}

.blog-latest .page-width {
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
  max-width: 1220px;
}

/* ═══════════════════════════════════════════════════════
   SECTION TITLE
═══════════════════════════════════════════════════════ */
.blog-latest .section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 25px;
  gap: 12px;
}

.blog-latest .section-title .title {
  font-size: var(--fs-5);
  margin: 0;
  padding: 5px 0;
  color: var(--c-text-1);
  font-weight: 800;
}

.blog-latest .section-title .view-more {
  text-decoration: none;
  font-size: var(--fs-3);
  font-weight: 500;
  color: var(--c-grey-dark-2);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color .2s ease;
}

.blog-latest .section-title .view-more .icon {
  display: flex;
  align-items: center;
  transition: transform .25s ease;
}

.blog-latest .section-title .view-more:hover {
  color: var(--c-red-3);
}

.blog-latest .section-title .view-more:hover .icon {
  transform: translateX(-4px);
}

/* ═══════════════════════════════════════════════════════
   SWIPER
═══════════════════════════════════════════════════════ */
.blog-swiper {
  overflow: hidden;
  padding: 4px 2px 10px;
}

.blog-swiper .swiper-wrapper {
  align-items: stretch;
}

/* ═══════════════════════════════════════════════════════
   BLOG CARD
═══════════════════════════════════════════════════════ */
.blog-card {
  height: auto;
  display: flex;
  flex-direction: column;
  border-radius: var(--br-3);
  overflow: hidden;
  background: var(--c-grey-light-7);
  transition: 0.28s cubic-bezier(0.25, 0.1, 0.25, 1);
  border: 1px solid var(--c-grey-light-5);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -18px rgba(179, 42, 101, .28);
}

/* ───── لینک کل کارت ───── */
.blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ───── عکس کاور ───── */
.blog-cover {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--card-accent, #b32a65);
}

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

.blog-card:hover .blog-cover img {
  transform: scale(1.06);
}

.blog-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--card-accent, #b32a65) 0%, #1f1a1e 100%);
}

.blog-cover-icon {
  font-size: 3rem;
  opacity: .55;
}

/* overlay رنگی */
.blog-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--card-accent, #b32a65) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.blog-card:hover .blog-overlay {
  opacity: .15;
}

/* ───── متن کارت ───── */
.blog-body {
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* متا: دسته + تاریخ */
.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-2-5);
}

.blog-cat {
  color: var(--card-accent, #b32a65);
  text-decoration: none;
  font-weight: 700;
  transition: opacity .2s ease;
}

.blog-cat:hover {
  opacity: .8;
  text-decoration: underline;
}

.blog-date {
  color: var(--c-grey);
  font-weight: 400;
  white-space: nowrap;
  font-feature-settings: "ss02";
}

/* عنوان */
.blog-title-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-title {
  margin: 0;
  font-size: var(--fs-4);
  font-weight: 800;
  color: var(--c-text-1);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.1em;
  transition: color .2s ease;
}

.blog-card:hover .blog-title {
  color: var(--card-accent, #b32a65);
}

/* خلاصه */
.blog-excerpt {
  margin: 0;
  font-size: var(--fs-2-5);
  line-height: 1.85;
  color: var(--c-grey-dark-2);
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* ═══════════════════════════════════════════════════════
   MOBILE VIEW-ALL
═══════════════════════════════════════════════════════ */
.blog-view-all-mobile {
  display: none;
  text-align: center;
  padding: 14px 0;
  margin-top: 18px;
  background: var(--c-grey-light-7);
  color: var(--c-text-1);
  text-decoration: none;
  border-radius: var(--br-2);
  font-weight: 600;
  font-size: var(--fs-3);
  transition: background .2s ease;
}

.blog-view-all-mobile:hover {
  background: var(--c-grey-light-6);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .blog-latest {
    padding: 40px 0 56px;
  }

  .blog-cover {
    height: 160px;
  }

  .blog-title {
    font-size: .92rem;
    min-height: 3em;
  }
}

@media (max-width: 560px) {
  .blog-latest {
    padding: 30px 0 42px;
  }

  .blog-latest .section-title .view-more {
    display: none;
  }

  .blog-cover {
    height: 170px;
  }

  .blog-body {
    padding: 14px 14px 16px;
    gap: 8px;
  }

  .blog-meta {
    font-size: .68rem;
  }

  .blog-title {
    font-size: .88rem;
  }

  .blog-excerpt {
    font-size: .72rem;
    -webkit-line-clamp: 3;
  }

  .blog-view-all-mobile {
    display: block;
  }
}

/* ═══════════════════════════════════════════════════════
   DARK MODE
═══════════════════════════════════════════════════════ */
[data-theme="dark"] .blog-latest {
  background: #121014;
}

[data-theme="dark"] .blog-card {
  background: #1e1b22;
  border-color: #2a242f;
}

[data-theme="dark"] .blog-card:hover {
  border-color: var(--card-accent, #b32a65);
}

[data-theme="dark"] .blog-title {
  color: #f8f4f7;
}

[data-theme="dark"] .blog-excerpt {
  color: #c9c9cf;
}

[data-theme="dark"] .blog-date {
  color: #a89ea8;
}

[data-theme="dark"] .blog-view-all-mobile {
  background: #1e1b22;
  color: #f8f4f7;
}

[data-theme="dark"] .blog-view-all-mobile:hover {
  background: #262230;
}