#main-content {
  margin-top: 32px;
  margin-bottom: 64px;
  padding-left: 16px;
  padding-right: 16px;
}
#main-content.single-column.landing {
  margin-bottom: 0;
}

.page-container-ds {
  max-width: var(--w-lg, 1176px);
  margin: 2rem auto;
  padding-right: 0;
  padding-left: 0;
}

.main-content-ds {
  margin-top: 32px;
  max-width: 100%;
}

article {
  display: block;
}

/* Single column layout */
.single-column {
  max-width: var(--w-page-content, 876px);
  margin: 0 auto;
}

.single-column.landing {
  max-width: var(--w-lg, 1176px);
  margin: 0 auto;
}

.single-column.single-column-wide {
  max-width: var(--w-lg, 1176px);
  margin: 0 auto;
}

.has-sidebar-left {
  .single-column {
    max-width: var(--w-lg, 1176px);
    margin: 0 auto;
  }
}

@include tablet-buffer {
  .footer-container,
  .page-container-ds {
    padding-right: 0;
    padding-left: 0;
  }
}

/* Responsive title behavior */
/* Hide Mobile title, lives outside flex aligned elements and before content navigation, desktop page title is inside main. */
.narrow-page-title {
  display: none;
}

.main-content-ds.single-column.landing {
  .wide-page-title {
    display: none;
  }
  .narrow-page-title {
    display: none;
  }
}

/* Responsive page title */
.wide-page-title {
  display: none;
}

.narrow-page-title {
  display: block;
  margin-bottom: 16px;
  margin-top: 16px;
}

.main-content-ds.single-column {
  .wide-page-title {
    display: none;
  }
}

.main-content-ds.single-column.landing {
  .wide-page-title {
    display: none;
  }
  .narrow-page-title {
    display: none;
  }
}

.sidebar-container {
  display: block;
  width: 276px;
  max-width: 276px;
  padding-right: 16px;
}

.with-sidebar {
  .main-content-default,
  .ds-content-layout {
    display: flex;
    flex-wrap: wrap;
    margin: calc(var(--s0) / 2 * -1);
  }

  &.has-sidebar-left .main-content-default > *,
  &.has-sidebar-left .main-content-ds .ds-content-layout > .everylayout {
    margin: calc(var(--s0) / 2);
    flex-basis: 267px;
    flex-grow: 1;
  }

  &.has-sidebar-left .main-content-default > :last-child,
  &.has-sidebar-left .main-content-ds .ds-content-layout > .everylayout:last-child {
    flex-basis: 0;
    flex-grow: 999;
    min-width: calc(50% - var(--s0));
  }

  &.has-sidebar-right .main-content-default,
  &.has-sidebar-right .main-content-ds .ds-content-layout > .everylayout {
    flex-basis: 0;
    flex-grow: 999;
    min-width: calc(50% - var(--s0));
  }

  &.has-sidebar-right .main-content-default > * > :last-child,
  &.has-sidebar-right .main-content-ds .ds-content-layout > :last-child {
    margin: calc(var(--s0) / 2);
    flex-basis: 267px;
    flex-grow: 1;
  }

  &.page-container-ds.has-sidebar-left main {
    margin-left: 64px;
    margin-right: 20px;
  }

  .page-container-ds.has-sidebar-right main {
    margin-right: 64px;
    margin-left: 20px;
  }

  .main-container-ds {
    max-width: 877px;
  }
}

/* footer */
.content-footer-container {
  border-bottom: 1px solid var(--gray-200, #ededef);
  border-top: 1px solid var(--gray-200, #ededef);
  padding-top: 23px;
  padding-bottom: 23px;
}

.content-footer {
  max-width: var(--w-lg, 1176px) !important;
  margin-right: auto;
  margin-left: auto;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  padding-left: 16px;
  padding-right: 16px;
}

@include phone {
  .with-sidebar {
    .main-content-default,
    .ds-content-layout {
      display: block;
    }

    &.page-container-ds main {
      margin-left: 0 !important;
      margin-top: 32px;
    }

    main {
      margin-top: 0;
      margin-left: 0;
    }
  }

  /* sidebar */
  .sidebar-container {
    display: block;
    width: 100%;
    max-width: 100%;
    padding-right: 16px;
  }

  /* Content Menu */
  .content-footer {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }
}

/* Scrolling default */
:root {
  --animation-duration: 1s;
  --transiton-duration: 0.5s;
}
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --animation-duration: 0;
    --transiton-duration: 0;
  }
  html {
    scroll-behavior: auto;
  }
}