/* Kantonsseite /immobilienmakler-in-der-nahe (Schritt 27, 14.10.2026). Baut auf rp-ggst.css auf (Hülle ohne Webflow,
   Titelbild, Brotkrumen, Eyebrow, Abschnitte, Fragen) und ergänzt nur, was die Übersicht braucht: Suche, Tabellen je
   Verwaltungskreis, Luftbild-Karte, Bewertung, Weiterlesen. Farben aus dem Designsystem (rp-breite.css): Titel #151314,
   Text #1d1d1f, leise #4d464a, Meta #52697a, Blau #194963, Fläche #f5f6f8, Linie #e3e6ea. Karte wie «Unsere
   Immobilien» (rp-immobilien.css: Luftbild, leiser Blauverlauf, Quelle unten rechts). Bewegung nur bei no-preference. */

/* Titelbild: Münster im Bild halten (Querformat 60 % rechts, Handy eigener Ausschnitt) */
.rph-body .rpg-hero-bild img { object-position: 64% 50%; }
/* «im Kanton Bern» samt Linie auf einer Zeile: zwei statt drei Zeilen ab 992 px */
@media (min-width: 992px) { .rph-body .rpg-hero-titel { max-width: 47rem; } }
@media (max-width: 767px) { .rph-body .rpg-hero-bild img { object-position: 50% 45%; } }
/* Kopfzeile über hellem Himmel: weicher Schatten oben im Bild, damit die weissen Menüpunkte lesbar bleiben (G8) */
.rph-kopfschatten { position: absolute; z-index: 1; top: 0; right: 0; width: 60%; height: 220px; pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 36, 52, .58) 0%, rgba(12, 36, 52, .38) 45%, rgba(12, 36, 52, 0) 100%);
  /* links liegt schon der Petrol-Verlauf: dort ausblenden, sonst entsteht an der Bildkante eine Stufe */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%); }
@media (max-width: 767px) { .rph-kopfschatten { display: none; } }

/* ---------- Gemeinden ---------- */
.rph-gemeinden { padding-top: clamp(28px, 3.5vw, 44px); }
.rph-raster { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 4.5vw, 72px); align-items: start; }
.rph-liste { min-width: 0; }

/* Suche (nur mit JavaScript sichtbar) */
.rph-suche { max-width: 30rem; margin: 0 0 clamp(28px, 3vw, 40px); }
.rph-suche-status { min-height: 1.5em; margin: 10px 0 0; color: var(--g-leise); font-size: 16px; line-height: 1.5; }
.rph-suche-status a { color: var(--g-blau); text-decoration: underline; text-decoration-color: rgba(25, 73, 99, .4); text-underline-offset: .18em; }
.rph-suche-status a:hover { text-decoration-color: currentColor; }
.rph-suche-status a:focus-visible { outline: 2px solid var(--g-blau); outline-offset: 3px; border-radius: 3px; }

/* Ein Verwaltungskreis: Name, ein Satz, Tabelle */
.rph-kreis + .rph-kreis { margin-top: clamp(44px, 5vw, 64px); }
.rph-kreis[hidden] { display: none; }
.rph-kreis-titel { margin: 0 0 10px; color: var(--g-titel); font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.rph-kreis-art { display: block; margin: 0 0 6px; color: var(--g-blau); font-size: 14px; font-weight: 600; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; }
.rph-kreis-text { max-width: 44rem; margin: 0 0 18px; color: var(--g-text); font-size: clamp(18px, 1.07rem + .25vw, 19px); line-height: 1.6; }
.rph-kreis-text a { color: var(--g-blau); text-decoration: underline; text-decoration-color: rgba(25, 73, 99, .4); text-underline-offset: .18em; }
.rph-kreis-text a:hover { text-decoration-color: currentColor; }
.rph-kreis-text a:focus-visible { outline: 2px solid var(--g-blau); outline-offset: 3px; border-radius: 3px; }
.rph-kreis-ohne .rph-kreis-text { margin-bottom: 0; }

/* Tabelle: Gemeinde, Einwohner, Luftlinie; die ganze Zeile ist der Link */
.rph-tabelle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rph-tabelle th, .rph-tabelle td { padding: 4px 16px 4px 0; border-bottom: 1px solid var(--g-linie); text-align: right; vertical-align: middle; white-space: nowrap; }
.rph-tabelle th:first-child { text-align: left; white-space: normal; }
.rph-tabelle thead th { padding-top: 0; padding-bottom: 10px; border-bottom-color: #c9d2da; color: var(--g-meta); font-size: 16px; font-weight: 600; line-height: 1.3; }
.rph-tabelle tbody tr { position: relative; }
.rph-tabelle tbody tr[hidden] { display: none; }
.rph-tabelle tbody th { width: 100%; padding-left: 0; font-weight: 500; }
.rph-tabelle tbody th a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 4px 0; color: var(--g-titel); font-size: 18px; font-weight: 500; line-height: 1.35; text-decoration: none; }
.rph-tabelle tbody th a::after { content: ""; position: absolute; inset: 0; }
.rph-tabelle tbody td { color: var(--g-leise); font-size: 16px; line-height: 1.35; }
.rph-tabelle .rph-pfeil-zelle { width: 1%; padding-right: 2px; color: #6b7c88; }
.rph-tabelle .rph-pfeil-zelle .rpg-pfeil { display: block; }
.rph-tabelle tbody tr:hover, .rph-tabelle tbody tr.ist-aktiv { background: var(--g-flaeche); }
.rph-tabelle tbody tr:hover th a, .rph-tabelle tbody tr.ist-aktiv th a { color: var(--g-blau); }
.rph-tabelle tbody tr:hover .rph-pfeil-zelle, .rph-tabelle tbody tr.ist-aktiv .rph-pfeil-zelle { color: var(--g-blau); }
.rph-tabelle tbody th a:focus-visible { outline: 2px solid var(--g-blau); outline-offset: 3px; border-radius: 3px; }
@supports selector(:has(a)) {
  .rph-tabelle tbody th a:focus-visible { outline: none; }
  .rph-tabelle tbody tr:has(a:focus-visible) { outline: 2px solid var(--g-blau); outline-offset: -2px; background: var(--g-flaeche); }
}
.rph-tabelle tbody td:first-of-type { padding-left: 12px; }
.rph-quelle { max-width: 44rem; margin: 24px 0 0; color: var(--g-leise); font-size: 16px; line-height: 1.5; }

/* ---------- Karte ---------- */
.rph-karte { position: relative; min-width: 0; }
@media (min-width: 992px) and (min-height: 760px) { .rph-karte { position: sticky; top: 112px; } }
.rph-karte-figur { margin: 0; }
.rph-karte-flaeche { position: relative; isolation: isolate; aspect-ratio: 4 / 5; border-radius: var(--rp-radius, 14px); overflow: hidden; background: #33433b; }
.rph-karte-grund, .rph-karte-grund img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.rph-karte-grund img { object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; }
/* Blauverlauf wie «Wo wir Immobilien vermarkten»: Ränder dichter, Mitte fast klar */
.rph-karte-flaeche::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 95% at 45% 50%, rgba(25, 73, 99, 0) 35%, rgba(16, 52, 74, .34) 100%),
    linear-gradient(180deg, rgba(25, 73, 99, .26) 0%, rgba(25, 73, 99, .12) 45%, rgba(25, 73, 99, .24) 100%);
}
.rph-grenzen { position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.rph-maske { fill: rgba(8, 26, 38, .46); }
.rph-grenze { fill: rgba(255, 255, 255, 0); stroke: rgba(255, 255, 255, .5); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rph-grenze.ist-aktiv { fill: rgba(255, 255, 255, .13); stroke: rgba(255, 255, 255, .9); }
.rph-kanton { fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rph-kreis-name {
  position: absolute; z-index: 3; left: var(--x); top: var(--y); transform: translate(-50%, -50%); max-width: 11em;
  pointer-events: none; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.25; letter-spacing: .12em;
  text-align: center; text-transform: uppercase; text-shadow: 0 1px 2px rgba(0, 0, 0, .7), 0 0 12px rgba(0, 0, 0, .55);
}
.rph-kreis-name.ist-ohne { color: rgba(255, 255, 255, .86); font-weight: 500; }

/* Punkte: sichtbar 11 px; Name erst bei Hover über Zeile oder Punkt */
.rph-punkt {
  position: absolute; z-index: 4; left: var(--x); top: var(--y); display: grid; place-items: center;
  width: 24px; height: 24px; margin: -12px 0 0 -12px; pointer-events: none;
}
.rph-punkt i {
  display: block; box-sizing: border-box; width: 11px; height: 11px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 2px rgba(25, 73, 99, .92), 0 1px 5px rgba(0, 0, 0, .55);
}
.rph-punkt-name, .rph-sitz-name {
  position: absolute; left: calc(50% + 12px); top: 50%; translate: 0 -50%; padding: 3px 2px; white-space: nowrap;
  color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 0 5px rgba(0, 0, 0, .5), 0 0 14px rgba(0, 0, 0, .55);
}
.rph-punkt-name { opacity: 0; }
.rph-punkt.links .rph-punkt-name { left: auto; right: calc(50% + 12px); }
.rph-punkt.ist-aktiv { z-index: 6; }
.rph-punkt.ist-aktiv i { transform: scale(1.45); box-shadow: 0 0 0 2px #194963, 0 0 0 5px rgba(255, 255, 255, .35), 0 1px 6px rgba(0, 0, 0, .6); }
.rph-punkt.ist-aktiv .rph-punkt-name { opacity: 1; }
.rph-punkt.ist-aus { opacity: .3; }
.rph-sitz { position: absolute; z-index: 5; left: var(--x); top: var(--y); display: grid; place-items: center; width: 24px; height: 24px; margin: -12px 0 0 -12px; pointer-events: none; }
.rph-sitz i { display: block; box-sizing: border-box; width: 17px; height: 17px; border: 3px solid #fff; border-radius: 50%; background: #194963; box-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.rph-sitz-name { font-size: 15px; letter-spacing: .16em; text-transform: uppercase; }
.rph-sitz.links .rph-sitz-name { left: auto; right: calc(50% + 13px); }
.rph-sitz.ist-aktiv i { transform: scale(1.25); }
.rph-legende { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; color: var(--g-leise); font-size: 16px; line-height: 1.4; }
.rph-legende span { display: inline-flex; align-items: center; gap: 9px; }
.rph-legende i { flex: none; display: inline-block; box-sizing: border-box; }
.rph-l-punkt { width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #194963; }
.rph-l-sitz { width: 15px; height: 15px; border: 3px solid #fff; border-radius: 50%; background: #194963; box-shadow: 0 0 0 1px #86909a; }
.rph-l-linie { width: 22px; height: 0; border-top: 2px solid #86909a; }
.rph-legende .rph-l-quelle { flex-basis: 100%; }
@media (hover: hover) and (pointer: fine) {
  .rph-body .rph-punkt { pointer-events: auto; cursor: pointer; }
}

/* ---------- Bewertung ---------- */
.rph-bewertung { padding-top: clamp(40px, 5vw, 72px); }
.rph-bew-raster { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
@media screen and (max-width: 1199px) {
  .rph-bew-raster { grid-template-columns: minmax(0, 1fr); }
  .rph-bew-text { max-width: 46rem; }
  .rph-bew-form { justify-content: flex-start; }
}
.rph-bew-text .rpg-lead { margin-top: 18px; }
.rph-bew-punkte { margin: 26px 0 20px; }
.rph-bew-punkte li { color: var(--g-text); font-size: clamp(18px, 1.07rem + .25vw, 19px); line-height: 1.6; }
.rph-bew-punkte strong { color: var(--g-titel); font-weight: 600; }
.rph-bew-form { min-width: 0; display: flex; justify-content: flex-end; }
.rph-bew-form .rp-bf { margin: 0; }

/* ---------- So arbeiten wir, Weiterlesen ---------- */
.rph-wissen { padding-top: clamp(40px, 5vw, 72px); }
.rph-wissen .rpg-text { max-width: 46rem; }
.rph-weiter { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--g-linie); }
.rph-weiter li { margin: 0; border-bottom: 1px solid var(--g-linie); }
.rph-weiter a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; min-height: 64px;
  padding: 14px 4px 14px 0; color: var(--g-titel); text-decoration: none !important;
}
.rph-weiter strong { grid-column: 1; font-size: 19px; font-weight: 600; line-height: 1.35; }
.rph-weiter span { grid-column: 1; color: var(--g-leise); font-size: 16px; line-height: 1.45; }
.rph-weiter .rpg-pfeil { grid-column: 2; grid-row: 1 / span 2; color: #6b7c88; }
.rph-weiter a:hover strong, .rph-weiter a:hover .rpg-pfeil { color: var(--g-blau); }
.rph-weiter a:focus-visible { outline: 2px solid var(--g-blau); outline-offset: 2px; border-radius: 4px; }

/* ---------- Breiten ---------- */
@media screen and (max-width: 991px) {
  .rph-raster { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rph-karte { order: -1; width: 100%; max-width: 520px; margin: 0 0 clamp(32px, 5vw, 48px); }
}
@media screen and (max-width: 767px) {
  .rph-suche { max-width: none; }
  .rph-tabelle th, .rph-tabelle td { padding-right: 10px; }
  .rph-tabelle tbody th a { font-size: 17px; }
  .rph-tabelle tbody td:first-of-type { padding-left: 8px; }
  .rph-legende { gap: 6px 18px; }
  .rph-punkt i { width: 9px; height: 9px; }
}
@media screen and (max-width: 479px) {
  .rph-tabelle thead th { font-size: 16px; }
  .rph-tabelle .rph-pfeil-zelle { display: none; }
  .rph-tabelle th, .rph-tabelle td { padding-right: 8px; }
  .rph-tabelle td:last-of-type { padding-right: 0; }
}

/* ---------- Bewegung nur auf Wunsch ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rph-tabelle tbody tr, .rph-tabelle tbody th a, .rph-tabelle .rph-pfeil-zelle { transition: background-color .2s var(--g-weich), color .2s var(--g-weich); }
  .rph-tabelle .rph-pfeil-zelle .rpg-pfeil, .rph-weiter .rpg-pfeil { transition: transform .3s var(--g-aus), color .2s var(--g-weich); }
  .rph-tabelle tbody tr:hover .rph-pfeil-zelle .rpg-pfeil, .rph-weiter a:hover .rpg-pfeil { transform: translateX(4px); }
  .rph-punkt i, .rph-sitz i { transition: transform .3s var(--g-aus), box-shadow .3s var(--g-aus); }
  .rph-punkt, .rph-punkt-name { transition: opacity .2s var(--g-weich); }
  .rph-grenze { transition: fill .3s var(--g-weich), stroke .3s var(--g-weich); }
}

/* ---------- Druck: Liste ohne Karte und Formulare ---------- */
@media print {
  .rph-karte, .rph-suche, .rph-bewertung, .rph-tabelle .rph-pfeil-zelle { display: none !important; }
  .rph-raster { grid-template-columns: 1fr; }
  .rph-tabelle tbody tr:hover { background: none; }
}
