/* ============================================
   小旋风CMS模板 - 全新现代风格
   文件名: css.css
   版本: 3.0
   ============================================ */

/* ===== CSS变量 ===== */
:root {
  --primary: #1B1B2F;
  --secondary: #2D3561;
  --accent-1: #E84545;
  --accent-2: #4A90D9;
  --accent-3: #F0A500;
  --light-bg: #F8FAFC;
  --dark-bg: #0F0F1A;
  --text: #2D3436;
  --text-light: #636E72;
  --text-muted: #ADB5BD;
  --white: #FFFFFF;
  --border: #E8ECF1;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--light-bg);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--accent-1);
}

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

ul, ol {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Section通用样式 ===== */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 36px;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
  border-radius: 2px;
  margin: 15px auto 0;
}

.section-title p {
  color: var(--text-light);
  font-size: 17px;
  max-width: 600px;
  margin: 15px auto 0;
}

/* ===== Header / Navigation ===== */
.header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
}

.logo span {
  color: var(--accent-1);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  display: block;
  padding: 10px 20px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-1);
  background: rgba(232, 69, 69, 0.06);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--accent-1);
  border-radius: 2px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero / Banner ===== */
.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--dark-bg);
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--white);
  z-index: 2;
  width: 90%;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 52px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-content p {
  font-size: 20px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 35px;
  line-height: 1.6;
}

.btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-1);
  color: var(--white);
}

.btn-primary:hover {
  background: #d03a3a;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(232, 69, 69, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent-3);
  color: var(--primary);
}

.btn-accent:hover {
  background: #d99400;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(240, 165, 0, 0.35);
}

/* ===== Grid布局 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ===== 卡片样式 ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: var(--transition);
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-img-wrapper {
  overflow: hidden;
  position: relative;
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-1);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  font-size: 19px;
  margin-bottom: 10px;
   overflow: hidden;
  white-space: nowrap;        /* 强制不换行 */
  text-overflow: ellipsis;    /* 超出显示 ... */
}

.card-body h3 a {
  color: var(--primary);
}

.card-body h3 a:hover {
  color: var(--accent-1);
}

.card-meta {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.card-desc {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-link {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 14px;
}

.card-link:hover {
  color: var(--accent-1);
}

/* ===== 产品卡片（大图模式） ===== */
.product-card .card-img {
  height: 280px;
}

/* ===== 关于我们 ===== */
.about-section {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about-image img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.about-content h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 16px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 25px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.about-feature .icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 16px;
  flex-shrink: 0;
}

/* ===== 特色/服务区域 ===== */
.features {
  background: var(--primary);
  color: var(--white);
}

.features .section-title h2 {
  color: var(--white);
}

.features .section-title p {
  color: rgba(255,255,255,0.7);
}

.feature-card {
  text-align: center;
  padding: 40px 30px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}

.feature-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-6px);
}

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--white);
}

.feature-card h3 {
  color: var(--white);
  font-size: 20px;
  margin-bottom: 12px;
}

.feature-card p {
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  line-height: 1.7;
}

/* ===== 文章列表 ===== */
.page-banner {
  background: var(--primary);
  padding: 80px 0 60px;
  text-align: center;
}

.page-banner h1 {
  color: var(--white);
  font-size: 38px;
  margin-bottom: 10px;
}

.page-banner p {
  color: rgba(255,255,255,0.7);
  font-size: 17px;
}

.breadcrumb {
  display: inline-flex;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  margin-top: 10px;
}

.breadcrumb a {
  color: rgba(255,255,255,0.8);
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb span {
  color: var(--accent-3);
}

/* ===== 主内容区域 ===== */
.main-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 60px 0;
}

.main-content {
  min-height: 500px;
}

/* ===== 侧边栏 ===== */
.sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 30px;
}

.sidebar-widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 18px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 3px solid var(--accent-1);
  position: relative;
}

.widget-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.widget-list li:last-child {
  border-bottom: none;
}

.widget-list a {
  color: var(--text);
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget-list a span:first-child {
  display: block;
  max-width: 200px;           /* 限制最大宽度，根据你的侧边栏宽度调整 */
  overflow: hidden;
  white-space: nowrap;        /* 强制不换行 */
  text-overflow: ellipsis;    /* 超出显示 ... */
}

.widget-list a .date {
  flex-shrink: 0;             /* 箭头不缩小，始终显示 */
}

.widget-list a:hover {
  color: var(--accent-1);
  padding-left: 4px;
}

.widget-list .date {
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--white);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.pagination a:hover {
  background: var(--accent-1);
  color: var(--white);
}

.pagination .thisclass {
  background: var(--accent-1);
  color: var(--white);
}

/* ===== 详情页 ===== */
.detail-header {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.detail-header h1 {
  font-size: 32px;
  margin-bottom: 16px;
}

.detail-meta {
  display: flex;
  gap: 24px;
  color: var(--text-muted);
  font-size: 14px;
  flex-wrap: wrap;
}

.detail-body {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  line-height: 2;
  font-size: 16px;
}

.detail-body p {
  margin-bottom: 16px;
}

.detail-body img {
  max-width: 100%;
  margin: 20px auto;
  border-radius: var(--radius-sm);
}

.detail-body h2, .detail-body h3 {
  margin: 30px 0 16px;
}

/* 产品相册 */
.product-gallery {
  margin-bottom: 30px;
}

.product-gallery img {
  width: 100%;
  border-radius: var(--radius);
  margin: 10px 0;
}

/* 上下篇 */
.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.page-nav a {
  background: var(--white);
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  color: var(--text);
  font-size: 15px;
}

.page-nav a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--accent-1);
}

.page-nav .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ===== 随机推荐标签 ===== */
.tags-cloud {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.tags-cloud a {
  display: inline-block;
  padding: 6px 18px;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-light);
  transition: var(--transition);
}

.tags-cloud a:hover {
  background: var(--accent-1);
  color: var(--white);
  border-color: var(--accent-1);
}

/* ===== Footer ===== */
.footer {
  background: var(--dark-bg);
  color: rgba(255,255,255,0.8);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-col h3 {
  color: var(--white);
  font-size: 20px;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 12px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--accent-1);
  border-radius: 2px;
}

.footer-about p {
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--white);
  padding-left: 4px;
}

.footer-contact p {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.6);
  font-size: 15px;
}

.footer-contact .icon {
  color: var(--accent-1);
  flex-shrink: 0;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 14px;
}

/* ===== 询价表单 ===== */
.quote-section {
  background: var(--white);
}

.quote-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.1);
}

.form-group textarea {
  height: 150px;
  resize: vertical;
}

/* ===== 页面通用 ===== */
.page-section {
  padding: 60px 0;
  background: var(--white);
}

/* ===== 响应式 - Tablet ===== */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .main-wrapper {
    grid-template-columns: 1fr 280px;
    gap: 30px;
  }
}

/* ===== 响应式 - Mobile ===== */
@media (max-width: 768px) {
  .section {
    padding: 50px 0;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
  }

  .nav.active {
    transform: translateY(0);
    opacity: 1;
  }

  .hero {
    height: 450px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-image img {
    height: 280px;
  }

  .main-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .detail-header,
  .detail-body {
    padding: 24px;
  }

  .detail-header h1 {
    font-size: 24px;
  }

  .page-nav {
    grid-template-columns: 1fr;
  }

  .page-banner {
    padding: 60px 0 40px;
  }

  .page-banner h1 {
    font-size: 28px;
  }

  .features .grid-3 {
    grid-template-columns: 1fr;
  }

  .about-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 380px;
  }

  .hero-content h1 {
    font-size: 26px;
  }

  .btn {
    padding: 12px 28px;
    font-size: 14px;
  }

  .container {
    padding: 0 16px;
  }
}
