/* Styles for mega-blog.hbs — the "بلاگ" panel.
   Card chrome shared with mega-crypto.hbs lives in header.css. */

.category-item {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  width: 213px;
  height: 120px;
}

/* Scrim so the white title stays readable over any cover image. */
.category-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.7) 99.83%);
  transition: background 1s ease;
  pointer-events: none;
}

.category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.category-body {
  position: absolute;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: 8px 16px;
}

.category-body strong {
  color: var(--on-foreground-neutral);
  font-size: 16px;
  font-weight: 700;
}

.category-description {
  display: flex;
  align-items: center;
}

.category-description small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  width: fit-content;
  color: var(--on-foreground-neutral);
  font-size: 14px;
}

.category-description .card-arrow {
  color: var(--on-foreground-neutral);
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (min-width: 1000px) {
  .mega-cards--blog {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-item {
    width: 100%;
    height: 100%;
  }

  .category-item:hover::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0.17%, rgba(0, 0, 0, 0.8) 99.83%);
  }

  .category-item:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
  }
}
