/* ===== 全局重置（解决不同浏览器默认样式不一致） ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== 四川主题配色 ===== */
:root {
  --red: #C8372D;      /* 辣椒红，强调色 */
  --green: #4A7C59;    /* 竹绿，辅助色 */
  --gold: #D4A843;     /* 金沙金，点缀色 */
  --cream: #F7F3EC;    /* 米白，页面背景 */
  --ink: #2B2B2B;      /* 墨黑，正文 */
  --gray: #888;        /* 次要文字 */
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== 导航栏 ===== */
.site-header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--red);
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-size: 16px;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ===== Hero 大图 ===== */
.hero {
  position: relative;
  height: 80vh;
  min-height: 480px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 2;
}

.hero-text h1 {
  font-size: 52px;
  margin-bottom: 16px;
  letter-spacing: 4px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.hero-text p {
  font-size: 20px;
  margin-bottom: 28px;
  opacity: 0.95;
}

.btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--red);
  color: #fff;
  font-size: 16px;
  border-radius: 4px;
  transition: background 0.3s, transform 0.2s;
}

.btn:hover {
  background: #A82C24;
  transform: translateY(-2px);
}

/* ===== 通用区块 ===== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-title {
  font-size: 32px;
  text-align: center;
  color: var(--ink);
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--gray);
  font-size: 16px;
  margin-bottom: 48px;
}

/* ===== 卡片网格 ===== */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.card {
  flex: 1 1 320px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-body {
  padding: 20px 22px 26px;
}

.card-body h3 {
  font-size: 20px;
  color: var(--red);
  margin-bottom: 10px;
}

.card-body p {
  color: #666;
  font-size: 15px;
  line-height: 1.7;
}

/* ===== 数据条 ===== */
.stats {
  display: flex;
  justify-content: space-around;
  background: var(--green);
  color: #fff;
  padding: 56px 24px;
}

.stat-item {
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 40px;
  margin-bottom: 8px;
  color: var(--gold);
}

.stat-item span {
  font-size: 16px;
  opacity: 0.9;
}

/* ===== 关于四川 ===== */
.about {
  display: flex;
  gap: 48px;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-text .section-title {
  text-align: left;
}

.about-text p {
  font-size: 16px;
  color: #555;
  margin-bottom: 18px;
  line-height: 1.9;
}

.about-img {
  flex: 1;
}

.about-img img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--ink);
  color: #999;
  text-align: center;
  padding: 28px 24px;
  font-size: 14px;
}

/* ===== 返回顶部按钮 ===== */
.back-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 99;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  background: #A82C24;
}

/* ===== 响应式：手机端 ===== */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }

  .nav-links {
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    height: 60vh;
    min-height: 360px;
  }

  .hero-text h1 {
    font-size: 30px;
  }

  .hero-text p {
    font-size: 16px;
  }

  .section {
    padding: 48px 16px;
  }

  .section-title {
    font-size: 24px;
  }

  .card {
    flex: 1 1 100%;
  }

  .stats {
    flex-direction: column;
    gap: 28px;
    padding: 40px 16px;
  }

  .about {
    flex-direction: column;
    gap: 28px;
  }

  .about-text .section-title {
    text-align: center;
  }

  .about-img img {
    height: 240px;
  }
}
