/* TBK 学社网站 - 样式表 */

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

:root {
  --primary-color: #E8693E;
  --secondary-color: #5BA878;
  --accent-color: #4A90E2;
  --bg-color: #FAFAFA;
  --text-color: #333;
  --light-text: #666;
  --border-color: #E0E0E0;
}

body {
  font-family: 'Noto Sans JP', 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* 导航栏 */
nav {
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s;
  font-size: 0.95rem;
}

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

/* 汉堡菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* 导航列表 */
.nav-list {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav-list.active {
  display: flex;
}

/* 汉堡菜单打开状态 */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

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

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

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

/* 轮播图 */
.carousel {
  position: relative;
  width: 100%;
  height: 500px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide-content {
  background: rgba(0,0,0,0.4);
  padding: 3rem;
  border-radius: 10px;
  max-width: 600px;
}

.carousel-slide h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.carousel-slide p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.carousel-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s;
  display: inline-block;
}

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

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

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

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

.btn-outline {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

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

.carousel-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

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

.carousel-dot.active {
  background-color: white;
  transform: scale(1.3);
}

/* 章节 */
section {
  padding: 4rem 0;
}

section.bg-light {
  background-color: #f5f5f5;
}

section.bg-warm {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

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

/* 关于我们 */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

.about-content ul {
  list-style: none;
}

.about-content li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.about-content li:before {
  content: "✓";
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2rem;
}

/* 赞助列表 */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.sponsor-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.sponsor-card:hover {
  transform: translateY(-5px);
}

.sponsor-card .logo {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.sponsor-card h3 {
  margin-bottom: 0.5rem;
}

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

/* 地图 */
.map-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.map-container {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

.map-info h3 {
  margin-bottom: 1rem;
}

.map-info p {
  margin-bottom: 1rem;
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(232, 105, 62, 0.3);
}

.form-container {
  max-width: 600px;
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 页脚 */
footer {
  background-color: #333;
  color: white;
  padding: 2rem;
  text-align: center;
}

footer p {
  color: #ccc;
  margin-bottom: 0.5rem;
}

/* 页面容器 */
.page-container {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* 新闻网格 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.news-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card-content {
  padding: 1.5rem;
}

.news-card h3 {
  margin-bottom: 0.5rem;
}

.news-card p {
  color: var(--light-text);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  /* 显示汉堡菜单 */
  .nav-toggle {
    display: flex;
  }

  /* 导航列表隐藏 */
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: white;
    padding: 1rem 2rem;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 99;
  }

  /* 导航列表显示 */
  .nav-list.active {
    display: flex;
  }

  nav .container {
    position: relative;
  }

  nav ul {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .carousel-slide h2 {
    font-size: 1.8rem;
  }

  .carousel-slide p {
    font-size: 1rem;
  }

  .carousel-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .about-grid,
  .map-section {
    grid-template-columns: 1fr;
  }

  section {
    padding: 2rem 0;
  }

  .carousel {
    height: 300px;
  }

  .carousel-slide-content {
    padding: 2rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

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

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

@media (max-width: 480px) {
  nav .container {
    flex-direction: row;
    gap: 1rem;
    justify-content: space-between;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  nav a {
    display: block;
    padding: 0.5rem 0;
  }

  .carousel {
    height: 250px;
  }

  .carousel-slide h2 {
    font-size: 1.3rem;
  }

  .carousel-slide p {
    font-size: 0.9rem;
  }

  .carousel-slide-content {
    padding: 1rem;
  }

  .carousel-buttons {
    gap: 0.5rem;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}
