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

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, #f5fff7 0%, #eefcf2 45%, #f8fffa 100%);
  color: #245c2e;
}

.page-container {
  width: 100%;
  min-height: 100vh;
}

/* 顶部 */
.top-header {
  width: 100%;
  /* 替换成背景图片 */
  background: url("images/title.png") center center / cover no-repeat;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 36px;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 6px 20px rgba(56, 179, 74, 0.25);
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  padding: 3px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.logo-box h1 {
  font-size: 32px;
  letter-spacing: 1px;
  margin: 0;
  color: #2f9e44;    /* 绿色文字 */
  font-weight: 700;
  text-shadow: 
    0 0 2px #fff,
    1px 1px 0 #fff,
    -1px 1px 0 #fff,
    1px -1px 0 #fff,
    -1px -1px 0 #fff; /* 白色描边 */
}

.top-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #2f9e44;
  border: 1px solid #b7efc5;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.nav-btn:hover {
  background: white;
  color: #38b34a;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(56, 179, 74, 0.2);
}

/* 搜索区域 */
.search-section {
  padding: 24px 40px;
  background: linear-gradient(180deg, #e8f9ee 0%, #f5fff7 100%);
}

.search-box {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  border: 2px solid #4cd964;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(56, 179, 74, 0.12);
}

.search-box input {
  flex: 1;
  padding: 14px;
  font-size: 16px;
  border: none;
  outline: none;
  color: #245c2e;
  background: transparent;
}

.search-box input::placeholder {
  color: #7aa483;
}

.search-box button {
  padding: 0 24px;
  border: none;
  background: linear-gradient(135deg, #38b34a, #4cd964);
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.search-box button:hover {
  background: linear-gradient(135deg, #2f9e44, #38b34a);
}

/* 主布局 */
.main-layout {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 20px;
  padding: 24px 32px;
}

/* 左边栏 */
.left-sidebar {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  padding: 20px;
  min-height: auto;
  max-height: fit-content;
  box-shadow: 0 10px 30px rgba(56, 179, 74, 0.08);
  border: 1px solid rgba(183, 239, 197, 0.8);
  backdrop-filter: blur(8px);
}

.left-sidebar h2 {
  margin-bottom: 20px;
  color: #2f9e44;
  font-size: 22px;
}

.menu-list {
  list-style: none;
}

.menu-list li {
  margin-bottom: 14px;
}

.menu-list a {
  display: block;
  text-decoration: none;
  color: #2f9e44;
  background: linear-gradient(135deg, #e8f9ee, #f5fff7);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #b7efc5;
  transition: all 0.3s ease;
}

.menu-list a:hover {
  background: linear-gradient(135deg, #b7efc5, #a0e8af);
  color: #1b5e20;
  transform: translateX(4px);
}

/* 中间内容区 */
.content-area {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-card,
.video-section {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 20px;
  min-height: 250px;
  box-shadow: 0 10px 30px rgba(56, 179, 74, 0.08);
  border: 1px solid rgba(183, 239, 197, 0.8);
  backdrop-filter: blur(8px);
}

.hero-card h2,
.video-section h2 {
  color: #2f9e44;
  margin-bottom: 16px;
}

.hero-card p {
  margin-bottom: 18px;
  line-height: 1.8;
  color: #40684a;
}

/* 简单轮播 */
.carousel {
  position: relative;
  width: 100%;
  height: 420px;               /* 不要太矮，否则海报会被压扁 */
  margin: 0 auto 16px auto;
  border-radius: 16px;
  overflow: hidden;
  background: #f3fbf5;         /* 浅绿底，图片周围留白也不丑 */
  border: 1px solid #b7efc5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide.active {
  display: block;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* 关键：完整显示，不裁切 */
  display: block;
  background: #f3fbf5;
}

.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.05));
  color: white;
}

.carousel-caption h3 {
  margin-bottom: 6px;
  font-size: 22px;
  color: white;
}

.carousel-caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
}


.carousel-controls {
  display: flex;
  justify-content: space-between; /* 左右分开 */
  width: 100%;
  margin-top: 8px;
}

.carousel-controls button {
  background: linear-gradient(135deg, #38b34a, #4cd964);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-controls button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(56, 179, 74, 0.2);
}

/* 视频区域 */
/* 课程推荐卡片 - 背景图版本 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 横向三列 */
  gap: 18px;
  margin-top: 16px;
}

/* 课程推荐卡片 - 背景图版本 */
.video-card {
  position: relative;
  border-radius: 14px;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid #b7efc5;
  transition: all 0.3s ease;
  background-size: cover;
  background-position: center;
}

/* 半透明遮罩，保证文字清晰 */
.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
  color: white;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(56, 179, 74, 0.12);
}

.video-card h3 {
  margin-bottom: 8px;
  color: white;
  font-size: 16px;
}

.video-card p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin: 0;
}

/* 右边栏 */
.right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 20px;
  min-height: 220px;
  box-shadow: 0 10px 30px rgba(56, 179, 74, 0.08);
  border: 1px solid rgba(183, 239, 197, 0.8);
  backdrop-filter: blur(8px);
}

.side-card h2 {
  color: #2f9e44;
  margin-bottom: 16px;
}

.side-card p {
  color: #40684a;
  line-height: 1.8;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form input {
  padding: 12px;
  border: 1px solid #b7efc5;
  border-radius: 10px;
  outline: none;
  background: #ffffff;
  color: #245c2e;
  transition: all 0.3s ease;
}

.login-form input:focus,
.search-box input:focus {
  box-shadow: 0 0 0 4px rgba(76, 217, 100, 0.15);
}

.login-form button {
  padding: 12px;
  border: none;
  background: linear-gradient(135deg, #38b34a, #4cd964);
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.login-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(56, 179, 74, 0.25);
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 20px;
  background: linear-gradient(90deg, #2f9e44, #38b34a, #4cd964);
  color: white;
  margin-top: 20px;
  box-shadow: 0 -4px 16px rgba(56, 179, 74, 0.15);
}

/* 响应式：平板 */
@media (max-width: 992px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

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

/* 响应式：手机 */
@media (max-width: 576px) {
  .top-header {
    padding: 20px;
  }

  .search-section,
  .main-layout {
    padding: 20px;
  }

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

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    width: 100%;
    padding: 14px;
  }

  .logo-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 右侧关于按钮组样式 */
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.side-nav .nav-btn {
  width: 100%;
  padding: 10px;
  font-size: 15px;
}

/* 顶部登录按钮样式 */
.top-header .login-btn {
  align-self: center;
}

/* 左侧视频菜单样式 */
/* 公益课堂标题居中 */
.center-title {
  text-align: center;
  margin-bottom: 24px;
  color: #2f9e44;
}

/* 纯文字菜单 无框 两行布局 */
.text-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.menu-item:hover {
  transform: translateX(4px);
}

.menu-title {
  font-size: 18px;
  font-weight: bold;
  color: #245c2e;
  line-height: 1.4;
}

.menu-desc {
  font-size: 14px;
  color: #7aa483;
  line-height: 1.4;
  margin-top: 2px;
}

/* 3D 转盘式轮播 */
.carousel-3d {
  position: relative;
  width: 100%;
  height: 420px;
  perspective: 1000px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #b7efc5;
}

.carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.carousel-3d .carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

/* 3D 旋转位置计算（3 张图） */
.carousel-3d .carousel-slide[data-index="0"] {
  transform: rotateY(0deg) translateZ(0px);
}
.carousel-3d .carousel-slide[data-index="1"] {
  transform: rotateY(120deg) translateZ(0px);
}
.carousel-3d .carousel-slide[data-index="2"] {
  transform: rotateY(240deg) translateZ(0px);
}

/* 推荐内容模块样式 */
.recommend-img {
  width: 100%;
  height: 150px;       /* 固定高度，控制大小 */
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.recommend-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* 保持图片比例 + 填满盒子 */
}

.recommend-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
}
.recommend-list li {
  padding: 9px 0;
  border-bottom: 1px solid #e6e6e6;
}
.recommend-list li:last-child {
  border-bottom: none;
}
.recommend-list a {
  text-decoration: none;
  color: #245c2e;
  font-size: 15px;
}
.recommend-list a:hover {
  color: #38b34a;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9d9d9;
}
.dot.active {
  background: #2f9e44;
}