/* ═══════════════════════════════════════
   SW Immobilien – Einzelobjekt (immobilie.php)
   ═══════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Outfit:wght@300;400;500&display=swap');

/* Neue Variablen (ergänzend zum globalen CSS) */
:root {
  --teal-bg: #e8f7f4;
  --bg:      #f3f2ef;
  --border2: #f0ede8;
  --muted:   #aaa;
  --serif:   'Cormorant Garamond', serif;
  --sans:    'Outfit', sans-serif;
}

body { background: var(--bg); font-family: var(--sans); }

/* ── SEITEN-WRAPPER ── */
.page { max-width: 1140px; margin: 0 auto; padding: 0 24px 80px; }

/* ── TOPBAR ── */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 16px; flex-wrap: wrap; gap: 12px; }
.breadcrumb { font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.breadcrumb a { color: var(--teal); font-weight: 500; }
.breadcrumb span { margin: 0 8px; color: #ccc; }
.topactions { display: flex; gap: 8px; }
.topbtn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; background: #fff;
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: #555; cursor: pointer; font-family: var(--sans); white-space: nowrap;
  transition: border-color .2s, color .2s;
}
.topbtn:hover { border-color: var(--teal); color: var(--teal); }

/* ── SHARE OVERLAY ── */
.share-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(243,242,239,.92); z-index: 999;
  align-items: center; justify-content: center; padding: 20px;
}
.share-overlay.open { display: flex; }
.share-box { background: #fff; border-radius: 8px; padding: 28px; max-width: 340px; width: 100%; border: 1px solid var(--border); }
.share-title { font-family: var(--serif); font-size: 22px; font-weight: 400; margin-bottom: 4px; }
.share-sub { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-radius: 4px; font-size: 12px;
  font-family: var(--sans); cursor: pointer; border: 1px solid var(--border);
  background: var(--light,#faf9f7); color: var(--dark,#1a1a1a); font-weight: 500;
  transition: all .2s;
}
.sh-btn:hover { border-color: var(--teal); color: var(--teal); }
.sh-wa { background: #25D366; color: #fff; border-color: #25D366; }
.sh-wa:hover { background: #20bb5a; color: #fff; border-color: #20bb5a; }
.share-close {
  margin-top: 12px; width: 100%; padding: 10px; background: none;
  border: 1px solid var(--border); border-radius: 4px;
  font-family: var(--sans); font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; cursor: pointer; color: var(--muted);
}

/* ── GALERIE ── */
.gallery {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: 260px 120px;
  gap: 8px; margin-bottom: 40px;
  border-radius: 6px; overflow: hidden;
}
.gallery-main { grid-row: 1 / 3; background: #e2ded6; position: relative; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.gallery-main img:hover { transform: scale(1.02); }
.gallery-thumb { background: #d8d4cc; overflow: hidden; cursor: pointer; position: relative; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.gallery-thumb:hover img { opacity: .85; }
.gallery-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #c0bbb2; }

/* ── CONTACT BAR ── */
.contact-bar {
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 14px 20px; margin-bottom: 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.cb-agent { display: flex; align-items: center; gap: 12px; }
.cb-av {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--teal-bg); border: 1.5px solid var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--teal);
  flex-shrink: 0; letter-spacing: .04em;
}
.cb-name { font-size: 13px; font-weight: 500; }
.cb-role { font-size: 11px; color: var(--muted); margin-top: 1px; }
.cb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 4px; font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase;
  font-family: var(--sans); cursor: pointer;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--dark,#1a1a1a); font-weight: 500; white-space: nowrap;
  transition: all .2s; text-decoration: none;
}
.cb-btn:hover { border-color: var(--teal); color: var(--teal); }
.cb-btn-wa { background: #25D366; color: #fff; border-color: #25D366; }
.cb-btn-wa:hover { background: #20bb5a; border-color: #20bb5a; color: #fff; }

/* ── 2-COL LAYOUT ── */
.layout { display: grid; grid-template-columns: 1fr 370px; gap: 48px; align-items: start; }

/* ── LINKE SPALTE ── */
.badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.badge { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 2px; font-weight: 500; }
.badge-kauf  { background: var(--teal); color: #fff; }
.badge-miete { background: #6366F1; color: #fff; }
.badge-type  { background: var(--border); color: #555; }
.obj-title { font-family: var(--serif); font-size: 34px; font-weight: 400; line-height: 1.2; margin-bottom: 8px; color: var(--dark,#1a1a1a); letter-spacing: -.01em; }
.obj-loc { font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 28px; }

/* ── FAKTEN ── */
.facts {
  display: grid; grid-template-columns: repeat(4,1fr);
  background: #fff; border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden; margin-bottom: 20px;
}
.fact { padding: 18px 14px; text-align: center; border-right: 1px solid var(--border2); }
.fact:last-child { border-right: none; }
.fv { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--dark,#1a1a1a); display: block; margin-bottom: 3px; }
.fl { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* ── ECKDATEN ── */
.eckdaten { background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 28px; }
.ed-head { padding: 12px 18px; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border-bottom: 1px solid var(--border2); background: var(--light,#faf9f7); }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; }
.ed-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; border-bottom: 1px solid #f5f3f0; font-size: 12px; gap: 8px; }
.ed-row:last-child { border-bottom: none; }
.ed-row:nth-child(odd) { background: #fdfcfa; }
.ed-key { color: #888; flex-shrink: 0; }
.ed-val { font-weight: 500; text-align: right; }

/* ── PROVISION ── */
.prov {
  display: flex; align-items: flex-start; gap: 12px;
  background: #f9f7f4; border: 1px solid var(--border);
  border-left: 3px solid var(--teal); border-radius: 0 4px 4px 0;
  padding: 14px 16px; margin-bottom: 32px;
  font-size: 13px; color: #555; line-height: 1.6;
}

/* ── TEXT SEKTIONEN ── */
.sec-title { font-family: var(--serif); font-size: 24px; font-weight: 400; color: var(--dark,#1a1a1a); margin-bottom: 12px; }
.sec-text { font-size: 14px; line-height: 1.85; color: #444; margin-bottom: 6px; }
.sec-text.hidden { display: none; }
.read-more-btn {
  font-size: 12px; color: var(--teal); background: none; border: none;
  padding: 0; cursor: pointer; margin-top: 6px; display: inline-block;
  font-family: var(--sans);
}
.read-more-btn:hover { text-decoration: underline; }
.divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* ── ANFRAGE CARD ── */
.req-card { background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; position: sticky; top: 24px; }
.req-header { padding: 22px 22px 18px; border-bottom: 1px solid var(--border2); }
.req-eyebrow { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 5px; font-weight: 500; }
.req-title { font-family: var(--serif); font-size: 20px; font-weight: 400; line-height: 1.3; }
.req-sub { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.agent { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--border2); }
.av {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--teal-bg); border: 1.5px solid var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--teal); flex-shrink: 0;
}
.ag-name { font-size: 13px; font-weight: 500; }
.ag-role { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ── FORMULAR ── */
.fb { padding: 18px 22px 22px; }
.fg { margin-bottom: 12px; }
.fr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lbl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #bbb; margin-bottom: 4px; }
.inp {
  width: 100%; padding: 10px 12px;
  border: 1px solid #ede9e3; border-radius: 4px;
  font-family: var(--sans); font-size: 13px; color: var(--dark,#1a1a1a);
  background: #fdfcfa; outline: none;
  transition: border-color .2s; -webkit-appearance: none; appearance: none;
}
.inp:focus { border-color: var(--teal); background: #fff; }
.inp.is-error { border-color: #dc3545; }
select.inp {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 5 5-5z' fill='%23bbb'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 28px; cursor: pointer;
}
textarea.inp { resize: none; height: 64px; line-height: 1.6; }
.fdiv { border: none; border-top: 1px solid var(--border2); margin: 10px 0; }
.f-err { font-size: 11px; color: #dc3545; margin-top: 3px; font-family: var(--sans); }

/* Custom Checkboxen */
.cbl {
  display: flex; align-items: flex-start; gap: 9px;
  cursor: pointer; font-size: 11px; color: #666;
  line-height: 1.55; margin-bottom: 9px;
}
.cbl input[type=checkbox] { display: none; }
.cbox {
  width: 14px; height: 14px; border: 1px solid #ddd; border-radius: 3px;
  flex-shrink: 0; margin-top: 2px; background: #fdfcfa;
  transition: all .15s; position: relative; display: block;
}
.cbl input:checked ~ .cbox { background: var(--teal); border-color: var(--teal); }
.cbl input:checked ~ .cbox::after {
  content: ''; position: absolute;
  left: 3px; top: 1px; width: 6px; height: 4px;
  border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg);
}
.cbl a { color: var(--teal); }

.btn-submit {
  width: 100%; background: var(--teal); color: #fff; border: none;
  padding: 14px; border-radius: 4px;
  font-family: var(--sans); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; cursor: pointer; margin-top: 4px;
  transition: background .2s; font-weight: 500;
}
.btn-submit:hover { background: #3aada0; }
.form-note { font-size: 10px; color: #ccc; text-align: center; margin-top: 8px; }

/* Erfolgsbox im Card */
.req-success { padding: 28px 22px; text-align: center; }
.req-success-icon { font-size: 36px; margin-bottom: 12px; }
.req-success h3 { font-family: var(--serif); font-size: 20px; font-weight: 400; margin-bottom: 8px; }
.req-success p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── FINANZIERUNGSRECHNER ── */
.section-wrap { margin-top: 52px; }
.sec-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--teal); font-weight: 500; margin-bottom: 8px; }
.sec-h2 { font-family: var(--serif); font-size: 28px; font-weight: 400; margin-bottom: 6px; }
.sec-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

.calc-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.calc-body { display: grid; grid-template-columns: 1fr 1fr; }
.calc-left { padding: 32px 36px; border-right: 1px solid var(--border2); }
.calc-right { padding: 32px 36px; background: var(--light,#faf9f7); }

.slider-group { margin-bottom: 26px; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.slider-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.slider-val { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.slider-val small { font-size: 13px; font-family: var(--sans); color: var(--muted); margin-left: 2px; }
.track-labels { display: flex; justify-content: space-between; font-size: 10px; color: #ccc; margin-top: 4px; }

input[type=range] { width: 100%; -webkit-appearance: none; height: 3px; background: var(--border); border-radius: 2px; outline: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--teal); border: 2.5px solid #fff; box-shadow: 0 0 0 1px var(--teal); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--teal); border: 2.5px solid #fff; cursor: pointer; }

.result-rate-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.result-rate { font-family: var(--serif); font-size: 48px; font-weight: 300; line-height: 1; margin-bottom: 4px; }
.result-rate small { font-size: 16px; font-family: var(--sans); color: #888; margin-left: 4px; }
.result-sub-text { font-size: 11px; color: var(--muted); margin-bottom: 24px; }

.result-kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 20px; }
.rk { background: #fff; padding: 13px 14px; }
.rk-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 3px; }
.rk-val { font-size: 14px; font-weight: 500; }

.bar-wrap { margin-bottom: 18px; }
.bar-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.bar-track { height: 5px; background: var(--border2); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.bar-zins { height: 100%; background: var(--teal); border-radius: 3px; transition: width .3s; }
.bar-tilg { height: 100%; background: #c8e8e3; border-radius: 3px; transition: width .3s; }
.calc-note { font-size: 11px; color: #bbb; line-height: 1.6; border-top: 1px solid var(--border2); padding-top: 14px; }
.calc-note a { color: var(--teal); }

/* ── POI ── */
.dist-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 24px; }
.ds-item { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 16px; text-align: center; }
.ds-val { font-family: var(--serif); font-size: 22px; font-weight: 400; display: block; }
.ds-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 3px; }

.poi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.poi-card { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 14px; display: flex; align-items: center; gap: 11px; transition: border-color .2s; }
.poi-card:hover { border-color: var(--teal); }
.poi-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.poi-info { flex: 1; min-width: 0; }
.poi-name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poi-type { font-size: 10px; color: var(--muted); margin-top: 1px; }
.poi-dist { font-size: 13px; font-weight: 500; color: var(--teal); white-space: nowrap; flex-shrink: 0; text-align: right; }
.poi-min { font-size: 10px; color: #ccc; display: block; margin-top: 1px; }
.poi-note { font-size: 11px; color: #bbb; margin-top: 12px; line-height: 1.6; }

/* ── ÄHNLICHE OBJEKTE ── */
.similar-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.sim-card { background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; cursor: pointer; transition: border-color .2s; text-decoration: none; display: block; color: inherit; }
.sim-card:hover { border-color: var(--teal); }
.sim-img { height: 160px; background: #e2ded6; position: relative; overflow: hidden; }
.sim-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sim-badge { position: absolute; top: 10px; left: 10px; background: var(--teal); color: #fff; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; font-weight: 500; }
.sim-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.sim-body { padding: 15px; }
.sim-loc { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); margin-bottom: 5px; }
.sim-title { font-family: var(--serif); font-size: 16px; font-weight: 400; line-height: 1.3; margin-bottom: 10px; color: var(--dark,#1a1a1a); }
.sim-facts { display: flex; gap: 10px; font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.sim-price { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.sim-link { font-size: 11px; color: var(--teal); text-transform: uppercase; letter-spacing: .06em; float: right; margin-top: 2px; }

/* ════════════════════════════
   RESPONSIVE
   ════════════════════════════ */
@media(max-width:900px) {
  .layout { grid-template-columns: 1fr; }
  .req-card { position: static; }
  .sidebar { order: -1; }
  .calc-body { grid-template-columns: 1fr; }
  .calc-left { border-right: none; border-bottom: 1px solid var(--border2); padding: 24px; }
  .calc-right { padding: 24px; }
  .similar-grid { grid-template-columns: 1fr 1fr; }
}
@media(max-width:680px) {
  .gallery { grid-template-columns: 1fr; grid-template-rows: 220px; }
  .gallery-main { grid-row: auto; }
  .gallery-thumb { display: none; }
  .facts { grid-template-columns: repeat(2,1fr); }
  .fact:nth-child(2) { border-right: none; }
  .fact:nth-child(3) { border-top: 1px solid var(--border2); }
  .fact:nth-child(4) { border-top: 1px solid var(--border2); border-right: none; }
  .ed-grid { grid-template-columns: 1fr; }
  .obj-title { font-size: 26px; }
  .contact-bar { flex-direction: column; align-items: flex-start; }
  .cb-actions { width: 100%; }
  .cb-btn { flex: 1; justify-content: center; }
  .poi-grid { grid-template-columns: repeat(2,1fr); }
  .dist-summary { grid-template-columns: repeat(2,1fr); }
  .fr { grid-template-columns: 1fr; }
  .result-rate { font-size: 38px; }
}
@media(max-width:420px) {
  .page { padding: 0 16px 60px; }
  .poi-grid { grid-template-columns: 1fr; }
  .similar-grid { grid-template-columns: 1fr; }
  .share-btns { grid-template-columns: 1fr; }
  .dist-summary { grid-template-columns: 1fr; }
}

/* ════════════════════════════
   PRINT
   ════════════════════════════ */
@media print {
  .contact-bar, .req-card, .topactions, .share-overlay,
  .section-wrap.financing, .section-wrap.similar { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: 300px; }
  .gallery-thumb { display: none; }
  body { background: #fff; }
}
