/* ==========================================================================
   WeChat OA Articles Block
   Design ref: Figma node 8296:54954
   ========================================================================== */

/* ---------- Module wrapper ---------- */
.wechat-oa-articles {
  background: #f5f5f7;
  overflow: hidden;
}

.wechat-oa-articles__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 60px 165px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ---------- Section header ---------- */
.wechat-oa-articles__header {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.wechat-oa-articles__title {
  font-weight: 700;
  font-size: 32px;
  line-height: 38.4px;
  color: #333;
  margin: 0;
}

.wechat-oa-articles__subtitle {
  font-weight: 400;
  font-size: 16px;
  line-height: 25px;
  color: #333;
  margin: 0;
}

/* ---------- Grid ---------- */
.wechat-oa-articles__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 16px;
  width: 100%;
}

/* ---------- Article card — Desktop (vertical layout) ---------- */
.wechat-oa-articles__card {
  background: #fff;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  /* 3-column: (100% - 2 * 16px gap) / 3 */
  width: calc(33.333% - 11px);
  flex-shrink: 0;
  transition: box-shadow 0.2s ease;
}

.wechat-oa-articles__card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Thumbnail: 4:3 aspect ratio */
.wechat-oa-articles__card-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.wechat-oa-articles__card-media img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  display: block;
}

.wechat-oa-articles__card-media-placeholder {
  position: absolute;
  inset: 0;
  background: #e0e0e0;
}

/* Card info */
.wechat-oa-articles__card-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.wechat-oa-articles__card-date {
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #a6a6a6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-oa-articles__card-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: #333;
  margin: 0;
  /* Max 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- CTA button ---------- */
.wechat-oa-articles__cta {
  display: flex;
  justify-content: center;
  width: 100%;
}

.wechat-oa-articles__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 183px;
  padding: 15px 20px;
  border: 2px solid #04043f;
  border-radius: 3px;
  background: transparent;
  color: #04043f;
  font-weight: 500;
  font-size: 18px;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.wechat-oa-articles__btn:hover {
  background: #04043f;
  color: #fff;
}

button.wechat-oa-articles__btn {
  cursor: pointer;
}

button.wechat-oa-articles__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
button.wechat-oa-articles__btn::after {
  display: none;
}

/* ==========================================================================
   Mobile — ≤ 768px
   Card switches to horizontal layout (thumbnail left, text right)
   ========================================================================== */
@media (max-width: 768px) {
  .wechat-oa-articles__inner {
    padding: 40px 16px;
    gap: 24px;
  }

  .wechat-oa-articles__header {
    width: 100%;
    gap: 16px;
  }

  .wechat-oa-articles__title { 
    font-size: 24px;
    line-height: 28.8px;
  }

  /* Stack cards vertically */
  .wechat-oa-articles__grid {
    flex-direction: column;
    gap: 16px;
  }

  /* Card: horizontal row layout */
  .wechat-oa-articles__card {
    flex-direction: row;
    width: 100%;
  }

  /* Thumbnail: 80×80 square on the left */
  .wechat-oa-articles__card-media {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    aspect-ratio: unset;
  }

  /* Card info */
  .wechat-oa-articles__card-info {
    flex: 1;
    padding: 8px;
    min-width: 0;
  }

  .wechat-oa-articles__card-title {
    font-size: 14px;
    line-height: 20px;
  }

  /* Button: full width on mobile */
  .wechat-oa-articles__btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
  }
}
