/* ============================================
   首页文章区域 - 热点文章 / 行业资讯 图文卡片
   设计：双栏布局 + 2x2 卡片网格
   SEO 优化：语义化 HTML5 + Schema.org
   ============================================ */

/* ── 容器 ── */
.home-articles-wrapper {
  width: 1200px;
  margin: 40px auto;
}

.home-articles-section {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ── 单栏面板 ── */
.ha-panel {
  flex: 1;
  min-width: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* ── 面板头部 ── */
.ha-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.ha-panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.ha-panel__title-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.ha-panel__more {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #007aff;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.ha-panel__more:hover {
  color: #0056cc;
}

.ha-panel__more-arrow {
  font-size: 16px;
  transition: transform 0.2s;
}

.ha-panel__more:hover .ha-panel__more-arrow {
  transform: translateX(3px);
}

/* ── 卡片网格 ── */
.ha-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #f5f5f5;
}

/* ── 单张卡片 ── */
.ha-card {
  background: #fff;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  padding: 12px 12px 0;
}

.ha-card:hover {
  box-shadow: 0 4px 20px rgba(0, 122, 255, 0.12);
  transform: translateY(-2px);
  z-index: 2;
}

/* ── 卡片缩略图 ── */
.ha-card__figure {
  margin: 0;
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f6ff 100%);
}

.ha-card__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ha-card:hover .ha-card__img {
  transform: scale(1.06);
}

/* 无图时的占位图标 */
.ha-card__img-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  opacity: 0.3;
}

/* ── 日期角标 ── */
.ha-card__date-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.4;
  backdrop-filter: blur(4px);
}

/* ── 置顶/头条标签 ── */
.ha-card__top-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #ff6b35, #ff3d00);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ── 卡片正文 ── */
.ha-card__body {
  padding: 14px 4px 16px;
}

.ha-card__title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.5;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.ha-card:hover .ha-card__title {
  color: #007aff;
}

.ha-card__title a {
  color: inherit;
  text-decoration: none;
}

.ha-card__title a:hover {
  color: #007aff;
}

.ha-card__excerpt {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 卡片元信息 ── */
.ha-card__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 12px;
  color: #aaa;
}

.ha-card__views {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.ha-card__views-icon {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

/* ── 响应式 ── */
@media (max-width: 1240px) {
  .home-articles-wrapper {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }
}

@media (max-width: 1024px) {
  .home-articles-section {
    flex-direction: column;
  }

  .ha-panel {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .ha-panel__grid {
    grid-template-columns: 1fr;
  }

  .ha-panel__header {
    padding: 16px;
  }

  .ha-panel__title {
    font-size: 18px;
  }

  .ha-card__body {
    padding: 12px;
  }

  .ha-card__title {
    font-size: 14px;
  }
}
