/* =============================================================================
   DCE: Special table
   ========================================================================== */

.specialTable__row {
  margin-bottom: 10px;
}

.specialTable__cell {
  padding: 0.3em 0.7em;
  border: 1px solid rgb(var(--c-neutral-lightest));
  background: rgb(var(--c-neutral-lighter));
  vertical-align: top;
}

.specialTable__cell.-head {
  background: rgb(var(--c-primary));
  color: rgb(var(--c-neutral-lightest));
  font-size: var(--f-size-l-1);
  text-transform: uppercase;
}

.specialTable__cell p {
  margin: 0;
}

.frame-bg-grey .specialTable__cell {
  border-color: rgb(var(--c-neutral-lighter));
  background: rgb(var(--c-neutral-lightest));
}

.frame-bg-grey .specialTable__cell.-head {
  background: rgb(var(--c-primary));
}

@media (min-width: 501px) {
  .specialTable__row {
    display: flex;
    margin-bottom: 0;
  }

  .specialTable__cell {
    flex: 1 1 65%;
  }

  .specialTable__cell.-head {
    flex: 0 0 35%;
  }
}

/* =============================================================================
   DCE: Link box
   ========================================================================== */

.linkbox {
  --linkbox-bg: var(--c-neutral-lighter);
  position: relative;
  margin-bottom: 1em;
  background: rgb(var(--linkbox-bg));
  transition: background 0.3s ease;
}

/* Weiße Linkbox auf grauem Abschnitt; :where() hält die Spezifität niedrig, damit der grüne Hover greift */
.frame-bg-grey .linkbox,
:where(.page:not(.-main) .content > :is([class*="frame-type-col"], .frame-type-tabs, .frame-type-accordion):nth-child(2n)) .linkbox,
:where(.page.-main .content > :is([class*="frame-type-col"], .frame-type-tabs, .frame-type-accordion):nth-child(2n+1)) .linkbox {
  --linkbox-bg: var(--c-neutral-lightest);
}

.linkbox__link,
.linkbox__inner {
  display: block;
  padding: 20px;
  color: rgb(var(--c-neutral-dark));
  text-decoration: none;
}

.linkbox.-withLink .linkbox__link {
  padding-right: 60px;
}

.linkbox.-withLink .linkbox__link::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 20px;
  width: 22px;
  height: 48px;
  margin-top: -24px;
  background-color: rgb(var(--c-primary));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 48'%3E%3Cpolyline points='2,2 20,24 2,46' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 48'%3E%3Cpolyline points='2,2 20,24 2,46' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: background-color 0.3s ease;
}

.linkbox__title {
  margin-bottom: 0.2em;
  color: rgb(var(--c-primary));
  font-size: 120%;
  line-height: 1.4;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.linkbox__subtitle {
  color: rgb(var(--c-neutral-dark));
  transition: color 0.3s ease;
}

.linkbox__title p,
.linkbox__subtitle p {
  margin: 0;
}

@media (hover: hover) {
  .linkbox.-withLink:hover {
    --linkbox-bg: var(--c-primary);
  }

  .linkbox.-withLink:hover .linkbox__title,
  .linkbox.-withLink:hover .linkbox__subtitle {
    color: rgb(var(--c-neutral-lightest));
  }

  .linkbox.-withLink:hover .linkbox__link::after {
    background-color: rgb(var(--c-neutral-lightest));
  }
}

.linkbox.-withLink:focus-within {
  outline: 2px solid rgb(var(--c-primary-dark));
  outline-offset: 2px;
}

/* =============================================================================
   DCE: Scroll image
   ========================================================================== */

.grid__main > .scrollimage {
  grid-column: 1 / -1;
}

.scrollimage {
  position: relative;
}

.scrollimage__image {
  width: 100%;
  height: 34vw;
  max-height: 700px;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.scrollimage__overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--c-neutral-darkest), 0.15);
}

.scrollimage__text {
  position: relative;
  padding: 3em var(--p);
  background: rgb(var(--c-neutral-lighter));
  box-sizing: border-box;
}

.scrollimage__text .headline.-large {
  margin-bottom: 1em;
}

.scrollimage__body p:last-child {
  margin-bottom: 0;
}

@media (min-width: 1141px) {
  .scrollimage__image {
    background-attachment: fixed;
  }

  .scrollimage__text {
    position: absolute;
    bottom: 3em;
    left: 3%;
    z-index: 1;
    max-width: 640px;
    padding: 3em;
    box-shadow: 0 0 20px 0 rgba(var(--c-neutral-darkest), 0.3);
  }
}

/* =============================================================================
   DCE: Service tiles
   ========================================================================== */

.serviceTiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.serviceTiles__item {
  position: relative;
  height: 34vw;
  overflow: hidden;
}

.serviceTiles__link {
  display: block;
  height: 100%;
  text-decoration: none;
}

.serviceTiles__image {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.serviceTiles__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(var(--c-neutral-darkest), 0.15);
  transition: background 0.3s ease;
}

.serviceTiles__label {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 40px;
  padding: 0 1rem;
  background: rgb(var(--c-neutral-lightest));
  color: rgb(var(--c-primary));
  font-size: var(--f-size-l-1);
  line-height: 40px;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease;
}

.page .content > [class*="frame-type-col"]:not(:nth-child(2n)) .serviceTiles__label,
.page.-main .content > [class*="frame-type-col"]:nth-child(2n) .serviceTiles__label {
  background: rgb(var(--c-neutral-lighter));
}

.page.-main .content > [class*="frame-type-col"]:not(:nth-child(2n)) .serviceTiles__label,
.page .content .frame-bg-grey .serviceTiles__label {
  background: rgb(var(--c-neutral-lightest));
}

@media (hover: hover) {
  .serviceTiles__link:hover .serviceTiles__image::after {
    background: rgba(var(--c-neutral-darkest), 0);
  }

  .page .serviceTiles__link:hover .serviceTiles__label {
    background: rgb(var(--c-primary));
    color: rgb(var(--c-neutral-lightest));
  }
}

.page .serviceTiles__link:focus-visible .serviceTiles__label {
  background: rgb(var(--c-primary));
  color: rgb(var(--c-neutral-lightest));
}

@media (min-width: 501px) {
  .serviceTiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .serviceTiles__item {
    height: 320px;
  }
}

@media (min-width: 801px) {
  .serviceTiles {
    grid-template-columns: repeat(3, 1fr);
  }

  .serviceTiles__item:nth-child(4n + 1),
  .serviceTiles__item:nth-child(4n + 4) {
    grid-column: span 2;
  }
}
