/* 首页样式（不包含公共布局） */

/* Banner 区域 */
.banner {
  position: relative;
  width: 100%;
  min-width: 1240px;
  text-align: center;
  color: #fff;
}

.banner-buttons {
  position: absolute;
  top: 21.92708vw;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* 首页按钮样式 */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 228px;
  height: 60px;
  border-radius: 30px;
  border: 1px solid #FFFFFF;
  font-weight: 400;
  font-size: 16px;
  color: #FFFFFF;
  line-height: 17px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-4px);
}

.btn-primary span {
  font-weight: bold;
  font-size: 18px;
  color: #FFFFFF;
  line-height: 19px;
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 228px;
  height: 60px;
  background: #FFFFFF;
  border-radius: 30px;
  font-weight: 400;
  font-size: 16px;
  color: #121212;
  text-align: center;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  transform: translateY(-4px);
}

.btn-secondary span {
  font-weight: bold;
  font-size: 18px;
  color: #121212;
  line-height: 19px;
}

/* 数据展示区 */
.data-section {
  position: relative;
  z-index: 19;
  margin-top: -200px;
  text-align: center;
  color: #fff;
}

.data-section h2 {
  font-weight: 500;
  font-size: 36px;
  color: #FFFFFF;
  line-height: 56px;
  letter-spacing: 2px;
}

.data-section p {
  margin-top: 12px;
  font-weight: 400;
  font-size: 24px;
  color: #FFFFFF;
  line-height: 24px;
  letter-spacing: 2px;
}

.data-list {
  margin-top: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 100px;
}

.data-item {
  text-align: left;
}

.data-item .number  {
  margin-bottom: 16px;
}

.data-item .number .num {
  font-weight: bold;
  font-size: 32px;
  color: #F46A1C;
  line-height: 32px;
  letter-spacing: 2px;
}

.data-item .number >span {
  font-weight: 500;
  font-size: 24px;
  color: #F46A1C;
  line-height: 25px;
}

.data-item .label {
  font-weight: 400;
  font-size: 18px;
  color: #FFFFFF;
  line-height: 18px;
  letter-spacing: 1px;
}

/* 免费入驻模块 */
.settle-section {
  padding-top: 140px;
  color: #fff;
}

.settle-tabs {
  display: flex;
  gap: 24px;
}

.settle-tab {
  width: 144px; /* 收起宽度 */
  height: 420px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.settle-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 为背景图切换添加平滑过渡 */
.settle-tab::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--bg-expanded);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.settle-tab.active::after {
  opacity: 1;
}

.settle-tab-content {
  position: relative;
  z-index: 2;
  height: 100%;
}

.tab-index {
  position: absolute;
  top: 30px;
  left: 20px; /* 收起状态位置 */
  font-weight: 400;
  font-size: 30px;
  color: #FFFFFF;
  line-height: 32px;
  text-align: left;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
}

.settle-tab.active .tab-index {
  opacity: 0;
  transform: translateX(-10px);
}

.tab-info {
  position: absolute;
  left: 20px; /* 收起状态位置 */
  bottom: 40px; /* 收起状态位置 */
  width: calc(100% - 40px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-title {
  font-weight: 400;
  font-size: 24px;
  color: #FFFFFF;
  line-height: 24px;
  letter-spacing: 1px;
  margin-bottom: 16px;
  white-space: nowrap;
}

.tab-desc {
  font-weight: 400;
  font-size: 13px;
  color: #FFFFFF;
  line-height: 24px;
  opacity: 0; /* 收起时不显示 */
  width: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(10px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
              max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
              width 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

/* 展开状态 */
.settle-tab.active {
  width: 568px; /* 展开宽度 */
}

.settle-tab:nth-of-type(1).active .tab-title {
  font-weight: 500;
  font-size: 24px;
  color: #F46A1C;
  line-height: 32px;
  letter-spacing: 2px;
}

.settle-tab.active .tab-title  {
  font-weight: 400;
  font-size: 34px;
  color: #FFFFFF;
  line-height: 34px;
  letter-spacing: 1px;
}


.settle-tab.active .tab-info {
  left: 40px; /* 展开状态位置 */
  top: 50%; /* 上下居中 */
  bottom: auto;
  transform: translateY(-50%);
}

.settle-tab.active .tab-desc {
  opacity: 1; /* 展开时显示 */
  width: auto;
  max-height: 500px;
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

.detail-item img {
  width: 60px;
  height: 60px;
  border-radius: 4px;
}

/* 优秀设计师作品 */
.works-section {
  padding-top: 140px;
  color: #fff;
  overflow: hidden;
}

.works-section h2 {
  text-align: center;
  font-weight: bold;
  font-size: 36px;
  color: #FFFFFF;
  line-height: 56px;
  letter-spacing: 2px;
}

.works-section .subtitle {
  margin: 12px auto 80px;
  text-align: center;
  font-weight: 400;
  font-size: 24px;
  color: #FFFFFF;
  line-height: 24px;
  letter-spacing: 2px;
}

/* Swiper 容器样式 */
.works-section .swipers {
  position: relative;
}

.works-section .swipers::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 50vw;
  height: 721px;
  background: linear-gradient(270deg, rgba(18,18,18,0) 36%, rgba(18,18,18,0.69) 53%, #121212 73%);
  pointer-events: none;
  z-index: 10;
}

/* 右侧渐变蒙层 */
.works-section .swipers::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 50vw;
  height: 721px;
  background: linear-gradient(90deg, rgba(18,18,18,0) 36%, rgba(18,18,18,0.69) 53%, #121212 73%);
  pointer-events: none;
  z-index: 10;
}

.works-section .swiper {
  width: 100%;
  max-width: 1620px;
  margin: 0 auto 20px;
}

.works-section .swiper:last-of-type {
  margin-bottom: 0;
}

/* 关键：设置线性过渡实现匀速滚动 */
.works-section .swiper-wrapper {
  transition-timing-function: linear !important;
}

/* Swiper Slide 样式 */
.works-section .swiper-slide {
  width: auto !important;
  height: auto;
}

.works-section .swiper-slide img {
  display: block;
  width: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.works-swiper-1 .swiper-slide img {
  height: 195px; /* 固定高度 */
}

.works-swiper-2 .swiper-slide img {
  height: 285px; /* 固定高度 */
}

.works-swiper-3 .swiper-slide img {
  height: 188px; /* 固定高度 */
}

/* 鼠标悬停图片放大效果 */
.works-section .swiper-slide img:hover {
  transform: scale(1.1);
  z-index: 10;
}

/* 最新悬赏任务 */
.task-list-section {
  padding-top: 140px;
  color: #fff;
}

.task-list-section h2 {
  text-align: center;
  font-weight: bold;
  font-size: 36px;
  color: #FFFFFF;
  line-height: 56px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.task-list-section .subtitle {
  text-align: center;
  font-weight: 400;
  font-size: 24px;
  color: #FFFFFF;
  line-height: 24px;
  letter-spacing: 2px;
  margin-bottom: 80px;
}

/* 查看更多按钮 */
.view-more-wrapper {
  position: relative;
  margin-top: 64px;
  text-align: center;
}

.view-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 44px;
  background: #121212;
  box-shadow: inset 0px -4px 4px 0px rgba(244,106,28,0.4);
  border-radius: 22px;
  border: 1px solid #F46A1C;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-more-btn:hover {
  background: #F46A1C;
  border-radius: 22px;
  border: 2px solid #F46A1C;
}

.view-more-btn:hover span {
  color: #fff;
}

.view-more-btn span {
  font-weight: 400;
  font-size: 14px;
  color: #F46A1C;
  line-height: 16px;
}

.view-more-wrapper::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 496px;
  height: 0px;
  border-radius: 0px 0px 0px 0px;
  border: 1px solid;
  border-image: linear-gradient(90deg, rgba(244, 106, 28, 0), rgba(244, 106, 28, 1)) 1 1;
}

.view-more-wrapper::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 496px;
  height: 0px;
  border-radius: 0px 0px 0px 0px;
  border: 1px solid;
  border-image: linear-gradient(90deg, rgba(244, 106, 28, 1), rgba(244, 106, 28, 0)) 1 1;
}

/* 任务卡片样式已提取到 components/task-card.css */

/* 合作企业 */
.partners-section {
  padding-top: 140px;
  color: #fff;
  overflow: hidden;
}

.partners-section h2 {
  text-align: center;
  font-weight: bold;
  font-size: 36px;
  color: #FFFFFF;
  line-height: 56px;
  letter-spacing: 2px;
  margin-bottom: 80px;
}

/* 企业Logo跑马灯 */
.partners-swiper {
  width: 100%;
  margin: 0 auto;
}

/* 关键：设置线性过渡实现匀速滚动 */
.partners-swiper .swiper-wrapper {
  transition-timing-function: linear !important;
}

.partners-swiper .swiper-slide {
  width: auto !important;
  height: 133px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partners-swiper .partner-logo {
  height: 100%;
  width: auto;
  max-height: 133px;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.partners-swiper .partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* 流程展示 */
.process-section {
  padding: 140px 0;
  color: #fff;
}

.process-img {
  width: 100%;
  width: 1106px;
  margin: 0 auto;
  display: block;
}

/* 接单达人排行榜 */
.ranking-section {
  color: #fff;
  padding-bottom: 140px;
}

.ranking-section h2 {
  text-align: center;
  font-weight: bold;
  font-size: 36px;
  color: #FFFFFF;
  line-height: 56px;
  letter-spacing: 2px;
}

.ranking-section .subtitle {
  text-align: center;
  font-weight: 400;
  font-size: 24px;
  color: #FFFFFF;
  line-height: 24px;
  letter-spacing: 2px;
  margin: 12px auto 80px;
}

.ranking-container {
  width: 1240px;
  height: 367px;
  box-sizing: border-box;
  background: url("https://rrparttimeoss.oss-accelerate.aliyuncs.com/img/list_bg@2x.png") no-repeat center/100% 100% ;
  padding: 32px 32px 32px 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ranking-users {
  display: flex;
  gap: 90px;
  align-items: flex-end;
}

.ranking-user {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.user-avatar-wrapper {
  position: relative;
  margin-bottom: 28px;
  border: 2px solid #F46A1C;
  border-radius: 50%;
}

.user-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}

.ranking-user-top .user-avatar {
  width: 120px;
  height: 120px;
  border-width: 4px;
}

.rank-badge {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  width: 27px;
  height: 27px;
}

.user-name {
  font-weight: bold;
  font-size: 14px;
  color: #FFFFFF;
  line-height: 16px;
  letter-spacing: 1px;
}

.user-income {
  display: flex;
  align-items: baseline;
  gap: 13px;
  margin-top: 11px;
}

.income-label {
  font-weight: 400;
  font-size: 16px;
  color: #F46A1C;
  line-height: 16px;
}

.income-value {
  font-weight: 400;
  font-size: 18px;
  color: #FFFFFF;
  line-height: 18px;
}

.income-unit {
  font-weight: 400;
  font-size: 16px;
  color: #F46A1C;
  line-height: 16px;
}

.ranking-list {
  width: 441px;
  height: 303px;
  border-radius: 16px 16px 16px 16px;
  border: 1px solid #D6D6D6;
  padding: 36px 64px;
  box-sizing: border-box;
}

.ranking-item {
  display: flex;
  align-items: center;
}

.ranking-item:not(:last-child) {
  margin-bottom: 24px;
}

.rank-icon {
  width: 27px;
  height: 27px;
  flex-shrink: 0;
}

.ranking-item .name {
  margin-left: 32px;
  font-weight: 500;
  font-size: 16px;
  color: #FFFFFF;
  line-height: 16px;
  min-width: 80px;
}

.ranking-item .amount {
  font-weight: 400;
  font-size: 16px;
  color: #F46A1C;
  line-height: 16px;
  margin-left: auto;
}

.ranking-item .amount-value {
  font-weight: 400;
  font-size: 16px;
  color: #F46A1C;
  line-height: 16px;
}

/* 响应式：视口宽度 <= 1240px */
@media screen and (max-width: 1240px) {
  .banner-buttons {
    top: 272px;
  }
}

@media screen and (max-width: 1440px) {
  .works-section .swiper {
    width: 1240px;
  }
  .works-section .swipers::before {
    content: none;
  }
  .works-section .swipers::after {
    content: none;
  }
}

@media (max-width: 767px) {
  .works-section,
  .partners-section {
    width: 1240px;
  }
}
