/* ========== ARTICLE CARD — VERTICAL (standard) ========== */
.article-card {
  background: #0e0a1a;
  height: 425px;
  border: 1px solid rgba(131, 92, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
  margin-bottom: 1rem;
}
.article-card-lg {
  height: 475px;
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}
/* img-container inside article card: 16:9 */
.article-card .img-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}
.article-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-card-img-ph {
  width: 100%;
  height: 100%;
  background: #1a1530;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
}

.article-category-badge {
  display: inline-block;
  background: #252b47;
  color: #b6b6d6;
  font-size: 0.85em;
  font-weight: 500;
  padding: 0.28em 0.85em 0.28em 0.7em;
  border-radius: 1em;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #39416b;
  letter-spacing: 0.01em;
  opacity: 0.88;
  transition: background 0.18s, color 0.18s, opacity 0.18s;
  text-align: center;
  width: 100%;
}
.article-category-badge:hover {
  background: #39416b;
  color: #e0e0ff;
  opacity: 1;
}

/* ========== ARTICLE CARD — HORIZONTAL ========== */
.article-h-card {
  --article-h-img-w: 32%;
  display: flex;
  position: relative;
  background: #0e0a1a;
  border: 1px solid rgba(131, 92, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.article-h-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
}
/* img-col is the only in-flow child — its height drives the card height */
.article-h-card-img-col {
  flex: 0 0 var(--article-h-img-w);
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
  text-decoration: none;
}
.article-h-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-h-card-img-ph {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.15);
}
/* Body taken out of flow — fills the space beside the image exactly */
.article-h-card-body {
  position: absolute;
  left: var(--article-h-img-w);
  top: 0;
  right: 0;
  bottom: 0;
  padding: 0.55rem 0.8rem 0.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.article-h-card-title-link {
  display: block;
  text-decoration: none;
  flex-shrink: 0;
}
.article-h-card-title-link:hover {
  text-decoration: none;
}
.article-h-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f0eeff;
  margin: 0 0 0.25rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  flex-shrink: 0;
}
/* Excerpt fills remaining space — overflow is hidden, no clamp/ellipsis */
.article-h-card-excerpt {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  line-height: 1.4;
  flex: 1;
  overflow: hidden;
}
/* Gradient softens the abrupt text cutoff above the footer */
.article-h-card-excerpt-fade {
  flex-shrink: 0;
  height: 1.5rem;
  margin-top: -1.5rem;
  background: linear-gradient(to bottom, rgba(14, 10, 26, 0) 0%, #0e0a1a 100%);
  pointer-events: none;
}
.article-h-card-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.article-h-card-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  line-height: 1;
  overflow: hidden;
}
.article-h-card-author:hover {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}
.article-h-card-author span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-h-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.article-h-card-avatar-ph {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}
/* wider img on small screens */
@media (max-width: 767px) {
  .article-h-card-img-col {
    flex: 0 0 44%;
  }
  .article-h-card-body {
    left: 44%;
  }
}

/* ========== RELATED LIST ========== */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ========== ARTICLE TAG BADGE ========== */
.article-tag-badge {
  display: inline-block;
  background: rgba(37, 99, 235, 0.15);
  color: #93b4ff;
  font-size: 0.75em;
  font-weight: 500;
  padding: 0.25em 0.6em;
  border-radius: 0.5em;
  border: 1px solid rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}
.article-tag-badge:hover {
  background: rgba(37, 99, 235, 0.25);
  color: #b4d0ff;
  border-color: rgba(37, 99, 235, 0.5);
}
