/* ===== ARTICLE LIST & GRID STYLES ===== */

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.f-chip {
  font-size: 12px;
  color: var(--ink-mid);
  background: var(--white);
  border: 1px solid var(--border-mid);
  padding: 5px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.f-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.f-chip.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ===== ARTICLE LIST ===== */
.article-list {
  display: flex;
  flex-direction: column;
}

.article-list-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  gap: 20px;
  transition: background 0.15s;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
}

.article-list-item:first-child {
  border-radius: 6px 6px 0 0;
}

.article-list-item:last-child {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
}

.article-list-item:hover {
  background: var(--blue-ghost);
}

/* Featured Item (Large) */
.article-list-item.featured {
  flex-direction: column;
  gap: 0;
}

.article-list-item.featured .item-thumb {
  width: 100%;
  height: 200px;
}

.article-list-item.featured .item-body {
  padding: 24px;
}

.article-list-item.featured .item-title {
  font-size: 22px;
  margin-bottom: 10px;
}

.article-list-item.featured .item-excerpt {
  font-size: 14px;
  line-height: 1.7;
  display: block;
}

.article-list-item.featured .item-meta {
  margin-top: 15px;
  border-top: 1px solid var(--gray-50);
  padding-top: 12px;
  text-align: left;
}

/* Standard Item (List with small square thumb) */
.article-list-item.standard {
  padding: 18px 24px;
  align-items: center;
}

.article-list-item.standard .item-thumb {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.article-list-item.standard .item-body {
  flex: 1;
}

.article-list-item.standard .item-meta {
  text-align: right;
  min-width: 80px;
}

/* Large List Item (Homepage Special) */
.article-list-item.large-list {
  padding: 24px;
  align-items: stretch;
  gap: 32px;
  border-bottom: 1px solid var(--border);
}

.article-list-item.large-list:last-child {
  border-bottom: 1px solid var(--border);
}

.article-list-item.large-list .item-thumb {
  width: 150px;
  height: 150px;
  border-radius: 3px;
  flex-shrink: 0;
}

.article-list-item.large-list .item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-list-item.large-list .item-title {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.article-list-item.large-list .item-excerpt {
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  margin-bottom: 15px;
  color: var(--ink-mid);
}

.article-list-item.large-list .item-meta {
  font-size: 11px;
  opacity: 0.8;
  margin-top: auto;
}

.item-thumb {
  flex-shrink: 0;
  background: var(--navy);
  overflow: hidden;
  position: relative;
}

.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  color: var(--white) !important;
  margin-bottom: 8px;
}

.item-cat.cat-tips {
  background: #00d4ff;
}

.item-cat.cat-column {
  background: #ff00a2;
}

.item-cat.cat-lecture {
  background: #6366f1;
}

.item-title {
  font-family: var(--ff-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 6px;
}

.item-excerpt {
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.item-meta {
  font-size: 11px;
  color: var(--ink-faint);
  white-space: nowrap;
  padding-top: 4px;
}

.item-meta .tag-inline {
  color: var(--blue);
  display: block;
  margin-top: 3px;
}

/* ===== ARTICLE GRID (CARD) ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: var(--blue-light);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.card-thumb {
  width: 100%;
  height: 112px;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.card-thumb-grid {
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.card-cat-badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white) !important;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 5;
}

.card-cat-badge.cat-tips {
  background: #00d4ff;
  border: none;
}

.card-cat-badge.cat-column {
  background: #ff00a2;
  border: none;
}

.card-cat-badge.cat-lecture {
  background: #6366f1;
  border: none;
}

.card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: var(--ff-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
  margin-bottom: 6px;
}

.card-excerpt {
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.55;
  flex: 1;
}

.card-footer {
  font-size: 11px;
  color: var(--ink-faint);
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
}

/* ===== VIEW TOGGLE ===== */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--ff-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 12px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: var(--blue);
  border-radius: 2px;
}

.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.section-more {
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s;
}

.section-more:hover {
  color: var(--navy);
}

.section-footer {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.section-more-bottom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.section-more-bottom:hover {
  background: var(--blue-ghost);
  border-color: var(--blue-light);
  color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.section-more-bottom .arrow {
  transition: transform 0.2s;
}

.section-more-bottom:hover .arrow {
  transform: translateX(4px);
}

.view-toggle {
  display: flex;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.view-btn {
  padding: 5px 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-faint);
  font-size: 14px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
}

.view-btn:hover {
  color: var(--ink-mid);
}

.view-btn.active {
  background: var(--navy);
  color: var(--white);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 22px;
}

.page-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-mid);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}

.page-num:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.page-num.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

@media (max-width: 768px) {
  .article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .article-list-item.standard {
    padding: 14px 16px;
    gap: 15px;
  }

  .article-list-item.standard .item-thumb {
    width: 70px;
    height: 70px;
  }

  .article-list-item.large-list {
    flex-direction: column;
    gap: 20px;
    padding: 20px 16px;
  }

  .article-list-item.large-list .item-thumb {
    width: 100%;
    height: 200px;
  }

  .article-list-item.large-list .item-title {
    font-size: 17px;
  }

  .article-list-item.large-list .item-excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .item-title {
    font-size: 15px;
  }

  .item-meta {
    text-align: left;
    padding-top: 8px;
    border-top: 1px solid var(--gray-50);
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .article-list-item.standard {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-list-item.standard .item-thumb {
    width: 100%;
    height: 180px;
  }

  .article-list-item.standard .item-meta {
    text-align: left;
  }
}