.header-main.content-width {
  min-height: 132px;
  display: grid;
  grid-template-areas: 'logo search app'
    'nav nav nav';

  .search-box {
    grid-area: search;
  }

  nav {
    grid-area: nav;
  }

  .header-right {
    grid-area: app;
    justify-self: end;
  }
}


#main-content {
  display: grid;
  gap: 20px;
  padding: 20px 0;
}

img {
  display: block;
}

.block-content {
  .job-items {
    display: grid;
    grid-template-columns: repeat(4, calc(1155px / 4));
    gap: 15px;
  }

  .job-item {
    background: white;
    padding: 10px;
    border-radius: 5px;

    &:hover {
      box-shadow: 0px 5px 10px 0px rgba(111, 116, 132, 0.1);
    }
  }

  .item-bottom {
    border-top: 1px dashed #f1f1f1;
    height: 76px;
    display: flex;
    align-items: center;
  }

  .avatar {
    object-fit: cover;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
  }

  .item-info {
    display: flex;
    justify-content: space-between;
    white-space: nowrap;

    a {
      overflow: hidden;
      text-overflow: ellipsis;
      display: block;
      font-size: 16px;

      &:hover {
        color: #fd7240;
      }
    }

    .item-salary {
      color: #fd7240;
      font-size: 15px;
    }
  }

  .item-tags {
    display: flex;
    height: 40px;
    align-items: center;
    font-size: 12px;
    color: #8d92a1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    span {
      &:not(:last-child):after {
        content: '|';
        margin: 0 5px;
        color: #e0e0e0;
      }

      &:empty {
        display: none;
      }
    }
  }

  .publisher {
    a:hover {
      color: #777;
    }
  }

  .block-title {
    font-size: 24px;
    margin: auto auto 20px;
    display: flex;
    align-items: center;
    width: min-content;
    white-space: nowrap;

    &::after,
    &::before {
      content: '';
      display: block;
      width: 86px;
      height: 16px;
      background: url('https://cdn.yupaowang.com/yupao_pc/qianzhan/tit_left.png');
      margin: 0 10px;
    }

    &::after {
      transform: rotateZ(180deg);
    }
  }

  .sub-title {
    color: #999;
    text-align: center;
    margin-bottom: 15px;
  }

  .view-more {
    display: grid;
    place-content: center;
    width: 430px;
    height: 40px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.2s ease 0s;
    margin: 20px auto;

    &:hover {
      background: var(--primary-color);
      color: white;
    }
  }
}

.news-content {
  background: white;
  display: flex;
  border-radius: 5px;
  justify-content: space-between;
  padding: 20px;


  a:hover {
    color: var(--primary-color);
  }

  .hot-news {
    width: 275px;
    flex: 0 0 275px;
    display: grid;
    align-items: center;
    counter-reset: num;
    margin-left: 15px;

    a {
      &::before {
        counter-increment: num;
        content: counter(num);
        display: inline-grid;
        place-content: center;
        width: 20px;
        height: 20px;
        font-size: 12px;
        background: #d8ecff;
        color: #3396f6;
        border-radius: 2px;
        margin-right: 10px;
      }

      &:nth-child(-n+3) {
        &::before {
          color: white;
          background: #f60;
        }
      }

      &:nth-child(2) {
        &::before {
          background: #ff8b3e;
        }
      }

      &:nth-child(3) {
        &::before {
          background: #f4ab2b;
        }
      }
    }
  }
}

.news-box {
  display: flex;
  flex-wrap: wrap;

  .top-news {
    width: 50%;
    display: flex;
    padding-right: 20px;
  }

  .news-img {
    background: #eee;
    margin-right: 20px;
  }

  .news-info {
    display: grid;
    grid-template-rows: 1fr auto auto;
    color: #bbbbbb;
  }

  .news-name {
    color: #666;
    font-size: 16px;
  }

}

.job-news {
  margin-top: 20px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;

  li {
    width: 50%;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  a {
    color: #666;
    display: flex;
    align-items: center;

    &::before {
      content: '';
      display: inline-block;
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: #bcbcbc;
      margin-right: 15px;
    }
  }

  span {
    font-size: 12px;
    margin-right: 20px;
    color: #bcbcbc;
  }
}

.friendly-link {
  a {
    margin-right: 20px;

    &:hover {
      color: var(--primary-color);
    }
  }
}

.floor1 {
  background: white;
  display: grid;
  border-radius: 5px;
  box-shadow: 0px 4px 10px 0px rgba(200, 200, 200, 0.1);
  grid-template-columns: 1fr 675px 260px;
  gap: 14px;
  padding: 14px;
  box-sizing: border-box;
}

.floor1-center {
  display: grid;
  gap: 14px;
}

.floor1-right {
  display: grid;
  grid-template-rows: min-content auto;
}

.company-job {
  display: grid;
  place-items: center;
  position: relative;
  height: 240px;
  overflow: hidden;

  .item-modal {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgb(51, 149, 246, 0.9);
    padding: 15px;
    color: white;
    font-size: 12px;
    transform: translateY(100%);
    transition: all 0.3s;

    .item-modal-name {
      font-size: 14px;
      font-weight: bold;
      text-align: center;
      line-height: 2;
      margin-bottom: 1em;
    }

    .index_mq_box_cont_showjoblist {
      line-height: 23px;
      margin-bottom: 5px;
    }

    .index_mq_box_cont_showjobmore {
      color: #ffc600;
    }

    a:hover {
      color: #ffc600;
      text-decoration: underline;
    }
  }

  .company-name {
    font-size: 16px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 95%;
  }

  .index_mq_box_info {
    font-size: 0;
    height: 30px;
    display: flex;
    align-items: center;

    span {
      color: #8d92a1;
      font-size: 13px;

      &:not(:last-child):not(:empty) {
        &::after {
          content: "|";
          margin: 0 5px;
        }
      }
    }


  }

  .index_mq_box_hot {
    width: 190px;
    line-height: 36px;
    text-align: center;
    border: 1px solid #eee;
    border-radius: 5px;
    color: #8d92a1;
  }

  .index_mq_box_hot_n {
    color: var(--primary-color);
    margin-right: 5px;
  }

  &:hover {
    .item-modal {
      transform: translateY(0);
    }
  }
}


@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  3% {
    transform: translateX(calc(-1 * var(--item-scroll)));
  }

  33.3% {
    transform: translateX(calc(-1 * var(--item-scroll)));
  }

  36.3% {
    transform: translateX(calc(-2 * var(--item-scroll)));
  }

  66.6% {
    transform: translateX(calc(-2 * var(--item-scroll)));
  }

  69.6% {
    transform: translateX(calc(-3 * var(--item-scroll)));
  }

  100% {
    transform: translateX(calc(-3 * var(--item-scroll)));
  }
}

#urgent {
  --swiper-width: 675px;
  --swiper-gap: 18px;
  --item-count: 3;
  --item-width: calc((var(--swiper-width) - var(--swiper-gap) * (var(--item-count) - 1)) / var(--item-count));
  --item-scroll: calc(var(--item-width) + var(--swiper-gap));

  width: var(--swiper-width);
  overflow: hidden;

  .job-items {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: repeat(auto-fit, var(--item-width));
    gap: var(--swiper-gap);
    animation: scroll 16s linear infinite 5s;
  }

  .urgent-item {
    width: var(--item-width);
    position: relative;
    white-space: nowrap;
    display: grid;
    gap: 8px;
    justify-content: start;
    height: 100px;
    box-shadow: 0px 0px 8px 0px rgb(111 116 132 / 10%);
    border: 1px solid #F2F2F2;
    padding: 15px;
    border-radius: 4px;
    font-size: 12px;
    grid-template-areas: 'img title'
      'img salary'
      'name name';

    &::after {
      content: '急聘';
      width: 35px;
      height: 18px;
      display: grid;
      place-content: center;
      background: #fc703e;
      color: white;
      font-size: 12px;
      position: absolute;
      top: 0;
      right: 0;
      border-radius: 0 4px 0 6px;
    }

    .urgent-img {
      grid-area: img;
      object-fit: contain;
    }

    .job-name {
      grid-area: title;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .salary {
      grid-area: salary;
      color: #fc703e;
      font-weight: 600;
      font-size: 14px;
    }

    .recruiter {
      grid-area: name;
      color: #999;
    }
  }

}


#menu-list {
  position: relative;
  height: max-content;
  z-index: 3;

  .level-1 {
    height: 450px;
    display: grid;

    >li {
      cursor: pointer;
      display: grid;
      padding: 0 16px;

      a.link {
        font-size: 15px;
        color: #333;
        display: flex;
        align-items: center;
        justify-content: space-between;

        &::after {
          content: '>';
          transform: scale(0.5, 1);
          transform-origin: center;
          color: #ccc;
          font-size: 20px;
        }
      }

      &:hover {
        box-shadow: -5px -5px 5px -4px #eee, -5px 5px 5px -4px #eee;

        .level-2 {
          display: block;
        }
      }
    }
  }

  .level-2 {
    display: none;
    width: 700px;
    height: 480px;
    overflow: auto;
    position: absolute;
    background: white;
    top: -14px;
    left: 100%;
    box-shadow: 0 1px 6px rgb(6 0 1 / 10%);
    line-height: 22px;
    border: 10px solid white;
    border-radius: 10px;
  }

  a.link {
    &:hover {
      .level-2 {
        display: block;
      }
    }
  }

  dl {
    padding: 10px;
  }

  dt {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;

    &:hover {
      a {
        text-decoration: underline;
      }
    }
  }

  dd {
    font-size: 13px;
    color: #777;
    display: flex;
    flex-wrap: wrap;

    a {
      padding: 5px 0 5px 0;

      &:hover {
        color: var(--primary-color);
      }

      &::after {
        content: "|";
        margin: 0 10px;
        opacity: 1;
        color: #aaa;
      }

      &:last-child {
        &::after {
          display: none;
        }
      }
    }
  }
}

/** 公招信息 */
#pub-jobs {
  box-shadow: 0px 0px 8px 0px rgb(111 116 132 / 10%);
  border: 1px solid #F2F2F2;
  border-radius: 5px;
  padding: 10px;
  display: grid;
  grid-template-rows: min-content auto;

  .jobs-tit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 10px;

    a {
      font-size: 12px;

      &::after {
        content: ' ▸';
      }
    }
  }

  .pub-list {
    display: grid;
    grid-template-rows: repeat(auto-fit, 26px);
    align-content: center;
    align-items: center;

    a {
      display: block;
      font-size: 12px;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;

      &:first-child {
        color: #f60;
      }

      &:hover {
        text-decoration: underline;
      }
    }
  }


}

#login+#pub-jobs {
  .pub-list {
    a:nth-child(n+5) {
      display: none;
    }
  }
}

/** 登录成功显示 */
.login-hello {
  margin-bottom: 16px;

  .login-hello-body {
    border: none;
    padding: 5px;
    margin-top: 5px;
  }

  .login-hello-item {
    img {
      width: 40px;
      height: 40px;
    }
  }
}

#login {
  padding: 16px 12px 16px;
  height: 284px;
}