/* 广告代理站 - 新闻稿风格样式 */
/* 主色调: #1565c0 */

/* ===== CSS 变量 ===== */
:root {
  --accent-color: #1565c0;
  --accent-dark: #0d47a1;
  --accent-light: #42a5f5;
  --text-primary: #212121;
  --text-secondary: #616161;
  --text-muted: #9e9e9e;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-muted: #fafafa;
  --border-color: #e0e0e0;
  --urgent-color: #d32f2f;
  --info-color: #0288d1;
  --update-color: #388e3c;
  --max-width: 1200px;
  --content-width: 800px;
}

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== 容器 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.content-wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ===== 页头 Header ===== */
.header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo span {
  color: var(--text-primary);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--accent-color);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
  width: 200px;
}

.search-box button {
  padding: 8px 16px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.search-box button:hover {
  background-color: var(--accent-dark);
}

/* ===== 公告横幅 ===== */
.announcement-banner {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  color: white;
  padding: 48px 0;
  text-align: center;
}

.announcement-banner h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.announcement-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 16px 0;
  background-color: var(--bg-muted);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb span {
  color: var(--text-muted);
  margin: 0 8px;
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== 区块标题 ===== */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===== 公告卡片 ===== */
.announcement-list {
  padding: 48px 0;
}

.announcement-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.announcement-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-light);
}

.announcement-card.urgent {
  border-left: 4px solid var(--urgent-color);
}

.announcement-card.info {
  border-left: 4px solid var(--info-color);
}

.announcement-card.update {
  border-left: 4px solid var(--update-color);
}

.announcement-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.announcement-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.announcement-type.urgent {
  background-color: rgba(211, 47, 47, 0.1);
  color: var(--urgent-color);
}

.announcement-type.info {
  background-color: rgba(2, 136, 209, 0.1);
  color: var(--info-color);
}

.announcement-type.update {
  background-color: rgba(56, 142, 60, 0.1);
  color: var(--update-color);
}

.announcement-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.announcement-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.announcement-card h3 a {
  color: inherit;
}

.announcement-card h3 a:hover {
  color: var(--accent-color);
}

.announcement-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== 筛选和排序 ===== */
.filter-bar {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-group span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.filter-options {
  display: flex;
  gap: 8px;
}

.filter-options a {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.filter-options a:hover {
  background-color: var(--bg-secondary);
  color: var(--accent-color);
}

.filter-options a.active {
  background-color: var(--accent-color);
  color: white;
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 32px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  font-size: 0.95rem;
}

.pagination a {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
}

.pagination a:hover {
  background-color: var(--accent-color);
  color: white;
}

.pagination .current {
  background-color: var(--accent-color);
  color: white;
  font-weight: 600;
}

/* ===== 文章详情页 ===== */
.article-detail {
  padding: 48px 0;
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 20px;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text-primary);
}

.article-content ul,
.article-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content strong {
  color: var(--accent-color);
}

/* ===== 行动项 ===== */
.action-items {
  background-color: var(--bg-muted);
  border-radius: 8px;
  padding: 24px;
  margin: 32px 0;
}

.action-items h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.action-items ul {
  list-style: none;
  padding: 0;
}

.action-items li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 12px;
}

.action-items li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 600;
}

/* ===== 联系信息 ===== */
.contact-info {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 24px;
  margin: 32px 0;
}

.contact-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ===== 相关文章 ===== */
.related-section {
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  background-color: var(--bg-muted);
  border-radius: 8px;
  padding: 20px;
  transition: background-color 0.2s ease;
}

.related-card:hover {
  background-color: var(--bg-secondary);
}

.related-card .type {
  font-size: 0.75rem;
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.related-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.related-card h4 a {
  color: var(--text-primary);
}

.related-card h4 a:hover {
  color: var(--accent-color);
}

.related-card .date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== 三栏文章列表 ===== */
.three-column-section {
  padding: 48px 0;
  background-color: var(--bg-secondary);
}

.three-column-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.column h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.column ul {
  list-style: none;
}

.column li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.column li:last-child {
  border-bottom: none;
}

.column a {
  color: var(--text-primary);
  display: block;
}

.column a:hover {
  color: var(--accent-color);
}

.column .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== 页脚 ===== */
.footer {
  background-color: var(--text-primary);
  color: var(--bg-secondary);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: white;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: white;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #424242;
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== 404页面 ===== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
}

.error-content h1 {
  font-size: 6rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 16px;
}

.error-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.error-content p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: var(--accent-dark);
  color: white;
}

/* ===== 归档链接 ===== */
.archive-link {
  text-align: center;
  padding: 24px 0;
}

.archive-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

/* ===== 响应式设计 ===== */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .three-column-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    align-items: stretch;
  }

  .nav {
    justify-content: center;
    gap: 20px;
  }

  .search-box {
    justify-content: center;
  }

  .search-box input {
    flex: 1;
    max-width: 200px;
  }

  .announcement-banner h1 {
    font-size: 1.5rem;
  }

  .announcement-banner p {
    font-size: 1rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-bar {
    flex-direction: column;
    gap: 16px;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 8px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .three-column-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .announcement-card {
    padding: 16px;
  }

  .announcement-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .pagination a,
  .pagination span {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
}
