/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* 字体导入 */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&family=Open+Sans:wght@300;400;600;700&display=swap');

/* 全局变量 */
:root {
  --primary-color: #6A1B9A;
  /* 主紫色 (匹配PPT) */
  --secondary-color: #FFC107;
  /* 辅助黄色 (匹配PPT) */
  --accent-color: #2196F3;
  /* 蓝色 (按钮/强调) */
  --text-dark: #333333;
  --text-light: #666666;
  --white: #FFFFFF;
  --gray-light: #F5F5F5;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 全局样式 */
body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  color: var(--primary-color);
}

h3 {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  font-family: 'Open Sans', sans-serif;
}

/* 固定顶部导航栏 */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  /* 从 1.5rem 缩小到 0.8rem，让 Logo 靠得更近 */
  flex-shrink: 1;
  /* 允许 Logo 容器在空间不足时缩小 */
}

/* 2. 缩小 Logo 本身的大小 */
.logo {
  height: 35px;
  /* 从 50px 缩小到 35px，这是最有效的办法 */
  width: auto;
  transition: transform 0.3s ease;
}

/* 3. 优化导航栏，确保文字不会被挤到下一行 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 3%;
  /* 稍微减少左右内边距 (从 5% 减到 3%) 给内容腾空间 */
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
  flex-wrap: nowrap;
  /* 强制不换行 */
}

.nav-links {
  display: flex;
  gap: clamp(0.8rem, 2vw, 2rem);
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* 主内容容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px clamp(15px, 5vw, 60px) 50px;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--accent-color);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.btn:hover {
  background-color: #1976D2;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: #4A148C;
}

/* 卡片样式 */
.card {
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

/* 滚动动画效果 (渐入) */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 网格布局 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

/* 团队成员卡片 */
.team-member {
  text-align: center;
  padding: 1.5rem;
}

.member-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 4px solid var(--primary-color);
}

/* 图标样式 */
.icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-right: 0.8rem;
}

/* 页脚样式 */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 5%;
  margin-top: 5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--white);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--secondary-color);
}

/* 响应式设计 */
/* 响应式设计 (手机专用) */
/* =========================================
   响应式设计 (手机端专门适配)
========================================= */
/* =========================================
   完美柔和自适应方案 (保留原本美感)
========================================= */
html, body {
  width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  max-width: 100%;
}

/* 图片、视频、iframe 永不溢出 */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================
   超大屏幕优化
========================================= */
@media (min-width: 1600px) {
  .container {
    max-width: 1400px;
  }
}

/* =========================================
   平板 / 小笔电
========================================= */
@media (max-width: 1024px) {
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.5rem; }

  .container {
    padding: 90px 4% 40px;
  }

  .nav-links {
    gap: 1.2rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* =========================================
   手机端
========================================= */
@media (max-width: 768px) {

  html {
    font-size: 15px;
  }

  body {
    overflow-x: hidden;
  }

  /* Navbar */
  .navbar {
    flex-direction: column;
    align-items: center;
    padding: 12px 15px;
    position: relative;
    width: 100%;
  }

  .logo-container {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }

  .logo {
    height: auto;
    max-height: 32px;
    max-width: 120px;
  }

  .nav-links {
    justify-content: flex-start; /* 靠左排列 */
    flex-wrap: nowrap; /* ⚠️ 绝对不换行 */
    width: 100%;
    overflow-x: auto; /* ⚠️ 允许横向滑动 */
    -webkit-overflow-scrolling: touch; /* 苹果手机滑动更顺滑 */
    padding-bottom: 5px; /* 留出一点底部呼吸空间 */
    scrollbar-width: none; /* 隐藏难看的滚动条 (Firefox) */
  }

  .nav-links::-webkit-scrollbar {
    display: none; /* 隐藏难看的滚动条 (Chrome/Safari/手机浏览器) */
  }

  /* Container */
  .container {
    width: 100%;
    padding: 25px 15px 40px;
  }

  /* Typography */
  h1 {
    font-size: 1.9rem;
    line-height: 1.3;
  }

  h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.25rem;
  }

  p {
    font-size: 1rem;
  }

  /* Cards */
  .card {
    padding: 1.2rem;
  }

  /* Grid */
  .grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  /* Team images */
  .member-img {
    width: 130px;
    height: 130px;
    margin: 0 auto 15px auto !important; /* ⚠️ 核心修复：强制图片在块级元素下左右居中 */
  }

  .team-member, .card {
    text-align: center !important; /* 确保卡片里的文字也跟着居中 */
  }

  /* Buttons */
  .btn {
    width: 100%;
    text-align: center;
    padding: 0.9rem;
  }

  .btn {
    display: block !important; /* 强制变为独立的一块 */
    width: 100% !important; /* 强制大家一样宽 */
    margin: 0 auto 15px auto !important; /* 强制居中，并加上下间距防止连在一起 */
    box-sizing: border-box;
  }

  /* Footer */
  .footer {
    padding: 2rem 15px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .social-links {
    justify-content: center;
  }
}

/* =========================================
   超小屏 (iPhone SE 等)
========================================= */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .logo {
    max-height: 26px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .container {
    padding: 20px 12px;
  }

  .card {
    padding: 1rem;
  }

  .member-img {
    width: 100px;
    height: 100px;
  }
}

/* ⚠️ 注意这里！这个大括号把手机专用区关起来了！ */


/* =========================================
   新增功能：Formspree 联系表单样式 (全局通用)
========================================= */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--gray-light);
  transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--white);
  box-shadow: 0 0 8px rgba(106, 27, 154, 0.2);
}

/* =========================================
   新增功能：图片点击放大 (Modal) 样式 (全局通用)
========================================= */
.demo-img:hover {
  transform: scale(1.02);
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-modal:hover {
  color: var(--secondary-color);
}
