/* --- section heading --- */

.article-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 30px;
}

.article-item {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 380px;
  border-radius: var(--border-radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--dark-text-color);
  background-color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* --- image wrapper --- */
.article-item article {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-item .article-img {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.article-item .article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-item:hover .article-img img {
  transform: scale(1.06);
}

/* gradient overlay on image */
.article-item .article-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}

/* category tag on image */
.article-item .article-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--main-bg-color);
  background-color: var(--gold-color);
  border-radius: 50px;
}

/* --- text content --- */
.article-item .article-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
  flex: 1;
}

.article-item h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--main-bg-color);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s;
}

.article-item:hover h3 {
  color: var(--gold-color);
}

/* meta row: date + read time */
.article-item .article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  font-size: 13px;
  color: var(--dark-text-color);
}

.article-item .article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* gold accent bar at bottom */
.article-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-color), var(--pink-color));
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-item:hover::after {
  width: 100%;
}

/* ===== RESPONSIVE ARTICLES ===== */
@media (max-width: 1400px) {
  .article-item {
    width: calc(33.333% - 16px);
  }
}

@media (max-width: 1100px) {
  .article-item {
    width: calc(50% - 12px);
  }
}

@media (max-width: 600px) {
  .article-cards {
    gap: 16px;
  }
  .article-item {
    width: 100%;
  }
  .article-item .article-img {
    height: 180px;
  }
}
