@import '../variables.less';

@impactFontFamily: Impact,-apple-system,BlinkMacSystemFont,Helvetica,"Segoe UI","Noto Sans CJK SC",Arial,Ubuntu,sans-serif,"Apple Color Emoji";
@darkBule: #0D2256;

.banner__section {
  position: relative;
  width: 100%;
  height: 0;
  background-size: cover !important;
  background-position: center !important;
  margin-top: @headerHeight;
}

.hackathon2019-banner {
  background: url('https://download.pingcap.com/images/banners/hackathon2019-banner-pc.jpg') no-repeat;
  padding-top: 34%;
  position: relative;

  .banner-btn {
    position: absolute;
    background-color: #a1a1a1;
    color: white;
    padding: 10px 30px;
    border: 1px solid #919191;
    border-radius: 30px;
    font-size: 18px;
    margin-top: 20px;
    cursor: not-allowed;
    transition: all 0.3s ease;

  //   &:hover {
  //     border: 1px solid #0D309E;
  //     background-color: #0D309E;
  //  }
  }
}

.section-title {
  padding: 0 2rem 2.5rem 2rem;
  position: relative;
  color: @darkBule;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.section-title::after {
  content: '';
  border-top: 3px solid #E30C34;
  width: 40px;
  display: block;
  position: absolute;
  left: 50%;
  margin-left: -20px;
  bottom: 2rem;
}

.section-title-white {
  color: white;
  padding-top: 4rem;

  &::after {
    border-top: 3px solid #E30C34;
  }
}

.about-hackathon19 {
  margin: 2rem;
  padding: 5rem;
  line-height: 1.7;

  .hackathon-intro {
    // text-align: center;
    line-height: 1.5;
    font-size: 0.8rem;
    color: #656565;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px 0;
  }

  .hackathon-sub-intro {
    // padding: 10px;
    // text-align: center;
    margin: 0 auto;
    max-width: 1024px;
    color: #656565;
    font-size: 0.8rem;
  }

  .wrap-ul {
    padding-top: 15px;
    padding-bottom: 15px;
    margin: 0 auto;
  }

  ul {
    // list-style: none;
    max-width: 1024px;
    padding-left: 55px;
    color: #656565;
    font-size: .8rem;

    .title-list {
      font-family: TitilliumWeb-bold, -apple-system,BlinkMacSystemFont,Helvetica,"Segoe UI","Hiragino Sans GB","Noto Sans CJK SC",Arial,Ubuntu,sans-serif,"Apple Color Emoji";
      color: #656565;
      font-weight: 600;
    }

    .thin-font {
      font-weight: 500 !important;
    }

    .sub-list {
      padding-left: 0;
    }
  }
}

.winners {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;

  .winner-team {
    margin: 30px 15px;
    width: 250px;
    height: 305px;
    position: relative;
    border: 1px solid rgba(13, 34, 86, 0.2);
  }

  .list {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
  }

  .team-info {
    text-align: center;
    color: @darkBule;
    margin-top: 15px;

    p {
      margin: 8px 20px;
    }

    .award {
      position: relative;
      font-weight: 600;
      font-size: 16px;
    }

    .project-name {
      opacity: 0.5;
      font-size: 14px;
    }
  }

  .misc {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    position: absolute;
    bottom: 10px;

    .award-icon {
      width: 30px;
      margin-left: 30px;
    }

    .GitHub-repo {
      background-color: rgba(13, 34, 86, 0.1);
      color: @darkBule;
      border: none;
      padding: 10px;
      border-radius: 4px;
      font-size: 12px;
      cursor: pointer;
      position: absolute;
      width: 100px;
      top: 50%;
      left: 50%;
      transform: translate(100%, -50%);

      &:hover {
        background-color: @darkBule;
        color: white;
      }
    }
  }

  .thumbnail {
    width: 100%;
    height: 167px;
    position: relative;

    .thumbnail-img {
      width: 100%;
      height: 100%;
      display: block;
    }

    .thumbnail-text-click {
      opacity: 1 !important;
    }

    .thumbnail-text {
      .thumbnail-img();

      font-size: 14px;
      position: absolute;
      top: 0;
      background-color: @darkBule;
      color: white;
      opacity: 0;
      padding: 1rem;
      line-height: 1.7;
      transition: opacity 0.5s ease;
    }
  }

  .more-project-btn {
    border: 1px solid #0D309E;
    border-radius: 30px;
    color: #0D309E;
    background-color: white;
    padding: 15px 25px;
    font-size: 16px;
    margin: 4rem 0;
    cursor: pointer;

    &:hover {
      background-color: #0D309E;
      color: white;
    }
  }
}

.tutor-members {
  background-color: @darkBule;

  .tutor-list {
    max-width: 1200px;
    color: white;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    margin: 0 auto;
    padding: 2rem 0 4rem;
  }

  .tutor {
    position: relative;
    width: 245px;
    height: 300px;
    margin: 15px 0;
    text-align: center;
    line-height: 1.7;

    .tutor-avatar {
      width: 140px;
      height: 140px;
      margin: 0 auto;
      position: relative;

      img {
        width: 100%;
        border-radius: 50%;
        height: 100%;
        display: block;
        object-fit: cover;
      }

      .role {
        position: absolute;
        font-size: .7rem;
        padding: 2px 15px;
        background: #FFBA00;
        border-radius: 30px;
        top: 10px;
        right: -22px;
      }

      .judge {
        background: #E30C34;
      }
    }

    .name {
      font-size: 0.9rem;
      margin-top: 2rem;
      font-weight: 600;
    }

    .title {
      font-size: 14px;
      padding: 0 1rem;
    }
  }
}

.awards {
  text-align: center;
  margin: 5rem auto;
  max-width: 1024px;

  .award-list {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    margin: 0 auto;

    .award-item {
      border: 1px solid rgba(13, 34, 86, 0.2);
      width: 278px;
      height: 300px;
      margin: 1rem;
      position: relative;

      .bg-img {
        position: absolute;
        width: 100px;
        top: 0;
        left: 0;
      }

      .award {
        padding-top: 75px;
        font-size: 18px;
        color: rgba(13, 34, 86, 0.68);
      }

      .bonus-item {
        line-height: 0.6;
        margin: 20px 0;

        span {
          font-size: 15px;
          padding: 0 5px;
          vertical-align: top;
        }

        .bonus {
          font-size: 1.8rem;
          font-family: @impactFontFamily;
          color: @darkBule;
        }
      }

      .team-numbers {
        color: rgba(13, 34, 86, 0.5);
        font-size: 0.65rem;
      }

      .gift {
        margin: 1.5rem 0 1.8rem;
        font-weight: 600;
        font-size: 1.1rem;
      }

      .icon {
        width: 50px;
        height: auto;
        margin: 15px auto;

        img {
          width: 100%;
          height: 100%;
          display: block;
        }
      }
    }
  }
}

.modal {
  background: none !important;
  max-width: 500px !important;
  box-shadow: none !important;
}

.modal-overlay {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.cards-list,
.step-list,
.reviews-list,
.btns {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  max-width: 1200px;
}

.step-list {
  margin: 1rem auto 7rem;

  .step-item {
    color: white;
    max-width: 550px;
    background-color: @darkBule;
    border-radius: 10px;
    margin: 10px;
    position: relative;

    .watermark {
      position: absolute;
      font-family: @impactFontFamily;
      font-size: 7rem;
      top: 0;
      left: 1rem;
      color: rgba(255, 255, 255, 0.08);
    }

    .step-info {
      margin: 2rem 2rem 3rem 3rem;

      .name {
        font-size: 18px;
        font-weight: 600;
        padding: 5px;
      }

      .time {
        font-size: 16px;
        font-weight: 600;
        padding: 5px;
      }

      .detail {
        padding: 10px 5px 40px;
        font-size: 14px;
        line-height: 2;
      }

      .btn-link {
        background-color: white;
        padding: 5px 18px;
        border-radius: 30px;
        color: @darkBule;
        position: absolute;
        bottom: 1.7rem;
        left: 3.5rem;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;

        &:hover {
          background: #E30C34;
          color: white;
        }
      }

      .signUp-end {
        background-color: #a1a1a1;
        cursor: not-allowed;
        color: white;

        &:hover {
          background: #a1a1a1;
          color: white;
        }
      }

      .step {
        font-family: @impactFontFamily;
        font-size: 1.4rem;
        position: absolute;
        bottom: 1.5rem;
        right: 2rem;
        text-align: right;
      }
    }
  }
}

.cards-list {
  margin: 0 auto 5rem;

  .card-item {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    width: 550px;
    margin: 10px 10px;
    border: 1px solid rgba(13, 48, 158, 0.17);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;

    .thumbnail {
      width: 298px;
      height: 200px;
      display: block;

      .mobile-bg {
        display: none;
      }

      img {
        width: 100%;
        height: 100%;
        display: block;
      }
    }

    .info {
      width: 250px;
      padding: 10px;

      h2 {
        font-size: 18px;
        padding: 7px;
      }

      p {
        font-size: 16px;
        padding: 7px;
        line-height: 1.6;
      }
    }

    &:hover {
      box-shadow: 0 3px 10px 3px #ddd;
    }
  }
}

.schedule-on-modal {
  height: auto;

  img {
    width: 100%;
    height: auto;
    display: block;
  }
}

.learning-section {
  margin: 1rem;
}

.faq-section {
  background-color: @darkBule;

  .q-list {
    max-width: 800px;
    padding: 10px 10px 5rem;
    margin: 0 auto;
  }

  .question {
    color: white;
    font-size: 18px;
    position: relative;
    padding: 1rem 0 0.5rem;
    cursor: pointer;
    line-height: 1.7;

    &::after {
      content: '';
      border-bottom: 1px dashed #3A58F0;
      position: absolute;
      width: 100%;
      bottom: 0;
      left: 0;
    }

    &:hover {
      &::before {
        color: #E30C34;
        border: 1px solid #E30C34;
      }

      &::after {
        border-bottom: 1px dashed #E30C34;
      }
    }

    &::before {
      content: '+';
      color: #3A58F0;
      border: 1px solid #3A58F0;
      border-radius: 50%;
      position: absolute;
      width: 20px;
      height: 20px;
      line-height: 20px;
      right: 0;
      bottom: 0;
      margin-bottom: 16px;
      text-align: center;
    }
  }

  .answer {
    color: white;
    font-size: 18px;
    padding: 1rem 2rem;
    display: none;
    line-height: 1.7;
  }

  .expand {
    &::before {
      content: '-';
      color: #E30C34;
      border: 1px solid #E30C34;
    }

    &::after {
      border-bottom: 1px dashed #E30C34;
    }
  }
}

.participant-section {
  background: url("https://download.pingcap.com/images/hackathon2019/hack19-participant-bg.png") no-repeat;
  height: 0;
  width: 100%;
  background-size: cover;
  background-position: center;
  padding-bottom: 30%;
  margin-bottom: 6rem;

  .btns {
    margin: 0 auto;

    .btn-item {
      width: 200px;
      border: 1px solid white;
      padding: 15px 20px;
      font-size: 0.8rem;
      color: white;
      margin: 0 2rem;
      text-align: center;

      &:hover {
        cursor: pointer;
        background: #E30C34;
        border-color: #E30C34;
      }
    }

    .contact-us-hack19 {
      position: relative;

      .qr-tooltiptext {
        width: 180px;
        background-color: #3351ff;
        color: white;
        text-align: right;
        padding: 10px;
        position: absolute;
        z-index: 1;
        font-size: 12px;
        line-height: 1.7;
        border-radius: 5px 5px 5px 0;
        right: -200px;
        top: -100%;
        opacity: 1;
        -webkit-transition: opacity 0.3s;
        transition: opacity 0.3s;

        .tidb-robot-qrCode {
          padding: 10px;

          p {
            padding: 0 10px;
          }

          img {
            width: 100%;
            height: 100%;
            display: block;
          }
        }
      }

      .qr-tooltiptext::after {
        content: '';
        position: absolute;
        bottom: 60%;
        left: -5px;
        border-width: 10px;
        border-style: solid;
        border-color: transparent #3351ff #3351ff transparent;
        transform: rotate(155deg) skew(30deg);
      }
    }

    .important-btn {
      cursor: not-allowed !important;
      color: white;
      border-color: #a1a1a1;
      background-color: #a1a1a1;

      &:hover {
        color: white;
        border-color: #a1a1a1;
        background-color: #a1a1a1;
      }
    }
  }
}

.participant-title {
  padding-top: 7rem;
}

.partners {
  max-width: 1024px;
  margin: 4rem auto;

  .sponsor-type {
    font-size: 0.9rem;
    text-align: center;
    padding-top: 10px;
  }

  .logo-list {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    margin: 10px auto;

    img {
      width: auto;
      height: 60px;
      margin: 15px;
    }
  }
}

.reviews-list {
  margin: 1rem auto 5rem;

  .review-item {
    max-width: 550px;
    margin: 10px;
    height: auto;
    border-radius: 10px;
    transition: all 0.2s ease;
    // box-shadow: 0 3px 10px 3px #ddd;

    img {
      width: 100%;
      height: 100%;
      display: block;
    }

    &:hover {
      box-shadow: 0 5px 14px 3px rgba(0, 0, 0, 0.3);
    }
  }
}

@media (max-width: 1025px) {
  .participant-section {
    .contact-us-hack19 .qr-tooltiptext {
      width: 150px !important;
      right: auto !important;
      font-size: 10px !important;
      top: 4rem !important;
      left: -6rem !important;

      .tidb-robot-qrCode {
        padding: 10px !important;
      }

      p {
        padding: 0 10px;
      }

      &::after {
        left: 80% !important;
        bottom: auto !important;
        transform: rotate(240deg) skew(30deg) !important;
        top: -4px !important;
      }
    }
  }
}

@media (max-width: 768px) {
  .hackathon2019-banner .banner-btn {
    padding: 5px 15px;
    margin-top: 5px;
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .hackathon2019-banner {
    background: url('https://download.pingcap.com/images/banners/hackathon2019-banner-mobile.jpg') no-repeat;
    padding-top: 62%;

    .banner-btn {
      padding: 5px 15px;
      font-size: 13px;
      margin-top: 10px;
    }
  }

  .about-hackathon19 {
    padding: 0;
    margin: 2rem 1.3rem;

    .wrap-ul {
      padding-top: 10px;
      padding-bottom: 10px;
      margin: 0 auto;
    }

    ul {
      padding-left: 40px;
    }

    .hackathon-sub-intro {
      padding: 10px 0;
    }
  }

  .step-list .step-item {
    border-radius: 0;
    margin: 10px 0;
  }

  .tutor-members .tutor {
    width: 180px;
    height: 200px;

    .tutor-avatar {
      width: 100px;
      height: 100px;
    }

    .title {
      line-height: 1.7;
      padding: 0 21px;
    }
  }

  .awards {
    .award-list {
      .award-item {
        height: 190px;
        width: 155px;
        margin: 10px;

        .bg-img {
          width: 40px;
        }

        .award {
          padding-top: 30px;
          font-size: 16px;
        }

        .icon {
          width: 30px;
        }
      }
    }
  }

  .step-list {
    margin: 0 auto 4rem;

    .step-item .step-info {
      .name {
        font-size: 16px;
      }

      .time {
        font-size: 14px;
      }

      .detail,
      .btn-link {
        font-size: 12px;
      }
    }
  }

  .cards-list .card-item {
    .thumbnail {
      width: 100%;
      height: auto;

      .pc-bg {
        display: none;
      }

      .mobile-bg {
        display: block;
      }
    }

    .info {
      width: 100%;
      padding: 20px;

      h2 {
        font-size: 16px;
        padding: 0 0 10px;
      }

      p {
        font-size: 14px;
        padding: 3px;
        line-height: 1.7;
      }
    }
  }

  .faq-section {
    .q-list {
      padding: 10px 20px 5rem;
    }

    .question,
    .answer {
      font-size: 16px;
    }
  }

  .partners {
    .sponsor-type {
      font-size: 16px;
    }

    .logo-list img {
      height: 45px;
    }
  }

  .participant-section {
    padding-bottom: 45%;

    .btns {
      margin: -1rem auto;

      .btn-item {
        margin: 10px;
        padding: 7px;
        width: 100px;
        font-size: 14px;
        position: relative;
      }
    }
  }

  .participant-title {
    padding-top: 2rem;
  }

  .modal {
    max-width: 250px !important;
  }
}

@media (max-width: 320px) {
  .hackathon2019-banner .banner-btn {
    padding: 5px 15px;
    margin-top: 5px;
  }

  .partners .logo-list img {
    margin: 5px;
  }

  .participant-section {
    padding-bottom: 70%;

    .btns .btn-item {
      width: 85px;
      margin: 6px;
      font-size: 12px;
    }
  }

  .participant-title {
    padding-top: 3rem;
  }

  .faq-section .question::before {
    width: 15px;
    height: 15px;
    margin-bottom: 15px;
  }

  .tutor-members .tutor .title {
    padding: 0;
  }

  .awards .award-list .award-item {
    .bg-img {
      width: 45px;
    }

    .bonus-item {
      margin: 10px 0 0;
    }
  }
}
