:root {
    --bg: #ffffff;
    --muted: #f5f7fb;
    --text: #0f172a;
    --text-soft: #475569;
    --brand: #185adb;
    --brand-ink: #0b3aa6;
    --line: #e5e7eb;
    --shadow: 0 10px 30px rgba(2, 6, 23, .08);
    --radius: 16px;
    --radius-lg: 22px;
    --ok: #16a34a;
}

* { box-sizing: border-box }
html, body { margin: 0; padding: 0 }
body {
    font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
    color: var(--text);
    background: var(--bg)
}

.container { width: min(1100px, 92%); margin-inline: auto }
.section { padding: 48px 0 }
.section-muted { background: var(--muted) }
.lead { color: var(--text-soft); max-width: 62ch }

.site-header {
    position: sticky; top: 0; z-index: 10; background: #fff;
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(160%) blur(6px)
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; font-weight: 700 }
.brand-logo { height: 28px; width: auto; display: block; object-fit: contain }
@media (min-width:768px){ .brand-logo { height: 32px } }
.brand-text { white-space: nowrap }

.main-nav a { color: var(--text-soft); text-decoration: none; margin-left: 20px }
.main-nav a:hover { color: var(--text) }

.hero { position: relative; overflow: hidden }
.hero-img { width: 100%; height: clamp(320px, 48vw, 560px); object-fit: cover; display: block }
.hero-overlay {
    position: absolute; inset: 0; display: grid; place-items: start center;
    padding-top: clamp(16px, 6vw, 72px);
    background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.25) 30%, transparent 70%)
}
.hero-overlay h1 { color: #fff; font-size: clamp(28px, 5vw, 46px); text-align: center }

.chip { display: inline-block; padding: 6px 10px; border-radius: 999px; background: #edf2ff; color: var(--brand-ink); font-weight: 600; font-size: 14px }

.exhibit-figure { position: relative; margin-top: 18px }
.exhibit-figure img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow) }
.bubble {
    position: absolute; right: 3%; bottom: 6%;
    background: #ffeb99; color: #333; font-weight: 700; text-align: center;
    padding: 16px 14px; border-radius: 999px; width: 140px; box-shadow: var(--shadow)
}

.quote { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center }
.avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover }
blockquote { margin: 0 }
blockquote p { font-size: clamp(18px, 3vw, 24px); margin: 0 0 8px }
blockquote footer { color: var(--text-soft) }

.catalog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-top: 14px }
.search-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border: 1px solid var(--line) }

.field { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; margin-bottom: 12px }
label { color: var(--text-soft) }

input, select, .btn {
    width: 100%; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff
}
input::placeholder { color: #9ca3af }
.btn { background: var(--brand); color: #fff; border: none; cursor: pointer; margin-top: 6px }
.btn:hover { background: var(--brand-ink) }

.hint { display: flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 14px; margin-top: 10px }
.hint .dot { width: 8px; height: 8px; background: var(--brand); border-radius: 50% }

.result-badge { margin-top: 10px; border: 1px solid #bbf7d0; background: #ecfdf5; color: #065f46; padding: 8px 10px; border-radius: 10px; font-size: 14px }
.hidden { display: none !important }

.note { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px }
.note h3 { margin-top: 0 }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 }
.breadcrumb a, .breadcrumb span {
    display: inline-block; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
    background: #fff; text-decoration: none; color: var(--text-soft); font-size: 14px
}
.breadcrumb a:hover { color: var(--text); border-color: #cbd5e1 }
.breadcrumb .is-current { background: #e2e8f0; color: #111827 }

.results { display: grid; gap: 18px }
.room-image img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow) }

/* --- Karten-Grid --- */
.items-grid { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr) }
.item-card {
    grid-column: span 12; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
    box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr; text-decoration: none; color: inherit
}
/* Nur das Thumbnail-Bild der Karte stylen (nicht das Pfeil-Icon!) */
.item-card .item-thumb { width: 100%; height: 220px; object-fit: cover; display: block }

.item-body { padding: 12px }
.item-title { font-weight: 700; font-size: 18px; margin: 2px 0 2px }
.item-meta { display: flex; gap: 10px; align-items: center; color: var(--text-soft); font-size: 14px }
.item-card:is(:hover, :focus-visible) { transform: translateY(-2px); transition: .15s ease; box-shadow: 0 12px 36px rgba(2, 6, 23, .12) }

/* Kopfbereich im Item: Titel/Meta links, Pfeil rechts */
.item-head { display: flex; align-items: center; gap: 12px }
.item-titles { flex: 1 1 auto; min-width: 0 }
.item-go { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: 8px }
.item-go img { width: 18px; height: 18px; display: block } /* fix: Icon bleibt klein und unverzerrt */
.item-card:hover .item-go img { transform: translateX(2px); transition: transform .12s ease }

@media (min-width:680px){ .items-grid .item-card { grid-column: span 6 } }
@media (min-width:980px){ .items-grid .item-card { grid-column: span 4 } }

/* --- Details / Bilder --- */
.details-grid { display: grid; gap: 16px; grid-template-columns: repeat(12, 1fr) }
.detail-figure {
    grid-column: span 12; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; box-shadow: var(--shadow)
}
.detail-figure img { width: 100%; height: auto; border-radius: 12px; cursor: zoom-in }
.detail-figure figcaption { font-size: 14px; color: var(--text-soft); margin-top: 6px }
.tap-hint { color: var(--text-soft); font-size: 14px; margin-top: 2px }

@media (min-width:760px){ .details-grid .detail-figure { grid-column: span 6 } }

.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 36px }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; padding: 22px 0 }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px }
.footer-right a { color: var(--text-soft); text-decoration: none }
.footer-right a:hover { color: var(--text) }

@media (max-width: 860px){
    .catalog-grid { grid-template-columns: 1fr; gap: 16px }
    .note { margin-top: 4px }
}
@media (max-width: 520px){
    .field { grid-template-columns: 1fr; row-gap: 6px }
    .item-card .item-thumb { height: 180px } /* mobil etwas flacher */
    .hero-overlay { padding-top: clamp(12px, 8vw, 48px) }
}

/* sanftes Scrollen */
html { scroll-behavior: smooth; }
/* Karten nicht unter den Header scrollen */
.items-grid .item-card { scroll-margin-top: 96px; } /* ggf. an Headerhöhe anpassen */

/* --- Lightbox / Bild-Zoom --- */
.lightbox { position: fixed; inset: 0; z-index: 1000; }
.lightbox.hidden { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); }
.lightbox-content {
    position: relative; z-index: 1; margin: 0;
    height: 100%; width: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 18px;
}
.lightbox-content img {
    max-width: 96vw; max-height: calc(100vh - 120px);
    object-fit: contain; border-radius: 12px; box-shadow: var(--shadow);
}
.lightbox-content figcaption { color: #e5e7eb; margin-top: 10px; font-size: 14px; text-align: center; max-width: 92ch }
.lightbox-close {
    position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 28px; line-height: 1;
    width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.2) }
body.modal-open { overflow: hidden; }
