/*
Description: Layout system for page structure


    ##### Table of Content #####

    - Basic layout
    - Column system


*/

/* Basic layout */
.page {
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  max-width: 100vw;
  position: relative;
}

.page > header {
  background-color: var(--nav_bg);
  grid-area: header;
}

.page > main {
  background-color: var(--main_bg);
  grid-area: main;
  margin-top: 134px;
}

.page > footer {
  background-color: var(--footer_bg);
  grid-area: footer;
}

header .header {
  background-color: var(--nav_bg);
}

section {
  max-width: 100vw;
  padding: 2rem 0;
  width: 100%;
}

.content section:last-child {
  padding-bottom: 6rem;
}

.page.with-sidebar .content {
  display: grid;
  grid-template-areas: "content-wrapper";
  grid-template-columns: 1fr;
  max-width: 1200px;
  margin: 0 auto;
}

.content-wrapper {
  grid-area: content-wrapper;
}

@media only screen and (min-width: 576px) {
  .page > main {
    margin-top: 134px;
  }

  section {
    padding: 3rem 0;
  }
}

@media only screen and (min-width: 768px) {
  .page > main {
    margin-top: 130px;
  }
}

@media only screen and (min-width: 992px) {
  .page > main {
    margin-top: 209px;
  }

  .page.with-sidebar .content {
    grid-template-areas: "content-wrapper sidebar";
    grid-template-rows: auto;
    grid-template-columns: 1fr 25%;
  }

  .sidebar {
    grid-area: sidebar;
  }
}

.container {
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
}

.container-fluid {
  max-width: 100%;
  width: 100%;
}

@media only screen and (min-width: 1200px) {
  main section {
    margin: 0 auto;
    max-width: 2400px;
    width: auto;
  }
}


/* Column system */
.row {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  max-width: 100%;
  width: 100%;
}

.row-reverse {
  flex-direction: row-reverse;
}

.flex-column {
  flex-direction: column;
}

[class*="col-"],
.col {
  flex-basis: 100%;
  max-width: 100%;
  padding: var(--col-gap);
  width: 100%;
}

main [class*="col-"],
main .col {
  padding: 1rem;
}

.column-reverse {
  flex-direction: column-reverse;
}

.flex-grow {
  flex: 1;
}

.flex-start {
  justify-content: flex-start;
}

.flex-center {
  justify-content: center;
}

.flex-end {
  justify-content: flex-end;
}

.flex-top {
  align-items: flex-start;
}

.flex-middle {
  align-items: center;
}

.flex-bottom {
  align-items: flex-end;
}

.flex-stretch {
  align-items: stretch;
}

.flex-around {
  justify-content: space-around;
}

.flex-between {
  justify-content: space-between;
}

.flex-first {
  order: -1;
}

.flex-last {
  order: 1;
}

.gap {
  gap: var(--col-gap);
}

@media only screen and (min-width: 325px) {
  .row-xs-reverse {
    flex-direction: row-reverse;
  }

  .column-xs-reverse {
    flex-direction: column-reverse;
  }

  .flex-xs-row {
    flex-direction: row;
  }

  .flex-xs-column {
    flex-direction: column;
  }

  .col-xs-1 {
    flex-basis: 8.33333333%;
    max-width: 8.33333333%;
  }

  .col-xs-2 {
    flex-basis: 16.66666667%;
    max-width: 16.66666667%;
  }

  .col-xs-3 {
    flex-basis: 25%;
    max-width: 25%;
  }

  .col-xs-4 {
    flex-basis: 33.33333333%;
    max-width: 33.33333333%;
  }

  .col-xs-5 {
    flex-basis: 41.66666667%;
    max-width: 41.66666667%;
  }

  .col-xs-6 {
    flex-basis: 50%;
    max-width: 50%;
  }

  .col-xs-7 {
    flex-basis: 58.33333333%;
    max-width: 58.33333333%;
  }

  .col-xs-8 {
    flex-basis: 66.66666667%;
    max-width: 66.66666667%;
  }

  .col-xs-9 {
    flex-basis: 75%;
    max-width: 75%;
  }

  .col-xs-10 {
    flex-basis: 83.33333333%;
    max-width: 83.33333333%;
  }

  .col-xs-11 {
    flex-basis: 91.66666667%;
    max-width: 91.66666667%;
  }

  .col-xs-12 {
    flex-basis: 100%;
    max-width: 100%;
  }

  .col-xs-offset-0 {
    margin-left: 0;
  }

  .col-xs-offset-1 {
    margin-left: 8.33333333%;
  }

  .col-xs-offset-2 {
    margin-left: 16.66666667%;
  }

  .col-xs-offset-3 {
    margin-left: 25%;
  }

  .col-xs-offset-4 {
    margin-left: 33.33333333%;
  }

  .col-xs-offset-5 {
    margin-left: 41.66666667%;
  }

  .col-xs-offset-6 {
    margin-left: 50%;
  }

  .col-xs-offset-7 {
    margin-left: 58.33333333%;
  }

  .col-xs-offset-8 {
    margin-left: 66.66666667%;
  }

  .col-xs-offset-9 {
    margin-left: 75%;
  }

  .col-xs-offset-10 {
    margin-left: 83.33333333%;
  }

  .col-xs-offset-11 {
    margin-left: 91.66666667%;
  }

  .flex-xs-start {
    justify-content: flex-start;
  }

  .flex-xs-center {
    justify-content: center;
  }

  .flex-xs-end {
    justify-content: flex-end;
  }

  .flex-xs-top {
    align-items: flex-start;
  }

  .flex-xs-middle {
    align-items: center;
  }

  .flex-xs-bottom {
    align-items: flex-end;
  }

  .flex-xs-stretch {
    align-items: stretch;
  }

  .flex-xs-around {
    justify-content: space-around;
  }

  .flex-xs-between {
    justify-content: space-between;
  }

  .flex-xs-first {
    order: -1;
  }

  .flex-xs-last {
    order: 1;
  }
}

@media only screen and (min-width: 576px) {
  main .row {
    padding: 0;
  }

  main [class*="col-"],
  main .col {
    padding: var(--col-gap);
  }

  .row-sm-reverse {
    flex-direction: row-reverse;
  }

  .column-sm-reverse {
    flex-direction: column-reverse;
  }

  .flex-sm-row {
    flex-direction: row;
  }

  .flex-sm-column {
    flex-direction: column;
  }

  .col-sm-1 {
    flex-basis: 8.33333333%;
    max-width: 8.33333333%;
  }

  .col-sm-2 {
    flex-basis: 16.66666667%;
    max-width: 16.66666667%;
  }

  .col-sm-3 {
    flex-basis: 25%;
    max-width: 25%;
  }

  .col-sm-4 {
    flex-basis: 33.33333333%;
    max-width: 33.33333333%;
  }

  .col-sm-5 {
    flex-basis: 41.66666667%;
    max-width: 41.66666667%;
  }

  .col-sm-6 {
    flex-basis: 50%;
    max-width: 50%;
  }

  .col-sm-7 {
    flex-basis: 58.33333333%;
    max-width: 58.33333333%;
  }

  .col-sm-8 {
    flex-basis: 66.66666667%;
    max-width: 66.66666667%;
  }

  .col-sm-9 {
    flex-basis: 75%;
    max-width: 75%;
  }

  .col-sm-10 {
    flex-basis: 83.33333333%;
    max-width: 83.33333333%;
  }

  .col-sm-11 {
    flex-basis: 91.66666667%;
    max-width: 91.66666667%;
  }

  .col-sm-12 {
    flex-basis: 100%;
    max-width: 100%;
  }

  .col-sm-offset-0 {
    margin-left: 0;
  }

  .col-sm-offset-1 {
    margin-left: 8.33333333%;
  }

  .col-sm-offset-2 {
    margin-left: 16.66666667%;
  }

  .col-sm-offset-3 {
    margin-left: 25%;
  }

  .col-sm-offset-4 {
    margin-left: 33.33333333%;
  }

  .col-sm-offset-5 {
    margin-left: 41.66666667%;
  }

  .col-sm-offset-6 {
    margin-left: 50%;
  }

  .col-sm-offset-7 {
    margin-left: 58.33333333%;
  }

  .col-sm-offset-8 {
    margin-left: 66.66666667%;
  }

  .col-sm-offset-9 {
    margin-left: 75%;
  }

  .col-sm-offset-10 {
    margin-left: 83.33333333%;
  }

  .col-sm-offset-11 {
    margin-left: 91.66666667%;
  }

  .flex-sm-start {
    justify-content: flex-start;
  }

  .flex-sm-center {
    justify-content: center;
  }

  .flex-sm-end {
    justify-content: flex-end;
  }

  .flex-sm-top {
    align-items: flex-start;
  }

  .flex-sm-middle {
    align-items: center;
  }

  .flex-sm-bottom {
    align-items: flex-end;
  }

  .flex-sm-stretch {
    align-items: stretch;
  }

  .flex-sm-around {
    justify-content: space-around;
  }

  .flex-sm-between {
    justify-content: space-between;
  }

  .flex-sm-first {
    order: -1;
  }

  .flex-sm-last {
    order: 1;
  }
}

@media only screen and (min-width: 768px) {
  .row-md-reverse {
    flex-direction: row-reverse;
  }

  .column-md-reverse {
    flex-direction: column-reverse;
  }

  .flex-md-row {
    flex-direction: row;
  }

  .flex-md-column {
    flex-direction: column;
  }

  .col-md-1 {
    flex-basis: 8.33333333%;
    max-width: 8.33333333%;
  }

  .col-md-2 {
    flex-basis: 16.66666667%;
    max-width: 16.66666667%;
  }

  .col-md-3 {
    flex-basis: 25%;
    max-width: 25%;
  }

  .col-md-4 {
    flex-basis: 33.33333333%;
    max-width: 33.33333333%;
  }

  .col-md-5 {
    flex-basis: 41.66666667%;
    max-width: 41.66666667%;
  }

  .col-md-6 {
    flex-basis: 50%;
    max-width: 50%;
  }

  .col-md-7 {
    flex-basis: 58.33333333%;
    max-width: 58.33333333%;
  }

  .col-md-8 {
    flex-basis: 66.66666667%;
    max-width: 66.66666667%;
  }

  .col-md-9 {
    flex-basis: 75%;
    max-width: 75%;
  }

  .col-md-10 {
    flex-basis: 83.33333333%;
    max-width: 83.33333333%;
  }

  .col-md-11 {
    flex-basis: 91.66666667%;
    max-width: 91.66666667%;
  }

  .col-md-12 {
    flex-basis: 100%;
    max-width: 100%;
  }

  .col-md-offset-0 {
    margin-left: 0;
  }

  .col-md-offset-1 {
    margin-left: 8.33333333%;
  }

  .col-md-offset-2 {
    margin-left: 16.66666667%;
  }

  .col-md-offset-3 {
    margin-left: 25%;
  }

  .col-md-offset-4 {
    margin-left: 33.33333333%;
  }

  .col-md-offset-5 {
    margin-left: 41.66666667%;
  }

  .col-md-offset-6 {
    margin-left: 50%;
  }

  .col-md-offset-7 {
    margin-left: 58.33333333%;
  }

  .col-md-offset-8 {
    margin-left: 66.66666667%;
  }

  .col-md-offset-9 {
    margin-left: 75%;
  }

  .col-md-offset-10 {
    margin-left: 83.33333333%;
  }

  .col-md-offset-11 {
    margin-left: 91.66666667%;
  }

  .flex-md-start {
    justify-content: flex-start;
  }

  .flex-md-center {
    justify-content: center;
  }

  .flex-md-end {
    justify-content: flex-end;
  }

  .flex-md-top {
    align-items: flex-start;
  }

  .flex-md-middle {
    align-items: center;
  }

  .flex-md-bottom {
    align-items: flex-end;
  }

  .flex-md-stretch {
    align-items: stretch;
  }

  .flex-md-around {
    justify-content: space-around;
  }

  .flex-md-between {
    justify-content: space-between;
  }

  .flex-md-first {
    order: -1;
  }

  .flex-md-last {
    order: 1;
  }
}

@media only screen and (min-width: 992px) {
  .row-lg-reverse {
    flex-direction: row-reverse;
  }

  .column-lg-reverse {
    flex-direction: column-reverse;
  }

  .flex-lg-row {
    flex-direction: row;
  }

  .flex-lg-column {
    flex-direction: column;
  }

  .col-lg-1 {
    flex-basis: 8.33333333%;
    max-width: 8.33333333%;
  }

  .col-lg-2 {
    flex-basis: 16.66666667%;
    max-width: 16.66666667%;
  }

  .col-lg-3 {
    flex-basis: 25%;
    max-width: 25%;
  }

  .col-lg-4 {
    flex-basis: 33.33333333%;
    max-width: 33.33333333%;
  }

  .col-lg-5 {
    flex-basis: 41.66666667%;
    max-width: 41.66666667%;
  }

  .col-lg-6 {
    flex-basis: 50%;
    max-width: 50%;
  }

  .col-lg-7 {
    flex-basis: 58.33333333%;
    max-width: 58.33333333%;
  }

  .col-lg-8 {
    flex-basis: 66.66666667%;
    max-width: 66.66666667%;
  }

  .col-lg-9 {
    flex-basis: 75%;
    max-width: 75%;
  }

  .col-lg-10 {
    flex-basis: 83.33333333%;
    max-width: 83.33333333%;
  }

  .col-lg-11 {
    flex-basis: 91.66666667%;
    max-width: 91.66666667%;
  }

  .col-lg-12 {
    flex-basis: 100%;
    max-width: 100%;
  }

  .col-lg-offset-0 {
    margin-left: 0;
  }

  .col-lg-offset-1 {
    margin-left: 8.33333333%;
  }

  .col-lg-offset-2 {
    margin-left: 16.66666667%;
  }

  .col-lg-offset-3 {
    margin-left: 25%;
  }

  .col-lg-offset-4 {
    margin-left: 33.33333333%;
  }

  .col-lg-offset-5 {
    margin-left: 41.66666667%;
  }

  .col-lg-offset-6 {
    margin-left: 50%;
  }

  .col-lg-offset-7 {
    margin-left: 58.33333333%;
  }

  .col-lg-offset-8 {
    margin-left: 66.66666667%;
  }

  .col-lg-offset-9 {
    margin-left: 75%;
  }

  .col-lg-offset-10 {
    margin-left: 83.33333333%;
  }

  .col-lg-offset-11 {
    margin-left: 91.66666667%;
  }

  .flex-lg-start {
    justify-content: flex-start;
  }

  .flex-lg-center {
    justify-content: center;
  }

  .flex-lg-end {
    justify-content: flex-end;
  }

  .flex-lg-top {
    align-items: flex-start;
  }

  .flex-lg-middle {
    align-items: center;
  }

  .flex-lg-bottom {
    align-items: flex-end;
  }

  .flex-lg-stretch {
    align-items: stretch;
  }

  .flex-lg-around {
    justify-content: space-around;
  }

  .flex-lg-between {
    justify-content: space-between;
  }

  .flex-lg-first {
    order: -1;
  }

  .flex-lg-last {
    order: 1;
  }
}

@media only screen and (min-width: 1200px) {
  .row-xl-reverse {
    flex-direction: row-reverse;
  }

  .column-xl-reverse {
    flex-direction: column-reverse;
  }

  .flex-xl-row {
    flex-direction: row;
  }

  .flex-xl-column {
    flex-direction: column;
  }

  .col-xl-1 {
    flex-basis: 8.33333333%;
    max-width: 8.33333333%;
  }

  .col-xl-2 {
    flex-basis: 16.66666667%;
    max-width: 16.66666667%;
  }

  .col-xl-3 {
    flex-basis: 25%;
    max-width: 25%;
  }

  .col-xl-4 {
    flex-basis: 33.33333333%;
    max-width: 33.33333333%;
  }

  .col-xl-5 {
    flex-basis: 41.66666667%;
    max-width: 41.66666667%;
  }

  .col-xl-6 {
    flex-basis: 50%;
    max-width: 50%;
  }

  .col-xl-7 {
    flex-basis: 58.33333333%;
    max-width: 58.33333333%;
  }

  .col-xl-8 {
    flex-basis: 66.66666667%;
    max-width: 66.66666667%;
  }

  .col-xl-9 {
    flex-basis: 75%;
    max-width: 75%;
  }

  .col-xl-10 {
    flex-basis: 83.33333333%;
    max-width: 83.33333333%;
  }

  .col-xl-11 {
    flex-basis: 91.66666667%;
    max-width: 91.66666667%;
  }

  .col-xl-12 {
    flex-basis: 100%;
    max-width: 100%;
  }

  .col-xl-offset-0 {
    margin-left: 0;
  }

  .col-xl-offset-1 {
    margin-left: 8.33333333%;
  }

  .col-xl-offset-2 {
    margin-left: 16.66666667%;
  }

  .col-xl-offset-3 {
    margin-left: 25%;
  }

  .col-xl-offset-4 {
    margin-left: 33.33333333%;
  }

  .col-xl-offset-5 {
    margin-left: 41.66666667%;
  }

  .col-xl-offset-6 {
    margin-left: 50%;
  }

  .col-xl-offset-7 {
    margin-left: 58.33333333%;
  }

  .col-xl-offset-8 {
    margin-left: 66.66666667%;
  }

  .col-xl-offset-9 {
    margin-left: 75%;
  }

  .col-xl-offset-10 {
    margin-left: 83.33333333%;
  }

  .col-xl-offset-11 {
    margin-left: 91.66666667%;
  }

  .flex-xl-start {
    justify-content: flex-start;
  }

  .flex-xl-center {
    justify-content: center;
  }

  .flex-xl-end {
    justify-content: flex-end;
  }

  .flex-xl-top {
    align-items: flex-start;
  }

  .flex-xl-middle {
    align-items: center;
  }

  .flex-xl-bottom {
    align-items: flex-end;
  }

  .flex-xl-stretch {
    align-items: stretch;
  }

  .flex-xl-around {
    justify-content: space-around;
  }

  .flex-xl-between {
    justify-content: space-between;
  }

  .flex-xl-first {
    order: -1;
  }

  .flex-xl-last {
    order: 1;
  }
}
