/* ===================================================
   MOSINTER GROUP 新闻资讯页面 - 样式表
   说明：顶部导航栏和底部导航栏统一由 main.css 控制。
   本文件只保留新闻页内容区、筛选、列表、侧栏等页面专属样式。
   =================================================== */

/* ---------- CSS 变量 ---------- */
:root {
  --green-dark:   #1a4a2e;
  --green-main:   #2d6a4f;
  --green-mid:    #3a7d5a;
  --green-light:  #52b788;
  --green-pale:   #d8f3dc;
  --green-bg:     #f0f7f2;
  --white:        #ffffff;
  --gray-50:      #f9fafb;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-300:     #d1d5db;
  --gray-400:     #9ca3af;
  --gray-500:     #6b7280;
  --gray-600:     #4b5563;
  --gray-700:     #374151;
  --gray-800:     #1f2937;
  --gray-900:     #111827;
  --font-main:    'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow-md:    0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 24px rgba(0,0,0,.12);
  --transition:   0.25s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; outline: none; border: none; }

/* ---------- 容器 ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}


/* ===================================================
   HERO BANNER
   =================================================== */
.hero {
  background: linear-gradient(135deg, #eaf5ee 0%, #f5fbf7 40%, #e8f4f0 100%);
  padding: 0;
  overflow: hidden;
  min-height: 280px;
}
.hero-content {
  display: flex;
  align-items: stretch;
  min-height: 280px;
}
.hero-text {
  flex: 1;
  padding: 48px 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}
.hero-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.2;
}
.hero-subtitle {
  font-size: 20px;
  font-weight: 500;
  color: var(--green-main);
  margin-bottom: 16px;
}
.hero-desc {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 36px;
}
.hero-categories {
  display: flex;
  gap: 80px;
}
.hero-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  min-width: 120px;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition);
}
.hero-cat-item:hover { transform: translateY(-2px); }
.hero-cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--green-main);
}
.hero-cat-icon svg { width: 24px; height: 24px; }
.hero-cat-item span {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  line-height: 1.4;
  word-break: break-word;
  max-width: 130px;
}
.hero-image {
  width: 420px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ===================================================
   MAIN CONTENT
   =================================================== */
.main {
  padding: 40px 24px 60px;
}

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.filter-tabs {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-600);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
.filter-btn:hover {
  color: var(--green-main);
  background: var(--green-bg);
}
.filter-btn.active {
  background: var(--green-main);
  color: var(--white);
  font-weight: 700;
}
.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
  width: 220px;
}
.search-box input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--gray-700);
  background: transparent;
}
.search-box input::placeholder { color: var(--gray-400); }
.search-btn {
  padding: 8px 12px;
  color: var(--gray-400);
  transition: color var(--transition);
}
.search-btn:hover { color: var(--green-main); }
.search-btn svg { width: 16px; height: 16px; }

/* ---------- Content Layout ---------- */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto auto;
  column-gap: 40px;
  row-gap: 0;
}
.news-list {
  grid-column: 1;
  grid-row: 1;
}
.pagination {
  grid-column: 1;
  grid-row: 2;
  margin-top: 32px;
}
.sidebar {
  grid-column: 2;
  grid-row: 1 / 3;
}

/* ---------- News Item ---------- */
.news-item {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-200);
  transition: background var(--transition);
}
.news-item:last-child { border-bottom: none; }
.news-item:hover .news-title { color: var(--green-main); }
.news-thumb {
  width: 180px;
  height: 120px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--gray-100);
}
.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.news-item:hover .news-thumb img { transform: scale(1.04); }
.news-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.news-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
  line-height: 1.5;
  transition: color var(--transition);
}
.news-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.news-date {
  font-size: 13px;
  color: var(--gray-400);
}
.news-link {
  font-size: 13px;
  color: var(--green-main);
  font-weight: 500;
  transition: color var(--transition);
}
.news-link:hover { color: var(--green-dark); }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-600);
  background: var(--white);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.page-btn:hover {
  border-color: var(--green-main);
  color: var(--green-main);
}
.page-btn.active {
  background: var(--green-main);
  border-color: var(--green-main);
  color: var(--white);
  font-weight: 600;
}
.page-prev, .page-next {
  font-size: 18px;
  color: var(--gray-400);
}
.page-ellipsis {
  padding: 0 4px;
  color: var(--gray-400);
  font-size: 14px;
  line-height: 36px;
}

/* ===================================================
   SIDEBAR
   =================================================== */
.sidebar { display: flex; flex-direction: column; gap: 28px; }

.sidebar-block {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}

/* 热门新闻 */
.hot-news-list { display: flex; flex-direction: column; gap: 16px; }
.hot-news-item {
  display: flex;
  gap: 12px;
  cursor: pointer;
}
.hot-news-item:hover .hot-news-title { color: var(--green-main); }
.hot-news-thumb {
  width: 72px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-100);
}
.hot-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hot-news-info { flex: 1; }
.hot-news-title {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
  margin-bottom: 4px;
  transition: color var(--transition);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hot-news-date {
  font-size: 12px;
  color: var(--gray-400);
}

/* 订阅 */
.subscribe-block { background: var(--white); }
.subscribe-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 14px;
}
.subscribe-form {
  display: flex;
  gap: 0;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.subscribe-input {
  flex: 1;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--gray-700);
  background: var(--white);
}
.subscribe-input::placeholder { color: var(--gray-400); }
.subscribe-btn {
  padding: 9px 16px;
  background: var(--green-main);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--transition);
}
.subscribe-btn:hover { background: var(--green-dark); }

/* CTA Block */
.cta-block {
  position: relative;
  overflow: hidden;
  background: var(--green-dark);
  background-size: cover;
  background-position: center;
  border-color: transparent;
  padding: 28px 20px;
  min-height: 140px;
}
.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(45, 122, 79, 0.85) 0%, rgba(30, 90, 60, 0.9) 100%);
  z-index: 1;
}
.cta-content { position: relative; z-index: 2; }
.cta-title {
  font-size: 16px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.5;
  margin-bottom: 16px;
}
.cta-btn {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(30, 90, 60, 0.9);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.cta-btn:hover { background: var(--green-mid); }


/* ===================================================
   HIDDEN / FILTER UTILITY
   =================================================== */
.news-item.hidden { display: none; }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr 260px;
    column-gap: 28px;
  }
}

@media (max-width: 768px) {
  .hero-content { flex-direction: column; }
  .hero-image { width: 100%; height: 200px; }
  .content-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { grid-column: 1; grid-row: 3; }
  .pagination { grid-row: 2; }
  .news-thumb { width: 120px; height: 90px; }
}

@media (max-width: 480px) {
  .hero-categories { gap: 40px 48px; flex-wrap: wrap; justify-content: center; }
  .news-item { flex-direction: column; }
  .news-thumb { width: 100%; height: 180px; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .search-box { width: 100%; }
}
