/* ============================================
   新闻资讯页面样式 - 现代卡片式设计
   奥仕电子 AOS Electronics
============================================ */

/* ---- 新闻列表页面布局 ---- */
.news-list-page {
  padding: 60px 0 100px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100px);
}

.news-list-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

/* ---- 分类筛选标签（分段控制器风格）---- */
.news-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}
.news-filter-bar {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  gap: 0;
}

.news-filter-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 26px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  border-radius: 7px;
  transition: all 0.25s ease;
  position: relative;
  white-space: nowrap;
}

/* 标签间分隔线 */
.news-filter-tag:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: #d1d5db;
  transition: opacity 0.25s;
}

.news-filter-tag:hover {
  color: #334155;
}

/* 激活态：白色凸起卡片 */
.news-filter-tag.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
  font-weight: 700;
}

/* 激活态隐藏相邻分隔线 */
.news-filter-tag.active::after,
.news-filter-tag.active + .news-filter-tag::after {
  opacity: 0;
}

/* 各分类激活态颜色 */
.news-filter-tag[href$="=announcement"].active,
.news-filter-tag[href*="cat=announcement"].active {
  color: #1e293b;
}
.news-filter-tag[href$="=life"].active,
.news-filter-tag[href*="cat=life"].active {
  color: #7c3aed;
}
.news-filter-tag[href$="=industry"].active,
.news-filter-tag[href*="cat=industry"].active {
  color: #2563eb;
}

/* ---- 新闻卡片网格 ---- */
.news-main-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* 特色新闻卡片（第一篇文章） */
.news-main-list .news-list-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  min-height: 320px;
}

.news-main-list .news-list-card:first-child .news-list-img {
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.news-main-list .news-list-card:first-child .news-list-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-main-list .news-list-card:first-child h3 {
  font-size: 22px !important;
  margin-bottom: 12px !important;
}

.news-main-list .news-list-card:first-child p {
  font-size: 15px !important;
  -webkit-line-clamp: 3 !important;
}

/* 普通新闻卡片 */
.news-list-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--border-light);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.news-list-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.05);
  border-color: rgba(0,102,255,0.15);
}

.news-list-img {
  position: relative;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #e8f0fe 0%, #dce5f5 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.news-list-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.news-list-card:hover .news-list-img::before {
  opacity: 1;
}

.news-list-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-list-card:hover .news-list-img img {
  transform: scale(1.05);
}

.news-list-img .no-cover-icon {
  font-size: 48px;
  opacity: 0.4;
}

/* 公告无图卡片：纯文字列表式，无图片区 */
.news-list-card.no-image {
  flex-direction: row;
  align-items: stretch;
  border-left: 4px solid #93c5fd;
  min-height: auto;
}
.news-list-card.no-image .news-list-body {
  padding: 20px 24px;
  flex: 1;
}
.news-list-card.no-image h3 {
  font-size: 16px !important;
  margin-bottom: 8px !important;
}
.news-list-card.no-image p {
  font-size: 13px !important;
}
.news-main-list .news-list-card.no-image:first-child {
  grid-column: span 1;
  display: flex;
  min-height: auto;
}

/* 分类标签（卡片内） */
.news-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.news-cat.expo {
  background: #d1fae5;
  color: #065f46;
}

.news-cat.company {
  background: #dbeafe;
  color: #1e40af;
}

/* 新分类标签 - 卡片内小标签 */
.news-cat.announcement {
  background: #f1f5f9;
  color: #374151;
  border: 1px solid #d1d5db;
}
.news-cat.life {
  background: #f5f3ff;
  color: #7c3aed;
}
.news-cat.industry {
  background: #eff6ff;
  color: #2563eb;
}

.news-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.news-list-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.news-list-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s;
}

.news-list-card:hover h3 {
  color: var(--primary);
}

.news-list-body p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
  flex: 1;
}

.news-list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  transition: gap 0.25s;
}

.news-list-card:hover .read-more {
  gap: 10px;
}

.view-count {
  font-size: 12px;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---- 侧边栏 ---- */
.news-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.sidebar-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-box h4::before {
  content: '';
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 2px;
}

.sidebar-news {
  list-style: none;
}

.sidebar-news li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-news li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-news li:first-child {
  padding-top: 0;
}

.sidebar-news a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.6;
  text-decoration: none;
  margin-bottom: 6px;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-news a:hover {
  color: var(--primary);
}

.s-date {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
}

.sidebar-about {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.sidebar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: gap 0.2s;
}

.sidebar-link:hover {
  gap: 10px;
}

/* ---- 分页 ---- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  transition: all 0.2s;
  background: #fff;
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,102,255,0.05);
}

.page-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,102,255,0.3);
}

/* ---- 新闻详情页 ---- */
.news-detail {
  padding: 60px 0 100px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100px);
}

.news-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.news-detail-main {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 48px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
}

.news-detail-main > h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.news-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 32px;
}

.news-detail-meta .news-cat {
  font-size: 12px;
}

.news-detail-meta .news-date {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.news-detail-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.news-detail-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-body);
}

.news-detail-content p {
  margin-bottom: 20px;
}

.news-detail-content h2,
.news-detail-content h3 {
  font-weight: 700;
  color: var(--text-dark);
  margin: 32px 0 16px;
}

.news-detail-content h2 {
  font-size: 22px;
}

.news-detail-content h3 {
  font-size: 18px;
}

.news-detail-content img {
  width: 100%;
  border-radius: var(--radius);
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.news-detail-content ul,
.news-detail-content ol {
  margin: 16px 0 16px 24px;
}

.news-detail-content li {
  margin-bottom: 8px;
}

/* 上一篇/下一篇导航 */
.news-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.news-nav-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius);
  border: 1.5px solid var(--border-light);
  text-decoration: none;
  transition: all 0.25s;
}

.news-nav-item:hover {
  background: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.news-nav-item.next {
  text-align: right;
  align-items: flex-end;
}

.news-nav-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.news-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-nav-item:hover .news-nav-title {
  color: var(--primary);
}

/* ---- 相关新闻卡片 ---- */
.related-news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.related-news-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg-light);
  border-radius: var(--radius);
  border: 1.5px solid var(--border-light);
  text-decoration: none;
  transition: all 0.25s;
}

.related-news-item:hover {
  background: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.related-news-thumb {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e8f0fe 0%, #dce5f5 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.related-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-news-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.related-news-info h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.related-news-item:hover h5 {
  color: var(--primary);
}

.related-news-info .s-date {
  font-size: 11px;
}

/* ---- 空状态 ---- */
.news-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.news-empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.news-empty p {
  font-size: 16px;
}

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  .news-list-layout,
  .news-detail-layout {
    grid-template-columns: 1fr;
  }
  
  .news-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .sidebar-box {
    margin-bottom: 0;
  }
  
  .news-main-list {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .news-main-list .news-list-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .news-filter-bar {
    width: 100%;
    border-radius: var(--radius);
  }
  
  .news-filter-tag {
    flex: 1;
    justify-content: center;
  }
  
  .news-main-list {
    grid-template-columns: 1fr;
  }
  
  .news-main-list .news-list-card:first-child {
    grid-template-columns: 1fr;
  }
  
  .news-main-list .news-list-card:first-child .news-list-img {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    aspect-ratio: 16/9;
  }
  
  .news-main-list .news-list-card:first-child .news-list-body {
    padding: 24px;
  }
  
  .news-sidebar {
    grid-template-columns: 1fr;
  }
  
  /* 公告列表移动端 */
  .announce-item-body {
    padding: 14px 16px;
  }
  .announce-item-title {
    font-size: 14px;
  }
  
  .news-detail-main {
    padding: 28px;
  }
  
  .news-detail-main > h1 {
    font-size: 22px;
  }
  
  .news-nav {
    grid-template-columns: 1fr;
  }
  
  .news-nav-item.next {
    text-align: left;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .news-list-page,
  .news-detail {
    padding: 40px 0 60px;
  }
  
  .news-detail-main {
    padding: 20px;
  }
  
  .news-detail-content {
    font-size: 15px;
  }
}

/* ---- 搜索栏 ---- */
/* 侧边栏搜索 */
.sidebar-search-box {
  padding: 16px 20px !important;
}
.sidebar-search-box .sidebar-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-search-box .news-search-input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sidebar-search-box .news-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.sidebar-search-box .news-search-btn {
  height: 38px;
  width: 38px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.sidebar-search-box .news-search-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}
.news-search-clear-link {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
  text-align: center;
}
.news-search-clear-inline {
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
}
.news-search-clear-inline:hover {
  color: #2563eb;
}

/* 分类行右侧搜索 */
.news-search-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}
.news-search-inline .news-search-input {
  width: 200px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.news-search-inline .news-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.news-search-inline .news-search-btn {
  height: 36px;
  width: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.news-search-inline .news-search-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

/* 搜索结果提示 */
.news-search-result-info {
  margin-bottom: 32px;
  padding: 12px 16px;
  background: #eff6ff;
  border-radius: 8px;
  font-size: 14px;
  color: #1e40af;
  border-left: 4px solid #2563eb;
}
.news-search-result-info strong {
  font-weight: 700;
}

/* ---- 公告列表（专业现代样式） ---- */
.announce-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.announce-item {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e8edf3;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.announce-item:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 24px rgba(37,99,235,0.1);
  transform: translateY(-2px);
}
.announce-item-accent {
  width: 4px;
  min-height: 100%;
  background: linear-gradient(180deg, #2563eb, #60a5fa);
  flex-shrink: 0;
  align-self: stretch;
}
.announce-item-body {
  flex: 1;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.announce-item-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.announce-item-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
}
.announce-item-date {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}
.announce-item-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.5;
  margin: 0;
  transition: color 0.2s;
}
.announce-item:hover .announce-item-title {
  color: #2563eb;
}

