/* ============================================================
 * 文件名：assets/css/site.css
 * 作用：公众前端公共样式（政务风格微调，主体样式使用 Tailwind）
 * ============================================================ */

/* ---------- 基础排版 ---------- */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  /* 思源黑体字族，逐级回退 */
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 可访问性：键盘聚焦轮廓 ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1f6fb8;
  outline-offset: 2px;
}

/* ---------- 页头 ---------- */
.gov-topbar {
  background: #0a2a4a;
  color: #d7e8f8;
  font-size: 13px;
}

.gov-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

/* 导航项 */
.gov-nav-link {
  position: relative;
  display: inline-block;
  padding: 10px 14px;
  font-size: 15px;
  color: #334155;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.gov-nav-link:hover {
  color: #14539a;
  background: #eef5fc;
}
.gov-nav-link.is-active {
  color: #14539a;
  font-weight: 700;
  background: #eef5fc;
}
.gov-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: #14539a;
}

/* ---------- Banner ---------- */
.gov-banner {
  background:
    linear-gradient(135deg, rgba(10, 42, 74, 0.94) 0%, rgba(15, 66, 121, 0.9) 55%, rgba(31, 111, 184, 0.86) 100%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 12px, transparent 12px 24px);
  color: #fff;
}

/* ---------- 卡片 ---------- */
.gov-card {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 8px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.gov-card:hover {
  border-color: #b0d0ef;
  box-shadow: 0 4px 12px rgba(15, 66, 121, 0.14), 0 12px 32px rgba(15, 66, 121, 0.1);
  transform: translateY(-2px);
}

/* 区块标题（左侧蓝色竖条） */
.gov-section-title {
  position: relative;
  padding-left: 14px;
  font-size: 22px;
  font-weight: 700;
  color: #0d3660;
}
.gov-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 2px;
  background: #14539a;
}

/* ---------- 图片占位 ---------- */
/* 所有图片位先用占位样式，后期替换真实素材即可 */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, #eef5fc 0%, #d7e8f8 100%);
  color: #7fb2e2;
  font-size: 13px;
  letter-spacing: 1px;
  border: 1px dashed #b0d0ef;
}

/* ---------- 列表条目 ---------- */
.gov-list-item {
  transition: background-color 0.15s ease;
}
.gov-list-item:hover {
  background: #f7fbff;
}

/* ---------- 关键词高亮 ---------- */
mark.kw {
  background: #fff3cd;
  color: #a05a00;
  padding: 0 2px;
  border-radius: 2px;
}

/* ---------- 富文本渲染（详情正文） ---------- */
.gov-article {
  line-height: 1.9;
  color: #334155;
  white-space: pre-wrap; /* 保留后台录入的换行 */
  word-break: break-word;
}

/* ---------- 打印样式（便于打印案例） ---------- */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
