/* Created by Content Blocks */

.bildtext {
  margin-top: 30px;
  margin-bottom: 1.5rem;
}

@media screen and (max-width: 39.9375em) {
  .start-slider .bildtext {
    margin-top: 0;
  }
  .bildtext {
    margin-bottom: 0;
  }
}

.bildtext__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.bildtext__image {
  position: relative;
  flex: 0 0 100%;
  max-width: 100%;
}

.bildtext__image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Title, e.g. "Fußverkehr", overlapping the bottom-left corner of the photo.
   font-size uses clamp() so it scales with the viewport once the window is
   narrower than the page's max content width (1315px, see .wider), but
   never drops below 24px. 4.5627vw = 60px at 1315px viewport width. */
.bildtext__title {
  position: absolute;
  left: 20px;
  bottom: -20px;
  max-width: calc(100% - 40px);
  box-sizing: border-box;
  padding: 0.25em 0.6em;
  background: #049eab; /* $secondary-color */
  color: #fff;
  font-family: "Roboto Slab", "Times New Roman", Times, serif;
  font-weight: bold;
  font-size: clamp(24px, 4.5627vw, 60px);
  line-height: 1.2;
  box-shadow: 4px 4px 8px 0 rgba(0, 0, 0, 0.25);
}

.bildtext__text {
  flex: 0 0 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  padding: 1.5rem;
  background: #049eab; /* $secondary-color */
}

.bildtext__text--plain {
  background: #fff;
}

.bildtext__text-inner {
  width: 100%;
  font-size: 1rem;
  line-height: 1.4;
}

.bildtext__text-inner,
.bildtext__text-inner p,
.bildtext__text-inner li,
.bildtext__text-inner h1,
.bildtext__text-inner h2,
.bildtext__text-inner h3,
.bildtext__text-inner h4,
.bildtext__text-inner strong,
.bildtext__text-inner a {
  color: #fff !important;
}

.bildtext__text--plain .bildtext__text-inner,
.bildtext__text--plain .bildtext__text-inner p,
.bildtext__text--plain .bildtext__text-inner li,
.bildtext__text--plain .bildtext__text-inner h1,
.bildtext__text--plain .bildtext__text-inner h2,
.bildtext__text--plain .bildtext__text-inner h3,
.bildtext__text--plain .bildtext__text-inner h4,
.bildtext__text--plain .bildtext__text-inner strong,
.bildtext__text--plain .bildtext__text-inner a {
  color: #000 !important;
}

.bildtext__text-inner a,
.bildtext__text-inner a:hover,
.bildtext__text-inner a:focus {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

/* H3 scales with the viewport below the page's max content width (1315px):
   44px at 1315px, shrinking to a minimum of 30px. 3.346vw = 44px at 1315px. */
.bildtext__text-inner h1 {
  font-size: clamp(30px, 3.346vw, 44px);
}

.bildtext__text-inner > *:last-child {
  margin-bottom: 0;
}

.bildtext__text-inner ul {
  margin-left: 0;
}

.bildtext__text-inner ul li {
  position: relative;
  list-style-type: none;
  padding-left: 1.5625rem;
  hyphens: auto;
}

.bildtext__text-inner ul li::before {
  display: inline-block;
  position: absolute;
  left: 0;
  top: 0.3125rem;
  content: "\f00c";
  font: normal normal normal 14px FontAwesome;
  line-height: 1;
  color: #fff;
}

.bildtext__text--plain .bildtext__text-inner ul li::before {
  color: #049eab; /* $secondary-color */
}

@media screen and (max-width: 1024px) {
  .bildtext__text {
    padding-left: 16px;
    padding-right: 16px;
  }

  .bildtext__text-inner ul {
    line-height: 1.5rem;
  }
}

/* Side by side from "medium" upwards: photo 2/3, text 1/3.
   Frontend.js measures the rendered photo height and caps the text
   box to that height (inline style), so the colored field can never
   become taller than the photo. It also shrinks the text (down to
   16px) and, if that still doesn't fit, adds .bildtext--stacked as
   a fallback.
.bildtext__row {
  margin-right: -10px;
  margin-left: -10px;
}*/
@media screen and (min-width: 40em) {
  .bildtext__row {
    flex-wrap: nowrap;
  }
  .bildtext__image {
    flex: 0 0 66.6667%;
    max-width: 66.6667%;
  }

  .bildtext__text {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
}

/* Fallback once the text can no longer be shrunk to 16px and still fit
   next to the photo: move the colored text box below the photo, both
   spanning the full width. */
.bildtext--stacked .bildtext__row {
  flex-wrap: wrap;
}

.bildtext--stacked .bildtext__image {
  flex: 0 0 100%;
  max-width: 100%;
}

.bildtext--stacked .bildtext__text {
  flex: 0 0 100%;
  max-width: 100%;
  height: auto !important;
  overflow: visible;
}

.bildtext__link,
.bildtext__link:hover,
.bildtext__link:focus {
  display: block;
  color: inherit;
  text-decoration: none;
}
