/* 晶体矿物学习平台 - 首页样式 */

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

body {
  font-family: "Source Han Sans CN", "PingFang SC", sans-serif;
  font-size: 14px;
  color: #333333;
  background-color: #F5F8FC;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: #2A5DAA;
}

ul, li {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* 通用按钮样式（首页未引入 Tailwind，提供自定义类） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  line-height: 1.2;
}

.btn-primary {
  background-color: #0ea5e9; /* sky-500 */
  color: #fff;
}

.btn-primary:hover {
  background-color: #0284c7; /* sky-600 */
}

/* 顶部导航栏 */
.main-header {
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  height: 40px;
}

.logo img {
  height: 100%;
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-menu a {
  color: #666666;
  font-size: 16px;
  transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #2A5DAA;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}



.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 主要内容区 */
.main-content {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 轮播图区域 */
.hero-section {
  position: relative;
  margin-bottom: 48px;
  border-radius: 12px;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  height: 480px;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s;
}

.slide.active {
  opacity: 1;
}

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

.slide-content {
  position: absolute;
  left: 64px;
  bottom: 64px;
  color: #FFFFFF;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slide-content h2 {
  font-size: 36px;
  margin-bottom: 16px;
}

.slide-content p {
  font-size: 18px;
  margin-bottom: 24px;
}

.cta-button {
  display: inline-block;
  padding: 12px 32px;
  background: #2A5DAA;
  color: #FFFFFF;
  border-radius: 24px;
  font-size: 16px;
  transition: background-color 0.3s;
}

.cta-button:hover {
  background: #4B8CD7;
}

.slider-controls button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.3);
  color: #FFFFFF;
  border-radius: 50%;
  font-size: 24px;
  transition: background-color 0.3s;
}

.slider-controls button:hover {
  background: rgba(0, 0, 0, 0.5);
}

.prev-btn {
  left: 24px;
}

.next-btn {
  right: 24px;
}

