/* base.css - 重置+变量+工具类（全局加载） */

/* ===== CSS Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #333333;
  background-color: #F5F6FA;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  word-wrap: break-word;
}

input, textarea, button {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: 1px solid #DCDDE1;
}

button {
  cursor: pointer;
  border: none;
}

/* ===== CSS Variables ===== */
:root {
  --primary: #2D3436;
  --secondary: #E17055;
  --dark-bg: #1E2729;
  --page-bg: #F5F6FA;
  --text-white: #FFFFFF;
  --text-dark: #333333;
  --text-muted: #666666;
  --border-color: #DCDDE1;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
}

/* ===== Utility Classes ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.fl {
  float: left;
}

.fr {
  float: right;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Flex utilities */
.flex {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}

.flex-wrap {
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.justify-between {
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

.justify-center {
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.align-center {
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
}

/* Margin & Padding utilities */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.pt-20 { padding-top: 20px; }
.pt-40 { padding-top: 40px; }
.pt-60 { padding-top: 60px; }
.pb-20 { padding-bottom: 20px; }
.pb-40 { padding-bottom: 40px; }
.pb-60 { padding-bottom: 60px; }

/* Text utilities */
.font-bold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

/* Color utilities */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--text-white); }

.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-dark { background-color: var(--dark-bg); }
.bg-page { background-color: var(--page-bg); }
.bg-white { background-color: #fff; }

/* Section title style */
.section-title {
  font-size: 1.75rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  -webkit-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--secondary);
}

/* Card style */
.card {
  background: #fff;
  border-radius: 6px;
  padding: 30px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease, -webkit-transform 0.3s ease;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  transition: box-shadow 0.3s ease, transform 0.3s ease, -webkit-transform 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  -webkit-transform: translateY(-4px);
  -ms-transform: translateY(-4px);
  transform: translateY(-4px);
}

/* Button styles */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--secondary);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: #c75c3f;
}

.btn-outline {
  background-color: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

.btn-outline:hover {
  background-color: var(--secondary);
  color: var(--text-white);
}

/* Responsive text */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  .container {
    padding: 0 15px;
  }
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }
  .section-title {
    font-size: 1.25rem;
  }
}
