/* 中国京安信用担保有限公司 - 政府门户风格样式 */
:root {
  /* 政府门户网站红色主题 */
  --gov-red: #c8102e;
  --gov-red-dark: #a00d24;
  --primary-red: #c8102e;
  --primary-red-dark: #a00d24;
  --primary-blue: #c8102e;
  --primary-blue-light: #e8394f;
  --accent-gold: #d4a84b;
  --bg-page: #f5f5f5;
  --bg-white: #ffffff;
  --border-color: #e8e8e8;
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-muted: #888888;
  --shadow-sm: 0 1px 4px rgba(200, 16, 46, 0.06);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.08);
  --font-sans: "Microsoft YaHei", "微软雅黑", "SimSun", Arial, sans-serif;
  --max-width: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-red);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ========== 顶部工具栏 ========== */
.top-bar {
  background: var(--primary-blue);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  padding: 6px 0;
}

.top-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-links a {
  color: rgba(255, 255, 255, 0.85);
  margin-left: 16px;
}

.top-bar-links a:hover {
  color: #fff;
}

/* ========== 页头 ========== */
.site-header {
  background: linear-gradient(180deg, #fff 0%, #f8f9fb 100%);
  border-bottom: 3px solid var(--primary-red);
  padding: 20px 0;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-emblem {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.site-title h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-red);
  letter-spacing: 2px;
  line-height: 1.3;
}

.site-title .subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 1px;
}

.header-search {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  min-width: 280px;
}

.header-search input {
  flex: 1;
  padding: 8px 12px;
  border: none;
  font-size: 13px;
  outline: none;
}

.header-search button {
  background: var(--primary-red);
  color: #fff;
  border: none;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 13px;
}

.header-search button:hover {
  background: var(--primary-red-dark);
}

/* ========== 主导航 ========== */
.main-nav {
  background: var(--primary-red);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  display: block;
  padding: 14px 22px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
}

.nav-list > li > a:hover,
.nav-list > li.active > a {
  background: var(--primary-red-dark);
  color: #fff;
}

/* ========== 轮播横幅 ========== */
.hero-banner {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: var(--primary-blue);
}

.hero-slides {
  position: relative;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(122, 10, 28, 0.2) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(122, 10, 28, 0.5) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide-1 {
  background: linear-gradient(135deg, rgba(122, 10, 28, 0.92) 0%, rgba(200, 16, 46, 0.88) 100%);
}

.hero-slide-2 {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.95) 0%, rgba(160, 13, 36, 0.92) 100%);
}

.hero-slide-3 {
  background: linear-gradient(135deg, rgba(160, 13, 36, 0.9) 0%, rgba(122, 10, 28, 0.95) 100%);
}

.hero-content {
  text-align: center;
  color: #fff;
  padding: 0 20px;
  max-width: 800px;
}

.hero-content h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  letter-spacing: 4px;
}

.hero-content p {
  font-size: 18px;
  opacity: 0.95;
  letter-spacing: 2px;
}

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.hero-dots button.active {
  background: #fff;
}

/* ========== 主内容区 ========== */
.main-content {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 40px;
  width: 100%;
}

/* 面包屑 */
.breadcrumb {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 2px);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary-red);
  text-decoration: underline;
}

.breadcrumb-sep {
  margin: 0 10px;
  color: #999;
  font-weight: 400;
  user-select: none;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

/* 三栏首页布局 */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

/* 面板通用 */
.panel {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 2px solid var(--primary-red);
  background: linear-gradient(90deg, #fafbfc 0%, #fff 100%);
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-red);
  padding-left: 10px;
  border-left: 4px solid var(--primary-red);
}

.panel-header .more {
  font-size: 12px;
  color: var(--text-muted);
}

.panel-body {
  padding: 12px 16px 16px;
}

/* 新闻列表 */
.news-list li {
  display: flex;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
  gap: 10px;
}

.news-list li:last-child {
  border-bottom: none;
}

.news-list .date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  width: 48px;
  text-align: center;
  line-height: 1.4;
}

.news-list .date .day {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-red);
}

.news-list a {
  flex: 1;
  color: var(--text-primary);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-list a:hover {
  color: var(--primary-red);
}

.news-list .tag {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 6px;
  background: #fff3e0;
  color: #e65100;
  border-radius: 2px;
}

/* 公告栏 */
.notice-list li {
  padding: 8px 0;
  border-bottom: 1px dotted #eee;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-list li::before {
  content: "▪";
  color: var(--primary-red);
  font-size: 10px;
}

.notice-list a {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-list .date {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* 业务快捷入口 */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 24px 16px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.service-card:hover {
  border-color: var(--primary-red);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-card .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.service-card h4 {
  font-size: 15px;
  color: var(--primary-blue);
  margin-bottom: 6px;
}

.service-card p {
  font-size: 12px;
  color: var(--text-muted);
}

/* 数据统计条 */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--primary-blue);
  color: #fff;
  margin-bottom: 24px;
  border-radius: 2px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-item {
  padding: 24px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item:last-child {
  border-right: none;
}

.stat-item .number {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-item .label {
  font-size: 13px;
  opacity: 0.9;
}

/* 双栏内容 */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* ========== 内页样式 ========== */
.page-title {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 20px 24px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-red);
}

.page-title h2 {
  font-size: 22px;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.page-title p {
  font-size: 13px;
  color: var(--text-muted);
}

.content-article {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 32px 40px;
  margin-bottom: 24px;
  line-height: 1.8;
}

.content-article h3 {
  font-size: 18px;
  color: var(--primary-blue);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.content-article h3:first-child {
  margin-top: 0;
}

.content-article p {
  margin-bottom: 16px;
  text-indent: 2em;
  color: var(--text-primary);
}

.content-article ul {
  margin: 16px 0 16px 2em;
  list-style: disc;
}

.content-article li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* 业务卡片列表 */
.business-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .business-list {
    grid-template-columns: 1fr;
  }
}

.business-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  gap: 20px;
  transition: box-shadow 0.3s;
}

.business-item:hover {
  box-shadow: var(--shadow-md);
}

.business-item .icon {
  width: 64px;
  height: 64px;
  background: var(--primary-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  border-radius: 4px;
}

.business-item h4 {
  font-size: 17px;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.business-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 联系信息 */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.contact-info dt {
  font-weight: 600;
  color: var(--primary-blue);
}

.contact-info dd {
  color: var(--text-secondary);
}

.contact-map {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--gov-red, #c8102e);
  background: #f0f2f5;
  line-height: 0;
}

.contact-map img {
  width: 100%;
  height: auto;
  min-height: 280px;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 新闻列表页 */
.news-page-list li {
  padding: 16px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.news-page-list a {
  font-size: 15px;
  color: var(--text-primary);
  flex: 1;
}

.news-page-list a:hover {
  color: var(--primary-red);
}

.news-page-list .meta {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding: 16px;
}

.pagination a,
.pagination span {
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  background: #fff;
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination a:hover,
.pagination span.current {
  background: var(--primary-red);
  color: #fff;
  border-color: var(--primary-red);
}

/* ========== 页脚 ========== */
.site-footer {
  background: linear-gradient(180deg, var(--primary-red-dark) 0%, #7a0a1c 100%);
  color: rgba(255, 255, 255, 0.85);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 20px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer-links h4 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  padding: 4px 0;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 2;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 8px;
}

/* 侧边栏 */
.sidebar-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .sidebar-layout {
    grid-template-columns: 1fr;
  }
}

.side-nav {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
}

.side-nav h3 {
  background: var(--primary-red);
  color: #fff;
  padding: 12px 16px;
  font-size: 15px;
}

.side-nav ul li a {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--text-primary);
  font-size: 14px;
}

.side-nav ul li a:hover,
.side-nav ul li.active a {
  background: #f8f9fb;
  color: var(--primary-red);
  border-left: 3px solid var(--primary-red);
  padding-left: 13px;
}

/* Tab 切换 */
.tab-header {
  display: flex;
  border-bottom: 2px solid var(--primary-red);
}

.tab-header button {
  padding: 10px 20px;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  font-family: inherit;
}

.tab-header button.active {
  background: var(--primary-red);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}
