@use "sass:math";
@use "./../abstracts/index";

.welcome {
  position: relative;
  z-index: 0;
  background: index.$color-primary;
  @include index.gradient-primary();

  .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: index.$welcome-height;
    min-height: index.$welcome-min-height;
    color: index.$color-neutral-light;
  }

  .mini_container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: index.$welcome-min-height;
    color: index.$color-neutral-light;
    width: 100%;
    max-width: index.$desktop-width;
    margin-left: auto;
    margin-right: auto;
    padding-left: index.$gap-md;
    padding-right: index.$gap-md;
  }

  &__title {
    font-size: 2.6em;
    margin-bottom: index.$gap-sm;

    @include index.up-to-mobile {
      word-break: break-all;
    }

    @include index.desktop {
      width: 85%;
      font-size: 3.6em;
    }
  }

  &__description {
    font-size: 18px;
    width: 100%;
    @include index.desktop {
      width: 80%;
    }
  }

  &__actions {
    display: flex;
    margin-top: math.div(index.$gap-lg * 3, 2);
    flex-wrap: wrap;
  }

  &__action {
    padding: 12px 16px;
    border-radius: 50px;
    text-decoration: none;
    line-height: 1.5;
    color: index.$welcome-action-color;
    border: 1px solid index.$welcome-action-color;
    margin-right: index.$gap-md;
    margin-bottom: index.$gap-md;
    transition: background-color .3s ease, color .3s ease;
    min-width: fit-content;

    &:last-child {
      margin-right: 0;
    }

    &:hover {
      background-color: index.$welcome-action-color;
      color: index.get-color-accessible-for-background(index.$welcome-action-color);
    }
  }

  &__image {
    display: none;
  }
}

@include index.desktop {
  .welcome__image {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: -1;
    position: absolute;
    top: 50%;
    right: 0;
    height: 70%;
    width: 24%;
    overflow: hidden;
    transform: translate(0, -50%);

    img {
      display: block;
      margin: auto;
      max-width: 200px;
      max-height: 100%;
    }
  }
}

