/* =========================================================
   ARTICLE FEED (one HTML, multiple layouts)
   Wrapper:
     .article-feed
     .article-feed--grid   (default)
     .article-feed--list
     .article-feed--grey

   Item HTML (same everywhere):
     .item-category
       .img-element
       .column-category
         .row-category
           .small-text-category (date)
           .small-text-category (author)
           .label-category > p (category)
         .title-article

   Responsive requirement (mobile):
   - image LEFT
   - content vertically centered
========================================================= */

.article-feed {
  margin: 20px 5%;
}

/* optional grey background variant */
.article-feed--grey {
  background-color: #edf6f9;
  padding: 20px 0;
}

/* ---------- GRID LAYOUT ---------- */
.article-feed--grid .grid-category {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: center;
}

.article-feed--grid .item-category {
  display: flex;
  cursor: pointer;
  margin-top: 20px;
}

/* ---------- LIST LAYOUT ---------- */
/* Same items, but stacked and tighter like a list */
.article-feed--list .grid-category {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.article-feed--list .item-category {
  display: flex;
  cursor: pointer;
  padding: 18px 0;
  margin-top: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.article-feed--list .item-category:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ---------- SHARED ITEM STYLES ---------- */
.img-element {
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
  overflow: hidden;
  border-radius: 16px;
}

/* ensure image crops correctly */
.img-element img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.column-category {
  padding: 0 20px;
  min-width: 0;
}

.row-category {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.small-text-category {
  color: #95a5a6;
  font-size: 16px;
  margin: 0;
}

.label-category {
  background-color: #edf6f9;
  color: #719fae;
  font-weight: 600;
  height: 27px;
  font-size: 16px;
  border-radius: 50px;
  padding: 2px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.label-category p {
  margin: 0;
}

.title-article {
  font-weight: 550;
  font-size: 26px;
  margin: 0;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1150px) {
  .article-feed--grid .grid-category {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .article-feed {
    margin: 20px 0;
    padding: 0 16px;
  }

  /* MOBILE: image LEFT + content centered */
  .item-category {
    flex-direction: row;
    align-items: center; /* vertical center */
    gap: 16px;
  }

  .img-element {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
  }

  .column-category {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical center for text block */
  }

  .row-category {
    gap: 12px;
    align-items: center;
  }

  .small-text-category {
    font-size: 13px;
    margin: 0;
  }

  .label-category {
    font-size: 13px;
    height: auto;
    padding: 2px 10px;
  }

  .title-article {
    font-size: 18px;
    margin-top: 4px;
  }

  /* Optional: if you want the list variant tighter on mobile */
  .article-feed--list .item-category {
    padding: 12px 0;
  }
}