@import '../abstracts/_mixins';

.section {
  position: relative;
  width: 100%;
  // container-type: inline-size;

  &--full.slick-cards {
    height: var(--section-full-height);
  }
  &--full {
    min-height: var(--section-full-height);    

    @include mq-1366 {
      .page-header {
        min-height: 50rem;
      }
    }
    @include mq-1024 {
      .page-header {
        min-height: 50rem;
      }
    }
    @include mq-480 {
      .page-header {
        height: 84vh;
        max-height: initial;
        min-height: initial;
      }
    }
    @include mq-320 {
      .page-header {
        height: auto;
        max-height: initial;
        min-height: 60rem;
      }
    }

  }
  &--half {
    min-height: 50vh;
  }
  
  &--spacing-above {
    padding-top: var(--section-spacing);      
  }
  &--spacing-above-double {
    padding-top: calc(var(--section-spacing) * 2);
  }
  &--spacing-below {
    padding-bottom: var(--section-spacing);
  }
  &--spacing-below-double {
    padding-bottom: calc(var(--section-spacing) * 2);
  }

  $section-paddings: (1,2,3);
  @each $section-padding in $section-paddings {
    &--padding-#{$section-padding} {
      padding: var(--section-padding-#{$section-padding});        
    }
  }

  &--related {    
    margin-bottom: var(--spacing-4);
    transition: background-color 360ms ease;
    background: var(--related-background);
  }

  &--user {
    min-height: inherit;
  }
  &__listings .column__main {
    display: flex;
    flex-direction: column;
    margin-bottom: auto;
  }
  
  &__overflow {
    padding: var(--spacing-4) 0;
    margin: calc(var(--spacing-4) * -1) calc(var(--spacing-2) * -1);
    flex-flow: row nowrap !important;

    .column {
      flex: 0 0 auto;
    }
    &.column {
      &__two .column {
        width: 49%;
        margin-bottom: 0;
      }
      &__three .column {
        width: 32%;
      }
      &__four .column {
        width: 24%;
        margin-bottom: 0;
      }
      &__five .column {
        width: 19%;
        margin-bottom: 0;

        img {
          margin-bottom: 0;
        }        
      }
      &__six .column {
        width: 15%;
      }

      @include mq-768 {
        &__two .column,
        &__three .column,
        &__four .column,
        &__five .column,
        &__six .column {
          width: 47%;
        }
      }
      @include mq-480 {
        &__two .column,
        &__three .column,
        &__four .column,
        &__five .column,
        &__six .column {
          width: 90%;
        }
      }
    }

    .article__row:first-of-type {
      padding-top: var(--spacing-5);
    }
  }

  &__number {
    margin: -1rem 0 0.7rem;
    padding-bottom: 0.2rem;
    font-size: var(--number-font-size);
    font-weight: var(--font-weight-black);
    line-height: 1.2;
    border-bottom: var(--border-width-3) solid;
    display: inline-block;
  }

  @include print {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  
  &__more {
    position: relative;
    margin-top: var(--spacing-6);

    &:before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 100%;
      height: .1rem;
      padding: 0 var(--spacing-4);
      background: var(--inverted-border-color);
      transform: translate(-50%, -50%);
    }

    .button__wrapper {
      .button:not(:last-of-type) {
        margin: 0 var(--spacing-3) 0 0;
      }
      .button + .button {
        margin: 0;
      }
    }
  }
  &__moore {
    display: flex;
    align-items: center;

    .divider {
        width: 100%;
        margin: 0 24px;
        background-color: #D9D9D9;
    }
    .button {
        min-width: fit-content;
    }
  }
}