/* ============================================
   Feature Cards — أزرار مصوّرة (الرئيسية + أنواع القراءة)
   ============================================ */

.feature-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin: 12px auto 0;
  padding: 0 2px;
}

.feature-cards-row-single {
  margin-top: 22px;
}

.feature-cards-row-single .feature-card {
  grid-column: 1 / -1;
  aspect-ratio: 5 / 2;
}

.feature-cards-row-single .feature-card-title {
  padding-bottom: 14px;
  font-size: clamp(17px, 4.8vw, 21px);
}

.feature-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.feature-card-grid .feature-card {
  aspect-ratio: 1 / 1;
}

.feature-card-span2 {
  grid-column: span 2;
}

.feature-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-gold-strong);
  cursor: pointer;
  background: var(--black-2);
  padding: 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

.feature-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 11, 22, 0.95) 0%, rgba(6, 11, 22, 0.55) 38%, rgba(6, 11, 22, 0) 72%);
}

.feature-card-title {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 8px 6px 11px;
  z-index: 2;
  text-align: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 3.9vw, 17px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  line-height: 1.3;
  text-wrap: balance;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 18px rgba(var(--gold-rgb), 0.16);
}

.feature-card:active {
  transform: translateY(0) scale(0.97);
}

/* ─── الرئيسية: ملاءمة البطاقات لارتفاع الشاشة ───
   الشاشات العريضة والهواتف القصيرة: بطاقات أقصر حتى تظهر الرئيسية كاملة
   (العنوان + كل القراءات) من دون تمرير. */
@media (min-width: 600px) {
  .welcome-msg .feature-cards-row-single .feature-card {
    aspect-ratio: 4 / 1;
  }

  .welcome-msg #home-feature-cards .feature-card {
    aspect-ratio: 4 / 3;
  }
}

@media (max-height: 720px) {
  .messages-area:not(:has(.message)) {
    padding-block: 10px;
  }

  .welcome-msg {
    padding-block: 0 4px;
  }

  .welcome-msg h3::after {
    margin: 10px auto 8px;
  }

  .welcome-msg .welcome-subtitle {
    min-height: 0;
  }

  .welcome-msg .feature-cards-row-single {
    margin-top: 14px;
  }

  .welcome-msg .feature-cards-row-single .feature-card {
    aspect-ratio: 7 / 2;
  }

  .welcome-msg #home-feature-cards .feature-card {
    aspect-ratio: 1 / 1;
  }
}

@media (min-width: 600px) and (max-height: 720px) {
  .welcome-msg .feature-cards-row-single .feature-card {
    aspect-ratio: 5 / 1;
  }

  .welcome-msg #home-feature-cards .feature-card {
    aspect-ratio: 16 / 9;
  }
}
