/*
 * 首页样式（参考猪八戒网首页的信息层级：分类导航 + 主视觉 + 需求/服务商/案例）
 * 仅作用于 #home，避免与旧版 lib.css / style.css 的通用规则冲突。
 */

#home {
  background: #f5f6f8;
  padding-top: 22px;
  padding-bottom: 40px;
  color: #1f2d3d;
}
#home .hp-wrap {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
#home ul,
#home li {
  list-style: none;
  margin: 0;
  padding: 0;
}
#home a {
  text-decoration: none;
  color: inherit;
}
#home h2,
#home h3,
#home h4,
#home p {
  margin: 0;
  font-weight: normal;
}
#home img {
  display: block;
  max-width: 100%;
}
#home .hp-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(20, 40, 80, 0.05);
}

/* ===== 首屏：主视觉 + 侧栏 ===== */
#home .hp-hero {
  padding: 24px 0 6px;
  background: linear-gradient(180deg, #eef2f7 0%, #f5f6f8 100%);
}
#home .hp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
}
#home .hp-main {
  min-width: 0;
  display: flex;
}
#home .hp-slider {
  position: relative;
  width: 100%;
  height: 508px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #233b5c, #3a5b85);
  box-shadow: 0 10px 30px rgba(20, 40, 80, 0.12);
}
#home .hp-slide {
  height: 508px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#home .hp-slide a {
  display: block;
  height: 100%;
}
#home .hp-slider .slick-list,
#home .hp-slider .slick-track {
  height: 100%;
}
#home .hp-slider .slick-dots {
  position: absolute;
  left: 0;
  bottom: 16px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 5;
}
#home .hp-slider .slick-dots li {
  font-size: 0;
  line-height: 0;
}
#home .hp-slider .slick-dots li button,
#home .hp-slider .slick-dots li a {
  display: block;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  text-indent: -99px;
}
#home .hp-slider .slick-dots li.slick-active button,
#home .hp-slider .slick-dots li.slick-active a {
  width: 20px;
  border-radius: 4px;
  background: #c91d39;
}

#home .hp-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
#home .hp-pub {
  position: relative;
  flex-shrink: 0;
  padding: 20px 20px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #233b5c 0%, #2f4d74 62%, #a1172e 160%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(35, 59, 92, 0.18);
}
#home .hp-pub::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -56px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
#home .hp-pub-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 1px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
  letter-spacing: 1px;
}
#home .hp-pub h3 {
  position: relative;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
#home .hp-pub p {
  position: relative;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.66);
}
#home .hp-pub-btn {
  position: relative;
  display: block;
  margin-top: 16px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 6px;
  background: #c91d39;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(201, 29, 57, 0.35);
  transition: background-color 0.2s;
}
#home .hp-pub-btn:hover {
  background: #e0354f;
}
#home .hp-side-card {
  flex: 1;
  padding: 14px 18px 8px;
}
#home .hp-side-h {
  padding-bottom: 8px;
  margin-bottom: 2px;
  border-bottom: 1px solid #eef1f5;
  font-size: 13px;
  font-weight: 700;
  color: #233b5c;
}
#home .hp-side-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: #4a5568;
  border-bottom: 1px dashed #eef1f5;
  transition: color 0.15s;
}
#home .hp-side-links a:last-child {
  border-bottom: 0;
}
#home .hp-side-links a:hover {
  color: #c91d39;
}
#home .hp-side-links i {
  font-style: normal;
  color: #c3cad4;
  font-size: 12px;
}
#home .hp-safeguard {
  padding-top: 6px;
}
#home .hp-safeguard li {
  position: relative;
  padding: 4px 0 4px 20px;
  font-size: 12px;
  color: #5a6675;
}
#home .hp-safeguard li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 9px;
  height: 5px;
  border-left: 2px solid #c91d39;
  border-bottom: 2px solid #c91d39;
  transform: rotate(-45deg);
}

/* ===== 四个快捷入口 ===== */
#home .hp-quicklinks {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
#home .hp-ql {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid #eef1f5;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
#home .hp-ql:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 29, 57, 0.25);
  box-shadow: 0 10px 26px rgba(20, 40, 80, 0.1);
}
#home .hp-ql-ic {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(201, 29, 57, 0.09);
  color: #c91d39;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
#home .hp-ql b {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
#home .hp-ql span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #9aa4b2;
}

/* ===== 板块标题 ===== */
#home .hp-sec {
  margin-top: 34px;
}
#home .hp-sec-h {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
#home .hp-sec-h h2 {
  position: relative;
  padding-left: 12px;
  font-size: 21px;
  font-weight: 700;
  color: #233b5c;
  line-height: 1.3;
}
#home .hp-sec-h h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 4px;
  border-radius: 2px;
  background: #c91d39;
}
#home .hp-sec-h p {
  font-size: 13px;
  color: #9aa4b2;
  padding-top: 4px;
}
#home .hp-more {
  margin-left: auto;
  font-size: 13px;
  color: #8a94a6;
}
#home .hp-more:hover {
  color: #c91d39;
}

/* ===== 平台动态 ===== */
#home .hp-notice-wrap + .hp-sec {
  margin-top: 20px;
}
#home .hp-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 10px;
  overflow: hidden;
}
#home .hp-notice-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 14px;
  border-right: 1px solid #eef1f5;
  font-size: 13px;
  font-weight: 600;
  color: #233b5c;
}
#home .hp-notice-label svg {
  width: 15px;
  height: 15px;
  color: #c91d39;
}
#home .hp-notice-track {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
#home .hp-notice-inner {
  display: inline-flex;
  gap: 56px;
  white-space: nowrap;
  animation: hpMarquee 40s linear infinite;
}
#home .hp-notice-inner span {
  font-size: 13px;
  color: #6b7688;
}
#home .hp-notice:hover .hp-notice-inner {
  animation-play-state: paused;
}
@keyframes hpMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

#home .hp-tasks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
#home .hp-task {
  display: flex;
  flex-direction: column;
  min-height: 148px;
  padding: 16px 18px 14px;
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(20, 40, 80, 0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
#home .hp-task:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 29, 57, 0.22);
  box-shadow: 0 10px 24px rgba(20, 40, 80, 0.1);
}
#home .hp-task h3 {
  height: 44px;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  color: #1f2d3d;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
#home .hp-task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
#home .hp-task-tags span {
  padding: 2px 7px;
  border-radius: 3px;
  background: #f3f5f8;
  font-size: 11px;
  color: #8a94a6;
}
#home .hp-task-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}
#home .hp-task-price {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #f56c1d;
}
#home .hp-task-price.quote {
  font-size: 15px;
}
#home .hp-task-go {
  flex-shrink: 0;
  height: 32px;
  line-height: 32px;
  padding: 0 18px;
  border-radius: 4px;
  background: #c91d39;
  color: #fff;
  font-size: 13px;
  transition: background-color 0.2s;
}
#home .hp-task:hover .hp-task-go {
  background: #e0354f;
}

/* ===== 找设计师 ===== */
#home .hp-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}
#home .hp-tab {
  padding: 5px 15px;
  border: 1px solid #e8ebf0;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: #5a6675;
  cursor: pointer;
  transition: all 0.15s;
}
#home .hp-tab:hover {
  color: #c91d39;
  border-color: rgba(201, 29, 57, 0.4);
}
#home .hp-tab.on {
  background: #c91d39;
  border-color: #c91d39;
  color: #fff;
}
#home .hp-talents {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
#home .hp-talent {
  padding: 20px 16px 16px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
#home .hp-talent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 40, 80, 0.09);
}
#home .hp-talent-avatar {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef1f6;
}
#home .hp-talent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#home .hp-talent h3 {
  font-size: 14px;
  font-weight: 600;
  color: #1f2d3d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#home .hp-talent .hp-talent-skill {
  margin-top: 4px;
  font-size: 12px;
  color: #9aa4b2;
  height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#home .hp-talent .hp-talent-price {
  margin-top: 8px;
  font-size: 12px;
  color: #8a94a6;
}
#home .hp-talent .hp-talent-price b {
  font-size: 16px;
  color: #c91d39;
}
#home .hp-talent-btn {
  display: block;
  margin-top: 12px;
  height: 32px;
  line-height: 30px;
  border: 1px solid rgba(201, 29, 57, 0.45);
  border-radius: 6px;
  font-size: 13px;
  color: #c91d39;
  transition: all 0.2s;
}
#home .hp-talent-btn:hover {
  background: #c91d39;
  border-color: #c91d39;
  color: #fff;
}
#home .hp-empty {
  padding: 40px 0;
  text-align: center;
  font-size: 13px;
  color: #9aa4b2;
}

/* ===== 原创作品 ===== */
#home .hp-works {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
#home .hp-work {
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
#home .hp-work:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 40, 80, 0.09);
}
#home .hp-work-pic {
  height: 168px;
  overflow: hidden;
  background: #eef1f6;
}
#home .hp-work-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}
#home .hp-work:hover .hp-work-pic img {
  transform: scale(1.05);
}
#home .hp-work-txt {
  padding: 10px 12px 12px;
}
#home .hp-work-txt h3 {
  font-size: 13px;
  font-weight: 600;
  color: #1f2d3d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#home .hp-work-txt p {
  margin-top: 4px;
  font-size: 12px;
  color: #9aa4b2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#home .hp-work-txt .hp-work-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: #9aa4b2;
}
#home .hp-work-txt b {
  font-size: 15px;
  color: #c91d39;
}

/* ===== 保障条 ===== */
#home .hp-adv {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 22px;
}
#home .hp-adv li {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
#home .hp-adv-ic {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(201, 29, 57, 0.09);
  color: #c91d39;
  font-size: 16px;
  font-weight: 700;
  line-height: 38px;
  text-align: center;
}
#home .hp-adv li > div {
  flex: 1;
  min-width: 0;
}
#home .hp-adv b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1f2d3d;
}
#home .hp-adv li > div span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #9aa4b2;
  line-height: 1.6;
}

/* ===== 广告位 ===== */
#home .adBox {
  margin-top: 24px;
}
#home .adBox img {
  width: 100%;
  border-radius: 12px;
}

/* ===== 响应式 ===== */
@media (max-width: 1180px) {
  #home .hp-hero-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  #home .hp-talents {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1024px) {
  #home .hp-tasks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #home .hp-hero-grid {
    grid-template-columns: 1fr;
  }
  #home .hp-side {
    flex-direction: row;
  }
  #home .hp-pub,
  #home .hp-side-card {
    flex: 1;
  }
}
@media (max-width: 900px) {
  #home .hp-quicklinks {
    grid-template-columns: repeat(2, 1fr);
  }
  #home .hp-tasks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #home .hp-works {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #home .hp-adv {
    grid-template-columns: repeat(2, 1fr);
  }
  #home .hp-sec-h {
    flex-wrap: wrap;
  }
  #home .hp-tabs {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
  }
}
@media (max-width: 760px) {
  #home .hp-tasks {
    grid-template-columns: 1fr;
  }
  #home .hp-slider,
  #home .hp-slide {
    height: 220px;
  }
  #home .hp-side {
    flex-direction: column;
  }
  #home .hp-talents {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #home .hp-works {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #home .hp-adv {
    grid-template-columns: 1fr;
  }
}
