
/* =========================
PAGE TYPOGRAPHY
========================= */

h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  font-weight: 600;
}

p {
  color: #444;
  margin-bottom: 20px;
  line-height: 1.9;
}

/* =========================
GRID (IMPORTANT FIX)
========================= */

.card {
  display: inline-flex;
  flex-direction: column;

  width: calc(33.333% - 14px);
  margin: 7px;

  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);

  transition: 0.25s ease;
  position: relative;
  cursor: pointer;

  /* 🔥 مهم‌ترین fix: همه کارت‌ها هم‌قد */
  height: 520px;
}

/* hover */
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.15);
}

/* =========================
MEDIA (FIXED HEIGHT)
========================= */

.card__media {
  position: relative;
  height: 200px;
  flex-shrink: 0;

  background: #f3f4f6;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s ease;
}

.card:hover .card__media img {
  transform: scale(1.08);
}

.card:hover .card__media {
  filter: brightness(0.9);
}

.placeholder {
  font-size: 2.8rem;
  opacity: 0.6;
}

/* overlay */
.card__overlay {
  position: absolute;
  inset: 0;
  transition: 0.3s ease;
}

.card:hover .card__overlay {
  background: rgba(224, 188, 27, 0.25);
}

/* =========================
BADGE
========================= */

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e0bc1b;
  color: #111;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* =========================
BODY (CONTROLLED HEIGHT)
========================= */

.card__body {
  padding: 14px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  flex: 1;

  /* 🔥 مهم: جلوگیری از بهم ریختگی */
  overflow: hidden;
}

/* TITLE (FIXED LINE HEIGHT) */
.card__title {
  font-size: 1.1rem;
  font-weight: 600;

  /* 🔥 جلوگیری از تغییر ارتفاع کارت */
  line-height: 1.4;
  min-height: 2.8em; /* حدود 2 خط */
  overflow: hidden;
}

/* =========================
META / DESCRIPTION (CLAMPED)
========================= */

.card__meta {
  font-size: 0.85rem;
  color: #444;

  /* 🔥 مهم‌ترین بخش برای یکنواختی */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================
FOOTER (PIN TO BOTTOM)
========================= */

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-top: auto; /* همیشه پایین */
  gap: 10px;
}

/* BUTTON */
.card__btn {
  background: #e0bc1b;
  color: #111;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  text-decoration: none;

  white-space: nowrap;
  transition: 0.2s ease;
}

.card__btn:hover {
  background: #cfae19;
}

/* =========================
RESPONSIVE
========================= */

/* دسکتاپ بزرگ */
.card{
width: calc(30% - 14px);
margin: 20px;   
}
/* لپ‌تاپ */
@media (max-width: 1200px){
  .card{
      width: calc(33.333% - 14px);
  }
}

/* تبلت */
@media (max-width: 900px){
  .card{
      width: calc(50% - 14px);
  }
}

/* موبایل */
@media (max-width: 600px){
  .card{
      width: 100%;
  }
}

/* =========================
EMPTY STATE
========================= */

.empty-box {
  text-align: center;
  padding: 50px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

