/* =========================
   Article Category Filter
========================= */

.article-category-section {
  padding: 42px 0 10px;
  background: #fffaf2;
}

.article-category-filter {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.article-subcategory-filter {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(120, 88, 55, 0.14);
}

.category-card {
  appearance: none;
  border: 1px solid rgba(92, 70, 52, 0.18);
  background: #fff8ea;
  color: #5c4634;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  background: #f3eadb;
}

.category-card.active {
  background: #8C6A4A;
  border-color: #8C6A4A;
  color: #FFF8EA;
}


/* =========================
   Article List
========================= */

.article-list-section {
  display: block;
  padding-top: 46px;
  padding-bottom: 90px;
  background: #fffaf2;
}

#articleList {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.article-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: stretch;
  background: rgba(255, 248, 234, 0.86);
  border: 1px solid rgba(92, 70, 52, 0.12);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(92, 70, 52, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 106, 74, 0.28);
  box-shadow: 0 18px 42px rgba(92, 70, 52, 0.1);
}

.article-card-image {
  display: block;
  width: 190px;
  min-height: 150px;
  background: #f3eadb;
  overflow: hidden;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card-body {
  padding: 24px 26px 24px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-category {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 28px;
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(140, 106, 74, 0.1);
  color: #8C6A4A;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.article-card h2 {
  margin: 0 0 8px;
  color: #3f2f24;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.35;
}

.article-card h2 a {
  color: inherit;
  text-decoration: none;
}

.article-card h2 a:hover {
  color: #8C6A4A;
}

.article-date {
  color: #9A7A58;
  font-size: 14px;
  margin: 0 0 12px;
}

.article-excerpt {
  color: #5c4634;
  margin: 0 0 16px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-link {
  display: inline-flex;
  align-self: flex-start;
  color: #7a5427;
  font-weight: 900;
  text-decoration: none;
}

.article-link:hover {
  color: #8C6A4A;
}

.empty-articles {
  grid-column: 1 / -1;
  text-align: center;
  background: #fff8ea;
  border: 1px solid rgba(92, 70, 52, 0.12);
  border-radius: 26px;
  padding: 60px 24px;
}

.empty-articles h2 {
  color: #3f2f24;
  margin-bottom: 10px;
}

.empty-articles p {
  color: #6f5a46;
}


/* =========================
   Mobile
========================= */

@media (max-width: 900px) {
  .article-category-section {
    padding: 32px 20px 8px;
  }

  .article-category-filter {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .category-card {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 14px;
  }

  #articleList {
    width: 100%;
  }

  .article-list-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .article-card {
    grid-template-columns: 150px 1fr;
    gap: 18px;
  }

  .article-card-image {
    width: 150px;
    min-height: 140px;
  }

  .article-card-body {
    padding: 20px 20px 20px 0;
  }
}

@media (max-width: 640px) {
  .article-list-section {
    padding-top: 34px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .article-card {
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 22px;
  }

  .article-card-image {
    width: 100%;
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .article-card-body {
    padding: 20px;
  }

  .article-card h2 {
    font-size: 22px;
  }

  .article-excerpt {
    -webkit-line-clamp: 3;
  }
}
