/**
 * Pages CSS - 页面样式
 */

/* ========== Hero Section ========== */
.hero {
  position: relative;
  height: 442px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max-width);
  padding: 0 var(--container-padding);
}

.hero__tags {
  width: 800px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  color: var(--text-inverse);
  margin: 15px auto;
  padding: 10px 14px;
}

.hero__tag-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.hero_line {
  font-weight: lighter;
}

.hero__tag {
  padding: 8px 16x;
  border-radius: var(--radius-full);
  color: var(--text-inverse);
  font-size: 14px;
  transition: all var(--transition-base);
  text-decoration: none;
}

.hero__tag:hover {
  transform: translateY(-2px);
}

.hero__ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;

}

.hero__ticker .name {
  font-size: 20px;
}

.hero__ticker .en {
  font-size: 16px;
}

.hero__ticker-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.hero__ticker-divider {
  color: rgba(255, 255, 255, 0.4);
}

/* ========== Categories Section ========== */
.categories {
  padding: var(--spacing-3xl) 0;
}

.section-title {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  text-align: center;
  margin-bottom: var(--spacing-3xl);
  color: var(--text-primary);
}

.categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-xl);
}

.category-card {
  position: relative;
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-base);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

.category-card__title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: var(--text-inverse);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

/* ========== Carousel Section ========== */
.carousel-section {
  padding: 40px 0 53px;
  background: #F6F9FC;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  /* 避免打包后被错误加上固定 width，导致轮播区域溢出；与 .container 同宽 */
  max-width: 100%;
  box-sizing: border-box;
}



.carousel__swiper {
  flex: 1;
  overflow: hidden;
}

.carousel__btn {
  flex-shrink: 0;
  width: 55px!important;
  height: 55px!important;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  
}

.carousel__btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.carousel__btn:hover:not(.swiper-button-disabled) {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  opacity: 0.7;
}

.carousel__btn.swiper-button-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.carousel__btn--prev {
  transform: translate(-38px, 20px);
  background: url(../assets/icons/icon-arrow-left-active@2x.png);
  background-size: 100% 100%;
}

.carousel__btn--prev.swiper-button-disabled {
  background-image: url(../assets/icons/icon-arrow-left@2x.png);
}

.carousel__btn--next {
  transform: translate(38px, 20px);
  background: url(../assets/icons/icon-arrow-right-active@2x.png);
  background-size: 100% 100%;

}

.carousel__btn--next.swiper-button-disabled {
  background-image: url(../assets/icons/icon-arrow-right@2x.png);
}

/* 隐藏 Swiper 默认的导航按钮样式 */
.swiper-button-prev::after,
.swiper-button-next::after {
  display: none;
}

.carousel__item {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* 轮播项为链接时保持布局与无下划线 */
.carousel__item-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.carousel__item-title {
  font-size: 24px;
  font-weight: 600;
  color: rgba(0,0,0,0.85);
  line-height: 34px;
  margin-bottom: 24px;
  /* 单行显示，超出宽度截断并显示省略号 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.carousel__card {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-base);
  cursor: pointer;
}

.carousel__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.carousel__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* ========== Links Section ========== */
.links-section {
  background: rgba(24, 99, 56, .1);
  height: 80px;
  display: flex;
  align-items: center;
}

.links-grid {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 20px;
  color: #186338;
}

.link-item {
  font-size: 14px;
  color: rgba(51, 51, 51, 1);
  border-radius: 3px 3px 3px 3px;
  border: none;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  height: 34px;
  line-height: 34px;
  padding: 0 15px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 99, 56, 0.2);
}


.span-item{
  font-weight: bold;
}



.link-item:hover {
  transform: translateY(-2px);
  filter: brightness(0.9);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .hero {
    height: 400px;
  }

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

  .carousel__btn {
    display: none;
  }

  .links-grid {
    gap: var(--spacing-md);
  }

  .link-item::after {
    display: none;
  }

  .section-title {
    font-size: var(--font-size-2xl);
  }
}

@media (max-width: 1024px) {
  /* Swiper 会自动处理响应式 */
}