/* 全局样式文件 - 围巾展示网站 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&display=swap');

/* 设计令牌 */
:root {
  --primary-color: #f5f5f0;
  --secondary-color: #e8ddd0;
  --accent-color: #c44536;
  --text-dark: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--primary-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 英文字体 */
.text-en {
  font-family: 'Montserrat', sans-serif;
}

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

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  position: relative;
  transition: var(--transition-smooth);
  padding: 10px 0;
}

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

.nav-link.active {
  color: var(--text-dark);
  font-weight: 500;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition-smooth);
}

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

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background-color: var(--text-dark);
  margin: 3px 0;
  transition: var(--transition-smooth);
}

/* 主容器 */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px 40px;
  min-height: 100vh;
}

/* 标题样式 */
.page-title {
  font-size: 36px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 60px;
  color: var(--text-dark);
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
}

/* 网格布局 */
.grid {
  display: grid;
  gap: 30px;
}

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

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 卡片样式 */
.card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
}

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

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.card-content {
  padding: 25px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.card-description {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.8;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: #a63728;
  transform: translateY(-2px);
}

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

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

/* 横幅样式 */
.banner {
  position: relative;
  height: 500px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 60px;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
}

.banner-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 10px;
}

.banner-subtitle {
  font-size: 18px;
  opacity: 0.9;
}

/* 材质板块 */
.material-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.material-card {
  background-color: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
}

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

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

.material-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.material-description {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.8;
}

/* 系法教程 */
.tutorial-section {
  margin-bottom: 60px;
}

.tutorial-card {
  background-color: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-light);
  margin-bottom: 30px;
}

.tutorial-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.tutorial-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

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

.step-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.step-number {
  display: inline-block;
  width: 30px;
  height: 30px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  line-height: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-description {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* 瀑布流布局 */
.masonry {
  column-count: 3;
  column-gap: 30px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 30px;
}

.masonry-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
  transition: var(--transition-smooth);
}

.masonry-image:hover {
  transform: scale(1.02);
}

.masonry-caption {
  font-size: 14px;
  color: var(--text-light);
  text-align: center;
  font-style: italic;
}

/* 页脚 */
.footer {
  background-color: var(--secondary-color);
  padding: 30px;
  text-align: center;
  margin-top: 80px;
}

.footer-text {
  color: var(--text-light);
  font-size: 14px;
}

/* 引导语 */
.guide-text {
  text-align: center;
  font-size: 18px;
  color: var(--text-light);
  margin: 50px 0;
  line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: white;
    flex-direction: column;
    justify-content: start;
    padding-top: 50px;
    gap: 20px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-light);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

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

  .masonry {
    column-count: 2;
  }

  .page-title {
    font-size: 28px;
  }

  .banner {
    height: 300px;
  }

  .banner-title {
    font-size: 24px;
  }

  .main-container {
    padding: 80px 15px 30px;
  }
}

@media (max-width: 480px) {
  .masonry {
    column-count: 1;
  }

  .tutorial-steps {
    grid-template-columns: 1fr;
  }

  .material-section {
    grid-template-columns: 1fr;
  }
}