@import "../../../src/style/front-end/overides/colors";
@import "../../../src/style/front-end/overides/variables";
@import "../../../node_modules/bulma/sass/utilities/mixins.sass";

.purdue-home-news-and-events {
  overflow: hidden;
  &.purdue-home-news-and-events--plain {
    .glide {
      padding-right: 1.5rem;
      @include touch {
        padding-right: 0;
      }
    }
  }
  h2 {
    color: #000000;
    font-family: $acumin-pro;
    font-size: 6rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    margin-right: 1rem;
    max-width: 900px;
    @include until-widescreen {
      font-size: 5rem;
    }
    @include touch {
      font-size: 4rem;
    }
    @include mobile {
      font-size: 3rem;
      margin-right: 0;
    }
    &.tagged-header {
      font-family: $united-sans-condensed;
      font-size: 1.125rem;
      font-weight: 900;
      letter-spacing: 2.81px;
      line-height: 1;
      border-radius: 4px;
      color: $white;
    }
    &.purdue-home-news-events__title{
      font-size: 1.25rem;
      line-height: 1.4;
      margin-bottom: 0.8rem !important;
      display: block;
    }
  }
  .align-bottom {
    align-items: flex-end;
  }
  .container:first-child {
    margin-bottom: 3rem;
    @include mobile {
      margin-bottom: 2rem;
    }
  }
  .tagged-header-container {
    margin-bottom: 3rem;
    & + .purdue-home-news-events__list {
      padding-top: 0;
    }
    @include mobile {
      margin-bottom: 1.5rem;
    }
  }
  &.post-50-50 {
    .glide {
      @include mobile {
        margin-bottom: 0;
      }
    }
    img {
      border-radius: 4px;
      object-fit: cover;
    }
    .purdue-home-news-events__date {
      margin-bottom: 0 !important;
      display: flex;
    }
    .purdue-home-news-events__list {
      padding-bottom: 1.5rem;
      &:first-child {
        padding-top: 0;
      }
      .purdue-home-news-events__title {
        margin-top: -0.5rem;
      }
    }
    .glide__slide {
      .flex-container--align-vertical-bottom {
        position: relative;
        padding: 0;
        @include until-widescreen {
          top: 0;
        }
        .purdue-home-news-events__content {
          min-width: 100%;
          padding: 1.25rem 0;
          border-radius: 0px;
          &::after {
            content: none;
          }
          .purdue-home-news-events__title {
            font-size: 1.75rem;
            @include mobile {
              font-size: 1.25rem;
            }
          }
          @include mobile {
            border-bottom: 2px solid #c4bfc0;
          }
        }
      }
    }
    .purdue-home-news-events__list-button {
      margin-left: 0px;
    }
  }
  .purdue-home-news-events__list {
    display: block;
    border-bottom: 2px solid $steam-gray;
    padding-top: 1.5rem;
    text-decoration: none;
    &:not(.is-50-50) {
      &:hover {
        .purdue-home-news-events__title {
          text-decoration: underline;
        }
      }
    }

    &.purdue-home-news-events__list--plain {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-left: 1.5rem;
      @include touch {
        margin-left: 0;
      }
      &:first-child {
        padding-top: 0;
      }
      &:after {
        content: "";
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath fill='%238e6f3e' d='M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z'/%3E%3C/svg%3E");
        height: 32px;
        width: 28px;
        background-repeat: no-repeat;
        background-size: cover;
        right: 0;
        font-size: 2rem;
        position: relative;
        bottom: 0.75rem;
        transition: all 0.3s ease;
      }
      &:hover {
        &:after {
          transform: translateX(3px);
        }
      }
      .flex-container {
        max-width: min(500px, calc(100% - 50px));
      }
    }
    &.is-50-50 {
      a.column {
        text-decoration: none;
        &:hover {
          .purdue-home-news-events__title {
            text-decoration: underline;
          }
        }
      }
    }
  }
  .purdue-home-news-events__date {
    span {
      &:not(:first-child) {
        padding-left: 0.5rem;
      }
      &:not(:last-child) {
        padding-right: 0.5rem;
      }
    }
  }
  .glide {
    @include mobile {
      margin-bottom: 1rem;
    }
  }
  .glide__slide {
    .flex-container--align-vertical-bottom {
      position: absolute;
      top: 0;
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      padding-bottom: 1rem;
      padding-left: 1rem;
      padding-right: 1rem;
      @include until-widescreen {
        position: relative;
        top: -2rem;
        padding-bottom: 0;
      }
      .purdue-home-news-events__content {
        background: $white;
        padding: 1.25rem;
        box-shadow: $box-shadow;
        border-radius: 4px;
        align-self: flex-end;
        min-width: 80%;
        display: block;
        text-decoration: none;
        .purdue-home-news-events__date {
          margin-bottom: 0 !important;
        }
        position: relative;
        &:after {
          content: "";
          background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath fill='%238e6f3e' d='M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z'/%3E%3C/svg%3E");
          height: 32px;
          width: 28px;
          background-repeat: no-repeat;
          background-size: cover;
          right: 1rem;
          font-size: 2rem;
          position: absolute;
          bottom: 0.75rem;
          transition: all 0.3s ease;
        }
        &:hover {
          &:after {
            transform: translateX(3px);
          }
          .purdue-home-news-events__title {
            text-decoration: underline;
          }
        }
      }
    }
    .purdue-home-cta-card--story.purdue-home-cta-card {
      box-shadow: none;
      .image:after {
        content: none;
      }
    }
    .purdue-home-cta-card.purdue-home-cta-card--news.purdue-home-cta-card--news--plain {
      .flex-container--align-vertical-bottom {
        position: relative;
        top: 0;
        padding: 0 0 4px;
        .purdue-home-news-events__content {
          padding: 1.25rem 0;
          padding-right: 3rem;
          box-shadow: none;
          border-radius: 0;
          width: 100%;
          &:after {
            position: absolute;
            top: calc(50% - 14px);
          }
          @include mobile {
            border-bottom: 2px solid $steam-gray;
          }
        }
      }
    }
    .cta-link {
      @include desktop {
        font-size: 2.5rem;
      }
    }
    .cta-icon.cta-icon--play {
      @include desktop {
        width: 80px;
        height: 80px;
      }
    }
  }
  .slider-controls {
    margin-top: 2rem;
    @include until-widescreen {
      margin-top: 0;
    }
    @include mobile {
      margin-top: -0.5rem;
    }
  }
  .purdue-home-news-events__list-button {
    margin-left: 1.5rem;
    margin-top: 2rem;
    @include touch {
      margin-left: 0;
    }
  }
}

p.purdue-home-news-events__tag {
  color: $aged-gold;
  font-family: $acumin-pro;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.5;
  text-transform: uppercase;
  margin-bottom: 0.8rem !important;
  @include mobile {
    font-size: 0.875rem;
  }
}
.purdue-home-news-events__title {
  color: #000000;
  font-family: $acumin-pro;
  font-size: 1.25rem;
  font-weight: bold;
  letter-spacing: 0;
  line-height: 1.4;
  margin-top: 0 !important;
  margin-bottom: 0.8rem !important;
  display: block;
}
.purdue-home-news-events__date {
  color: $cool-gray;
  font-family: $united-sans-condensed;
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.5;
  text-transform: uppercase;
  margin-bottom: 1.5rem !important;
}
