:root {
  --offsetLeft: 160px;
  --offsetRight: 120px;
}

.sub-page-shapes-header-services {
  width: 100%;
  position: relative;
  height: calc(var(--shape-half-size) + var(--shape-half-size));
  margin: 150px auto 192px;
  max-width: 1440px;
  background: #fff;
}

/* GENERAL SHAPE SIZES */
.sub-page-shapes-header-services > *:not(.message-text) {
  width: var(--shape-h-size);
  height: var(--shape-h-size);
  display: inline-block;
}

.sub-page-shapes-header-services > div:not(.message-text) {
  opacity: 0;
  transform: translate3d(0, var(--shape-half-size), 0);
}

body.loaded .sub-page-shapes-header-services > div:not(.message-text):nth-child(even) {
  transition: opacity 1s, transform 2.25s;
}

body.loaded .sub-page-shapes-header-services > div:not(.message-text) {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 1s, transform 2s;
}

/* MESSAGE TEXT */
.message-text {
  font-size: 20px;
  width: calc(100% - (var(--shape-half-size) * 5));
  position: absolute;
  top: 50%;
  left: calc(var(--shape-half-size) * 4 - 50px);
  max-width: 454px;
  line-height: 1.3em;
  opacity: 0;
  transform: translate3d(0, -40%, 0);
}

.message-text[style="font-size:20px;"] {
  line-height: 35px;
}

body.loaded .message-text {
  transition: opacity 1s, transform 1s;
  opacity: 1;
  transform: translate3d(0, -50%, 0);
}

.message-text p:not(:first-child) {
  margin-top: 30px;
}

/* SUB PAGE SHAPES */
.sub-page-shape-services-1 {
  position: absolute;
  left: calc(-1 * var(--offsetLeft));
  top: 0;
}

.sub-page-shape-services-2 {
  position: absolute;
  left: calc(var(--shape-h-size) + (-1 * var(--offsetLeft)));
  top: 0;
}

.sub-page-shape-services-3 {
  position: absolute;
  top: 0;
  left: calc(var(--shape-h-size) + var(--shape-half-size) + (-1 * var(--offsetLeft)));
}

.sub-page-shape-services-4 {
  position: absolute;
  top: var(--shape-half-size);
  left: calc(var(--shape-h-size) + var(--shape-half-size) + (-1 * var(--offsetLeft)));
}

.sub-page-shape-services-5 {
  position: absolute;
  top: 0;
  right: calc(-1 * var(--offsetRight));
}

.sub-page-shape-services-6 {
  position: absolute;
  top: var(--shape-half-size);
  right: calc(-1 * var(--offsetRight));
}

/* -- MEDIA QUERIES -- */

/* 1330 */
@media only screen and (max-width: 1330px) {
  .message-text {
    width: calc(100% - (var(--shape-half-size) * 4.5));
    left: calc(var(--shape-half-size) * 4 - 80px);
  }
}

/* 1240 */
@media only screen and (max-width: 1240px) {
  .sub-page-shape-services-1 {
    left: calc(-2 * var(--offsetLeft));
  }

  .sub-page-shape-services-2 {
    left: calc(var(--shape-h-size) + (-2 * var(--offsetLeft)));
  }

  .sub-page-shape-services-3,
  .sub-page-shape-services-4 {
    left: calc(var(--shape-h-size) + var(--shape-half-size) + (-2 * var(--offsetLeft)));
  }

  .message-text {
    width: calc(100% - (var(--shape-half-size) * 3.45));
    left: calc(var(--shape-half-size) * 3 - 40px);
  }
}

/* 1050 */
@media only screen and (max-width: 1050px) {
  .sub-page-shape-services-3,
  .sub-page-shape-services-4 {
    display: none !important;
  }

  .message-text {
    width: calc(100% - (var(--shape-half-size) * 2.45));
    left: calc(var(--shape-half-size) * 2 - 50px);
  }
}

/* 810 */
@media only screen and (max-width: 810px) {
  .sub-page-shapes-header-services {
    width: 100%;
    position: relative;
    height: auto;
    margin: 100px auto;
  }

  .sub-page-shape-services-2 {
    display: none !important;
  }

  .message-text {
    width: 100%;
    left: 0;
    margin: 0 auto;
    position: relative;
    padding: 0 5vw;
    max-width: 750px;
    box-sizing: border-box;
    top: 0;
    transform: unset !important;
  }
}
