/* Stilovi pojedinačnih strana (bili su inline u PHP stranama) */

/* ===== referenzen ===== */
/* ── Referenzen (Seitenspezifisch, nutzt das bestehende Design-System) ── */
.ref-sec { padding: 80px 0 100px; background: var(--white) }
.ref-head { margin-bottom: 2.4rem }

.ref-tabs {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-bottom: 2.4rem;
}
.ref-tab {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: 'Instrument Sans', sans-serif;
  font-size: .88rem; font-weight: 600; color: var(--ink-mid);
  background: var(--white);
  border: 1.5px solid var(--grey-2); border-radius: 999px;
  padding: .65rem 1.25rem; cursor: pointer;
  transition: all .22s ease;
}
.ref-tab:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-pale) }
.ref-tab.active {
  background: var(--navy); border-color: var(--navy); color: var(--white);
  box-shadow: 0 4px 14px rgba(13,31,60,.25);
}
.ref-tab .ref-count {
  font-size: .7rem; font-weight: 700; line-height: 1;
  padding: .28rem .5rem; border-radius: 999px;
  background: var(--grey-1); color: var(--ink-soft);
  transition: all .22s ease;
}
.ref-tab.active .ref-count { background: rgba(255,255,255,.16); color: var(--blue-lt) }

.ref-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.ref-item {
  position: relative; display: block; width: 100%;
  aspect-ratio: 4 / 3; overflow: hidden;
  border: none; padding: 0; background: var(--grey-1);
  border-radius: var(--r-lg); box-shadow: var(--s1);
  cursor: zoom-in;
  transition: box-shadow .3s ease, transform .3s ease;
  animation: refIn .45s cubic-bezier(.16,1,.3,1) both;
}
.ref-item[hidden] { display: none }
.ref-item img { transition: transform .6s cubic-bezier(.16,1,.3,1) }
.ref-item::after {
  content: '＋'; position: absolute; right: 14px; bottom: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); color: var(--navy);
  font-size: 1.2rem; font-weight: 700; line-height: 1;
  opacity: 0; transform: translateY(8px);
  transition: all .3s ease;
}
.ref-item::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(13,31,60,.55) 100%);
  opacity: 0; transition: opacity .3s ease;
}
.ref-item:hover { box-shadow: var(--s3); transform: translateY(-3px) }
.ref-item:hover img { transform: scale(1.06) }
.ref-item:hover::after { opacity: 1; transform: none; z-index: 2 }
.ref-item:hover::before { opacity: 1 }
.ref-item:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px }

.ref-tag {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  font-size: .72rem; font-weight: 600; letter-spacing: .4px; color: var(--white);
  background: rgba(13,31,60,.72); backdrop-filter: blur(4px);
  padding: .3rem .7rem; border-radius: 999px;
  opacity: 0; transform: translateY(8px); transition: all .3s ease;
}
.ref-item:hover .ref-tag { opacity: 1; transform: none }

.ref-empty {
  text-align: center; padding: 4rem 1rem; color: var(--ink-soft);
  border: 1.5px dashed var(--grey-2); border-radius: var(--r-lg);
}

@keyframes refIn { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

/* Lightbox */
.ref-lb {
  position: fixed; inset: 0; z-index: 99999;
  display: none; align-items: center; justify-content: center;
  background: rgba(8,18,36,.94);
  backdrop-filter: blur(6px);
}
.ref-lb.open { display: flex }
.ref-lb-img {
  max-width: min(92vw, 1400px); max-height: 82vh;
  width: auto; height: auto; object-fit: contain;
  border-radius: var(--r); box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.ref-lb-cap {
  position: absolute; left: 0; right: 0; bottom: 22px;
  text-align: center; color: rgba(255,255,255,.75);
  font-size: .85rem; letter-spacing: .3px;
}
.ref-lb-cap strong { color: var(--white); font-weight: 600 }
.ref-lb-btn {
  position: absolute; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: var(--white);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 1.5rem; line-height: 1;
  transition: all .2s ease;
}
.ref-lb-btn:hover { background: var(--blue); border-color: var(--blue) }
.ref-lb-prev  { left: 22px;  top: 50%; transform: translateY(-50%) }
.ref-lb-next  { right: 22px; top: 50%; transform: translateY(-50%) }
.ref-lb-close { right: 22px; top: 22px }

@media (max-width: 768px) {
  .ref-sec { padding: 56px 0 72px }
  .ref-tabs {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin-right: -5vw; padding-right: 5vw; padding-bottom: .4rem;
    scrollbar-width: none;
  }
  .ref-tabs::-webkit-scrollbar { display: none }
  .ref-tab { flex-shrink: 0 }
  .ref-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem }
  .ref-lb-prev { left: 8px } .ref-lb-next { right: 8px }
  .ref-lb-btn { width: 42px; height: 42px }
}
@media (max-width: 480px) {
  .ref-grid { grid-template-columns: 1fr }
}
@media (prefers-reduced-motion: reduce) {
  .ref-item { animation: none }
}
