@mixin box-shadow($shadow: 0px 5px 30px 0px rgba(0, 0, 0, 0.1)) {
  box-shadow: $shadow;
}

.welcome-page {
  font-family: 'Open Sans Regular';
  display: flex;
  flex-direction: column;
  background-color: var(--welcome-color-white);
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
  padding: 80px 80px;
  overflow: hidden;
  position: relative;
  top: -15px;
  left: -0;
  margin-right: -15px;
  margin-bottom: -40px;
  min-height: 100vh;
}

.welcome-header {
  display: flex;
  width: 100%;
  align-items: center;

  h2 {
    font-size: 40px;
    color: var(--welcome-color-primary);
    margin-bottom: 16px;
  }

  p {
    font-size: 20px;
  }

  .header-text-content {
    display: flex;
    flex-direction: column;
    width: 50%;
    padding-right: 120px;
  }

  .header-image-box {
    display: flex;
    width: 50%;
  }
}

@media (max-width: 1400px) {
  .welcome-page {
    padding: 60px 40px;
  }
  .welcome-header {
    flex-direction: column;
    row-gap: 40px;

    .header-text-content {
      width: 100%;
      padding-right: 0;
    }
    .header-image-box {
      width: 100%;
    }
  }

  .onboarding-cards-container {
    margin-top: 40px !important;
  }

  .service-card-container {
    margin-top: 40px !important;
  }
}

@media (max-width: 1290px) {
  .others-card-container {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 1215px) {
  .welcome-page {
    padding: 35px 30px;
  }

  .service-card {
    flex-direction: column;
    flex-wrap: wrap;

    .service-card-text {
      margin-top: 20px;
    }
  }
}

@media (max-width: 995px) {
  .onboarding-cards-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr;

    .onboarding-card {
      width: 100%;
    }
  }

  .line-curve {
    bottom: -15% !important;
  }

  .welcome-page {
    right: -4px;
  }
}

.btn-rounded {
  border-radius: 100px;
  padding: 7px 20px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  text-decoration: none !important;
}

.btn-secondary {
  background-color: var(--welcome-color-secondary);
  color: var(--welcome-color-white);
  border: none;

  &:hover {
    background-color: var(--welcome-color-secondary-dark);
    color: var(--welcome-color-white);
  }
}

.btn-outlined {
  background-color: var(--welcome-color-white);
  color: var(--welcome-color-primary);
  border: 2px solid var(--welcome-color-primary);

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

.onboarding-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 80px;
  position: relative;
  min-height: 160px;
}

.onboarding-card {
  @include box-shadow;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  height: 160px;
  width: 234px;
  padding: 20px;
  justify-content: space-between;
  color: var(--welcome-color-primary);
  transition: background-color 0.3s ease;
  background-color: var(--welcome-color-white);
  z-index: 2;
  cursor: pointer;
  text-decoration: none;

  h3 {
    font-size: 20px;
    line-height: 16px;
    margin-bottom: 0;
    font-weight: 600;
    text-decoration: none;
  }

  &:hover {
    background-color: var(--welcome-color-primary);
    color: var(--welcome-color-white);
    text-decoration: none;
  }
}

.onboarding-welcome-image {
  @include box-shadow;
  border-radius: 20px;
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.service-card {
  @include box-shadow;
  display: flex;
  padding: 40px;
  column-gap: 86px;
  border-radius: 20px;
  background-color: var(--welcome-color-white);
  position: relative;
  z-index: 2;

  h3 {
    color: var(--welcome-color-primary);
    font-size: 20px;
    margin: 0;
  }
  p {
    color: var(--welcome-color-gray);
    font-size: 16px;
    margin-bottom: 0;
  }
  .text-link {
    text-decoration: underline !important;
    font-weight: 600 !important;
    color: var(--welcome-color-gray);
  }
  .service-card-image, .service-card-image-video-overlay {
    position: relative;
    width: 274px;
    height: 154px;
  }
  .service-card-text {
    display: flex;
    flex-direction: column;
    row-gap: 20px;
  }

  .service-card-image-video-overlay {
    display: none;
  }

  &:hover, &.highlighted {
    .service-card-image-video-overlay.active {
      position: absolute;
      display: block;
      border-radius: 12px;
      display: flex;
      justify-content: center;
      align-items: center;
      background: rgba(0, 0, 0, 0.5);
      color: var(--welcome-color-white);
      font-size: 80px;
      cursor: pointer;
    }
  }
}

.line-curve {
  position: absolute;
  z-index: 0;
  right: -50%;
  bottom: -50%;
  height: 137.9px !important;
}

.others-card-container {
  margin-top: 40px;
  flex-wrap: wrap;
  justify-content: space-between;
  display: grid;
  gap: 32px;

  &.multi-card {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.others-card {
  @include box-shadow;
  display: flex;
  flex-direction: column;
  padding: 24px;
  row-gap: 15px;
  background-color: var(--welcome-color-white);
  border-radius: 20px;
  align-items: start;

  h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--welcome-color-primary-alt);
  }

  p {
    font-size: 16px;
    color: var(--welcome-color-gray);
    line-height: normal;
  }

  a {
    color: var(--welcome-color-primary-alt);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;

    &:hover {
      text-decoration: none;
      color: var(--welcome-color-primary-dark);
    }
  }

  .links-list {
    display: flex;
    column-gap: 24px;
    margin-top: auto;
  }
}

.optional-link {
  color: var(--welcome-color-primary-alt);
  text-decoration: underline;
  position: relative;
  font-size: 16px;
  font-weight: bold;
  padding: 9px 20px;

  &::after {
    content: " >";
    font-weight: bold;
    position: absolute;
    right: 8px;
  }

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

.scroll-up {
  position: fixed;
  margin: 30px;
  bottom: 0;
  right: 0;
  z-index: 3;
}

.welcome-video-modal {
.modal-dialog {
    max-width: 1800px; /* default for 4K and up */
  }

  @media (max-width: 2200px) {
    .modal-dialog {
      max-width: 1140px; /* for FHD */
      max-height: calc(100% - 3.5rem);
    }
  }

  @media (max-width: 1366px) {
    .modal-dialog {
      max-width: 880px; /* for smaller screens */
    }
  }

  .modal-content {
    display: flex;
    padding: 20px 40px 40px 40px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    border-radius: 20px;
    background: var(--welcome-color-white);
    box-shadow: 0px 15px 30px 0px rgba(0, 0, 0, 0.15);
  }

  .welcome-video-header {
    display: flex;
    height: 32px;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    align-self: stretch;

    .modal-close {
      width: 34px;
      height: 32px;
      opacity: 1;

      i {
        font-size: 32px;
        color: var(--welcome-color-primary);
      }

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

  .welcome-video-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
  }

  .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }

  .welcome-video-thumbs {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    align-self: stretch;

    .welcome-video-thumb {
      position: relative;
      display: flex;
      width: 240px;
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
      cursor: pointer;

      .welcome-video-thumb-img {
        height: 135px;
        align-self: stretch;
        aspect-ratio: 16/9;

        .welcome-video-thumb-img-overlay {
          background-color: rgba(0, 0, 0, 0.25);
        }

        i {
          width: 32px;
          height: 32px;
          aspect-ratio: 1/1;
        }
      }

      .welcome-video-thumb-play-overlay {
        position: absolute;
        width: 100%;
        height: 135px;
        top: 0;
        left: 0;
        background-color: rgba(0, 0, 0, 0.25);
        display: flex;
        justify-content: center;
        align-items: center;
        color: var(--welcome-color-white);

        i {
          font-size: 32px;
        }
      }

      .welcome-video-thumb-title {
        color: var(--welcome-color-primary-alt);
        font-family: 'Open Sans Regular';
        font-size: 20px;
        font-style: normal;
        font-weight: 600;
        line-height: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* show only 2 lines */
        -webkit-box-orient: vertical;
        line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      &.checked {
        .welcome-video-thumb-play-overlay {
          display: none;
        }

        cursor: default;
      }
    }
  }

  @media (max-width: 2200px) {
    .welcome-video-thumbs {
      .welcome-video-thumb {
        width: 176px !important;
        gap: 8px;
      }

      .welcome-video-thumb-title {
        font-size: 16px !important;
      }

      .welcome-video-thumb-img {
        height: 99px !important;
      }

      .welcome-video-thumb-play-overlay {
        height: 99px !important;
      }
    }
  }

  @media (max-width: 1366px) {
    .modal-content {
      padding: 12px 24px 24px 24px;
    }
  }
}
