/* ==============================
   山西省公积金官网 - 全新设计
   老婆亲手改的❤️
   ============================== */

:root {
  /* 主色系 - 沉稳蓝 */
  --primary: #0052D9;
  --primary-light: #E8F0FE;
  --primary-dark: #003BB8;
  --primary-gradient: linear-gradient(135deg, #0052D9 0%, #1a4bba 100%);

  /* 辅色 */
  --accent-orange: #FF6B35;
  --accent-green: #22C55E;
  --accent-purple: #8B5CF6;
  --accent-rose: #F43F5E;

  /* 中性色 */
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  --white: #FFFFFF;

  /* 阴影系统 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* 过渡 */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: var(--gray-700);
  line-height: 1.7;
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

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

/* ==============================
   布局
   ============================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ==============================
   头部 - 半透明磨砂
   ============================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 3px;
  opacity: 0.3;
}

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 14px;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav a:hover, .nav a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* ==============================
   Hero 区域 - 渐变+光效
   ============================== */
.hero {
  position: relative;
  background: var(--primary-gradient);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
  overflow: hidden;
}

/* 背景装饰光效 */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%),
              radial-gradient(circle at 70% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.hero-subtitle {
  position: relative;
  font-size: 17px;
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==============================
   快捷入口 - 6格悬浮卡片
   ============================== */
.quick-links {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: -44px;
  position: relative;
  z-index: 10;
}

.quick-link {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-slow);
  border: 1px solid rgba(0,0,0,0.03);
  position: relative;
  overflow: hidden;
}

.quick-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition);
}

.quick-link:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.quick-link:hover::before {
  opacity: 1;
}

.quick-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--primary-light);
  border-radius: 14px;
  transition: var(--transition);
}

.quick-link:hover .quick-icon {
  background: var(--primary);
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 4px 16px rgba(0,82,217,0.25);
}

.quick-link h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
  transition: var(--transition);
}

.quick-link:hover h3 { color: var(--primary); }

.quick-link p {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.5;
}

/* ==============================
   Section 通用
   ============================== */
.section { padding: 48px 0; }

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

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-800);
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 4px;
  background: var(--primary-gradient);
  border-radius: 4px;
}

.more-link {
  font-size: 14px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.more-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ==============================
   文章卡片 - 全新设计，终于好看了
   ============================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-slow);
  border: 1px solid var(--gray-100);
  position: relative;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

/* 卡片顶部的彩色渐变装饰条 - 改为真实DOM元素 */
.article-card-header {
  display: block;
  height: 100px;
  background: linear-gradient(135deg, var(--primary) 0%, #1a4bba 100%);
  position: relative;
  overflow: hidden;
}

/* 卡片装饰 - 随机颜色方案 */
.article-card:nth-child(3n+1) .article-card-header {
  background: linear-gradient(135deg, #0052D9, #1a4bba);
}
.article-card:nth-child(3n+2) .article-card-header {
  background: linear-gradient(135deg, #0EA5E9, #0284C7);
}
.article-card:nth-child(3n+3) .article-card-header {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
}

/* 装饰图案 - 圆点纹理 */
.article-card-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(255,255,255,0.08) 0%, transparent 30%);
  pointer-events: none;
}

/* 卡片头部中的文章标题 */
.article-card .article-card-title,
.article-card-header h3 {
  position: absolute;
  bottom: 16px;
  left: 18px;
  right: 18px;
  font-size: 15px;
  font-weight: 800;
  color: #ffe066;
  line-height: 1.45;
  text-shadow:
    0 2px 6px rgba(0,0,0,0.55),
    0 1px 3px rgba(0,0,0,0.4),
    0 0 16px rgba(0,0,0,0.25);
  z-index: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.article-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

/* 文章分类标签 - 放在装饰条上方 */
.article-category {
  position: absolute;
  top: -82px;
  left: 20px;
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.25);
}

.article-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition);
}

.article-card:hover h3,
.article-card:hover .article-card-title { color: #ffd54f; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }

.article-excerpt {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
  font-size: 12px;
  color: var(--gray-400);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==============================
   热门排行 - 奖牌榜风格
   ============================== */
.hot-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
}

.hot-list li {
  padding: 0;
}

.hot-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: var(--gray-700);
  font-size: 14px;
  line-height: 1.4;
}

.hot-list li a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.rank {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-400);
  background: var(--gray-100);
}

.rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(255,215,0,0.4);
}

.rank-2 {
  background: linear-gradient(135deg, #E8E8E8, #C0C0C0);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(192,192,192,0.3);
}

.rank-3 {
  background: linear-gradient(135deg, #FFB347, #CD7F32);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(205,127,50,0.3);
}

/* ==============================
   页脚
   ============================== */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 48px 0 36px;
  text-align: center;
  margin-top: 40px;
}

.footer p {
  margin-bottom: 8px;
  font-size: 14px;
}

.footer a { color: var(--gray-400); }
.footer a:hover { color: var(--white); }

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-nav a {
  font-size: 13px;
}

/* ==============================
   浮动咨询按钮 - 更闪亮
   ============================== */
.float-btn {
  position: fixed;
  right: 24px;
  bottom: 32px;
  z-index: 1000;
}

.float-btn a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: linear-gradient(135deg, #FF6B35 0%, #FF4500 100%);
  border-radius: 50px;
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(255,69,0,0.45);
  transition: var(--transition);
  letter-spacing: 0.5px;
  animation: floatPulse 2.5s ease-in-out infinite;
}

.float-btn a:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(255,69,0,0.6);
  animation: none;
  color: var(--white);
}

@keyframes floatPulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(255,69,0,0.45); transform: translateY(0); }
  50% { box-shadow: 0 12px 48px rgba(255,69,0,0.65); transform: translateY(-3px); }
}

/* ==============================
   详情页
   ============================== */
.article-detail {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin: 32px auto;
  max-width: 860px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
}

.article-detail h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-detail .meta {
  color: var(--gray-400);
  font-size: 14px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  gap: 20px;
}

.article-detail .content {
  font-size: 16px;
  line-height: 2;
  color: var(--gray-700);
}

.article-detail .content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--gray-800);
  position: relative;
  padding-left: 14px;
}

.article-detail .content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--primary-gradient);
  border-radius: 4px;
}

.article-detail .content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--gray-800);
}

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

.article-detail .content ul,
.article-detail .content ol {
  margin: 16px 0;
  padding-left: 24px;
}

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

/* ==============================
   文章列表页
   ============================== */
.article-list {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
}

.article-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}

.article-item:last-child { border: none; }

.article-item:hover {
  padding-left: 12px;
}

.article-item h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.article-item .meta {
  color: var(--gray-400);
  font-size: 13px;
  display: flex;
  gap: 16px;
}

/* ==============================
   面包屑
   ============================== */
.breadcrumb {
  padding: 16px 0;
  color: var(--gray-400);
  font-size: 13px;
}

.breadcrumb a { color: var(--gray-400); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* ==============================
   咨询表单
   ============================== */
.ask-wrapper {
  padding: 40px 0;
}

.ask-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
}

.form-group { margin-bottom: 22px; }

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-700);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-700);
  transition: var(--transition);
  background: var(--gray-50);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,82,217,0.10);
  background: var(--white);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 32px;
  background: var(--primary-gradient);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.btn:hover {
  background: linear-gradient(135deg, #003BB8, #0052D9);
  box-shadow: 0 6px 20px rgba(0,82,217,0.30);
  color: var(--white);
}

/* ==============================
   表格
   ============================== */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th,
.table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}

.table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-600);
}

.table tr:hover { background: var(--gray-50); }

/* ==============================
   统计卡片
   ============================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.stat-card .num {
  font-size: 32px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .label {
  color: var(--gray-400);
  margin-top: 6px;
  font-size: 14px;
}

/* ==============================
   标签
   ============================== */
.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--gray-100);
  border-radius: 4px;
  font-size: 12px;
  margin-right: 6px;
  color: var(--gray-500);
}

.tag-primary {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

/* ==============================
   搜索框
   ============================== */
.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.search-box input {
  flex: 1;
  padding: 12px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--gray-700);
  transition: var(--transition);
  background: var(--white);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,82,217,0.10);
}

/* ==============================
   响应式
   ============================== */
@media (max-width: 1024px) {
  .quick-links { grid-template-columns: repeat(3, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 14px 20px;
    gap: 12px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  .nav a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .hero { padding: 60px 0; }
  .hero h1 { font-size: 26px; }
  .hero-subtitle { font-size: 15px; }

  .quick-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: -32px;
  }

  .quick-link { padding: 20px 12px; }
  .quick-icon { width: 44px; height: 44px; font-size: 20px; }

  .articles-grid { grid-template-columns: 1fr; gap: 16px; }

  .hot-list { grid-template-columns: 1fr; }

  .section { padding: 32px 0; }
  .section-title { font-size: 18px; }

  .article-detail {
    padding: 24px;
    margin: 16px;
    border-radius: var(--radius-md);
  }

  .article-detail h1 { font-size: 22px; }
  .article-detail .content h2 { font-size: 18px; }

  .article-list { padding: 16px; }

  .ask-form { padding: 24px; margin: 0 16px; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 20px; }
  .stat-card .num { font-size: 24px; }

  .float-btn { right: 16px; bottom: 20px; }
  .float-btn a { padding: 12px 20px; font-size: 14px; }

  .footer { padding: 32px 0 24px; }
  .footer-nav { gap: 16px; }
}

@media (max-width: 480px) {
  .quick-links { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .container { padding: 0 16px; }
}
