/* ============================================
   太原市斯航网络科技有限公司 - 基础样式
   文件名：base.css
   作用：CSS重置 + 变量 + 工具类
   ============================================ */

/* CSS变量定义 */
:root {
  --primary: #3D3D3D;
  --secondary: #FF6B35;
  --dark: #2A2A2A;
  --bg: #F7F7F7;
  --white: #FFFFFF;
  --text: #333333;
  --text-muted: #666666;
  --border: #D0D0D0;
  --font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --container: 1200px;
  --transition: 0.3s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--secondary);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary);
}

p {
  margin-bottom: 1em;
}

/* 工具类 */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

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

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

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

.flex {
  display: flex;
}

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

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

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-20 {
  gap: 20px;
}

.gap-30 {
  gap: 30px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-30 {
  margin-bottom: 30px;
}

.mb-40 {
  margin-bottom: 40px;
}

.mb-60 {
  margin-bottom: 60px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px;
}

.mt-40 {
  margin-top: 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;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn:hover {
  background-color: #e55a2b;
  color: var(--white);
}

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

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

/* 卡片样式 */
.card {
  background-color: var(--white);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* 隐藏类 */
.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: none;
}

/* 清除浮动 */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* 溢出隐藏 */
.overflow-hidden {
  overflow: hidden;
}

/* 文字截断 */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 行高工具 */
.leading-relaxed {
  line-height: 1.8;
}

.leading-normal {
  line-height: 1.6;
}

/* 字体大小 */
.text-sm {
  font-size: 14px;
}

.text-base {
  font-size: 16px;
}

.text-lg {
  font-size: 18px;
}

.text-xl {
  font-size: 20px;
}

.text-2xl {
  font-size: 24px;
}

.text-3xl {
  font-size: 30px;
}

/* 字体颜色 */
.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-white {
  color: var(--white);
}

/* 背景色 */
.bg-primary {
  background-color: var(--primary);
}

.bg-dark {
  background-color: var(--dark);
}

.bg-white {
  background-color: var(--white);
}

.bg-secondary {
  background-color: var(--secondary);
}

/* 边框 */
.border {
  border: 1px solid var(--border);
}

.border-t {
  border-top: 1px solid var(--border);
}

.border-b {
  border-bottom: 1px solid var(--border);
}

/* 圆角 */
.rounded {
  border-radius: 4px;
}

.rounded-lg {
  border-radius: 8px;
}

/* 网格基础 */
.grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.grid > [class*="col-"] {
  padding: 0 15px;
}

.col-3 {
  width: 25%;
}

.col-4 {
  width: 33.333%;
}

.col-6 {
  width: 50%;
}

.col-8 {
  width: 66.667%;
}

.col-9 {
  width: 75%;
}

.col-12 {
  width: 100%;
}
