.webcrema-projekte-query {
  --webcrema-projekte-gap: 24px;
  --webcrema-projekte-card-bg: #eef5fb;
  --webcrema-projekte-text: #15233b;
  --webcrema-projekte-accent: #f04b13;
}

.webcrema-projekt,
.block-editor-block-list__block[data-type="webcrema/projekt"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.is-layout-flex:not(.is-vertical) > .webcrema-projekt,
.is-layout-flex:not(.is-vertical)
  > .block-editor-block-list__block[data-type="webcrema/projekt"] {
  flex: 1 1 280px;
}

.webcrema-projekte-query__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin: 0 0 32px;
}

.webcrema-projekte-query__filter {
  appearance: none;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid #65728a;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  color: var(--webcrema-projekte-text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.webcrema-projekte-query__filter:hover,
.webcrema-projekte-query__filter:focus-visible {
  border-color: var(--webcrema-projekte-accent);
  color: var(--webcrema-projekte-accent);
}

.webcrema-projekte-query__filter:focus-visible {
  outline: 2px solid var(--webcrema-projekte-accent);
  outline-offset: 2px;
}

.webcrema-projekte-query__filter.is-active,
.webcrema-projekte-query__filter[aria-pressed="true"] {
  border-color: var(--webcrema-projekte-accent);
  background: var(--webcrema-projekte-accent);
  color: #fff;
}

.webcrema-projekte-query.is-category-filtered:is(
    .is-style-alternierend,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card.is-filter-position-narrow {
  grid-column: span 1;
}

.webcrema-projekte-query.is-category-filtered:is(
    .is-style-alternierend,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card.is-filter-position-wide {
  grid-column: span 2;
}

.webcrema-projekte-card[hidden] {
  display: none !important;
}

.webcrema-projekte-query__grid {
  display: grid;
  grid-template-columns: repeat(
    var(--webcrema-projekte-columns, 3),
    minmax(0, 1fr)
  );
  gap: var(--webcrema-projekte-gap);
  align-items: stretch;
}

.webcrema-projekte-query:is(
    .is-style-alternierend,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-query__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.webcrema-projekte-query:is(
    .is-style-alternierend,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card:nth-child(4n + 1),
.webcrema-projekte-query:is(
    .is-style-alternierend,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card:nth-child(4n + 4) {
  grid-column: span 1;
}

.webcrema-projekte-query:is(
    .is-style-alternierend,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card:nth-child(4n + 2),
.webcrema-projekte-query:is(
    .is-style-alternierend,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card:nth-child(4n + 3) {
  grid-column: span 2;
}

.webcrema-projekte-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px;
  border-radius: 8px;
  background: var(--webcrema-projekte-card-bg);
  color: var(--webcrema-projekte-text);
  gap: var(--webcrema-projekte-gap);
}

.webcrema-projekte-card__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.webcrema-projekte-card__term {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--webcrema-projekte-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.webcrema-projekte-card__image-link {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 16 / 10;
  background: #dce6ee;
}

.webcrema-projekte-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.webcrema-projekte-card__body {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 12px;
}

.webcrema-projekte-card__title {
  margin: 0;
}

.webcrema-projekte-card__title a {
  color: var(--webcrema-projekte-text);
  font-size: clamp(1.5rem, 1.15rem + 0.8vw, 1.875rem);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.webcrema-projekte-card__title a:hover,
.webcrema-projekte-card__title a:focus {
  color: var(--webcrema-projekte-accent);
}

.webcrema-projekte-card__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin: 0;
}

.webcrema-projekte-card__excerpt {
  color: var(--webcrema-projekte-text);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
}

.webcrema-projekte-card__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--webcrema-projekte-accent);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.webcrema-projekte-card__link span {
  display: inline-flex;
  align-items: center;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-2px);
}

.webcrema-projekte-card__link:hover,
.webcrema-projekte-card__link:focus {
  border-bottom-color: currentColor;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: var(--webcrema-projekte-card-min-height, 280px);
  padding: 0;
  border-radius: 12px;
  background: #15233b;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(0deg, #16223a -11.43%, rgba(22, 34, 58, 0) 100%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card:hover::before,
.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card:focus-within::before {
  opacity: 1;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card::after {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 45%;
  background: linear-gradient(
    to top,
    rgb(10 20 38 / 82%) 0%,
    rgb(10 20 38 / 42%) 55%,
    transparent 100%
  );
  content: "";
  pointer-events: none;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__image-link {
  position: absolute;
  inset: 0;
  border-radius: 0;
  aspect-ratio: auto;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__terms {
  position: absolute;
  z-index: 3;
  top: 24px;
  right: 24px;
  left: 24px;
  justify-content: flex-end;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__body {
  position: absolute;
  z-index: 2;
  right: 32px;
  bottom: 28px;
  left: 32px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__title {
  min-width: 0;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__title
  a {
  color: #fff;
  font-weight: 700;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__title
  a:hover,
.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__title
  a:focus {
  color: #fff;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__footer {
  display: block;
  flex: 0 0 auto;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__excerpt {
  display: none;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__link {
  display: block;
  overflow: hidden;
  width: 32px;
  height: 32px;
  border: 0;
  color: #fff;
  font-size: 0;
  white-space: nowrap;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__link
  span {
  display: none;
}

.webcrema-projekte-query:is(
    .is-style-bild-overlay,
    .is-style-bild-overlay-alternierend
  )
  .webcrema-projekte-card__link::after {
  display: block;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  content: "→";
}

.webcrema-projekte-query__empty {
  margin: 0;
  color: var(--webcrema-projekte-text);
}

@media (max-width: 900px) {
  .webcrema-projekte-query__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .webcrema-projekte-query__grid {
    grid-template-columns: 1fr;
  }

  .webcrema-projekte-query:is(
      .is-style-alternierend,
      .is-style-bild-overlay-alternierend
    )
    .webcrema-projekte-query__grid {
    grid-template-columns: 1fr;
  }

  .webcrema-projekte-query:is(
      .is-style-alternierend,
      .is-style-bild-overlay-alternierend
    )
    .webcrema-projekte-card,
  .webcrema-projekte-query.is-category-filtered:is(
      .is-style-alternierend,
      .is-style-bild-overlay-alternierend
    )
    .webcrema-projekte-card.is-filter-position-narrow,
  .webcrema-projekte-query.is-category-filtered:is(
      .is-style-alternierend,
      .is-style-bild-overlay-alternierend
    )
    .webcrema-projekte-card.is-filter-position-wide {
    grid-column: auto;
  }

  .webcrema-projekte-query:is(
      .is-style-bild-overlay,
      .is-style-bild-overlay-alternierend
    )
    .webcrema-projekte-card__terms {
    top: 16px;
    right: 16px;
    left: 16px;
  }

  .webcrema-projekte-query:is(
      .is-style-bild-overlay,
      .is-style-bild-overlay-alternierend
    )
    .webcrema-projekte-card__body {
    right: 20px;
    bottom: 20px;
    left: 20px;
  }

  .webcrema-projekte-card__footer {
    grid-template-columns: 1fr;
  }

  .webcrema-projekte-card__link {
    justify-self: start;
  }
}
