/*
 * @file
 * Provides the layout styles for three-column layout section.
 */

.layout--threecol-section {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 50px 60px;

  @media screen and (max-width: 1365px) {
    gap: 0;
  }
}

@media screen and (min-width: 992px) {
  .layout--threecol-section {
    flex-wrap: nowrap;
  }
}

.layout--threecol-section > .layout__region {
  flex: 0 1 100%;
  width: 100%;
}

.layout--threecol-section > .layout__region:not(:last-child) {
  z-index: 2;
}

@media screen and (min-width: 992px) {
  .layout--threecol-section--25-50-25 > .layout__region--first,
  .layout--threecol-section--25-50-25 > .layout__region--third,
  .layout--threecol-section--25-25-50 > .layout__region--first,
  .layout--threecol-section--25-25-50 > .layout__region--second,
  .layout--threecol-section--50-25-25 > .layout__region--second,
  .layout--threecol-section--50-25-25 > .layout__region--third {
    flex: 0 1 25%;
    width: 25%;
  }
  .layout--threecol-section--25-50-25 > .layout__region--second,
  .layout--threecol-section--25-25-50 > .layout__region--third,
  .layout--threecol-section--50-25-25 > .layout__region--first {
    flex: 0 1 50%;
    width: 50%;
  }
  .layout--threecol-section--33-34-33 > .layout__region--first {
    flex: 0 1 33%;
    width: 33%;
  }
  .layout--threecol-section--33-34-33 > .layout__region--second,
  .layout--threecol-section--33-34-33 > .layout__region--third {
    flex: 0 1 33%;
    width: 33%;
    margin-left: 0.5%;
  }
}

@media screen and (max-width: 991px) {
  .layout--threecol-section {
    gap: 16px;
    justify-content: space-between;
  }

  .layout--threecol-section > .layout__region {
    flex: 0 1 calc(50% - 27px);
    width: calc(50% - 27px);
  }

  .layout--threecol-section > .layout__region--third {
    margin-top: 38px;
  }
}

@media screen and (max-width: 767.98px) {
  .layout--threecol-section > .layout__region {
    flex: 0 1 100%;
    width: 100%;
    margin-bottom: 28px;
  }

  .layout--threecol-section > .layout__region--third {
    margin-top: 0;
  }
}
