/* 全局样式定义 - 围巾展示网站 */

/* 导入思源黑体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* CSS变量定义 */
:root {
  --primary-color: #f5f5f0;
  --secondary-color: #e8e6e1;
  --accent-color: #c8a97e;
  --text-dark: #2c2c2c;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--primary-color);
  overflow-x: hidden;
}

/* 导航栏样式 */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(245, 245, 240, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition-base);
}

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

.nav-logo {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  letter-spacing: 0.05em;
}

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

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  position: relative;
  transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-dark);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

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

/* 主要内容区域 */
.main-content {
  min-height: 100vh;
  padding-top: 80px;
}

.hero-section {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  text-align: center;
  letter-spacing: 0.1em;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
  position: relative;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 1rem;
  letter-spacing: 0.05em;
}

/* 网格布局 */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.series-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-base);
  cursor: pointer;
}

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

.series-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  height: 300px;
  gap: 2px;
}

.series-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-base);
}

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

.series-info {
  padding: 1.5rem;
}

.series-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.series-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* 工艺页面样式 */
.craft-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

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

.craft-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  transition: var(--transition-base);
}

.craft-item:hover .craft-image {
  box-shadow: var(--shadow-medium);
}

.craft-name {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.craft-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* 系法页面样式 */
.styles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.style-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition-base);
}

.style-card:hover {
  box-shadow: var(--shadow-medium);
}

.style-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.style-name {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.style-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* 页脚样式 */
footer {
  background: var(--secondary-color);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-content {
    padding: 1rem;
  }
  
  .nav-menu {
    gap: 1rem;
  }
  
  .nav-link {
    font-size: 0.85rem;
  }
  
  .series-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .craft-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .styles-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
    padding: 0 1rem;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b89a6e;
}

/* 加载动画 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 图片容器 */
.image-container {
  overflow: hidden;
  border-radius: 8px;
}

.image-container img {
  transition: transform 0.5s ease;
}

.image-container:hover img {
  transform: scale(1.1);
}