@use "00-base/configure" as *;

.ma__action-card {

  @include ma-container;

  &__title {

    @include ma-border-decorative;
    padding-bottom: 15px;

    @media ($bp-medium-min) {
      text-align: center;

      &:after {
        left: 50%;
        transform: translateX(-50%);
      }
    }
  }

  &__description {
    margin-bottom: 30px;

    @media ($bp-medium-min) {
      text-align: center;
    }

    @media ($bp-large-min) {

      .ma__rich-text {
        margin-left: auto;
        margin-right: auto;
        padding: 0;
      }
    }
  }

  &__items {

    @include clearfix;
  }

  &__item {

    @include ma-valign-block;
    cursor: pointer;
    font-size: 0;  //valign fix
    margin-bottom: 20px;
    padding: 30px 20px;
    width: 100%;

    @media ($bp-x-small-min) {
      padding: 30px;
    }

    @media ($bp-medium-min) {

      @include span-columns(6);

      @include omega(2n);
      height: 215px;
      padding: 40px 20px;

      &:nth-last-child(2) {
        margin-bottom: 0;
      }
    }

    @media ($bp-large-min) {
      padding: 20px;
    }

    &:last-child {
      margin-bottom: 0;
    }
  }

  &__icon,
  &__content {
    vertical-align: middle;

    @media ($bp-x-small-min) {
      display: inline-block;
    }
  }

  &__icon {
    height: 50px;
    margin-bottom: 15px;
    width: 50px;

    @media ($bp-x-small-min) {
      margin-bottom: 0;
      margin-right: 20px;
      text-align: center;
    }

    @media ($bp-small-min) {
      height: 60px;
      margin-bottom: 20px;
      width: 60px;
    }

    @media ($bp-medium-min) {
      margin-right: 0;
      padding: 0 20px;
      width: 100px;
    }

    svg {
      height: 100%;
      width: 100%;
    }
  }

  &__content {

    @media ($bp-x-small-min) {
      width: calc(100% - 105px);
    }

    @media ($bp-medium-min) {
      width: calc(100% - 100px);
    }
  }

  &__category {
    font-size: $fonts-xsmall;
    letter-spacing: $letter-spacing-large;
    line-height: 1.5;
    text-transform: uppercase;

    @media ($bp-large-min) {
      font-size: $fonts-smaller;
    }
  }

  &__link {

    @include ma-link-decorative;
    line-height: 1;
    margin-bottom: 0;
    margin-top: 5px;

    a {
      font-size: $fonts-2xlarge;

      @media ($bp-large-min) {
        font-size: $fonts-2xlarge;
      }
    }
  }
}

//theme

.ma__action-card {

  &__title {

    @include ma-border-decorative($c-primary-alt);
  }

  &__item {

    @include ma-link-transition;
    background-color: var(--mf-c-bg-subtle);
    box-shadow: $box-shadow;

    &:hover {
      background-color: darken($c-bg-subtle, 10%);

      a {
        border-bottom-color: var(--mf-c-font-link);
      }
    }

    &--blue {
      background-color: var(--mf-c-primary);

      &:hover {
        background-color: rgba($c-primary,.8);

        a {
          border-bottom-color: var(--mf-c-font-inverse);
        }
      }
    }

    &--green {
      background-color: var(--mf-c-primary-alt);

      &:hover {
        background-color: rgba($c-primary-alt,.8);

        a {
          border-bottom-color: var(--mf-c-font-inverse);
        }
      }
    }

    &--dark-gray {
      background-color: var(--mf-c-gray-dark);

      &:hover {
        background-color: rgba($c-gray-dark,.8);

        a {
          border-bottom-color: var(--mf-c-font-inverse);
        }
      }
    }
  }

  &__icon {

    svg,
    svg > g {
      fill: rgba($c-font-medium,.7);
    }
  }

  &__item--blue &__icon,
  &__item--green &__icon,
  &__item--dark-gray &__icon {

    svg,
    svg > g {
      fill: rgba($c-font-inverse,.7);
    }
  }

  &__category {
    color: rgba($c-font-base,.85);
    font-weight: $fonts-bold;
  }

  &__item--blue &__category,
  &__item--green &__category,
  &__item--dark-gray &__category {
    color: rgba($c-font-inverse,.8);
    text-shadow: 0 0.125rem 0.125rem rgba($c-black, 0.5);
  }

  &__link {

    a:hover {
      border-bottom-color: var(--mf-c-font-link);
    }

    svg {
      fill: var(--mf-c-bay-blue-lighter);
    }
  }

  &__item--blue &__link,
  &__item--green &__link,
  &__item--dark-gray &__link {

    a {
      color: var(--mf-c-font-inverse);

      &:hover {
        border-bottom-color: var(--mf-c-font-inverse);
      }
    }

    svg {
      fill: rgba(var(--mf-c-font-inverse), .5);
    }
  }
}
