/* =====================================================================
   /immobilienfinanzierung/: Leistungsseite als PASTOR-Landingpage.
   Baut auf start.css auf (Kopf, Fuss, Knoepfe, .leistung, .frage, .kontakt-karte);
   hier nur, was es dort nicht gibt. Alle eigenen Klassen mit Praefix if-.
   Alle Akzente Smaragdgruen (die Tokens --gold/--gold-hell sind gruen), Rot-Weiss-Rot nur als
   kleine Linie am Kicker der Oesterreich-Sektion.
   Radien wie start.css: Knoepfe 8, Karten 14, grosse Flaechen 20, Pillen rund.
   ===================================================================== */

.seite-immo { --at-rot: #C8102E; }

/* ---------- Brotkrumen ---------- */
.brotkrumen { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; font-size: 14px; color: var(--ink-3); }
.brotkrumen a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.brotkrumen a:hover { color: var(--gruen-ink); }

/* ---------- Haken (Hero-Karte, Angebot) ---------- */
.haken { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--tint); }
.haken svg { width: 15px; height: 15px; fill: none; stroke: var(--gruen-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* =====================================================================
   HERO: Text links, Wiener Haustuer rechts, Anfrage-Karte ueberlappend
   ===================================================================== */
.if-hero-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
.if-hero h1 { font-size: clamp(32px, 2.95vw, 42px); }
.if-hero .kicker { margin-bottom: 20px; }
.if-hero-bild { position: relative; width: 100%; max-width: 460px; justify-self: center; }
.if-rahmen { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--r-big); background: var(--tint); box-shadow: var(--schatten); }
.if-rahmen::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(253, 253, 251, .6); border-radius: 12px; pointer-events: none; }
.if-rahmen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.if-notiz-hero { left: -8px; top: -50px; transform: rotate(-5deg); }
.if-notiz-hero svg { left: calc(100% + 6px); top: 10px; }
.if-anfrage { position: relative; z-index: 2; width: min(280px, 86%); margin: -64px 0 0 auto; margin-right: -4px; padding: 18px 20px 20px; border: 1px solid var(--line-mid); border-radius: var(--r-card); background: rgba(253, 253, 251, .96); box-shadow: 0 30px 60px -34px rgba(15, 61, 39, .45); }
.if-anfrage-titel { margin-bottom: 12px; font: 400 19px/1.2 var(--head); color: var(--ink); }
.if-anfrage ul { display: grid; gap: 9px; }
.if-anfrage li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }

/* =====================================================================
   VORHABEN: Kauf gross links, Bau und Sanierung rechts gestapelt
   ===================================================================== */
.if-vorhaben { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.if-vh { --farbe: var(--gruen); display: flex; flex-direction: column; padding: 8px; border: 1px solid var(--line-mid); border-radius: 22px; background: var(--paper); }
.if-vh:nth-child(2) { --farbe: #2A5A48; }
.if-vh:nth-child(3) { --farbe: #4F7A3A; }
.if-vh--kauf { border: 2px solid var(--gruen); }
.if-vh-bild { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 16 / 10; background: var(--tint); }
.if-vh-bild img { width: 100%; height: 100%; object-fit: cover; }
.if-vh-text { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 0 20px 20px; }
.if-vh-text .kachel { margin: -26px 0 6px; border: 3px solid var(--paper); box-sizing: content-box; }
.if-vh h3 { font-size: 23px; }
.if-vh p { font-size: 16px; line-height: 1.58; max-width: 32em; }
.if-vh--kauf h3 { font-size: clamp(26px, 2.6vw, 32px); }
.if-vh--kauf p { font-size: 17px; }

/* =====================================================================
   PROBLEM: fuenf Gedanken als Karten, 3 oben, 2 breit unten
   ===================================================================== */
.if-schmerzen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: clamp(28px, 4vw, 44px); }
.if-schmerz { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; border: 1px solid var(--line-mid); border-radius: var(--r-card); background: #FFFFFF; }
.if-schmerz p { font: 400 18px/1.5 var(--head); letter-spacing: -.005em; color: var(--ink); }
.if-schmerz-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; margin-top: 1px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gruen-ink); background: var(--paper); }
.if-schmerz-ic .ic { width: 17px; height: 17px; }
/* Variation: Bankangebot als Brief mit gruenem Rand, Nebenkosten auf Karo */
.if-schmerz--brief { border-color: rgba(31, 122, 77, .6); background: linear-gradient(160deg, #FFFFFF, var(--paper)); }
.if-schmerz--brief .if-schmerz-ic { background: var(--gruen); border-color: var(--gruen); color: #FFFFFF; }
.if-schmerz--karo { background: linear-gradient(to right, rgba(31, 122, 77, .07) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(to bottom, rgba(31, 122, 77, .07) 1px, transparent 1px) 0 0 / 24px 24px, #FFFFFF; }

/* =====================================================================
   VERSTAERKEN: links der eine Satz, rechts drei Folgen untereinander
   ===================================================================== */
.if-folgen-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.if-folgen-satz { margin-top: 22px; max-width: 16em; font: italic 400 clamp(22px, 2.2vw, 27px)/1.4 var(--head); color: var(--ink-2); }
.if-folgen li { display: flex; gap: 18px; align-items: flex-start; padding: 26px 0; }
.if-folgen li + li { border-top: 1px solid var(--line-mid); }
.if-folgen li:first-child { padding-top: 0; }
.if-folgen li:last-child { padding-bottom: 0; }
.if-folgen .mm-kachel { --farbe: var(--gruen); width: 44px; height: 44px; border-radius: 12px; }
.if-folgen h3 { font-size: 21px; margin-bottom: 6px; }
.if-folgen p { font-size: 16.5px; max-width: 34em; }

/* =====================================================================
   LOESUNG: vier Bausteine, versetztes Raster ohne Luecke
   ===================================================================== */
.if-bausteine { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.if-baustein .leistung-kopf { gap: 10px; }
.if-baustein h3 { font-size: 23px; }
.if-baustein p { max-width: 30em; }
.if-baustein--rate { border: 2px solid var(--gruen); }
.if-baustein--rate .leistung-kopf::after { content: ""; position: absolute; z-index: -1; right: -26px; top: -30px; width: 28%; max-width: 161px; aspect-ratio: 1; background: color-mix(in srgb, var(--farbe) 10%, transparent); -webkit-mask: url(/assets/img/anbo-zeichen-weiss.svg?v=1) center / contain no-repeat; mask: url(/assets/img/anbo-zeichen-weiss.svg?v=1) center / contain no-repeat; pointer-events: none; }
.if-baustein--eigen .leistung-kopf { background: radial-gradient(ellipse 80% 90% at 0% 100%, color-mix(in srgb, var(--farbe) 16%, transparent) 0, transparent 70%), linear-gradient(200deg, color-mix(in srgb, var(--farbe) 6%, #fff), #fff 80%); }

/* =====================================================================
   OESTERREICH: Nebenkosten beim Kauf, als Aufstellung ohne Betraege
   ===================================================================== */
.if-at-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; align-items: center; }
/* Rot-Weiss-Rot als feine dreigeteilte Linie statt der Kicker-Linie */
.if-kicker-at::before { width: 26px; height: 7px; border-radius: 1px; background: linear-gradient(to bottom, var(--at-rot) 0 2px, #FFFFFF 2px 5px, var(--at-rot) 5px 7px); box-shadow: 0 0 0 .5px rgba(27, 38, 33, .12); }
.if-at-text h2 { max-width: 14em; }
.if-at-lead { margin-top: 18px; max-width: 30em; font-size: 18px; }
.if-at-klein { margin-top: 16px; max-width: 30em; font-size: 15.5px; color: var(--ink-3); }
.if-rechnung { position: relative; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line-mid); border-radius: var(--r-big); background: #FFFFFF; box-shadow: var(--schatten); }
.if-notiz-rechnung { right: 22px; top: -30px; transform: rotate(-4deg); }
.if-rechnung-kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line-mid); }
.if-rechnung-kopf p { font: 400 24px/1.2 var(--head); color: var(--ink); }
.if-rechnung-kopf img { width: 34px; height: auto; }
.if-posten { border-bottom: 3px double rgba(31, 122, 77, .8); }
.if-posten li { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; padding: 14px 0; }
.if-posten li + li { border-top: 1px dashed var(--line-mid); }
.if-posten i { grid-row: span 2; font: 400 22px/1 var(--head); font-style: normal; color: var(--gold); padding-top: 1px; }
.if-posten b { font: 400 18.5px/1.35 var(--head); color: var(--ink); }
.if-posten span { font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.if-posten--basis { grid-template-columns: minmax(0, 1fr) !important; }
.if-posten--basis b { font-weight: 700; }
.if-eigenmittel { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; padding: 16px 18px; border-radius: var(--r-card); background: var(--tint-weak); border: 1px solid var(--line); }
.if-eigenmittel .kachel { --farbe: var(--gruen); flex: none; width: 38px; height: 38px; margin: 0; border-radius: 10px; }
.if-eigenmittel .kachel .ic { width: 19px; height: 19px; }
.if-eigenmittel div > b { display: block; font: 400 18.5px/1.35 var(--head); color: var(--ink); margin-bottom: 2px; }
.if-eigenmittel div > span { display: block; font-size: 15px; line-height: 1.5; }

/* =====================================================================
   BEWEIS: Andrija persoenlich, daneben der Ablauf der Anfrage
   ===================================================================== */
.if-person-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
.if-person { position: relative; max-width: 460px; }
.if-person-foto { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--r-big); background: #11140F; box-shadow: var(--schatten); }
.if-person-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 100%; transform: scale(1.2); transform-origin: 52% 100%; }
.if-person-foto::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(to bottom, rgba(10, 42, 27, 0), rgba(10, 42, 27, .88)); pointer-events: none; }
.if-person figcaption { position: absolute; left: 26px; right: 26px; bottom: 24px; z-index: 1; padding-top: 14px; border-top: 1px solid rgba(169, 214, 189, .5); color: #fff; }
.if-person figcaption b { display: block; font: 400 22px/1.2 var(--head); }
.if-person figcaption span { font-size: 14.5px; color: var(--on-dark-2); }
.if-person-text > p { max-width: 34em; margin-top: 20px; font-size: 18px; }
.if-ablauf { margin-top: 36px; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line-mid); border-radius: var(--r-big); background: var(--tint-weak); }
.if-ablauf-titel { font: 400 24px/1.25 var(--head); color: var(--ink); }
.if-ablauf-hinweis { margin-top: 6px; font-size: 15.5px; color: var(--ink-3); }
.if-schritte { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 26px 0 28px; }
.if-schritte li { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.if-schritte li:not(:last-child)::before { content: ""; position: absolute; left: 21.5px; top: 44px; bottom: -20px; width: 1px; background: rgba(31, 122, 77, .6); }
.if-nr { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); background: var(--paper); font: italic 400 19px/1 var(--head); color: var(--gruen-ink); }
.if-schritte li:first-child .if-nr { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.if-schritte h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 9px 0 6px; font-size: 20px; }
.if-schritte p { font-size: 16px; line-height: 1.58; max-width: 34em; }
.if-schritt-notiz { font: 600 23px/1 var(--hand); color: var(--gruen-ink); transform: rotate(-5deg); white-space: nowrap; }

/* =====================================================================
   WAS DU BEKOMMST
   ===================================================================== */
.if-angebot { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding: clamp(26px, 4vw, 52px); border: 2px solid var(--gruen); border-radius: var(--r-big); background: radial-gradient(ellipse 60% 90% at 100% 0%, rgba(31, 122, 77, .1) 0, transparent 70%), var(--paper); }
.if-angebot::after { content: ""; position: absolute; z-index: -1; left: -40px; bottom: -46px; width: 210px; aspect-ratio: 1; background: rgba(31, 122, 77, .06); -webkit-mask: url(/assets/img/anbo-zeichen-weiss.svg?v=1) center / contain no-repeat; mask: url(/assets/img/anbo-zeichen-weiss.svg?v=1) center / contain no-repeat; pointer-events: none; }
.if-angebot-kopf h2 { margin-bottom: 14px; }
.if-angebot-kopf p { max-width: 24em; margin-bottom: 26px; font-size: 17px; }
.if-angebot-liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 32px; align-content: center; }
.if-angebot-liste li { display: flex; gap: 12px; align-items: flex-start; font-size: 16.5px; line-height: 1.5; color: var(--ink); }

/* =====================================================================
   SCHLUSS: dunkle Karte aus start.css, hier nur Foto und Notiz
   ===================================================================== */
.if-kontakt-person { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.if-kontakt-foto { position: relative; overflow: hidden; flex: none; width: 76px; height: 76px; border-radius: 50%; border: 2px solid var(--gold-hell); background: var(--gruen-tief); }
/* Ausschnitt auf Gesicht und Schultern (buehne-1: Gesicht bei ca. 50 % / 21 %) */
.if-kontakt-foto img { position: absolute; left: -198%; top: -20%; width: 500%; max-width: none; height: auto; }
.if-kontakt-notiz { font: 600 25px/1 var(--hand); color: var(--gold-hell); transform: rotate(-4deg); }
.seite-immo .kontakt h2 { font-size: clamp(30px, 3.6vw, 46px); }

/* ---------- Ab Tablet ---------- */
@media (min-width: 760px) {
  .if-vorhaben { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .if-vh--kauf { grid-column: 1 / -1; }
  .if-vh--kauf .if-vh-bild { aspect-ratio: 2 / 1; }
  .if-schmerzen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .if-schmerz:last-child { grid-column: 1 / -1; }
  .if-bausteine { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .if-baustein:nth-child(1), .if-baustein:nth-child(4) { grid-column: span 7; }
  .if-baustein:nth-child(2), .if-baustein:nth-child(3) { grid-column: span 5; }
  .if-angebot-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .if-hero-raster { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(40px, 5vw, 72px); }
  .if-hero-bild { justify-self: end; }
  .if-anfrage { position: absolute; left: -56px; bottom: 40px; margin: 0; }
  .if-folgen-raster { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 88px); }
  .if-at-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 88px); }
  .if-person-raster { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 6vw, 80px); }
  .if-person { position: sticky; top: 104px; }
  .if-angebot { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
}

@media (min-width: 1100px) {
  .if-vorhaben { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; }
  .if-vh--kauf { grid-column: 1; grid-row: 1 / span 2; }
  .if-vh--kauf .if-vh-bild { aspect-ratio: auto; flex: 1; min-height: 320px; }
  .if-vh--kauf .if-vh-text { padding: 0 26px 24px; }
  .if-vh--quer { flex-direction: row; align-items: stretch; }
  .if-vh--quer .if-vh-bild { flex: 0 0 44%; aspect-ratio: auto; min-height: 220px; }
  .if-vh--quer .if-vh-text { justify-content: center; padding: 18px 18px 18px 22px; }
  .if-vh--quer .kachel { margin: 0 0 6px; border: 0; }
  .if-schmerzen { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .if-schmerz { grid-column: span 2; }
  .if-schmerz:nth-child(4), .if-schmerz:last-child { grid-column: span 3; }
}

@media (max-width: 759px) {
  .if-hero-bild { max-width: 420px; margin-top: 30px; }
  .if-rahmen { aspect-ratio: 5 / 5.4; }
  .if-notiz-hero { left: 4px; top: -36px; }
  .if-anfrage { margin-top: -54px; margin-right: 10px; }
  .if-schmerz { padding: 18px 18px; gap: 14px; }
  .if-schmerz p { font-size: 17px; }
  .if-vh-text { padding: 0 16px 18px; }
  .if-rechnung { padding: 20px 18px; }
  .if-notiz-rechnung { right: 12px; top: -26px; }
  .if-posten b, .if-eigenmittel b { font-size: 17.5px; }
  .if-person { max-width: none; }
  .if-person-foto { aspect-ratio: 1 / 1; }
  .if-ablauf { margin-left: calc(var(--gutter) * -1 + 6px); margin-right: calc(var(--gutter) * -1 + 6px); padding: 22px 18px; }
  .if-ablauf .btn { width: 100%; }
  .if-angebot .btn { width: 100%; }
  .if-kontakt-foto { width: 64px; height: 64px; }
  .if-kontakt-notiz { font-size: 22px; }
}
