.textmedia {
  position: relative;
  display: grid;
  width: 100%;
  padding: 2rem 0 0 0 !important;
  grid-template-columns: 16px 1fr 16px;

  & .headline .-center {
    text-align: left;
  }

  & .textmedia__icon {
    display: flex;
    grid-column: 2;
    justify-self: center;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    width: 70px;
    height: 70px;
    background-color: rgb(var(--c-neutral-lightest));
    border-radius: 999px;
    position: relative;
    z-index: 101;
    transform: translateY(50%);
  }

  & .textmedia__icon img {
    height: 40px;
    width: auto;
  }
}

.textmedia.frame-space-after-extra-large .textmedia__icon img {
  height: 30px;
}

.textmedia.-left {
  & .headline .-center {
    text-align: right;
  }
}

.textmedia.-right {
  margin: 0;
}

.textmedia__content {
  grid-column: 2;
  padding: 10px 0 var(--p) 0;
  align-self: center;
  position: relative;

  & h2 {
    font-size: var(--f-size-l-4);
    font-weight: var(--f-weight-b);
    text-transform: uppercase;
    color: rgb(var(--c-neutral-lightest));
  }

  & .headline.-large {
    margin-bottom: 0;
  }
}

.textmedia.frame-type-gkmb_textmedia {
  background-color: rgb(var(--c-primary));
}

.textmedia__image {
  grid-column: span 3;
  min-height: auto;
}

.textmedia__logo {
  margin-bottom: 40px;
  display: inline-block;
}

.textmedia__logo img {
  max-width: 180px;
  max-height: 60px;
  height: 100%;
  width: 100%;
}

.textmedia__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  position: relative;
  z-index: 100;
  border-radius: 0;
}

.textmedia__text {
  text-wrap: balance;

  & p {
    font-size: var(--f-size-l-2);
    font-weight: var(--f-weight-b);
    color: rgb(var(--c-neutral-lightest));
  }
}

.textmedia.-left h3::before,
.textmedia.-right h3::before {
  content: "";
  position: absolute;
  left: -43.5rem;
  top: -0.5rem;
  z-index: 0;
  background: url(linecircle_textmedia.svg) no-repeat 0 0;
  -webkit-background-size: 620px 38px;
  -moz-background-size: 620px 38px;
  -o-background-size: 620px 38px;
  background-size: 620px 38px;
  width: 620px;
  height: 38px;
}

/* =============================================================================
   Media Queries
   ========================================================================== */

@media (min-width: 400px) {
  .textmedia {
    grid-template-columns: 4% 1fr 4%;
  }
}

@media (min-width: 500px) {
  .textmedia.-left h3::before,
  .textmedia.-right h3::before {
    left: -42rem;
    top: -0.5rem;
  }
}

@media (min-width: 640px) {
  .textmedia.-left h3::before,
  .textmedia.-right h3::before {
    left: -41rem;
    top: -0.5rem;
  }
}

@media (min-width: 760px) {
  .textmedia__content h2 {
    font-size: var(--f-size-l-5);
  }

  .textmedia .textmedia__icon {
    width: 90px;
    height: 90px;
  }

  .textmedia .textmedia__icon img {
    height: 50px;
    width: auto;
  }

  .textmedia.frame-space-after-extra-large .textmedia__icon img {
    height: 40px;
  }

  .textmedia .textmedia__content {
    padding-left: 1.5rem;
  }
}

@media (min-width: 799px) {
  .textmedia.textmedia__icon {
    transform: translate(-400%, 120%);
  }
}

@media (min-width: 800px) {
  .textmedia {
    position: relative;
    grid-template-columns: 4% 1fr 0 1fr 4%;
    padding: 0 !important;
  }

  .textmedia .textmedia__content {
    align-self: start;
    grid-column: 2;
  }

  .textmedia .textmedia__icon {
    grid-column: 3;
    position: relative;
    justify-self: auto;
    top: 70px;
  }

  main.content > div:nth-of-type(5) .textmedia__icon {
    transform: translateX(-50%);
  }

  main.content > div:nth-of-type(6) .textmedia__icon {
    transform: translateX(50%);
  }

  main.content > div:nth-of-type(7) .textmedia__icon {
    transform: translateX(-50%);
  }

  .textmedia__image {
    grid-column: 4 / 6;
    min-height: 50vw;
  }

  .textmedia.-right {
    direction: rtl;
  }

  .textmedia.-left .textmedia__content {
    text-align: -webkit-right;
    padding: 52px 90px 0 0;
  }

  .textmedia.-right .textmedia__content {
    padding: 52px 0 0 90px;
    direction: ltr;
  }

  .textmedia.-left h3::before {
    left: -40rem;
    top: -0.5rem;
  }

  .textmedia.-right h3::before {
    left: -37rem;
    top: -0.5rem;
  }
}

@media (min-width: 1024px) {
  .textmedia.-left h3::before {
    left: -39rem;
    top: -0.25rem;
  }

  .textmedia.-right h3::before {
    left: -36rem;
    top: -0.25rem;
  }
}

@media (min-width: 1280px) {
  .textmedia {
    transition: grid-template-columns 350ms ease;
  }

  .textmedia .textmedia__text p {
    width: 32.25rem;
  }

  .textmedia__image {
    min-height: 400px;
    max-height: 400px;
    overflow: hidden;
  }

  .textmedia__image img {
    transition: transform 350ms ease;
  }

  @media (hover: hover) {
    .textmedia.-left:hover {
      grid-template-columns: 4% 1fr 0 1fr 10%;
    }

    .textmedia.-left:hover .textmedia__image img,
    .textmedia.-right:hover .textmedia__image img {
      transform: scale(1.06);
    }
  }

  @media (hover: hover) {
    .textmedia.-right:hover {
      grid-template-columns: 4% 1fr 0 1fr 10%;
    }
  }

  .textmedia.-left h3::before {
    left: -34rem;
    top: -0.25rem;
  }

  .textmedia.-right h3::before {
    left: -29rem;
    top: -0.25rem;
  }
}

@media (min-width: 1540px) {
  .textmedia__image img {
    aspect-ratio: 7 / 4;
  }
}

@media (min-width: 1580px) {
  .textmedia.-left h3::before {
    left: -32rem;
    top: 0;
  }

  .textmedia.-right h3::before {
    left: -27rem;
    top: 0;
  }
}
