/* Illustrationen und Titelbilder (lib/bilder.js). Farben über die Tokens der App; feste Töne nur auf dunklem Grund. */

.hero-illu-svg, .portal-kopf-bild { display: block; }
.hero-illu-svg svg, .portal-kopf-bild svg { display: block; width: 100%; height: 100%; }

/* Leere Zustände */
.leer-bild { display: block; width: 168px; max-width: 60%; margin: 0 auto 6px; color: var(--muted); }
.leer-bild svg { display: block; width: 100%; height: auto; }

/* Titelbild: Platz von Anfang an reserviert, Foto blendet ein */
.titelbild { position: relative; overflow: hidden; background: var(--surface-2); color: var(--muted); flex: none; }
.titelbild-platz { position: absolute; inset: 0; display: grid; place-items: center; }
.titelbild-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s ease; }
.titelbild.hat-foto .titelbild-foto { opacity: 1; }
.titelbild.hat-foto .titelbild-platz { visibility: hidden; }

.titelbild-klein { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--border); }
.titelbild-klein .titelbild-platz svg { color: var(--primary); opacity: .75; }

.titelbild-gross { width: 100%; aspect-ratio: 16 / 7; min-height: 150px; border-radius: 16px; border: 1px solid var(--border); margin-bottom: 12px;
  background: linear-gradient(135deg, #0b2a4a 0%, #0e5a6b 100%); color: #fff; }
.titelbild-gross .titelbild-platz { place-items: end center; padding: 8% 10% 0 30%; opacity: .55; }
.titelbild-gross .titelbild-platz .hero-illu-svg { width: 100%; max-height: 100%; }
.titelbild-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 12px; color: #fff;
  background: linear-gradient(to top, rgba(6, 16, 31, .82), rgba(6, 16, 31, 0)); }
.titelbild-overlay h2 { margin: 0; font-size: 1.15rem; line-height: 1.25; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.titelbild-overlay p { margin: 2px 0 0; font-size: .85rem; opacity: .9; color: #fff; }
.titelbild-gross.hat-foto .titelbild-platz { display: none; }
/* „Titelbild wählen“ oben rechts auf dem Foto: halbdurchsichtig dunkel, damit es auf jedem Bild lesbar bleibt */
.titelbild-aktion { position: absolute; top: var(--sp-2); right: var(--sp-2); }
.titelbild-aktion .btn { background: rgba(10, 34, 54, .55); color: #fff; border-color: transparent; backdrop-filter: blur(4px); }
.titelbild-aktion .btn:hover { background: rgba(10, 34, 54, .75); }
/* Auswahl des Titelbilds: gewähltes Foto mit Rahmen in der Hauptfarbe */
.titelbild-wahl .foto-kachel { position: relative; border-radius: 10px; outline: 3px solid transparent; outline-offset: 2px; }
.titelbild-wahl .foto-kachel[aria-pressed="true"] { outline-color: var(--primary); }
.titelbild-wahl .titelbild-wahl-zeichnung { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; min-height: 0; margin: 0; border-radius: 8px; }
.titelbild-wahl .foto-kachel .badge { position: absolute; top: var(--sp-1); left: var(--sp-1); }

/* Kompakte Kopfkarte der Anlagenseite ohne Foto */
.anlage-kopf { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 12px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #0b2a4a 0%, #0e5a6b 100%); overflow: hidden; }
.anlage-kopf .hero-illu-svg { flex: none; width: 120px; opacity: .85; }
.anlage-kopf h2 { margin: 0; font-size: 1.05rem; color: #fff; }
.anlage-kopf p { margin: 2px 0 0; font-size: .85rem; opacity: .85; color: #fff; }

/* Kopf des Kundenportals */
.portal-kopf { position: relative; display: flex; align-items: center; gap: 14px; min-height: 104px; padding: 16px; margin-bottom: 12px; border-radius: 16px; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #0b2a4a 0%, #0e5a6b 100%); }
.portal-kopf-bild { position: absolute; right: 0; top: 0; bottom: 0; width: 70%; opacity: .28; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
.portal-kopf-text { position: relative; flex: 1; min-width: 0; }
.portal-kopf-text h2 { margin: 0; font-size: 1.15rem; color: #fff; }
.portal-kopf-text p { margin: 4px 0 0; font-size: .85rem; opacity: .9; color: #fff; }
.portal-kopf-logo { position: relative; flex: none; max-width: 38%; }
.portal-kopf-logo img { display: block; max-height: 48px; max-width: 100%; object-fit: contain; }

/* Illustration auf der Seite „Pro“ */
.pro-illu { border-radius: 16px; padding: 14px 14px 6px; margin-bottom: 12px; background: linear-gradient(135deg, #0b2a4a 0%, #0e5a6b 100%); }
.pro-illu .hero-illu-svg { max-width: 620px; margin: 0 auto; }

@media (min-width: 900px) {
  /* Höhe begrenzt: am breiten Büro-Bildschirm füllte das Foto sonst die halbe Seite (Fälligkeit und Prüfungen erst nach dem Scrollen) */
  .titelbild-gross { aspect-ratio: auto; height: clamp(170px, 15vw, 240px); }
}
@media (prefers-reduced-motion: reduce) { .titelbild-foto { transition: none; } }
