/* 绿色科普馆专题页面样式 */

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

body {
  line-height: 28px;
  font-size: 15px;
  color: #444;
  font-family: Arial, "Lucida Grande", "Microsoft Yahei", "Hiragino Sans GB", "Hiragino Sans GB W3", SimSun, "PingFang SC", STHeiti;

}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 顶部通知条 */
.top-banner {
  background: linear-gradient(135deg, #2c5530, #4a7c59);
  color: white;
  padding: 12px 0;
  font-size: 14px;
}

.top-banner .container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
}

.msg {
  flex: 1;
  line-height: 1.4;
}

/* 白色横条 */
.white-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* 首屏 */
.hero {
  position: relative;
  height: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  overflow: visible;
}

.hero-bg {
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  height: 1000px;
  background: linear-gradient(to bottom, rgba(161, 217, 245, 1) 0%, rgba(161, 217, 245, 1) 33%, rgba(161, 217, 245, 0) 100%);
  z-index: 1;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  /* 防止图片在加载时闪烁 */
  transition: opacity 0.3s ease;
}

/* 首屏标题图片叠加层 */
.hero-title-img {
  position: absolute;
  top: 1px;
  left: 0;
  width: 100%;
  height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
}

.hero-title-img img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  display: block;
}

.hero-bg img {
  object-fit: cover;
  object-position: center top;
}

.hero-title {
  position: relative;
  z-index: 2;
}

.hero-title h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
  font-size: 1.5rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.logo {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* 通用样式 */
.section {
  padding: 80px 0;
  position: relative;
  overflow: visible;
}

/* Section 锯齿装饰 */
.zigzag-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(30px, 4vw, 80px);
  background: 
    linear-gradient(45deg, transparent 50%, #E3F0E3 50%),
    linear-gradient(-45deg, transparent 50%, #E3F0E3 50%);
  background-size: clamp(30px, 4vw, 30px) clamp(30px, 4vw, 30px);
  background-repeat: repeat-x;
  background-position: 0 0;
  z-index: 10;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 60px;
  color: #2c5530;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
}

.section-title img {
  max-width: 1400px;
  height: auto;
  object-fit: contain;
  display: block;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  color: #4a7c59;
  text-decoration: none;
  border-radius: 25px;
  border: 1px solid #4a7c59;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(44, 85, 48, 0.3);
}

.more-btn-wrap {
  text-align: center;
  margin-top: 30px;
}

/* 图片占位符 */
.image-slot {
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.image-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 6px solid #19713F;
}

.image-slot.small {
  width: 80px;
  height: 80px;
}

.image-slot.tiny {
  width: 120px;
  height: 80px;
  flex-shrink: 0;
}

.image-slot.tiny img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

/* 基地新资讯 */
.news .news-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

/* 轮播容器 */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 720px;
}

.carousel-container .image-slot {
  width: 100%;
  height: 405px;

}

.carousel {
  position: relative;
  width: 100%;
  height: 405px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
}

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

.carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 30px 20px 20px;
}

.carousel-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.carousel-summary {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 轮播指示器 */
.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicators button.active {
  background: white;
  transform: scale(1.2);
}

/* 轮播控制按钮 */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
}

.carousel:hover .carousel-prev,
.carousel:hover .carousel-next {
  opacity: 1;
}

.carousel-prev {
  left: 15px;
}

.carousel-next {
  right: 15px;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(0,0,0,0.7);
  transform: translateY(-50%) scale(1.1);
}

.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  padding: 20px 0;
  border-bottom: 1px solid #e9ecef;
}

.news-item:last-child {
  border-bottom: none;
}

.news-link {
  color: #333;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
}

.news-link:hover {
  color: #2c5530;
  transform: translateX(5px);
}

.news-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 8px 0;
  color: #3A9000;
  transition: color 0.3s ease;
}

.news-summary {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-link:hover .news-title {
  color: #1a3a1e;
}

.news-link:hover .news-summary {
  color: #555;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.news-card {
  /* background: #E3F0E3; */
  overflow: hidden;
  /* box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease; */
}

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

.news-card .thumb {
  width: 100%;
  max-width: 360px;
  height: 220px;
  border-radius: 0;
  margin: 0 auto;
}

.news-card-title {
  font-size: 18px;
  font-weight: 600;
  padding: 20px 0px;
  color: #3A9000;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-card-desc {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  height: 100px;
}

/* 大思政课堂 */
.classroom {
  background: #E3F0E3;
}

.classroom .zigzag-section {
  background: 
    linear-gradient(45deg, transparent 50%, #F7F7EC 50%),
    linear-gradient(-45deg, transparent 50%, #F7F7EC 50%);
    background-size: clamp(30px, 4vw, 30px) clamp(30px, 4vw, 30px);
  background-repeat: repeat-x;
  background-position: 0 0;
}

.cards-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card {
  background: #E3F0E3;
  overflow: hidden;
  transition: transform 0.3s ease;
}

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

.card .thumb {
  width: 100%;
  max-width: 360px;
  height: 220px;
  border-radius: 0;
  margin: 0 auto;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  padding: 20px 0px;
  color: #3A9000;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}


.card-desc {

  color: #666;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* 绿色资源库 */
.resources-wrap {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.resources-main {
  width: 100%;
  max-width: 760px;
  height: 430px;
}

.resources-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-item {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: #E3F0E3;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
  align-items: flex-start;
}

.side-item .meta {
  flex: 1;
  min-width: 0; /* 允许文字区域收缩 */
}

.side-item:hover {
  transform: translateX(5px);
}

.side-item .meta h4 {
  font-size: 16px;
  color: #3A9000;
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-item .meta p {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* 底部海报 */
.footer-poster {
  position: relative;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  overflow: visible;
}

/* 锯齿顶部装饰 */
.zigzag-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(30px, 4vw, 80px);
  background: 
    linear-gradient(45deg, transparent 50%, #F7F7EC 50%),
    linear-gradient(-45deg, transparent 50%, #F7F7EC 50%);
    background-size: clamp(30px, 4vw, 30px) clamp(30px, 4vw, 30px);
  background-repeat: repeat-x;
  background-position: 0 0;
  z-index: 10;
}

.poster-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #19713F;
  z-index: 1;
}

.poster-bg img {
  /* width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; */
  display: block;
  transition: opacity 0.3s ease;
}

/* 底部海报的屏幕适配 */
@media (min-aspect-ratio: 21/9) {
  .poster-bg img {
    object-position: center bottom;
  }
}

@media (max-aspect-ratio: 4/3) {
  .poster-bg img {
    object-position: center center;
  }
}

/* 底部logo图片 */
.footer-logo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  top:20px;
}

.footer-logo img {

  object-fit: contain;
  display: block;
}

.poster-title {
  position: relative;
  z-index: 2;
}

.poster-title h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.poster-title p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.brand {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* 底部 */
.site-footer {
  background: #2c5530;
  color: white;
  padding: 30px 0;
  text-align: center;
}

.site-footer p {
  font-size: 14px;
  opacity: 0.8;
}

/* 平板端适配 */
@media (max-width: 1024px) and (min-width: 769px) {
  .hero {
    height: 800px;
  }
  
  .hero-bg {
    top: 80px;
    height: 720px;
  }
  
  .hero-title-img {
    top: -150px;
    height: 720px;
  }
  
  .white-bar {
    height: 80px;
  }
  
  .logo-img {
    height: 50px;
  }
  
  .footer-poster {
    height: 400px;
  }
  
  .footer-logo img {
    max-width: 85%;
    max-height: 300px;
  }
  
  .news-grid,
  .cards-3x2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .hero {
    height: 600px;
  }
  
  .white-bar {
    height: 60px;
  }
  
  .logo-img {
    height: 40px;
  }
  
  .hero-bg {
    top: 60px;
    height: 540px;
  }
  
  .hero-title-img {
    top: -120px;
    height: 540px;
  }
  
  .hero-title-img img {
    max-width: 95%;
    max-height: 70%;
  }
  
  .hero-title h1 {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1.2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section-title img {
    width: 100px;
  }
  
  .news-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .news-grid,
  .cards-3x2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .resources-wrap {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .poster-title h2 {
    font-size: 2rem;
  }
  
  .footer-poster {
    height: 300px;
  }
  
  .footer-logo img {
    max-width: 90%;
    max-height: 200px;
  }
  
  /* 移动端轮播调整 */
  .carousel-container {
    max-width: 100%;
  }
  
  .carousel {
    height: 250px;
  }
  
  .carousel-title {
    font-size: 16px;
  }
  
  .carousel-summary {
    font-size: 12px;
    -webkit-line-clamp: 1;
  }
  
  .carousel-prev,
  .carousel-next {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  .news-card .thumb,
  .card .thumb {
    width: 100%;
    height: 180px;
  }
  
  .resources-main {
    width: 100%;
    height: 250px;
  }
  
  /* 移动端新闻列表调整 */
  .news-item {
    padding: 15px 0;
  }
  
  .news-title {
    font-size: 15px;
  }
  
  .news-summary {
    font-size: 13px;
    -webkit-line-clamp: 1;
  }
}

/* Loading 状态 */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.error {
  text-align: center;
  padding: 40px;
  color: #dc3545;
}

/* Vue 过渡动画 */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.5s;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}

.slide-enter-active, .slide-leave-active {
  transition: all 0.3s;
}
.slide-enter, .slide-leave-to {
  transform: translateX(30px);
  opacity: 0;
}
.footer-poster-img {
  width: 100%;
  height: 100%;
  display: block;
}