/* =========================================================
   KiwiAI — Article Visual Final V4
   Full cover images + premium tags + related articles
   ========================================================= */

:root{
  --kav-deep:#074c38;
  --kav-green:#0b8d5c;
  --kav-light:#edf8f2;
  --kav-light-2:#f8fcfa;
  --kav-text:#143e30;
  --kav-muted:#648075;
  --kav-line:rgba(7,76,56,.13);
  --kav-shadow:0 16px 34px rgba(6,73,48,.10);
  --kav-shadow-soft:0 9px 22px rgba(6,73,48,.07);
}

/* =========================================================
   ARCHIVE ARTICLE CARDS
   ========================================================= */

#articlesList .article-card{
  overflow:hidden !important;
  border:1px solid var(--kav-line) !important;
  border-radius:24px !important;
  background:#fff !important;
  box-shadow:var(--kav-shadow-soft) !important;
}

/* قاب ثابت، تصویر کامل بدون برش */
#articlesList .article-card .article-cover{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  width:calc(100% - 24px) !important;
  height:238px !important;
  min-height:238px !important;

  margin:12px auto 0 !important;
  padding:9px !important;
  overflow:hidden !important;

  border-radius:18px !important;
  border:1px solid rgba(7,76,56,.10) !important;
  box-sizing:border-box !important;

  background:
    radial-gradient(circle at 11% 10%, rgba(255,255,255,.80), transparent 26%),
    radial-gradient(circle at 89% 9%, rgba(93,194,140,.20), transparent 28%),
    linear-gradient(135deg,#f8fcfa,#e7f3eb) !important;
}

/* اصل مهم: هیچ برشی انجام نشود */
#articlesList .article-card .article-cover > img{
  display:block !important;

  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:100% !important;
  max-height:100% !important;

  object-fit:contain !important;
  object-position:center center !important;

  border-radius:13px !important;
  background:transparent !important;
  transform:none !important;
  filter:none !important;
}

/* حذف لایه‌های قدیمی که باعث بیضی و خراب‌شدن تصویر می‌شوند */
#articlesList .article-card .article-cover::before,
#articlesList .article-card .article-cover::after{
  display:none !important;
  content:none !important;
}

/* برچسب مقاله روی تصویر */
#articlesList .article-card .article-badge{
  position:absolute !important;
  top:12px !important;
  right:12px !important;
  left:auto !important;
  bottom:auto !important;
  z-index:10 !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;

  min-height:34px !important;
  width:auto !important;
  max-width:calc(100% - 24px) !important;
  margin:0 !important;
  padding:7px 12px !important;

  color:var(--kav-deep) !important;
  background:rgba(255,255,255,.95) !important;
  border:1px solid rgba(7,76,56,.14) !important;
  border-radius:999px !important;

  font-size:.77rem !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  text-align:center !important;

  box-shadow:0 8px 18px rgba(6,73,48,.16) !important;
  backdrop-filter:blur(8px) !important;
}

#articlesList .article-card .article-badge::before,
#articlesList .article-card .article-badge::after{
  display:none !important;
  content:none !important;
}

/* عنوان و خلاصه */
#articlesList .article-card .article-title{
  color:var(--kav-text) !important;
  font-weight:900 !important;
  line-height:1.85 !important;
}

#articlesList .article-card .article-summary-card{
  border:1px solid rgba(7,76,56,.10) !important;
  border-radius:16px !important;
  background:linear-gradient(135deg,#fbfefc,#f0f8f3) !important;
  color:var(--kav-muted) !important;
  line-height:2 !important;
}

/* تگ‌های مقاله در آرشیو */
#articlesList .article-card .article-tags{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:7px !important;
  margin-top:13px !important;
  padding-top:12px !important;
  border-top:1px solid rgba(7,76,56,.08) !important;
}

#articlesList .article-card .article-tags::before{
  content:"برچسب‌ها" !important;
  display:inline-flex !important;
  align-items:center !important;
  min-height:27px !important;
  padding:5px 9px !important;
  border-radius:999px !important;
  color:#6f877d !important;
  background:#f5faf7 !important;
  font-size:.72rem !important;
  font-weight:800 !important;
}

#articlesList .article-card .article-tags .tag-pill{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  min-height:29px !important;
  padding:6px 10px !important;
  border:1px solid rgba(7,76,56,.11) !important;
  border-radius:999px !important;

  color:var(--kav-deep) !important;
  background:linear-gradient(135deg,#fff,#edf8f2) !important;

  font-size:.74rem !important;
  font-weight:850 !important;
  text-decoration:none !important;

  transition:transform .18s ease, background .18s ease, color .18s ease !important;
}

#articlesList .article-card .article-tags .tag-pill:hover{
  color:#fff !important;
  background:linear-gradient(135deg,#08724d,#0c9a63) !important;
  border-color:transparent !important;
  transform:translateY(-2px) !important;
}

/* =========================================================
   HOME ARTICLE CARDS
   ========================================================= */

#homeArticlesList .article-card-home{
  overflow:hidden !important;
  border:1px solid var(--kav-line) !important;
  border-radius:24px !important;
  background:#fff !important;
  box-shadow:var(--kav-shadow-soft) !important;
}

#homeArticlesList .article-card-home .article-card-cover{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  width:calc(100% - 24px) !important;
  height:238px !important;
  min-height:238px !important;

  margin:12px auto 0 !important;
  padding:9px !important;
  overflow:hidden !important;

  border:1px solid rgba(7,76,56,.10) !important;
  border-radius:18px !important;
  box-sizing:border-box !important;

  background:
    radial-gradient(circle at 11% 10%, rgba(255,255,255,.80), transparent 26%),
    radial-gradient(circle at 89% 9%, rgba(93,194,140,.20), transparent 28%),
    linear-gradient(135deg,#f8fcfa,#e7f3eb) !important;
}

#homeArticlesList .article-card-home .article-card-cover > img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;

  object-fit:contain !important;
  object-position:center center !important;

  border-radius:13px !important;
  background:transparent !important;
  transform:none !important;
}

#homeArticlesList .article-card-home .article-card-cover::before,
#homeArticlesList .article-card-home .article-card-cover::after{
  display:none !important;
  content:none !important;
}

#homeArticlesList .article-card-home .article-chip{
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;

  min-height:31px !important;
  padding:7px 11px !important;
  border:1px solid rgba(7,76,56,.12) !important;
  border-radius:999px !important;

  color:var(--kav-deep) !important;
  background:linear-gradient(135deg,#fff,#edf8f2) !important;

  font-size:.76rem !important;
  font-weight:850 !important;
}

/* =========================================================
   ARTICLE DETAIL COVER
   ========================================================= */

.article-hero-img{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  min-height:320px !important;
  max-height:620px !important;
  padding:14px !important;
  overflow:hidden !important;

  border-radius:28px !important;
  background:
    radial-gradient(circle at 11% 10%, rgba(255,255,255,.78), transparent 26%),
    radial-gradient(circle at 89% 9%, rgba(93,194,140,.19), transparent 30%),
    linear-gradient(135deg,#f8fcfa,#e7f3eb) !important;
}

.article-hero-img img,
#articleImage{
  display:block !important;

  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:560px !important;

  object-fit:contain !important;
  object-position:center center !important;

  border-radius:20px !important;
  background:transparent !important;
}

/* =========================================================
   RELATED ARTICLES
   ========================================================= */

#kiwiRelatedArticlesFinalV4{
  margin-top:42px !important;
  padding:28px !important;

  border:1px solid var(--kav-line) !important;
  border-radius:28px !important;

  background:
    radial-gradient(circle at 9% 8%, rgba(255,255,255,.72), transparent 24%),
    radial-gradient(circle at 96% 0%, rgba(93,194,140,.11), transparent 27%),
    linear-gradient(135deg,#fff,#f3faf6) !important;

  box-shadow:var(--kav-shadow) !important;
}

.kiwi-related-final-head{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:14px !important;
  flex-wrap:wrap !important;
  margin-bottom:21px !important;
}

.kiwi-related-final-title{
  margin:0 !important;
  color:var(--kav-text) !important;
  font-size:1.38rem !important;
  font-weight:900 !important;
}

.kiwi-related-final-sub{
  margin:8px 0 0 !important;
  color:var(--kav-muted) !important;
  font-size:.96rem !important;
  line-height:1.9 !important;
}

.kiwi-related-final-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:19px !important;
}

.kiwi-related-final-card{
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;

  border:1px solid var(--kav-line) !important;
  border-radius:22px !important;
  background:#fff !important;

  box-shadow:var(--kav-shadow-soft) !important;
  color:inherit !important;
  text-decoration:none !important;

  transition:transform .2s ease, box-shadow .2s ease !important;
}

.kiwi-related-final-card:hover{
  color:inherit !important;
  text-decoration:none !important;
  transform:translateY(-4px) !important;
  box-shadow:0 18px 36px rgba(6,73,48,.14) !important;
}

.kiwi-related-final-cover{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  height:195px !important;
  min-height:195px !important;
  margin:10px 10px 0 !important;
  padding:8px !important;
  overflow:hidden !important;

  border:1px solid rgba(7,76,56,.10) !important;
  border-radius:17px !important;

  background:
    radial-gradient(circle at 88% 10%, rgba(93,194,140,.19), transparent 28%),
    linear-gradient(135deg,#f8fcfa,#e7f3eb) !important;
}

.kiwi-related-final-cover img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;

  object-fit:contain !important;
  object-position:center center !important;

  border-radius:12px !important;
}

.kiwi-related-final-badge{
  position:absolute !important;
  top:9px !important;
  right:9px !important;

  padding:6px 10px !important;
  border:1px solid rgba(255,255,255,.55) !important;
  border-radius:999px !important;

  color:var(--kav-deep) !important;
  background:rgba(255,255,255,.95) !important;

  font-size:.70rem !important;
  font-weight:900 !important;
  box-shadow:0 7px 16px rgba(6,73,48,.12) !important;
}

.kiwi-related-final-body{
  padding:15px 16px 17px !important;
}

.kiwi-related-final-card h3{
  margin:0 0 10px !important;
  color:var(--kav-text) !important;
  font-size:1rem !important;
  font-weight:900 !important;
  line-height:1.85 !important;
}

.kiwi-related-final-card p{
  margin:0 0 13px !important;
  color:var(--kav-muted) !important;
  font-size:.91rem !important;
  line-height:1.95 !important;
}

.kiwi-related-final-footer{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  margin-top:auto !important;
}

.kiwi-related-final-date{
  color:#768e83 !important;
  font-size:.79rem !important;
  font-weight:700 !important;
}

.kiwi-related-final-button{
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;

  padding:8px 12px !important;
  border-radius:999px !important;

  color:#fff !important;
  background:linear-gradient(135deg,#08734d,#0d9d64) !important;

  font-size:.78rem !important;
  font-weight:850 !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (min-width:1400px){
  #articlesList .article-card .article-cover,
  #homeArticlesList .article-card-home .article-card-cover{
    height:255px !important;
    min-height:255px !important;
  }
}

@media (max-width:1199.98px){
  .kiwi-related-final-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width:767.98px){
  #articlesList .article-card .article-cover,
  #homeArticlesList .article-card-home .article-card-cover{
    width:calc(100% - 18px) !important;
    height:215px !important;
    min-height:215px !important;
    margin:9px auto 0 !important;
    padding:7px !important;
    border-radius:15px !important;
  }

  #articlesList .article-card .article-cover > img,
  #homeArticlesList .article-card-home .article-card-cover > img{
    border-radius:11px !important;
  }

  #articlesList .article-card .article-badge{
    top:9px !important;
    right:9px !important;
    min-height:31px !important;
    padding:6px 10px !important;
    font-size:.71rem !important;
  }

  .article-hero-img{
    min-height:220px !important;
    padding:10px !important;
    border-radius:18px !important;
  }

  .article-hero-img img,
  #articleImage{
    border-radius:13px !important;
    max-height:420px !important;
  }

  #kiwiRelatedArticlesFinalV4{
    margin-top:30px !important;
    padding:18px !important;
    border-radius:21px !important;
  }

  .kiwi-related-final-grid{
    grid-template-columns:1fr !important;
    gap:15px !important;
  }

  .kiwi-related-final-cover{
    height:190px !important;
    min-height:190px !important;
  }
}
