/* ================================================================
   Bilderbuchheld – Buchbeispiele
   Design-System: storybook-creator-pro CI
   ================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;600;700;800;900&family=Quicksand:wght@400;500;600;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────────── */
:root {
    --bb-primary:        hsl(140, 40%, 42%);   /* #5B8B68  Sage Green     */
    --bb-primary-hover:  hsl(140, 40%, 36%);
    --bb-primary-light:  hsl(140, 35%, 94%);
    --bb-primary-glow:   0 0 40px hsl(140 40% 42% / 0.18);

    --bb-accent:         hsl(28, 75%, 58%);    /* #E5984E  Burnt Orange   */
    --bb-accent-light:   hsl(30, 55%, 92%);    /* #F5E8DA  Warm Cream     */

    --bb-bg:             hsl(36, 47%, 96%);    /* #FAF6F0  Warm White     */
    --bb-bg-alt:         hsl(30, 55%, 92%);    /* #F5E8DA  Warm Cream     */
    --bb-card:           #ffffff;

    --bb-text:           hsl(25, 35%, 22%);    /* #48362A  Warm Brown     */
    --bb-text-muted:     hsl(25, 15%, 48%);    /* #7B6357  Taupe          */

    --bb-border:         hsl(30, 20%, 88%);    /* #E8DDD2  Light Warm Gray*/

    --bb-font-display:   'Roboto Slab', Georgia, serif;
    --bb-font-body:      'Quicksand', system-ui, sans-serif;

    --bb-radius-sm:      12px;
    --bb-radius:         16px;
    --bb-radius-lg:      24px;
    --bb-radius-xl:      30px;
    --bb-radius-full:    9999px;

    --bb-shadow:         0 4px 24px -4px hsl(30 30% 40% / 0.08);
    --bb-shadow-hover:   0 8px 32px -4px hsl(30 30% 40% / 0.13);
    --bb-shadow-strong:  0 10px 40px hsl(30 30% 40% / 0.15);

    --bb-gradient-cta:   linear-gradient(135deg, hsl(140,40%,42%) 0%, hsl(140,45%,48%) 100%);
}

/* ── Reset ────────────────────────────────────────────────────── */
.bg-galerie-wrapper *,
.bd-seite * {
    box-sizing: border-box;
}

.bg-galerie-wrapper,
.bd-seite {
    font-family: var(--bb-font-body);
    color: var(--bb-text);
    -webkit-font-smoothing: antialiased;
}

/* ================================================================
   GALERIE  [buch_beispiele]
   ================================================================ */

.bg-galerie-wrapper {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px 40px;
    overflow: hidden;
}

.bg-galerie-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Karte: 2 Spalten — Charaktere (mit Foto im Hintergrund) | Buch */
.bg-karte {
    min-width: 100%;
    box-sizing: border-box;
    background: var(--bb-bg-alt);
    border-radius: var(--bb-radius-lg);
    border: 1px solid var(--bb-border);
    padding: 28px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    box-shadow: var(--bb-shadow);
}

/* ── Schritt-Label ── */
.bg-schritt { display: flex; flex-direction: column; gap: 12px; }

.bg-schritt-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    color: var(--bb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.bg-schritt-nr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bb-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

/* ── Charakter-Karten 2×2 ── */
.bg-chars-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bg-char-karte {
    background: var(--bb-card);
    border-radius: var(--bb-radius);
    border: 1.5px solid var(--bb-border);
    padding: 14px 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
    box-shadow: var(--bb-shadow);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bg-char-karte:hover {
    transform: translateY(-2px);
    box-shadow: var(--bb-shadow-hover);
}

/* Held-Variante: grüner Ring */
.bg-char-held { border-color: var(--bb-primary); }
.bg-char-held .bg-char-avatar {
    border-color: var(--bb-primary);
    box-shadow: 0 0 0 3px hsl(140 40% 42% / 0.15);
}

/* Held-Badge */
.bg-held-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bb-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: var(--bb-radius-full);
    white-space: nowrap;
    letter-spacing: 0.05em;
}

/* ── Avatar-Wrap: Foto als weicher Hintergrund ── */
.bg-char-avatar-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 8px;  /* Platz für den Thumb der nach unten ragt */
}

/* Echtfoto: verschwommener Kreis dahinter */
.bg-char-foto-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    opacity: 0.28;
    filter: blur(3px);
    transform: scale(1.18);
    background: var(--bb-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.bg-char-foto-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Echtfoto-Badge: kleines Thumbnail unten rechts am Avatar */
.bg-char-foto-thumb {
    position: absolute;
    bottom: -12px;
    right: -14px;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    overflow: hidden;
    border: 2.5px solid #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    z-index: 2;          /* hinter dem Avatar (z-index: 3) */
    background: var(--bb-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.bg-char-foto-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Avatar-Kreis (vorne) */
.bg-char-avatar {
    position: relative;
    z-index: 3;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
    background: var(--bb-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.bg-char-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bg-char-avatar-ph { opacity: 0.5; }

.bg-char-name {
    font-family: var(--bb-font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--bb-text);
    line-height: 1.2;
}

.bg-char-rolle {
    font-size: 11px;
    color: var(--bb-accent);
    line-height: 1.3;
}

/* ── Buch-Preview ── */
.bg-buch-preview { display: flex; flex-direction: column; height: 100%; }

.bg-buch-karte {
    background: var(--bb-card);
    border-radius: var(--bb-radius-lg);
    border: 1px solid var(--bb-border);
    box-shadow: var(--bb-shadow-hover);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bg-buch-cover-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bb-bg-alt);
    flex-shrink: 0;
}

.bg-buch-cover-bild {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bg-buch-info {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}

.bg-buch-titel {
    font-family: var(--bb-font-display);
    font-size: 14px;
    font-weight: 800;
    color: var(--bb-text);
    margin: 0;
    line-height: 1.3;
}

.bg-buch-beschr {
    font-size: 12px;
    color: var(--bb-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ── Shared Utility ── */
.bg-akzent { color: var(--bb-primary); font-weight: 700; }

.bg-cta-gruppe {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.bg-link-sekundaer,
.bg-link-primaer {
    display: block;
    text-align: center;
    text-decoration: none;
    font-family: var(--bb-font-body);
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--bb-radius-full);
    padding: 9px 14px;
    transition: all 0.25s ease;
    line-height: 1.3;
}

.bg-link-sekundaer {
    color: var(--bb-primary);
    background: transparent;
    border: 2px solid var(--bb-primary);
}

.bg-link-sekundaer:hover { background: var(--bb-primary-light); }

.bg-link-primaer {
    color: #fff;
    background: var(--bb-gradient-cta);
    border: 2px solid transparent;
    box-shadow: var(--bb-primary-glow), 0 4px 12px hsl(140 40% 42% / 0.25);
}

.bg-link-primaer:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: var(--bb-primary-glow), 0 6px 20px hsl(140 40% 42% / 0.35);
}

/* ── Navigation ── */
.bg-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
}

.bg-nav-btn {
    background: var(--bb-card);
    border: 1.5px solid var(--bb-border);
    color: var(--bb-text);
    border-radius: var(--bb-radius-full);
    width: 36px;
    height: 36px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    box-shadow: var(--bb-shadow);
}

.bg-nav-btn:hover {
    border-color: var(--bb-primary);
    color: var(--bb-primary);
    box-shadow: var(--bb-shadow-hover);
}

.bg-dots { display: flex; gap: 7px; align-items: center; }

.bg-dot {
    width: 9px;
    height: 9px;
    border-radius: var(--bb-radius-full);
    border: none;
    background: var(--bb-border);
    cursor: pointer;
    padding: 0;
    transition: background 0.25s, transform 0.25s;
}

.bg-dot.aktiv {
    background: var(--bb-primary);
    transform: scale(1.3);
}

/* ================================================================
   DETAILSEITE  [buch_detail]
   ================================================================ */

.bd-seite {
    background: var(--bb-bg);
    line-height: 1.6;
}

.bd-container {
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 24px;
}

.bd-container-schmal {
    max-width: 720px;
}

.bd-abschnitt-titel {
    font-family: var(--bb-font-display);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    color: var(--bb-text);
    margin: 0 0 32px;
    text-align: center;
    letter-spacing: -0.02em;
}

/* Hero */
.bd-hero {
    background: var(--bb-bg-alt);
    padding: 56px 24px 48px;
}

.bd-hero-inner {
    max-width: 1060px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 155px auto 1fr;
    gap: 32px;
    align-items: start;
}

.bd-hero-fotos { display: flex; flex-direction: column; }

.bd-foto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.bd-foto-rahmen {
    aspect-ratio: 1;
    border-radius: var(--bb-radius-sm);
    overflow: hidden;
    background: var(--bb-bg);
    border: 1.5px solid var(--bb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.bd-foto-rahmen img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bd-hero-cover { display: flex; justify-content: center; }

.bd-cover-wrapper {
    width: 185px;
    aspect-ratio: 3/4;
    border-radius: var(--bb-radius);
    overflow: hidden;
    box-shadow: var(--bb-shadow-strong);
    background: var(--bb-bg-alt);
    flex-shrink: 0;
}

.bd-cover-bild { width: 100%; height: 100%; object-fit: cover; display: block; }

.bd-buchtitel {
    font-family: var(--bb-font-display);
    font-size: clamp(22px, 3.5vw, 34px);
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--bb-text);
}

.bd-synopsis {
    font-size: 15px;
    color: var(--bb-text-muted);
    margin: 0 0 20px;
    line-height: 1.7;
}

.bd-parameter-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bd-parameter-liste li { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.bd-param-key { font-weight: 700; min-width: 100px; color: var(--bb-text); }
.bd-param-val { color: var(--bb-text-muted); }
.bd-label-klein { font-size: 11px; font-weight: 700; color: var(--bb-text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin: 0 0 10px; }
.bd-akzent { color: var(--bb-primary); font-weight: 700; }

/* Viewer */
.bd-viewer-sektion { padding: 64px 24px; background: var(--bb-bg); }
.bd-flipbook { display: flex; flex-direction: column; align-items: center; gap: 20px; }
/* Bühne-Breite: 100% — aspect-ratio wird per JS aus dem PDF gesetzt */
.bd-flipbook-bühne { position: relative; width: 100%; max-width: 900px; }

.bd-seiten-track {
    position: relative;
    width: 100%;
    /* aspect-ratio wird dynamisch per JS gesetzt (abhängig vom PDF-Format) */
    min-height: 120px;
    border-radius: var(--bb-radius-lg);
    overflow: hidden;
    box-shadow: var(--bb-shadow-strong);
    background: var(--bb-bg-alt);
    border: 1px solid var(--bb-border);
}

.bd-buchseite { position: absolute; inset: 0; opacity: 0; transition: opacity 0.35s ease; display: flex; align-items: center; justify-content: center; }
.bd-buchseite.aktiv { opacity: 1; z-index: 1; }
.bd-buchseite img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-seiten-nr { position: absolute; bottom: 10px; right: 14px; font-size: 12px; color: rgba(0,0,0,0.35); font-weight: 600; }

/* PDF Canvas */
.bd-pdf-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Loading Spinner */
.bd-pdf-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--bb-bg-alt);
    color: var(--bb-text-muted);
    font-size: 14px;
}

.bd-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--bb-border);
    border-top-color: var(--bb-primary);
    border-radius: 50%;
    animation: bb-spin 0.8s linear infinite;
}

@keyframes bb-spin {
    to { transform: rotate(360deg); }
}

/* PDF Download Link */
.bd-pdf-download-link {
    margin-top: 14px;
    text-align: center;
}

.bd-pdf-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--bb-font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--bb-primary);
    text-decoration: none;
    border: 1.5px solid var(--bb-primary);
    padding: 8px 18px;
    border-radius: var(--bb-radius-full);
    transition: all 0.2s;
}

.bd-pdf-dl-btn:hover {
    background: var(--bb-primary-light);
}

.bd-viewer-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--bb-card);
    border: 1.5px solid var(--bb-border);
    border-radius: var(--bb-radius-full);
    width: 44px;
    height: 44px;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--bb-text);
    padding: 0;
    box-shadow: var(--bb-shadow);
}

.bd-viewer-btn:hover { border-color: var(--bb-primary); color: var(--bb-primary); box-shadow: var(--bb-shadow-hover); transform: translateY(-50%) scale(1.05); }
.bd-viewer-prev { left: -18px; }
.bd-viewer-next { right: -18px; }

.bd-thumb-leiste { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; max-width: 900px; width: 100%; }

.bd-thumb {
    width: 90px;
    /* kein festes aspect-ratio — wird per JS auf PDF-Proportion gesetzt */
    border-radius: var(--bb-radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: var(--bb-bg-alt);
    transition: border-color 0.2s, transform 0.2s;
    display: block;   /* block statt flex, damit canvas Höhe vorgibt */
    flex-shrink: 0;
    box-shadow: var(--bb-shadow);
}

/* Thumbnail-Canvas füllt Button in natürlicher Proportion */
.bd-thumb-canvas {
    display: block;
    width: 100%;
    height: auto;   /* Höhe folgt canvas-Inhalt (= PDF-Proportion) */
}

.bd-thumb img { width: 100%; height: auto; display: block; }
.bd-thumb.aktiv { border-color: var(--bb-primary); transform: scale(1.06); }
.bd-thumb:hover { border-color: var(--bb-primary); }

/* Specs */
.bd-specs-sektion { padding: 64px 24px; background: var(--bb-bg-alt); }

.bd-specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }

.bd-spec-karte {
    background: var(--bb-card);
    border-radius: var(--bb-radius-lg);
    border: 1px solid var(--bb-border);
    padding: 24px 20px;
    box-shadow: var(--bb-shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.bd-spec-karte:hover { box-shadow: var(--bb-shadow-hover); transform: translateY(-3px); }
.bd-spec-icon { font-size: 30px; margin-bottom: 10px; line-height: 1; }
.bd-spec-titel { font-family: var(--bb-font-display); font-size: 14px; font-weight: 700; margin: 0 0 8px; color: var(--bb-text); }
.bd-spec-text { font-size: 13px; color: var(--bb-text-muted); margin: 0; line-height: 1.5; }

/* CTA */
.bd-cta-sektion { padding: 72px 24px; background: var(--bb-bg); }

.bd-cta-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
    max-width: 1060px;
    margin: 0 auto;
    background: var(--bb-gradient-cta);
    border-radius: var(--bb-radius-xl);
    padding: 48px;
    box-shadow: var(--bb-primary-glow), var(--bb-shadow-strong);
}

.bd-cta-titel { font-family: var(--bb-font-display); font-size: clamp(20px, 3vw, 28px); font-weight: 800; margin: 0 0 20px; line-height: 1.25; color: #fff; letter-spacing: -0.02em; }

.bd-check-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bd-check-liste li { font-size: 15px; padding-left: 26px; position: relative; color: hsl(140 40% 92%); }
.bd-check-liste li::before { content: '✓'; position: absolute; left: 0; color: #fff; font-weight: 800; }

.bd-cta-preise { display: flex; gap: 16px; align-items: stretch; flex-shrink: 0; }

.bd-preis-karte {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: var(--bb-radius-lg);
    padding: 24px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 155px;
    position: relative;
}

.bd-preis-druck { background: rgba(255,255,255,0.95); border-color: rgba(255,255,255,0.9); padding-top: 36px; }

.bd-preis-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bb-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: var(--bb-radius-full);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bd-preis-label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 0.06em; }
.bd-preis-druck .bd-preis-label { color: var(--bb-text-muted); }
.bd-preis-wert { font-family: var(--bb-font-display); font-size: 28px; font-weight: 900; color: #fff; line-height: 1; margin: 4px 0; }
.bd-preis-druck .bd-preis-wert { color: var(--bb-text); }
.bd-preis-sub { font-size: 11px; color: rgba(255,255,255,0.7); margin-bottom: 12px; }
.bd-preis-druck .bd-preis-sub { color: var(--bb-text-muted); }

.bd-btn { display: inline-block; text-decoration: none; font-family: var(--bb-font-body); font-size: 13px; font-weight: 700; padding: 10px 16px; border-radius: var(--bb-radius-full); transition: all 0.25s ease; text-align: center; width: 100%; }
.bd-btn-outline { border: 2px solid rgba(255,255,255,0.7); color: #fff; background: transparent; }
.bd-btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
.bd-btn-primaer { background: var(--bb-text); color: #fff; border: 2px solid transparent; }
.bd-btn-primaer:hover { background: var(--bb-primary); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

/* FAQ */
.bd-faq-sektion { padding: 64px 24px 80px; background: var(--bb-bg-alt); }

.bd-faq-liste {
    background: var(--bb-card);
    border-radius: var(--bb-radius-lg);
    border: 1px solid var(--bb-border);
    box-shadow: var(--bb-shadow);
    overflow: hidden;
}

.bd-faq-item { border-bottom: 1px solid var(--bb-border); }
.bd-faq-item:last-child { border-bottom: none; }

.bd-faq-frage {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 24px;
    font-family: var(--bb-font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--bb-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    text-align: left;
    line-height: 1.4;
    transition: color 0.2s, background 0.2s;
}

.bd-faq-frage:hover { color: var(--bb-primary); background: var(--bb-bg); }
.bd-faq-icon { font-size: 20px; font-weight: 300; color: var(--bb-primary); transition: transform 0.25s; flex-shrink: 0; line-height: 1; }
.bd-faq-item.offen .bd-faq-icon { transform: rotate(45deg); }
.bd-faq-antwort { padding: 0 24px 20px; font-size: 15px; color: var(--bb-text-muted); line-height: 1.7; animation: bd-fade-in 0.2s ease; }
.bd-faq-antwort p { margin: 0; }

@keyframes bd-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 840px) {
    /* Galerie */
    .bg-karte { grid-template-columns: 1fr; gap: 20px; padding: 20px 16px; }
    .bg-fotos-spalte { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
    .bg-fotos-label  { width: 100%; }
    .bg-fotos-grid   { max-width: 148px; flex-shrink: 0; }
    .bg-pfeil        { transform: rotate(60deg); margin: 0; align-self: center; }
    .bg-cover-rahmen { max-width: 170px; }

    /* Detail Hero: Fotos + Cover nebeneinander, Info darunter */
    .bd-hero         { padding: 32px 16px 28px; }
    .bd-hero-inner   { grid-template-columns: auto auto 1fr; gap: 16px; align-items: start; }
    .bd-hero-fotos   { flex-direction: column; }
    .bd-foto-grid    { grid-template-columns: 1fr 1fr; gap: 5px; }
    .bd-foto-rahmen  { width: 60px; height: 60px; }
    .bd-cover-wrapper{ width: 110px; }
    .bd-buchtitel    { font-size: 20px; }
    .bd-synopsis     { font-size: 14px; }

    /* Sections */
    .bd-viewer-sektion  { padding: 40px 16px; }
    .bd-specs-sektion   { padding: 40px 16px; }
    .bd-cta-sektion     { padding: 40px 16px; }
    .bd-faq-sektion     { padding: 40px 16px 56px; }
    .bd-abschnitt-titel { font-size: clamp(18px, 4vw, 24px); }

    /* Specs: 2×2 Grid */
    .bd-specs-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .bd-spec-karte { padding: 18px 14px; }

    /* CTA */
    .bd-cta-inner  { grid-template-columns: 1fr; gap: 24px; padding: 28px 20px; }
    .bd-cta-preise { justify-content: center; }
}

@media (max-width: 520px) {
    /* Hero: alles untereinander */
    .bd-hero-inner   { grid-template-columns: 1fr; text-align: center; }
    .bd-hero-fotos   { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; }
    .bd-label-klein  { width: 100%; text-align: center; }
    .bd-foto-grid    { max-width: 128px; }
    .bd-hero-cover   { justify-content: center; }
    .bd-cover-wrapper{ width: 140px; }
    .bd-parameter-liste li { justify-content: center; }

    /* Viewer-Buttons nicht abschneiden */
    .bd-viewer-prev  { left: -4px; }
    .bd-viewer-next  { right: -4px; }

    /* Specs: 2 Spalten bleiben */
    .bd-specs-grid   { grid-template-columns: 1fr 1fr; gap: 10px; }
    .bd-spec-icon    { font-size: 24px; }
    .bd-spec-titel   { font-size: 13px; }
    .bd-spec-text    { font-size: 12px; }

    /* CTA: Preiskarten untereinander */
    .bd-cta-preise   { flex-direction: column; align-items: stretch; width: 100%; max-width: 280px; margin: 0 auto; }
    .bd-cta-titel    { font-size: 20px; }

    /* FAQ */
    .bd-faq-frage    { font-size: 14px; padding: 16px 18px; }
    .bd-faq-antwort  { padding: 0 18px 16px; font-size: 14px; }
}
