
.references {
  margin-bottom: 4rem;
}
.references-overview{
  margin-top: 4rem;
}

.reference-filter {
  margin-bottom: 2.5rem;
}

.reference-filter__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.ref-pill {
  border: 1px solid #ddd;
  border-radius: 9999px;
  color: #827d82;
  font-family: Arial Regular, sans-serif;
  padding: 0.4rem 1.3rem;
  background: #fff;
  font-size: 18px;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 0 0 0 rgba(0,0,0,0);
  outline-color: #e3010f;
}

.ref-pill:hover {
  border-color: #e3010f;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.15);
}
.ref-pill:focus-visible {
  border-color: #e3010f;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.15);
}

.ref-pill.is-active {
  background: #e3010f;
  border-color: #e3010f;
  color: #fff;
}

.reference-filter__search {
  margin-bottom: 2.5rem;
}

.reference-filter__search-input {
  width: 100%;
  max-width: 480px;
  padding: 0.65rem 1.2rem;
  color: #827d82;
  font-family: Arial Regular, sans-serif;
  border: 1px solid #ddd;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.reference-filter__search-input:focus {
  border-color: #e3010f;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.15);
}

.reference-filter__ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  color: #827d82;
  font-family: Arial Regular, sans-serif;
}

.reference-filter__range {
  min-width: 220px;
}.reference-filter__range > label{
  font-size: 18px;
}

.reference-filter__range label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.reference-filter__range-inputs {
  display: flex;
  gap: 0.5rem;
}

.reference-filter__range-inputs input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem;
}

@media (max-width: 850px) {
  .reference-grid {
    grid-template-columns: 1fr;
  }
}

.reference-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.reference-card:focus-within{
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.reference-card__image-wrapper {
  display: block;
  height: 100%;
}
.reference-card__image{
    position: relative;
    z-index: 1;
}
.reference-card__image img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.reference-card__title-band {
  background: #ffffff;
  color: #e3010f;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 0.7rem 1rem;
  margin-top: -18px;
  margin-left: 1.2rem;
  margin-right: 1.2rem;
  box-shadow: 0 8px 15px rgba(0,0,0,0.20);
  text-align: center;
  position: relative;
  z-index: 2;
    overflow: hidden;
}

.reference-card__more {
  display: block;
  padding: 0.9rem 1.2rem 1.2rem;
  font-size: 1.1rem;
  color: #777;
  text-decoration: none;
    margin-top: auto;
}

.reference-card__more:hover {
  text-decoration: underline;
}
.reference-filter__toggle {
  border: none;
  background: none;
  color: #666;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  color: #827d82;
  font-family: Arial Regular, sans-serif;
}

.reference-filter__toggle::after {
  content: "▾";
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

.reference-filter__toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.reference-filter__advanced {
  margin-top: 0.5rem;
}
.range-filter__values {
  color: #827d82;
  font-family: Arial Regular, sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

/* Enhanced Dual Range (custom thumbs, track non-clickable) */
.range-filter__slider {
  position: relative;
  height: 24px;
}

/* Hide native sliders from pointer interaction (still in DOM for form submit) */
.range-filter__slider input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  opacity: 0;            /* unsichtbar */
  pointer-events: none;  /* Track kann nicht mehr geklickt werden */
}

/* Track */
.range-filter__slider .dr-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  background: #cfcfcf;
}

/* Active range between thumbs */
.range-filter__slider .dr-range {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  background: #e3010f;
}

/* Thumbs */
.range-filter__slider .dr-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e3010f;
  cursor: pointer;
  touch-action: none; /* wichtig für PointerEvents auf Mobile */
}

/* Optional: besseres Feedback */
.range-filter__slider .dr-thumb.is-active {
  outline: 2px solid rgba(227, 1, 15, 0.35);
  outline-offset: 2px;
}

/* Thumb: rot, ohne Rand */
.range-filter__slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e3010f;
  border: none;
  cursor: pointer;
  margin-top: calc((6px - 18px) / 2);
  box-shadow: 0 0 0 10px rgba(0,0,0,0);
}
.range-filter__slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e3010f;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 0 10px rgba(0,0,0,0);
}

/* Nur der MIN-Slider malt den Track (per JS als Gradient über CSS-Variable) */
.range-filter__slider input[type="range"][name$="Min"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--track-bg, #cfcfcf);
}
.range-filter__slider input[type="range"][name$="Min"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--track-bg, #cfcfcf);
}

/* MAX-Slider-Track unsichtbar (nur Thumb) */
.range-filter__slider input[type="range"][name$="Max"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: transparent;
}
.range-filter__slider input[type="range"][name$="Max"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: transparent;
}




.reference-card__meta {
  padding: 0.5rem 1.2rem 0.8rem;
  font-size: 18px;
  color: #827d82;
}

.reference-card__meta-row + .reference-card__meta-row {
  margin-top: 0.2rem;
}

.reference-card__meta-label {
  font-weight: 600;
  margin-right: 0.3rem;
}

.reference-card__meta-value {
  white-space: nowrap;
}

.reference-filter__submit-wraper{
  margin-top: 12px;
}
.reference-filter__submit{
  background-color: #e3010f;
  color: #fff;
  border: 0;
  padding: 12px;
  font-family: Arial Regular, sans-serif;
  font-size: 18px;
}
.reference-filter__submit:hover{
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.references-pagination{
  text-align: center;
  font-family: Arial Regular, sans-serif;
  color: #827d82;
  margin-top: 16px;
  font-size: 23px;
}

.references-row{
  display:flex;
  flex-wrap: wrap;
}

.references-row>*{
  box-sizing: border-box;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-inline: calc(30px * .5);
  margin-top: 30px;
}

.references-col-3{
  flex: 0 0 auto;
  width: 25%;
}

.references-col{
  flex: 1 0 0%;
}

.references_mb{
  margin-bottom: 50px;
}

.reference-detail p{
  margin-bottom: 0 !important;
}

.reference-detail__back-wrap{
  margin-top: 40px;
  text-align: center;
}

.reference-detail__back{
  display: inline-block;
  background-color: #e3010f;
  color: #fff;
  border: 0;
  padding: 12px 18px;
  font-family: Arial Regular, sans-serif;
  font-size: 18px;
  text-decoration: none;
}

.reference-detail__back:hover{
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.references-teaser-image{
  margin: 0;
  padding: 0;
}

@media(max-width:1070px){
  .references-pagination{
    font-size: 20px;
  }
}
@media(max-width:850px){
  .references-pagination{
    font-size: 18px;
  }
}

@media ( max-width : 590px ){
  .references-md-col{
    flex: 1 0 0%;
  }
  .references-md-col-12{
  flex: 0 0 auto;
  width: 100%;
  }
  .references-pagination{
    font-size: 15px;
  }
}
