#wrapper {
  display: flex;
  min-height: 100vh;
  flex-flow: column nowrap;
  overflow: hidden;

  #container {
    @include media-breakpoint-up(md) {
      &.with--left-col:not(.with--right-col) {
        #main {
          max-width: calc(100% - #{$left-col--width});
        }
      }

      &.with--right-col:not(.with--left-col) {
        #main {
          max-width: calc(100% - #{$right-col--width});
        }
      }

      &.with--right-col.with--left-col {
        #main {
          max-width: calc(100% - (#{$right-col--width} + #{$left-col--width}));
        }
      }
    }
  }

  #main {
    //overflow: hidden;


    .mod_article {
      .ce--inner {
        position: relative;
      }

      > *:not(.ce_headline):not(.ce_html) {
        margin-bottom: $basic-gutter;
      }

      &:last-child {
        *[class*="bg-"]:last-of-type {
          margin-bottom: 0;
        }


      }

      &:first-child {
        *[class*="bg-"]:first-of-type {
          margin-top: 0px;
        }
      }

      &[class*="bg-"] {
        overflow: hidden;

        .ce_rsce_headimagelogo {
          &:first-child {
            margin-top: -$basic-gutter !important;
          }

          margin-left: -$basic-gutter;
          margin-right: -$basic-gutter;
          margin-bottom: $basic-gutter/2;

          > .ce--inner {
            margin-bottom: 0px !important;
          }
        }

        > div > * {
          &:not(:last-child):not(.ce_headline) {
            margin: rfs-value($basic-gutter auto);

            &.ce_rsce_linkboxen {
              margin-bottom: rfs-value($basic-gutter);
            }
          }

          &:first-child {
            margin-top: 0px !important; // ??
          }
        }

        &:last-of-type {
          //margin-bottom: rfs-value(-$basic-gutter);
        }

        & + .mod_article {
          .content--element:first-child {
            &[class*="bg-"] {
              margin-top: 0px;
            }
          }
        }
      }

      *[class*="bg-dark"] {
        color: var(--bs-body-color-inverse);

        * {
          color: inherit;
        }
      }

      & + .mod_article {
        &[class*="bg-"] {
          margin-top: rfs-value($basic-gutter);
        }

        .content--element[class*="bg-"]:first-of-type {
          margin-top: 0px;
        }
      }
    }
  }
}
