/* ==========================================================================
   Über uns (vorlagen/ueber-uns.php): Überschrift, Fotoreihe aus den Jahren,
   zwei Textspalten, Berlin mit Foto, Kundenfotos, Abschluss.
   Variante 7 aus entwurf/neubau/ueber-uns-sandbox.html. Kundenfotos-Kacheln
   und Großansicht stehen in seiten.css, Knöpfe („sp-knoepfe“) in wp.css.
   ========================================================================== */
/* --rand: Abstand zum Fensterrand, wie bei den Abschnitten der Startseite (höchstens 1280 px breit).
   Prozent statt vw, damit der Scrollbalken nicht mitzählt. */
.uj { --rand: max(24px, var(--safe-l), var(--safe-r), calc((100% - 1280px) / 2 + 24px)); }
.uj h2 { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: clamp(23px, 2.4vw, 30px); line-height: 1.16; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.uj p { font-size: 17.5px; line-height: 1.62; color: #3a3731; }
.uj .uj-link a { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.uj .uj-link a:hover { text-decoration-color: var(--ink); }

/* Kopf */
.uj-kopf { padding: 72px var(--rand) 0; text-align: center; }
.uj .uj-kopf h1 { font-size: clamp(34px, 4.8vw, 56px); line-height: 1.06; letter-spacing: -0.015em; text-wrap: balance; }
.uj .uj-kopf p { font-size: 19px; line-height: 1.55; max-width: 60ch; margin: 16px auto 0; text-wrap: pretty; }

/* Fotoreihe */
.uj-jahre { position: relative; padding-top: 56px; }
.uj .uj-jahre > h2 { padding: 0 calc(var(--rand) + 124px) 0 var(--rand); min-height: 46px; display: flex; align-items: center; margin-bottom: 18px; }
.uj-pfeile { position: absolute; top: 56px; right: var(--rand); display: flex; gap: 8px; }
.uj-pfeile button { width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 1.5px solid var(--ink); background: none; color: var(--ink); display: grid; place-items: center; transition: background-color 0.2s, color 0.2s, opacity 0.2s; }
.uj-pfeile button:hover:not(:disabled) { background: var(--ink); color: #fff; }
.uj-pfeile button:disabled { opacity: 0.28; cursor: default; }
.uj-pfeile button:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
.uj-pfeile svg { width: 20px; height: 20px; }
.uj-band { position: relative; display: flex; gap: 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; padding: 6px var(--rand); margin: -6px 0; scroll-padding: 0 var(--rand); }
.uj-band::-webkit-scrollbar { display: none; }
.uj-band:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.uj-karte { flex: none; width: 340px; margin: 0; scroll-snap-align: start; color: inherit; text-decoration: none; }
.uj-karte .uj-rahmen { display: block; height: 400px; border-radius: 14px; overflow: hidden; background: var(--sand); }
.uj-karte .uj-rahmen img { width: 100%; height: 100%; max-width: none; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.uj-karte figcaption { margin: 0; text-align: left; font-size: inherit; color: inherit; }
.uj-karte .uj-jahr { display: block; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 26px; letter-spacing: -0.015em; line-height: 1.1; margin-top: 14px; color: var(--ink); }
.uj-karte .uj-zeile { display: block; font-size: 15.5px; line-height: 1.45; margin-top: 4px; color: var(--ink-soft); }
/* Letzte Karte: die Kufe, die es noch nicht gibt */
.uj-neu { cursor: pointer; border-radius: 14px; }
.uj-neu .uj-rahmen { display: grid; place-items: center; transition: background-color 0.25s; }
.uj-neu .uj-rahmen svg { width: 62%; height: auto; transition: transform 0.4s; }
.uj-neu .uj-zeile { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.uj-neu:hover .uj-rahmen { background: #e9e2d5; }
.uj-neu:hover .uj-rahmen svg { transform: scale(1.03); }
.uj-neu:hover .uj-zeile { text-decoration-color: var(--ink); }
.uj-neu:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 4px; }
/* Mit der Maus ziehen (jahresfotos.js) */
.uj-band.ziehbar { cursor: grab; }
.uj-band.zieht { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.uj-band.zieht .uj-neu { pointer-events: none; }
.uj-striche { display: none; }

/* Zwei Textspalten */
.uj-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 80px var(--rand) 0; }
/* Beide Überschriften sollen in eine Zeile passen, dann beginnen die Texte auf gleicher Höhe. */
.uj .uj-kap h2 { font-size: clamp(22px, 2.05vw, 27px); }
.uj .uj-kap p { margin-top: 12px; max-width: 60ch; }
.uj .uj-kap p.uj-link { margin-top: 16px; }

/* Berlin: sandfarbene Box mit Foto */
.uj-berlin { display: grid; grid-template-columns: minmax(0, 1fr) 380px; margin: 80px var(--rand) 0; background: var(--sand); border-radius: var(--radius-l); overflow: hidden; }
.uj-berlin .uj-tx { padding: clamp(28px, 4.5vw, 60px); align-self: center; }
.uj .uj-berlin p { margin-top: 14px; max-width: 52ch; }
.uj .uj-berlin h2 { font-size: clamp(26px, 2.8vw, 36px); }
.uj-berlin figure.uj-bild { position: relative; min-height: 380px; margin: 0; }
.uj-berlin .uj-bild img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 30%; }

/* Kundenfotos */
.uj-kf { padding: 80px var(--rand) 0; }
.uj-kz { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 24px; margin-bottom: 20px; }
.uj .uj-kz p { font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.uj .uj-kz h2 + p { margin-top: 4px; }

/* Abschluss */
.uj-ende { margin-top: 88px; background: var(--sand); text-align: center; padding: 68px var(--rand) 72px; }
.uj .uj-ende p { max-width: 54ch; margin: 12px auto 0; color: var(--ink-soft); text-wrap: balance; }
.uj-ende .wp-block-buttons.sp-knoepfe { justify-content: center; margin: 24px 0 0; }
.uj-ende .sp-knoepfe .wp-block-button__link { margin-top: 0; }

@media (max-width: 860px) {
  .uj { --rand: max(20px, var(--safe-l), var(--safe-r)); }
  .uj p { font-size: 17px; }
  .uj-kopf { padding-top: 40px; }
  .uj .uj-kopf h1 { font-size: clamp(30px, 8.6vw, 44px); }
  .uj .uj-kopf p { font-size: 17px; line-height: 1.6; margin-top: 18px; }
  .uj-jahre { padding-top: 40px; }
  .uj .uj-jahre > h2 { padding-right: var(--rand); min-height: 0; margin-bottom: 14px; }
  .uj-pfeile { display: none; }
  .uj-band { gap: 12px; scroll-snap-type: x mandatory; }
  .uj-karte { width: min(74vw, 320px); }
  .uj-karte .uj-rahmen { height: 340px; }
  .uj-karte .uj-jahr { font-size: 24px; margin-top: 12px; }
  .uj-striche:not([hidden]) { display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 var(--rand); margin: 8px 0 -10px; }
  .uj-striche button { position: relative; width: 16px; height: 4px; border: 0; padding: 0; border-radius: 4px; background: #d8d0c2; transition: width 0.5s cubic-bezier(0.45, 0, 0.25, 1), background-color 0.5s; -webkit-tap-highlight-color: transparent; }
  .uj-striche button::after { content: ""; position: absolute; inset: -20px -4px; }
  .uj-striche button[aria-current="true"] { width: 42px; background: var(--gold); }
  .uj-striche button:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 4px; }
  .uj-paar { grid-template-columns: minmax(0, 1fr); gap: 38px; padding-top: 52px; }
  .uj-berlin { grid-template-columns: minmax(0, 1fr); margin-top: 54px; }
  .uj-berlin .uj-tx { padding: 26px 22px 30px; }
  .uj-berlin figure.uj-bild { order: -1; min-height: clamp(270px, 56vw, 420px); }
  .uj-berlin .uj-bild img { object-position: 50% 20%; }
  .uj-kf { padding-top: 56px; }
  .uj-ende { margin-top: 58px; padding-top: 48px; padding-bottom: 52px; }
  .uj-ende .wp-block-buttons.sp-knoepfe { flex-direction: column; align-items: center; }
  .uj-ende .sp-knoepfe .wp-block-button { width: 100%; max-width: 420px; }
  .uj-ende .sp-knoepfe .wp-block-button__link { display: block; text-align: center; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .uj-paar { gap: 44px; }
  .uj-berlin { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (prefers-reduced-motion: reduce) { .uj-striche button, .uj-neu .uj-rahmen svg { transition: none; } }
