@charset "UTF-8";

/* 首页样式  */

:root {
  --bg: #f5f7f5;
  --card-bg: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --border: #e0e6e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Main layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.hero-section {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* Carousel */
.carousel {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
  min-height: 380px;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.carousel.dragging {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.carousel-track.dragging {
  transition: none;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.carousel-slide .slide-link {
  display: block;
  position: absolute;
  inset: 0;
  color: inherit;
  text-decoration: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.carousel-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.28) 42%, rgba(0,0,0,0) 70%);
  padding: 24px;
  z-index: 2;
}

.carousel-content h4 {
  font-size: 1.2rem;
  font-weight: 800;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
  margin-bottom: 8px;
  letter-spacing: 2px;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel-content p {
  font-size: 0.9rem;
  max-width: 80%;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
  margin-top: 0;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-dots button {
  /* 透明热区按钮，靠 padding 撑大点击范围，避免误触 */
  background: transparent;
  border: none;
  padding: 8px 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.carousel-dots button::before {
  content: "";
  display: block;
  width: 14px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.5);
  transition: background 0.2s, width 0.25s;
}

.carousel-dots button.active::before {
  background: #fff;
  width: 32px;
}

/* Panels */
.panel {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8faf8;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  cursor: default;
}

/* 面板标题左侧竖条：悬停时从 0 高度向中间拉伸 */
.panel-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 0 3px 3px 0;
  transform: translateY(-50%);
  transition: height 0.35s ease;
}

.panel-header:hover::before {
  height: 70%;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
  transition: color 0.25s;
}

.panel-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s ease;
}

.panel-header:hover .panel-title {
  color: var(--primary);
}

.panel-header:hover .panel-icon {
  transform: scale(1.18) rotate(-6deg);
}

.more-btn {
  background: var(--primary);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.more-btn:hover {
  background: var(--primary-dark);
}

.panel-body {
  padding: 12px 16px;
  flex: 1;
}

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

.news-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
}

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

.news-list a {
  color: var(--text);
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.news-list a::before {
  content: "●";
  color: var(--primary);
  font-size: 0.6rem;
  flex-shrink: 0;
}

.news-list .title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease, color 0.25s;
}

.news-list a:hover .title-text {
  color: var(--primary);
  background-size: 100% 1px;
}

.news-list .date {
  color: var(--text-light);
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Grid sections */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 24px 16px;
  margin-top: 24px;
  font-size: 0.85rem;
}

/* Mobile responsive */
@media (max-width: 992px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .carousel {
    height: 180px;
    min-height: 180px; /* 覆盖桌面端 min-height: 380px */
  }

  .carousel-content {
    /* 标题上移，避免与底部指示点重叠 */
    justify-content: flex-start;
    padding: 10px 12px;
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.72) 0%,
      rgba(0,0,0,0.32) 42%,
      rgba(0,0,0,0) 70%
    );
  }

  .carousel-content h4 {
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 4px;
    max-width: 100%;
  }

  .carousel-content p {
    font-size: 0.78rem;
  }

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

  .news-list li {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .news-list .date {
    margin-left: 16px;
    margin-top: 2px;
  }
}

@media (max-width: 600px) {
  .carousel {
    height: 180px;
    min-height: 180px;
  }

  .carousel-content {
    padding: 8px 10px;
  }

  .carousel-content h4 {
    font-size: 0.82rem;
    letter-spacing: 0.5px;
  }

  .carousel-dots button {
    padding: 1px 1px;
  }
}

@media (max-width: 360px) {
  .carousel {
    height: 110px;
    min-height: 110px;
  }

  .carousel-content {
    padding: 6px 8px;
  }

  .carousel-content h4 {
    font-size: 0.78rem;
  }

  .panel-header {
    padding: 10px 12px;
  }

  .panel-title {
    font-size: 0.95rem;
  }

  .news-list a {
    font-size: 0.88rem;
  }
}
