/* ========== Reset & 基础布局 ========== */
*, *::before, *::after { box-sizing: border-box; }

body {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 16px;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

body > header {
  text-align: right;
}
body > h1 {
  max-width: 1360px;
}
body > p,
body > footer {
  max-width: 1360px;
  text-align: center;
  font-size: 16px;
}
body > h2 {
  max-width: 1300px;
  margin-left: 25px;
}

/* ========== 分组链接网格 ========== */
body > h2 + ul {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px 16px;
  list-style: none;
  padding-left: 0;
  margin: 8px 0 20px;
  text-align: center;
}
body > h2 + ul > li {
  overflow: hidden;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.8;
}
body > h2 + ul > li > a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/*
 * 首页/区县页分组链接默认样式。
 * 不加 !important，后台设置的 style="color:xxx" 优先，保留自定义颜色。
 * 没设颜色的站点：默认黑色，鼠标悬停红色。
 */
body > h2 + ul > li > a,
body > h2 + ul > li > a:link,
body > h2 + ul > li > a:visited {
  font-size: 18px;
  color: #000;
  text-decoration: none;
}
body > h2 + ul > li > a:hover,
body > h2 + ul > li > a:focus,
body > h2 + ul > li > a:active {
  color: #e60000;
  text-decoration: none;
}

/* ========== 站点头部 ========== */
.site-header-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}
.site-header-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.site-header-logo img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}
.site-header-home {
  font-weight: 600;
  font-size: 16px;
  color: #333;
  text-decoration: none;
  flex: 0 0 auto;
}
.site-header-home:hover {
  color: #e60000;
}
.site-header-home-lg {
  font-size: 20px;
}
.site-header-title {
  font-weight: 600;
  font-size: 16px;
  color: #333;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}
.site-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
}
.site-header-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 14px;
}
.site-header-nav a.active {
  color: #e60000;
  font-weight: 600;
}
.nav-short { display: none; }
.site-header-clock {
  display: flex;
  flex-direction: row;          /* 关键：横向排列 */
  align-items: baseline;        /* 让大字和小字底对齐 */
  justify-content: flex-end;    /* 仍然右对齐 */
  gap: 8px;                     /* 两个 span 之间的间距，可调 */
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.site-header-clock .clock-row1 {
  font-size: 12px;
  color: #999;
}
.site-header-clock .clock-row2 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}
.site-header-clock .week {
  color: #999;
}
.site-header-clock .date {
  color: #666;
}
.site-header-clock .time {
  color: #333;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.site-header-nav a {
  color: #333;
  text-decoration: none;
}
.site-header-nav a:hover {
  color: #e60000;
}

/* ========== 全站提示 ========== */
.site-notice {
  margin: 12px 0 16px;
  padding: 10px 14px;
  background: rgba(0, 116, 217, 0.06);
  border-left: 3px solid #0074d9;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: #5a6b7b;
}
.site-notice:empty { display: none; }
.site-notice a { color: #0074d9; }
.site-notice a:hover { color: #0056a3; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  body {
    padding: 0 14px;
  }
  body > h2 + ul {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 8px;
    margin: 6px 0 14px;
  }
  body > h2 + ul > li {
    font-size: 13px;
    line-height: 1.7;
  }
  .site-header-logo img { height: 28px; max-width: 140px; }
  .site-header-home { font-size: 15px; }
  .site-header-home-lg { font-size: 18px; }
  .site-header-title { font-size: 15px; max-width: 60%; }
  .site-header-nav { font-size: 13px; }
  .site-header-right { gap: 8px; }
  .site-header-clock { font-size: 12px; gap: 5px; padding-left: 8px; }
  .site-header-clock .date { display: none; }
  .nav-full { display: none; }
  .nav-short { display: inline; }
  .site-header-clock .clock-row1 { font-size: 11px; }
  .site-header-clock .clock-row2 { font-size: 16px; }
  body > h2 + ul > li .sub-list { position: static; box-shadow: none; border: none; padding: 0; margin-top: 4px; }
  body > h2 + ul > li.has-subs:hover .sub-list { display: none; }
  body > h2 + ul > li.has-subs.open .sub-list { display: block; }
}
/* ========== 子站下拉样式 ========== */
body > h2 + ul > li.has-subs {
  position: relative;
  overflow: visible;          /* 关键修复：不裁剪绝对定位的子菜单 */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
body > h2 + ul > li.has-subs > a {
  flex: 0 1 auto;             /* 允许收缩 */
  min-width: 0;               /* 允许收缩到省略号 */
}
body > h2 + ul > li .sub-toggle {
  cursor: pointer;
  color: #999;
  font-size: 36px;
  margin-left: 1px;
  user-select: none;
  flex: 0 0 auto;             /* 三角不收缩 */
  line-height: 1;
}
body > h2 + ul > li .sub-toggle:hover {
  color: #e60000;
}
body > h2 + ul > li .sub-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 140px;
  max-width: 260px;
  background: #fff;
  border: 1px solid #e2e6eb;
  border-radius: 6px;
  padding: 6px 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  z-index: 20;
  text-align: left;
  list-style: none;
  white-space: nowrap;
}
body > h2 + ul > li.has-subs:hover .sub-list,
body > h2 + ul > li.has-subs.open .sub-list {
  display: block;
}
body > h2 + ul > li .sub-list li {
  display: block;
  font-size: 14px;
  line-height: 1.8;
  padding: 2px 0;
}
body > h2 + ul > li .sub-list a {
  display: inline-block;
  color: #333;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
body > h2 + ul > li .sub-list a:hover {
  color: #e60000;
}

/* ========== 区县直达条 ========== */
/* 首页和区县页的分组上方那条「首页 + 各区县」快速切换链接 */
.region-bar {
  max-width: 1360px;
  margin: 10px 0 12px;
  text-align: center;
  font-size: 16px;
  line-height: 1.8;
  margin-top:10px
}
.region-bar a {
  color: #333;
  text-decoration: none;
  margin: 0 2.5px;
  display: inline-block;
}
.region-bar a:hover {
  color: #e60000;
}
.region-bar a.active {
  color: #e60000;
  font-weight: 600;
}
@media (max-width: 768px) {
  .region-bar {
    font-size: 16px;
    margin-top:2px
  }
  .region-bar a {
    margin: 0 0.1px;
  }
  .copy-btn {
    display: none;
  }
}

/* ========== 表单页（apply）样式 ========== */
.pages-form {
  width: 100%;
  max-width: 860px;
  margin: 32px auto 0;
  padding: 0 16px;
  box-sizing: border-box;
}
.pages-center {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(31, 45, 61, .08);
  padding: 40px 44px;
  border: 1px solid rgba(0, 0, 0, .04);
  box-sizing: border-box;
}

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 500;
  font-size: .92rem;
  color: #34495e;
  margin-bottom: 8px;
}
.form-control {
  display: block;
  width: 100%;
  height: 42px;
  padding: 6px 12px;
  font-size: .92rem;
  line-height: 1.5;
  color: #2c3e50;
  background-color: #fff;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control::placeholder { color: #a0aab4; opacity: 1; }
.form-control:focus {
  border-color: #0074d9;
  box-shadow: 0 0 0 3px rgba(0, 116, 217, .12);
  outline: none;
}
select.form-control {
  height: 42px;
  padding: 6px 36px 6px 12px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
  cursor: pointer;
}

.btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: .92rem;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: all .2s ease;
}
.btn-primary {
  color: #fff;
  height: 46px;
  background: #0074d9;
  border-color: #0074d9;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 116, 217, .25);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: #0056a3 !important;
  border-color: #0056a3 !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 116, 217, .32) !important;
  outline: none;
}
.btn-block { display: block; width: 100%; }

.pages-gg {
  margin: 0 0 24px;
  padding: 14px 18px;
  background: rgba(0, 116, 217, .06);
  border-left: 3px solid #0074d9;
  border-radius: 8px;
  font-size: .92rem;
  line-height: 1.85;
  color: #5a6b7b;
}
.pages-gg:empty { display: none; }

/* ========== About 内容样式 ========== */
.markdown-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  line-height: 1.8;
  color: #34495e;
}
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
  color: #333;
  font-weight: 500;
  margin: 1.2em 0 .6em;
  line-height: 1.3;
}
.markdown-section h1 { font-size: 1.6rem; }
.markdown-section h2 { font-size: 1.3rem; }
.markdown-section h3 { font-size: 1.15rem; }
.markdown-section p,
.markdown-section ul,
.markdown-section ol { margin: 1em 0; }
.markdown-section ul,
.markdown-section ol { padding-left: 1.5rem; }
.markdown-section a { color: #0074d9; }
.markdown-section a:hover { text-decoration: underline; }
.markdown-section blockquote {
  border-left: 4px solid #0074d9;
  color: #858585;
  margin: 1.5em 0;
  padding: .4em 0 .4em 20px;
  background: rgba(0, 116, 217, .04);
  border-radius: 0 6px 6px 0;
}
.markdown-section code {
  background: #f9f9f9;
  border-radius: 3px;
  padding: .15em .4em;
  font-family: Consolas, Monaco, monospace;
  font-size: .92em;
  color: #c7254e;
}
.markdown-section pre {
  background: #f8f8f8;
  border-left: 3px solid #0074d9;
  border-radius: 0 6px 6px 0;
  padding: 14px 16px;
  overflow: auto;
  margin: 1em 0;
  line-height: 1.5;
}
.markdown-section pre code { background: transparent; color: #2c3e50; padding: 0; }
.markdown-section table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.markdown-section th,
.markdown-section td { border: 1px solid #ddd; padding: 8px 12px; text-align: left; }
.markdown-section th { background: #f4f6f8; font-weight: 600; }
.markdown-section img { max-width: 100%; height: auto; border-radius: 6px; }

@media (max-width: 768px) {
  .pages-form { margin-top: 16px; padding: 0 12px; }
  .pages-center { padding: 24px 18px; border-radius: 10px; }
  .markdown-section { padding: 12px 12px 32px; }
}
/* ========== 区县下拉菜单（LOGO 右侧） ========== */
.region-dropdown {
  position: relative;
  flex: 0 0 auto;
}
.region-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #e2e6eb;
  border-radius: 6px;
  color: #333;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
}
.region-dropdown-toggle:hover {
  border-color: #e60000;
  color: #e60000;
}
.region-dropdown-toggle .arrow {
  font-size: 12px;
  color: #999;
}
.region-dropdown.open .region-dropdown-toggle {
  border-color: #e60000;
  color: #e60000;
}
.region-dropdown.open .region-dropdown-toggle .arrow {
  color: #e60000;
}
.region-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  max-width: 420px;
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e6eb;
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  z-index: 100;
  list-style: none;
  margin: 0;
}
.region-dropdown.open .region-dropdown-menu {
  display: block;
}
.region-dropdown-menu li {
  display: inline-block;
  width: calc(33.33% - 4px);
  margin: 2px;
  vertical-align: top;
}
.region-dropdown-menu a {
  display: block;
  padding: 4px 8px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
  transition: all .2s ease;
}
.region-dropdown-menu a:hover,
.region-dropdown-menu a.active {
  background: #fff5f5;
  color: #e60000;
}
@media (max-width: 768px) {
  .region-dropdown-toggle {
    padding: 4px 10px;
    font-size: 13px;
  }
  .region-dropdown-menu {
    min-width: 240px;
    max-width: calc(100vw - 32px);
  }
  .region-dropdown-menu li {
    width: calc(50% - 4px);
  }
}