/* ===== Immobilienmarkt (05.10.2026) – baut auf home-neu.css + auftrag-neu.css auf ===== */
.im-top .au-top-media img { object-position: 70% 40%; }

/* Hero der Übersicht: Foto, links abgedunkelt */
.im-hero { position: relative; background: var(--hn-dark); color: #fff; padding: 84px 0 150px; overflow: hidden; }
.im-hero-media { position: absolute; inset: 0; }
.im-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 45%; }
.im-hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,14,30,.95) 0%, rgba(11,14,30,.82) 40%, rgba(11,14,30,.3) 78%, rgba(11,14,30,.1) 100%), linear-gradient(180deg, rgba(11,14,30,0) 55%, rgba(11,14,30,.75)); }
.im-hero .hn-wrap { position: relative; z-index: 1; }
.im-hero .hn-eyebrow { color: #fecaca; }
.im-hero h1 { margin: 0 0 14px; font-size: clamp(34px, 4.8vw, 58px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; max-width: 760px; }
.im-hero .hn-lead { color: #cfd4ee; max-width: 600px; }
.im-hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.im-body { background: var(--hn-bg); padding: 0 0 90px; }
.im-filter { position: relative; z-index: 2; margin-top: -78px; background: #fff; border: 1px solid var(--hn-line); border-radius: 22px; box-shadow: var(--hn-shadow-lg); padding: 18px; display: grid; grid-template-columns: 1.1fr 1.2fr 1fr .8fr auto; gap: 12px; align-items: end; }
.im-filter label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; color: var(--hn-faint); text-transform: uppercase; letter-spacing: .06em; }
.im-filter select, .im-filter input { border: 1px solid var(--hn-line); border-radius: 12px; padding: 12px 13px; font: inherit; font-size: 15px; color: var(--hn-ink); background: var(--hn-bg); text-transform: none; letter-spacing: 0; font-weight: 600; outline: none; }
.im-filter select:focus, .im-filter input:focus { border-color: var(--hn-orange); background: #fff; }
.im-filter .hn-btn { height: 47px; }
.im-filter select, .im-filter input { height: 47px; box-sizing: border-box; }

.im-meine { margin-top: 26px; background: #fff; border: 1px solid var(--hn-line); border-radius: 20px; padding: 18px 20px; }
.im-meine h2 { margin: 0 0 12px; font-size: 17px; font-weight: 800; }
.im-meine-liste { display: grid; gap: 8px; }
.im-meine-liste a { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 11px 14px; border-radius: 12px; background: var(--hn-bg); color: var(--hn-ink); text-decoration: none; }
.im-meine-liste a:hover { background: var(--hn-bg-soft); }
.im-meine-liste small { color: var(--hn-faint); font-weight: 600; }
.im-st { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 100px; background: #e5e7eb; color: #374151; }
.im-st--open { background: #dcfce7; color: #15803d; } .im-st--pending { background: #fef3c7; color: #92400e; } .im-st--vergeben { background: #dbeafe; color: #1d4ed8; }

.im-kopf { margin: 38px 0 16px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.im-kopf h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.im-kopf small { color: var(--hn-faint); }

.im-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.im-karte { background: #fff; border: 1px solid var(--hn-line); border-radius: 20px; overflow: hidden; color: var(--hn-ink); text-decoration: none; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.im-karte:hover { transform: translateY(-3px); box-shadow: var(--hn-shadow); }
.im-karte-bild { position: relative; aspect-ratio: 4 / 3; background: var(--hn-bg-soft); overflow: hidden; }
.im-karte-bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.im-karte:hover .im-karte-bild img { transform: scale(1.04); }
.im-badge { position: absolute; left: 12px; top: 12px; padding: 5px 11px; border-radius: 100px; font-size: 12px; font-weight: 800; background: #fff; color: var(--hn-ink); box-shadow: 0 6px 16px -8px rgba(0,0,0,.4); }
.im-badge--verkaufen { background: var(--hn-grad); color: #fff; }
.im-badge--vermieten { background: #0b0e1e; color: #fff; }
.im-km { position: absolute; right: 12px; top: 12px; padding: 5px 10px; border-radius: 100px; font-size: 12px; font-weight: 800; background: rgba(11,14,30,.72); color: #fff; }
.im-karte-text { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.im-karte-text small { color: var(--hn-faint); font-weight: 700; font-size: 12.5px; }
.im-karte-text h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.im-eck { display: flex; gap: 16px; margin-top: 4px; }
.im-eck span { display: grid; font-size: 12px; color: var(--hn-faint); font-weight: 600; }
.im-eck b { font-size: 15px; color: var(--hn-ink); font-weight: 800; }
.im-karte-fuss { margin-top: auto; padding-top: 12px; border-top: 1px solid #f1edf3; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.im-karte-fuss b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.im-karte-fuss small { font-size: 12px; }

.im-leer { background: #fff; border: 1px solid var(--hn-line); border-radius: 24px; padding: 34px; text-align: center; }
.im-leer-bilder { display: flex; justify-content: center; margin-bottom: 18px; }
.im-leer-bilder img { width: 120px; height: 90px; object-fit: cover; border-radius: 16px; border: 4px solid #fff; box-shadow: var(--hn-shadow); margin: 0 -10px; }
.im-leer-bilder img:nth-child(1) { transform: rotate(-6deg); } .im-leer-bilder img:nth-child(3) { transform: rotate(6deg); } .im-leer-bilder img:nth-child(2) { position: relative; z-index: 1; transform: translateY(-6px); }
.im-leer h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.im-leer p { margin: 0 0 18px; color: var(--hn-soft); }

.im-schritte { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 54px; }
.im-schritte div { background: #fff; border: 1px solid var(--hn-line); border-radius: 20px; padding: 22px; }
.im-schritte i { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--hn-grad); color: #fff; font-style: normal; font-weight: 800; margin-bottom: 12px; }
.im-schritte b { display: block; font-size: 16.5px; margin-bottom: 6px; }
.im-schritte p { margin: 0; color: var(--hn-soft); font-size: 14.5px; line-height: 1.55; }

.im-makler { margin-top: 28px; background: var(--hn-dark); color: #fff; border-radius: 24px; padding: 30px 32px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; overflow: hidden; }
.im-makler::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: #ef4444; filter: blur(120px); opacity: .25; right: -120px; top: -220px; }
.im-makler > * { position: relative; }
.im-makler .hn-eyebrow { color: #fecaca; }
.im-makler h2 { margin: 6px 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.im-makler p { margin: 0; color: #c9cfe9; max-width: 620px; }

/* Formular */
.im-ziele { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.im-ziel input, .im-art input { position: absolute; opacity: 0; pointer-events: none; }
.im-ziel span { display: grid; gap: 4px; padding: 16px; border: 2px solid var(--hn-line); border-radius: 16px; cursor: pointer; height: 100%; box-sizing: border-box; transition: border-color .15s, background .15s; }
.im-ziel b { font-size: 16px; }
.im-ziel small { color: var(--hn-soft); font-size: 13px; line-height: 1.4; }
.im-ziel input:checked + span { border-color: var(--hn-red); background: #fff5f3; box-shadow: 0 10px 24px -16px rgba(239,68,68,.6); }
.im-ziel input:focus-visible + span, .im-art input:focus-visible + span { outline: 3px solid rgba(245,158,11,.4); }
.im-arten { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.im-art span { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border: 2px solid var(--hn-line); border-radius: 14px; font-size: 13px; font-weight: 700; text-align: center; cursor: pointer; color: var(--hn-soft); }
.im-art svg { width: 26px; height: 26px; color: var(--hn-faint); }
.im-art input:checked + span { border-color: var(--hn-red); color: var(--hn-ink); background: #fff5f3; }
.im-art input:checked + span svg { color: var(--hn-red); }
.im-zahlen .au-field[hidden] { display: none; }
.im-preis { display: flex; align-items: center; gap: 10px; }
.im-preis .au-input { flex: 1; }
.im-preis span { font-weight: 800; color: var(--hn-soft); white-space: nowrap; }
.au-thumb.im-titelbild { outline: 3px solid var(--hn-orange); outline-offset: 2px; }

/* Objektseite */
.im-show-top { padding-bottom: 130px; }
.im-galerie { position: relative; z-index: 2; margin-top: -96px; margin-bottom: 22px; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 200px 200px; gap: 8px; border-radius: 24px; overflow: hidden; box-shadow: var(--hn-shadow-lg); background: #fff; }
.im-galerie.is-einzeln { grid-template-columns: 1fr; grid-template-rows: 420px; }
.im-g { border: 0; padding: 0; margin: 0; cursor: zoom-in; position: relative; overflow: hidden; background: var(--hn-bg-soft); }
.im-g img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.im-g:hover img { transform: scale(1.03); }
.im-g0 { grid-row: 1 / 3; }
.im-g span { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11,14,30,.55); color: #fff; font-weight: 800; font-size: 16px; }
.im-g-hinweis { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 100px; background: rgba(11,14,30,.6); color: #fff; font-size: 11.5px; font-weight: 700; }
.im-galerie:has(.im-g1):not(:has(.im-g2)) { grid-template-columns: 2fr 1fr; }
.im-galerie:has(.im-g1):not(:has(.im-g2)) .im-g1 { grid-row: 1 / 3; }
.im-preiszeile { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--hn-line); }
.im-preiszeile div { display: grid; }
.im-preiszeile small { font-size: 12px; color: var(--hn-faint); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.im-preiszeile b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.im-preiszeile div:first-child b { background: var(--hn-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.im-leist { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.im-leist span { padding: 4px 10px; border-radius: 100px; background: var(--hn-bg-soft); font-size: 12.5px; font-weight: 700; }
.im-leist-wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.im-leist-wahl input { position: absolute; opacity: 0; }
.im-leist-wahl span { display: inline-block; padding: 7px 12px; border-radius: 100px; border: 1px solid var(--hn-line); font-size: 13px; font-weight: 700; cursor: pointer; background: #fff; }
.im-leist-wahl input:checked + span { border-color: var(--hn-red); background: #fff5f3; color: #b91c1c; }
.im-leist-wahl input:focus-visible + span { outline: 3px solid rgba(245,158,11,.4); }
.im-aehnlich-h { margin: 46px 0 16px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

.im-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(5,7,15,.92); display: grid; place-items: center; }
.im-lb[hidden] { display: none; }
.im-lb img { max-width: 92vw; max-height: 86vh; border-radius: 12px; }
.im-lb button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer; line-height: 1; }
.im-lb button:hover { background: rgba(255,255,255,.22); }
.im-lb-x { top: 18px; right: 18px; } .im-lb-p { left: 18px; top: 50%; } .im-lb-n { right: 18px; top: 50%; }

@media (max-width: 1000px) {
    .im-filter { grid-template-columns: 1fr 1fr; }
    .im-filter .hn-btn { grid-column: 1 / -1; }
    .im-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .im-arten { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
    .im-hero { padding: 56px 0 130px; }
    .im-hero-media::after { background: linear-gradient(180deg, rgba(11,14,30,.75), rgba(11,14,30,.92)); }
    .im-hero-ctas .hn-btn { flex: 1 1 100%; justify-content: center; }
    .im-grid, .im-schritte, .im-ziele { grid-template-columns: 1fr; }
    .im-galerie { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 110px; }
    .im-g0 { grid-column: 1 / -1; grid-row: auto; }
    .im-g3, .im-g4 { display: none; }
    .im-galerie.is-einzeln { grid-template-rows: 260px; }
    .im-meine-liste a { grid-template-columns: 1fr auto; }
    .im-meine-liste small { grid-column: 1 / -1; }
}
/* Objektseite: Galerie übernimmt die Überlappung mit dem Kopf, Inhalt darunter normal */
.im-galerie + .as-layout { margin-top: 0 !important; position: relative; z-index: 1; }
