/* Referenzen – Übersicht: Figma „⬛ Portfolio V1“ (3823:45952)
                Detail:    Figma „🟫 Portfolio Single“ (3823:46104)
   Basis-Komponenten aus main.css: .project-feature, .card-arrow, .testimonial, .section-head, .btn */

/* ---------- Gemeinsam ---------- */

/* Kundenname als Text, wenn kein Logo vorliegt */
.ref-kunde { display: inline-block; font-size: var(--fs-display-4); line-height: var(--lh-display-4); font-weight: 700; color: var(--ink); }
/* Logo auf dunklem Grund weiß darstellen */
.ref-logo--hell { filter: brightness(0) invert(1); }
.ref-kunde.ref-logo--hell { filter: none; color: var(--white); }
/* Quadratische und hochformatige Logos doppelt so hoch wie Schriftzüge (siehe partials/referenz-logo.njk) */
.refd-hero__logo.ref-logo--quadrat { height: 76px; }
.project-feature__logo.ref-logo--quadrat { height: 84px; }

/* Abschluss: Gesprächsangebot */
.ref-cta { padding-block: 160px; }
.ref-cta__panel {
  background: var(--grey-50); padding: 88px 40px;
  display: grid; justify-items: center; gap: 20px; text-align: center;
}
.ref-cta__panel h2 { max-width: 760px; }
.ref-cta__text { max-width: 600px; }
.ref-cta__panel .btn-row { margin-top: 28px; }

/* ---------- Übersicht (Portfolio Section 6848:16897) ---------- */

.ref-hero { padding: 100px 0 90px; }
.ref-hero__inner { display: grid; justify-items: center; gap: 14px; text-align: center; }
.ref-hero__lead { max-width: 597px; }

/* Filter: Ink-Buttons, aktiv gefüllt, Cyan nur im Hover */
.ref-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.ref-filter[hidden] { display: none; }
.ref-filter__btn {
  min-height: 54px; padding: 16px 24px;
  font-size: 16px; line-height: 18px; font-weight: 700;
  color: var(--ink); background: transparent; border: 2px solid var(--ink);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.ref-filter__btn[aria-pressed="true"] { background: var(--ink); color: var(--grey-50); }
.ref-filter__btn:hover { background: var(--cyan); border-color: var(--cyan); color: var(--white); }

/* Kartenliste: volle Breite 1440, Bild 720×700 und Textfläche im Wechsel */
.ref-list { width: min(1440px, 100%); margin-inline: auto; }
.ref-feature[hidden] { display: none; }
.ref-feature .project-feature__media { background: var(--ink); }
.ref-feature .project-feature__media img { aspect-ratio: 720 / 700; }
.ref-feature .ref-kunde { align-self: start; font-size: 32px; line-height: 42px; }
.ref-feature .project-feature__card:hover .ref-kunde { color: var(--ink); }

@media (max-width: 991px) {
  .ref-hero { padding: 72px 0 64px; }
}
@media (max-width: 767px) {
  .ref-hero { padding: 56px 0 48px; }
  .ref-filter { margin-top: 24px; gap: 8px; }
  .ref-filter__btn { min-height: 46px; padding: 12px 16px; font-size: 15px; }
  .ref-cta { padding-block: 80px; }
  .ref-cta__panel { padding: 48px 20px; justify-items: stretch; }
  .ref-cta__panel .btn-row { margin-top: 12px; justify-content: center; }
}

/* ---------- Detailseite ---------- */

/* Hero (6848:22539): Bild 720×700 bündig links, Textspalte 533, Abstand 78 */
.refd-hero__inner {
  width: min(1440px, 100%); margin-inline: auto;
  display: grid; grid-template-columns: 50% minmax(0, 533px); column-gap: clamp(40px, 5.42vw, 78px); align-items: center;
}
.refd-hero__media { background: var(--ink); aspect-ratio: 720 / 700; overflow: hidden; }
.refd-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.refd-hero__text { display: grid; gap: 48px; justify-items: start; padding: 48px var(--gutter) 48px 0; }
.refd-hero__content { display: grid; gap: 21px; justify-items: start; }
.refd-hero__logo { height: 38px; width: auto; max-width: 240px; object-fit: contain; object-position: left center; }

/* Eckdaten (3911:46511) */
.refd-daten { background: var(--grey-50); padding: 72px var(--gutter); }
.refd-daten__liste {
  max-width: 1256px; margin: 0 auto;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min-content, 1fr); gap: 32px 48px;
}
.refd-daten__eintrag { display: grid; gap: 15px; align-content: start; }
.refd-daten dt { font-size: 16px; line-height: 18px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-600); }
.refd-daten dd { margin: 0; font-size: var(--fs-display-4); line-height: var(--lh-display-4); font-weight: 700; }

/* Rich Text (6850:8225): Überschrift links, Text 650 rechts */
.refd-text { padding-block: 180px; }
.refd-text__inner { display: grid; gap: 90px; }
.refd-block { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; }
.refd-block__title { flex: none; }
.refd-block__content { width: 650px; max-width: 100%; display: grid; gap: 24px; }
.refd-check { display: grid; gap: 24px; padding-left: 12px; }
.refd-check li { display: flex; align-items: flex-start; gap: 14px; font-size: 20px; line-height: 26px; }
.refd-check__icon { flex: none; width: 18px; height: 18px; margin-top: 4px; color: var(--ink); }
.refd-umsetzung { display: grid; gap: 48px; }
.refd-umsetzung > .refd-bild { justify-self: end; }
.refd-bild { width: 702px; max-width: 100%; height: auto; aspect-ratio: 702 / 582; object-fit: cover; background: var(--ink); }

/* Ergebnis (Projects Section 6852:8228): Bild 702 links, Text 459 rechts */
.refd-ergebnis { padding-block: 90px; }
.refd-ergebnis__inner { width: min(1204px, 100% - 2 * var(--gutter)); display: flex; justify-content: space-between; align-items: center; gap: 48px; }
.refd-ergebnis__inner .refd-bild { flex: 0 1 702px; min-width: 0; }
.refd-ergebnis__text { flex: 0 1 459px; min-width: 0; display: grid; gap: 12px; }
.refd-ergebnis__text p + p { margin-top: 18px; }
.refd-ergebnis__inner:not(:has(.refd-bild)) { justify-content: flex-end; }

/* Kennzahlen als große Zahlen – eigene Zeile unter Bild und Text */
.refd-zahlen {
  width: min(1204px, 100% - 2 * var(--gutter)); margin: 72px auto 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px 28px;
}
.refd-zahlen__eintrag { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding-top: 18px; border-top: 1px solid var(--grey-100); }
.refd-zahlen__wert { margin: 0; font-size: var(--fs-display-2); line-height: var(--lh-display-2); font-weight: 700; white-space: nowrap; }
.refd-zahlen__label { font-size: 16px; line-height: 24px; color: var(--grey-600); max-width: 240px; }

/* Kundenstimme (6852:8372) */
.refd-stimme { padding-block: 180px; }
.refd-stimme__inner { width: min(1012px, 100% - 2 * var(--gutter)); display: grid; gap: 48px; }

/* Weitere Referenzen */
.refd-weitere { padding-top: 160px; }
.ref-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.ref-card { display: flex; flex-direction: column; gap: 24px; }
.ref-card__image { aspect-ratio: 596 / 411; overflow: hidden; background: var(--ink); }
.ref-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ref-card:hover .ref-card__image img { transform: scale(1.03); }
.ref-card__content { display: grid; gap: 12px; justify-items: start; }
.ref-card__kunde { font-size: 16px; line-height: 18px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-600); }
.ref-card__title { font-size: 24px; line-height: 34px; font-weight: 700; }
.ref-card__title a { transition: color .2s ease; }
.ref-card__title a:hover { color: var(--cyan); }

@media (max-width: 1279px) {
  .refd-text { padding: 128px 0 72px; }
  .refd-ergebnis { padding-block: 72px; }
  .refd-stimme { padding-block: 128px; }
  .refd-weitere { padding-top: 128px; }
  .refd-daten__liste { column-gap: 32px; }
}
@media (max-width: 991px) {
  .refd-hero__inner { grid-template-columns: 1fr; }
  .refd-hero__media { aspect-ratio: auto; max-height: 560px; }
  .refd-hero__media img { aspect-ratio: 720 / 700; max-height: 560px; }
  .refd-hero__text { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; padding: 56px 0 72px; gap: 36px; }
  .refd-daten { padding-block: 56px; }
  .refd-daten__liste { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .refd-text { padding: 104px 0 56px; }
  .refd-text__inner { gap: 72px; }
  .refd-block { flex-direction: column; gap: 24px; }
  .refd-block__content { width: 100%; }
  .refd-block__title { flex: initial; }
  .refd-umsetzung > .refd-bild { justify-self: stretch; width: 100%; }
  .refd-ergebnis__inner { flex-direction: column; align-items: stretch; }
  .refd-ergebnis__inner .refd-bild { flex: none; width: 100%; }
  .refd-ergebnis__text { flex: none; }
  .refd-stimme { padding-block: 104px; }
  .refd-weitere { padding-top: 104px; }
  .ref-cards { grid-template-columns: 1fr 1fr; }
  .ref-cards > :nth-child(3) { display: none; }
}
@media (max-width: 767px) {
  .refd-hero__media { max-height: none; }
  .refd-hero__media img { max-height: none; }
  .refd-hero__text { padding: 40px 0 56px; gap: 32px; }
  .refd-hero__logo { height: 32px; }
  .refd-hero__logo.ref-logo--quadrat { height: 64px; }
  .refd-daten { padding-block: 40px; }
  .refd-daten__liste { gap: 24px 20px; }
  .refd-daten dt { font-size: 14px; line-height: 16px; }
  .refd-daten dd { font-size: 19px; line-height: 28px; }
  .refd-text { padding: 80px 0 40px; }
  .refd-text__inner { gap: 56px; }
  .refd-umsetzung { gap: 32px; }
  .refd-check { padding-left: 0; gap: 16px; }
  .refd-check li { font-size: 18px; line-height: 26px; }
  .refd-ergebnis { padding-block: 40px; }
  .refd-ergebnis__inner { gap: 32px; }
  .refd-zahlen { margin-top: 48px; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .refd-stimme { padding-block: 80px; }
  .refd-stimme__inner { gap: 32px; }
  .refd-weitere { padding-top: 80px; }
  .ref-cards { grid-template-columns: 1fr; gap: 48px; }
  .ref-cards > :nth-child(3) { display: flex; }
}
@media (max-width: 479px) {
  .refd-daten__liste { grid-template-columns: 1fr; }
}

/* Kundenname im Detail-Hero in Logo-Größe */
.ref-kunde.refd-hero__logo { height: auto; max-width: none; font-size: 32px; line-height: 38px; }
@media (max-width: 767px) { .ref-kunde.refd-hero__logo, .ref-feature .ref-kunde { font-size: 26px; line-height: 34px; } }
