/*
 * Home page: running projects and completed projects with a status band
 * (plugin tnteberhardreferences_referenceslist, option "Darstellung: Status-Binde").
 * Builds on .project-card-wrapper / .project-card from style.css.
 */
.status-band-wrapper {
  --sb-yellow: var(--eb-color-ffd400, #FFD400);
  --sb-petrol: var(--eb-color-007791, #007791);
  --sb-dark: var(--eb-color-1a1a1a, #1A1A1A);
  --sb-font: var(--eb-font-family-source-sans-pro, sans-serif);
}

/* Head: title left, filter right */
.status-band-wrapper .status-band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  margin-bottom: 50px;
}
.status-band-wrapper .status-band-head h2 {
  margin-bottom: 0;
}

/* Filter */
.status-band-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 40px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--eb-color-C6D6D9, #C6D6D9) inset;
}
.status-band-filter button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 30px;
  background: transparent;
  color: var(--sb-dark);
  font: 600 17px/24px var(--sb-font);
  padding: 8px 18px;
  cursor: pointer;
  transition: 0.2s ease-out all;
}
.status-band-filter button:hover {
  background: var(--eb-color-F6F8F9, #F6F8F9);
}
.status-band-filter button[aria-pressed="true"] {
  background: var(--sb-petrol);
  color: #fff;
}
.status-band-filter button:focus-visible {
  outline: 2px solid var(--sb-petrol);
  outline-offset: 2px;
}
.status-band-filter__key {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.status-band-filter__key--running {
  background: var(--sb-yellow);
  box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.15);
}
.status-band-filter__key--completed {
  background: var(--sb-petrol);
  box-shadow: 0 0 0 2px #fff;
}

/* Grid items hidden by the filter */
.status-band-wrapper [data-status][hidden] {
  display: none;
}

/* Card */
.status-band-wrapper .status-card {
  background: var(--sb-dark);
  container-type: inline-size;
}
.status-band-wrapper .status-card__link {
  display: block;
  color: #fff;
  text-decoration: none;
}
.status-band-wrapper .project-card img {
  height: auto;
  aspect-ratio: 4 / 3;
}
.status-band-wrapper .project-card::after {
  pointer-events: none;
}

/* Status band: square on the left (flush with the image), rounded end on the right */
.status-band {
  position: absolute;
  top: 22px;
  left: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 20px);
  padding: 7px 22px 7px 18px;
  border-radius: 0 999px 999px 0;
  font: 700 15px/20px var(--sb-font);
  white-space: nowrap;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}
.status-band small {
  font: 400 14px/20px var(--sb-font);
  opacity: 0.85;
}
/* The date sits in the band on wide cards and moves to the meta line on narrow cards,
   so the band label always stays on one line */
.status-band-wrapper .status-card__date {
  display: none;
}
@container (max-width: 330px) {
  .status-band small {
    display: none;
  }
  .status-band-wrapper .status-card__date {
    display: inline;
  }
}
.status-band--running {
  background: var(--sb-yellow);
  color: var(--sb-dark);
}
.status-band--completed {
  background: var(--sb-petrol);
  color: #fff;
}
.status-band__live {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sb-dark);
  flex: 0 0 auto;
}
.status-band__live::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--sb-dark);
  opacity: 0;
  animation: status-band-pulse 1.8s ease-out infinite;
}
@keyframes status-band-pulse {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}
.status-band__check {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

/* Title and meta at the bottom; meta appears on hover (always visible on touch sizes) */
.status-band-wrapper .status-card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0 28px 24px;
}
.status-band-wrapper .status-card__title {
  margin: 0;
  color: #fff;
}
.status-band-wrapper .status-card__meta {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  font: 400 15px/22px var(--sb-font);
  color: rgba(255, 255, 255, 0.85);
  transition: 0.3s ease-out all;
}
.status-band-wrapper .status-card:hover .status-card__meta,
.status-band-wrapper .status-card:focus-within .status-card__meta {
  max-height: 50px;
  opacity: 1;
  margin-top: 6px;
}
.status-band-wrapper .status-card:focus-within img {
  transform: scale(1.05);
}

@media screen and (max-width: 1499px) {
  .status-band-wrapper .status-band-head {
    margin-bottom: 35px;
  }
  .status-band-wrapper .status-card__body {
    padding: 0 22px 20px;
  }
}

@media screen and (max-width: 991px) {
  .status-band-wrapper .status-band-head {
    margin-bottom: 16px;
  }
  .status-band-filter button {
    font-size: 15px;
    padding: 6px 14px;
  }
  .status-band {
    top: 14px;
    font-size: 13px;
    line-height: 18px;
    padding: 5px 16px 5px 12px;
  }
  .status-band small {
    font-size: 12px;
    line-height: 18px;
  }
  .status-band-wrapper .status-card__body {
    padding: 0 16px 14px;
  }
  .status-band-wrapper .status-card__meta {
    max-height: 50px;
    opacity: 1;
    margin-top: 4px;
    font-size: 13px;
    line-height: 19px;
  }
}

@media screen and (max-width: 575px) {
  .status-band-filter {
    width: 100%;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 4px;
  }
  .status-band-filter button {
    flex: 1 1 auto;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px;
    font-size: 14px;
    white-space: nowrap;
  }
  .status-band-filter__key {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-band-wrapper *,
  .status-band-wrapper *::after {
    transition: none !important;
    animation: none !important;
  }
}
