/* =========================================================
   PROPERTY DETAIL – LAYOUT & HERO 
   ========================================================= */

.ps-detail * {
  border-radius: 4px !important;
}

.ps-btn {
  border-radius: 2px !important;
}

.ps-detail {
  margin: 0;
  padding: 0;
}

.ps-detail__header {
  position: relative;
}

/* FULL-WIDTH HERO */
.ps-detail__heroWrap {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: 450px;
  position: relative;
  overflow: hidden;
  background: #000;
}

.ps-detail__heroImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* HERO OVERLAY */
.ps-detail__heroShade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, .65) 0%,
      rgba(0, 0, 0, .35) 55%,
      rgba(0, 0, 0, .15) 75%,
      rgba(0, 0, 0, 0) 100%);
  z-index: 1;
}

/* TITLE + META INSIDE HERO */
.ps-detail__headtext {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 72px;
  z-index: 2;
  color: #fff;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, .35),
    0 4px 12px rgba(0, 0, 0, .25);
}

.ps-detail__title {
  margin: 0 0 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
}

.ps-detail__sub {
  font-size: 0.95rem;
  opacity: 0.95;
}

.ps-dot {
  margin: 0 6px;
  opacity: 0.7;
}

/* =========================================================
   KPI BAR
   ========================================================= */

.ps-kpi {
  max-width: 1200px;
  margin: -12px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.ps-kpi__item {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.ps-kpi__value {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.ps-kpi__label {
  font-size: 0.8rem;
  color: #6b7280;
}

/* =========================================================
   BODY LAYOUT
   ========================================================= */

.ps-detail__body {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
}

.ps-detail__content {
  line-height: 1.65;
  font-size: 0.95rem;
}

/* Reduce spacing after section headings inside the content area */
.ps-detail__content h2 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem; /* smaller gap after h2 */
  line-height: 1.25;
}
 
/* =========================================================
   CONTENT TABLE STYLING
   ========================================================= */

.ps-detail__content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.25rem 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.9rem;
}

/* Cells */
.ps-detail__content th,
.ps-detail__content td {
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  text-align: left;
}

/* Header row */
.ps-detail__content thead th,
.ps-detail__content table tr:first-child th {
  font-weight: 600;
  background: rgba(0, 0, 0, .04);
}

/* Remove last divider */
.ps-detail__content tr:last-child th,
.ps-detail__content tr:last-child td {
  border-bottom: 0;
}

/* Zebra rows */
.ps-detail__content tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, .02);
}

/* Mobile scroll */
.ps-detail__content table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.ps-detail__sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ps-sidecard {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.ps-sidecard__title {
  font-weight: 600;
  margin-bottom: 10px;
}

.ps-sidecard__text {
  font-size: 0.9rem;
  color: #374151;
}

.ps-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 0;
  background: #111827;
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
}

.ps-btn:hover {
  background: #000;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1024px) {
  .ps-detail__body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ps-detail__heroWrap {
    height: 320px;
  }

  /* ✅ Headtext nicht mehr absolut -> kann nicht mehr von KPI überdeckt werden */
  .ps-detail__headtext{
    position: relative !important;
    left: auto; right: auto; bottom: auto;
    z-index: 6;
    padding: 0 16px;

    /* zieht den Block optisch in den Hero hinein */
    margin-top: -120px;   /* bei Bedarf -100..-140 */
    margin-bottom: 10px;
  }

  /* optional: Title etwas kompakter, damit er weniger "wächst" */
  .ps-detail__title{
    line-height: 1.05;
  }

  /* ✅ KPI nicht mehr hochziehen -> kein Collision-Risiko */
  .ps-kpi{
    margin: 0 auto 0 !important;  /* statt -16px */
    padding: 0 16px;
    z-index: 5;
  }

  .ps-detail__body {
    padding: 0 16px;
    margin-top: 32px;
  }
}

  .ps-kpi {
    margin-top: -16px;
    padding: 0 16px;
  }

  .ps-detail__body {
    padding: 0 16px;
    margin-top: 32px;
  }

  /* ---------------------------------------------------------
     FIX: Mobile overlap (Titel wird von KPI "überdeckt")
     Ursache: headtext absolut + KPI negativer margin-top
     Lösung: headtext höher setzen + KPI-Overlap reduzieren
     --------------------------------------------------------- */
  .ps-detail__headtext{
    bottom: 64px;   /* statt 18px */
    z-index: 6;     /* sicher über KPI/Overlay */
  }

  .ps-kpi{
    margin-top: -8px; /* statt -16px (bei Bedarf 0) */
  }

  .ps-detail__title{
    line-height: 1.05; /* etwas entspannter bei 2 Zeilen */
  }
}

/* Extra klein: noch etwas mehr Luft (optional, aber hilft auf 360px Breite) */
@media (max-width: 420px){
  .ps-detail__headtext{ bottom: 76px; }
  .ps-detail__title{ font-size: 1.45rem; }
}


/* =========================================================
   SIDEBAR – GOOGLE MAP (SATELLITE)
   ========================================================= */

.ps-sidecard--map {
  padding: 16px;
}

.ps-sidecard__map {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.ps-sidecard__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.ps-sidecard__maplink {
  display: inline-block;
  font-size: 0.8rem;
  color: #374151;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* =========================================================
   DETAIL – typography + KPI icons (align with property-grid)
   ========================================================= */

.ps-detail {
  font-family: Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  padding-bottom: 32px;
}

.ps-kpi__item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ps-kpi__ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  background: none;
  flex: 0 0 auto;
}

.ps-kpi__ico svg {
  width: 18px;
  height: 18px;
}

.ps-kpi__txt {
  min-width: 0;
}

/* =========================================================
   SPACING – add breathing room after gallery/content to footer
   ========================================================= */

.ps-detail__content .wp-block-gallery,
.ps-detail__content .gallery {
  margin-bottom: 44px;
}

.ps-detail__content > *:last-child {
  margin-bottom: 64px;
}

.ps-sidecard__idline{margin:0;}

/* =========================================================
   W&J Button – scoped to .ps-detail
   Left → Right Fill Animation
   ========================================================= */

.ps-detail .wj-btn{
  --wj-btn-bg:#d5b284;
  --wj-btn-fg:#111;
  --wj-btn-border:#d5b284;

  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:12px 20px;
  border-radius:999px;
  border:1px solid var(--wj-btn-border);
  background:transparent;
  color:var(--wj-btn-fg);
  text-decoration:none;
  font-weight:600;
  line-height:1;
  cursor:pointer;
  overflow:hidden;

  transition:
    color .28s ease,
    transform .18s ease;
}

.ps-detail .wj-btn::before{
  content:"";
  position:absolute;
  inset:0;
  background:var(--wj-btn-bg);
  transform:translateX(-101%);
  transition:transform .38s cubic-bezier(.2,.8,.2,1);
  z-index:0;
}

.ps-detail .wj-btn > span{
  position:relative;
  z-index:1;
}

.ps-detail .wj-btn:hover::before,
.ps-detail .wj-btn:focus-visible::before{
  transform:translateX(0);
}

.ps-detail .wj-btn:hover,
.ps-detail .wj-btn:focus-visible{
  color:#000;
}

.ps-detail .wj-btn:active{
  transform:translateY(1px);
}

.ps-detail .wj-btn:focus-visible{
  outline:2px solid rgba(213,178,132,.5);
  outline-offset:3px;
}

/* Motion safety */
@media (prefers-reduced-motion: reduce){
  .ps-detail .wj-btn,
  .ps-detail .wj-btn::before{
    transition:none !important;
  }
}
