/* ===== 全局变量与基础样式 ===== */
:root {
  --primary: #D96C4A;       /* 柴烧暖橙色 */
  --secondary: #A67C52;     /* 陶土原色 */
  --accent-gray: #8C9C9A;   /* 青瓷灰 */
  --accent-purple: #5C4A5C; /* 窑变紫 */
  --bg: #F5F2EB;            /* 粗陶肌理米白 */
  --card: #FAFAFA;          /* 素坯白 */
  --text: #3E2C20;          /* 深褐泥色 */
  --text-light: #6B5445;
  --border: #E0D8CC;
  --shadow: rgba(62, 44, 32, 0.08);
  --radius: 12px;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: "Noto Serif SC", "Source Han Serif CN", "STSong", serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

/* ===== 排版 ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

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

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

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

/* ===== 容器 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

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

.section-title p {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--accent-gray);
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(245, 242, 235, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 2px 20px var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text);
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

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

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ===== 首页轮播（拉坯机旋转效果） ===== */
.hero-carousel {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  margin-top: 0;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.2s ease;
  transform: rotate(2deg) scale(1.05);
}

.carousel-slide.active {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(62, 44, 32, 0.3) 0%,
    rgba(62, 44, 32, 0.6) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.carousel-content {
  color: #fff;
  max-width: 700px;
  padding: 2rem;
}

.carousel-content h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.carousel-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.carousel-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 10;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.carousel-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 15px rgba(217, 108, 74, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 108, 74, 0.4);
  color: #fff;
}

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

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== 泥料质感悬浮卡片 ===== */
.clay-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: var(--transition);
  position: relative;
}

.clay-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(217,108,74,0.05), rgba(166,124,82,0.05));
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.clay-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(62, 44, 32, 0.15);
}

.clay-card:hover::before {
  opacity: 1;
}

.clay-card .card-image {
  overflow: hidden;
  aspect-ratio: 4/3;
}

.clay-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.clay-card:hover .card-image img {
  transform: scale(1.08);
}

.clay-card .card-body {
  padding: 1.5rem;
}

.clay-card .card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.clay-card .card-body p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== 窑温进度条 ===== */
.kiln-progress {
  position: relative;
  height: 24px;
  background: linear-gradient(90deg, #E8DDD4, #D4C4B0);
  border-radius: 12px;
  overflow: hidden;
  margin: 1rem 0;
}

.kiln-progress-bar {
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(90deg, #F4A460, #D96C4A, #8B0000);
  position: relative;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: kiln-glow 2s infinite alternate;
}

@keyframes kiln-glow {
  0% { box-shadow: 0 0 5px rgba(217, 108, 74, 0.5); }
  100% { box-shadow: 0 0 15px rgba(217, 108, 74, 0.8), 0 0 30px rgba(139, 0, 0, 0.3); }
}

.kiln-progress-label {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #fff;
  font-weight: 600;
}

.kiln-temp {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* ===== 釉色对比滑块 ===== */
.glaze-compare {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: col-resize;
}

.glaze-compare .before-img,
.glaze-compare .after-img {
  display: block;
  width: 100%;
}

.glaze-compare .before-img {
  position: absolute;
  top: 0;
  left: 0;
  clip-path: inset(0 50% 0 0);
}

.glaze-compare .slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--primary);
  cursor: col-resize;
  z-index: 5;
}

.glaze-compare .slider-handle::before {
  content: '◀▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  letter-spacing: 2px;
}

/* ===== 网格布局 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

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

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

/* ===== 时间轴 ===== */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1.5rem 2.5rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 2rem;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--primary);
}

.timeline-item:nth-child(odd)::before {
  right: -8px;
}

.timeline-item:nth-child(even)::before {
  left: -8px;
}

.timeline-content {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px var(--shadow);
}

.timeline-date {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ===== 横向滑动区域 ===== */
.scroll-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0 2rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
  height: 6px;
}

.scroll-container::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 3px;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 3px;
}

.scroll-item {
  flex: 0 0 300px;
  scroll-snap-align: start;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer h4 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-light);
}

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

.breadcrumb span {
  margin: 0 0.5rem;
  color: var(--border);
}

/* ===== 页面头部Banner ===== */
.page-hero {
  position: relative;
  height: 40vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 70px;
  overflow: hidden;
}

.page-hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(62,44,32,0.4), rgba(62,44,32,0.7));
}

.page-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.page-hero-content h1 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-hero-content p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
}

/* ===== 文章内容 ===== */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.article-content h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.article-content p {
  text-indent: 2em;
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

/* ===== 搜索页 ===== */
.search-box {
  max-width: 600px;
  margin: 3rem auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 1.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--card);
  color: var(--text);
  transition: var(--transition);
  font-family: inherit;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 108, 74, 0.1);
}

.search-box button {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.25rem;
  cursor: pointer;
}

/* ===== 错误页 ===== */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-page h1 {
  font-size: 8rem;
  color: var(--primary);
  opacity: 0.3;
  line-height: 1;
}

.error-page h2 {
  margin: 1rem 0;
}

/* ===== 表格 ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow);
}

.data-table th,
.data-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 600;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(217, 108, 74, 0.03);
}

/* ===== 标签 ===== */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(217, 108, 74, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  margin: 0.25rem;
}

/* ===== 呼吸微光效果 ===== */
@keyframes breath-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.glow-effect {
  animation: breath-glow 3s ease-in-out infinite;
}

/* ===== 表单 ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ===== 下载页 ===== */
.download-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px var(--shadow);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.download-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 20px var(--shadow);
}

.download-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  flex-shrink: 0;
}

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

@media (max-width: 768px) {
  html { font-size: 14px; }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--shadow);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .carousel-content h1 {
    font-size: 2rem;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 50px;
    text-align: left !important;
  }
  
  .timeline-item::before {
    left: 12px !important;
    right: auto !important;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-carousel {
    height: 70vh;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .section { padding: 3rem 0; }
  .scroll-item { flex: 0 0 260px; }
}

/* ===== 无障碍 ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 打印样式 ===== */
@media print {
  .navbar, .footer, .carousel-dots { display: none; }
  body { background: #fff; }
}
