/* 济源篮球官网全局样式 */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&family=Open+Sans:wght@300;400;600&display=swap");

/* 全局重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0078d7;
  --secondary-color: #005a9f;
  --accent-color: #40e0d0;
  --text-dark: #333333;
  --text-light: #666666;
  --text-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-dark: #1e1e1e;
  --border-color: #e5e5e5;
  --shadow-light: 0 2px 8px rgba(0, 120, 215, 0.1);
  --shadow-medium: 0 4px 16px rgba(0, 120, 215, 0.15);
  --shadow-heavy: 0 8px 32px rgba(0, 120, 215, 0.2);
  --gradient-primary: linear-gradient(135deg, #0078d7 0%, #005a9f 100%);
  --gradient-overlay: linear-gradient(
    rgba(0, 120, 215, 0.8),
    rgba(0, 90, 159, 0.8)
  );
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--text-white);
  overflow-x: hidden;
}

/* 字体样式 */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* 容器和布局 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.main-title {
  text-align: center;
  position: relative;
  padding: 3rem 0 1.5rem;
}
.main-title::after {
  content: '';
  border-top: 4px solid rgb(255 125 0);
  width: 4.5rem;
  border-radius: 3rem;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.section {
  padding: 4rem 0;
  position: relative;
}

.section.alone {
  padding-top: 0;
}

.section-bg {
  background-color: var(--bg-light);
}

/* 轮播图样式 - 修复宽度和比例 */
.hero-banner {
  position: relative;
  width: 100%; /* 确保宽度填充父容器 */
  height: 40vh; /* 调整为原高度的一半 */
  min-height: 300px;
  max-width: 100vw; /* 确保不超过视口宽度 */
  overflow: hidden;
  margin: 0; /* 移除可能的边距 */
  padding: 0; /* 移除可能的内边距 */
}

.swiper {
  width: 100%;
  height: 100%;
  position: relative;
}

.swiper-wrapper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.swiper-slide-img {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  display: block;
  object-fit: cover;
  object-position: center;
}

.slide-content {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-white);
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
  width: 100%;
}

.slide-title {
  font-size: 2.5rem; /* 调小标题字体适应较小的banner */
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-description {
  font-size: 1.1rem; /* 调小描述字体 */
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Swiper 导航按钮自定义 */
.swiper-button-next,
.swiper-button-prev {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px; /* 调小按钮尺寸 */
  height: 40px;
  margin-top: -20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 16px; /* 调小箭头尺寸 */
  font-weight: bold;
}

/* Swiper 分页器自定义 */
.swiper-pagination {
  bottom: 20px; /* 调整分页器位置 */
}

.swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  background: var(--text-white);
  transform: scale(1.2);
}

/* 卡片样式 - 优化布局和间距 */
.section-card {
  background: var(--text-white);
  border-radius: 16px;
  padding: 2.5rem; /* 增加内边距 */
  margin-bottom: 3rem; /* 增加卡片间距 */
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.section-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.section-card.alone{
  border: none;
  box-shadow: none;
}

.card-header {
  margin-bottom: 2rem; /* 增加标题与内容间距 */
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary-color);
}

.card-title {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin: 0;
}

/* 改进卡片内容布局 */
.card-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-more {
  text-align: center;
  font-size: 1.2rem;
  color: var(--primary-color);
}
.video-more {
  padding-bottom: 2rem;
  text-align: center;
}

/* 创建两列布局用于图片和文字 */
.card-grid {
  display: grid;
  grid-template-columns: 30% 65%; /* 调整图片和文字的比例 */
  gap: 5%;
  align-items: flex-start;
}

/* 图文列表样式 */
.image-text-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.image-text-item {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 1rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.image-text-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-light);
}

.item-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.item-image.people {
  object-position: 50% 0%;
}

.item-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0.5rem 0;
}

.item-description {
  font-size: 0.9rem;
  color: var(--text-light);
}

.card-image {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
}

.card-image:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-medium);
}

/* 文本内容样式优化 */
.card-text {
  color: var(--text-light);
  line-height: 1.8;
}

/* 列表样式优化 */
.content-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.content-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.content-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* 文章列表 */
.article-title-index {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.article-title-index h3 {
  margin: 0 0 0 1rem;
}
.article-title-icon {
  color: rgb(22 93 255);
  background-color: rgb(22 93 255 / 0.1);
  border-radius: 9999px;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 强调文本样式 */
.highlight-text {
  color: var(--primary-color);
  font-weight: 600;
}

/* 视频展示区 */
.video-section {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 5rem 0; /* 增加顶部和底部间距 */
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem; /* 增加视频间距 */
  margin-top: 3rem;
}

.video-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-heavy);
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%; /* 确保所有视频项目高度一致 */
  display: flex;
  flex-direction: column;
}

.video-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 40px rgba(0, 120, 215, 0.3);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 200px; /* 统一高度 */
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumbnail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.video-item:hover .video-thumbnail::before {
  background: rgba(0, 120, 215, 0.6);
}

.play-button {
  position: relative;
  z-index: 2;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.video-item:hover .play-button {
  background: var(--text-white);
  transform: scale(1.1);
}

.video-info {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  flex-grow: 1; /* 确保信息部分填充剩余空间 */
  display: flex;
  flex-direction: column;
}

.video-info-bottom {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-white);
  line-height: 1.3;
}

.video-description {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: var(--text-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s ease;
  z-index: 100;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

/* 懒加载图片 */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.loaded {
  opacity: 1;
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 120, 215, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

  .hero-banner {
    height: 35vh;
    min-height: 280px;
  }

  .card-grid {
    grid-template-columns: 1fr; /* 中等屏幕上堆叠排列 */
    gap: 2rem;
  }

  .slide-title {
    font-size: 2.2rem;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }

  .image-text-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .hero-banner {
    height: 30vh; /* 小屏幕上进一步减小高度 */
    min-height: 250px;
  }

  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.6rem;
  }
  h3 {
    font-size: 1.4rem;
  }

  .slide-title {
    font-size: 1.8rem;
  }

  .slide-description {
    font-size: 0.95rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .section-card {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .card-header {
    margin-bottom: 1.5rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .image-text-list {
    grid-template-columns: 1fr;
  }

  .video-thumbnail {
    height: 180px;
  }

  .play-button {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 35px;
    height: 35px;
    margin-top: -17.5px;
  }

  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-banner {
    height: 25vh;
    min-height: 200px;
  }

  .slide-content {
    padding: 0 1rem;
    bottom: 15%;
  }

  .slide-title {
    font-size: 1.5rem;
  }

  .slide-description {
    font-size: 0.85rem;
  }

  .section-card {
    padding: 1rem;
    border-radius: 12px;
  }

  .card-image {
    height: 180px;
  }

  .video-thumbnail {
    height: 160px;
  }

  .video-info {
    padding: 1rem;
  }

  .modal-content {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .card-header {
    margin-bottom: 1rem;
  }
}

/* 高对比度和可访问性 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #e5e5e5;
    --text-light: #b0b0b0;
    --bg-light: #2a2a2a;
    --border-color: #404040;
  }

  body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
  }

  .section-card {
    background: #2a2a2a;
    border-color: var(--border-color);
  }
}

/* 打印样式 */
@media print {
  .swiper-button-next,
  .swiper-button-prev,
  .swiper-pagination,
  .back-to-top,
  .video-modal {
    display: none !important;
  }

  .section-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .hero-banner {
    height: 200px;
  }
}

/* 性能优化：减少重绘和回流 */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* 文章列表样式 */
.article-ul {
  padding: 1rem .8rem;
}

.article-li {
  border-bottom: 1px solid var(--border-color);
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: .8rem 0;
  cursor: pointer;
}
.article-title {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #333;
}
.article-time {
  margin-left: 1rem;
  color: #999;
  white-space: nowrap;
}

.heron-footer {
  color: #fff;
  margin-top: 4rem;
  background: var(--bg-dark);
  padding: 2rem;
}
.footer-info {
  color: #fff;
}
.footer-about-text {
  max-width: 20rem;
}

.details-zw {
  text-align: right;
  margin: 0;
}

.details-img {
  max-width: 100%;
  display: block;
  margin: 0 auto 20px;
}
