/* ==========================================================================
   r2go4-Skin — 1:1 extrahiert aus packages/immo/assets/css/immo.css
   Refactor 2026-05-28
   ========================================================================== */

/* ── Card-Styles ─────────────────────────────────────────────────────────── */
.result-item {
  background: #fff;
  border: 1px solid #ddd;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  min-height: 550px;
  animation: immoFadeIn 0.3s ease-out;
}

@keyframes immoFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card Image ────────────────────────────────────────────────────────── */

.result-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--immo-image-aspect-ratio, 16/9);
}

.result-image__link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  /* Permanent GPU-Composite-Layer — verhindert Subpixel-Snapping-Sprung
     an Animations-Start/Ende (Bild würde sonst „rasten"). */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.result-image__link:hover img {
  transform: scale(1.05) translateZ(0);
}

.result-placeholder {
  width: 100%;
  height: 100%;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

/* ── Badges ────────────────────────────────────────────────────────────── */

.result-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-direction: row;
  gap: 0.25rem;
}

.objektart-badge,
.vermarktungsart-badge {
  background: var(--immo-ci-color);
  color: #fff;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.result-objektnummer-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ── Status Ribbon (rotated banner) ────────────────────────────────────── */

.status-ribbon {
  position: absolute;
  top: 43px;
  right: -54px;
  width: 235px;
  padding: 0.5rem 0 0.375rem 0;
  background: #8B0000;
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  transform: rotate(45deg);
  transform-origin: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 10;
  letter-spacing: 0.5px;
}

.status-ribbon.verkauft    { background: var(--ribbon-verkauft, #8B0000); }
.status-ribbon.vermietet   { background: var(--ribbon-vermietet, #8B0000); }
.status-ribbon.reserviert  { background: var(--ribbon-reserviert, #006400); }
.status-ribbon.vorbereitung { background: var(--ribbon-vorbereitung, var(--immo-ci-color)); }
.status-ribbon.preisreduziert { background: var(--ribbon-preisreduziert, #00008B); }

/* ── Card Content ──────────────────────────────────────────────────────── */

.result-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 2.5rem 3.4375rem;
  text-align: left;
}

.result-location {
  font-size: 1rem;
  font-family: var(--font-body, 'Montserrat', sans-serif);
  color: #666;
  margin-bottom: 0.25rem;
}

.result-title {
  /* Card-Höhen-Alignment, sonst alles via globaler h3-Regel. */
  min-height: 90px;
  margin: 0;
  display: flex;
  align-items: start;
}

.result-title a {
  color: inherit;
  text-decoration: none;
}

.result-title a:hover {
  color: var(--immo-ci-color);
}

/* ── Property Grid (Fläche | Zimmer | Preis | Button) ──────────────────── */

.result-props-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1.875rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.prop-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
}

.prop-col-button {
  margin-left: auto;
}

.immo-prop-value {
  font-size: 1.2em;
  font-weight: 500;
  text-align: left;
  color: var(--color-text-dark, #1a1a1a);
  white-space: nowrap;
}

.immo-prop-label {
  display: block;
  font-size: 0.75em;
  text-align: left;
  margin-top: -5px;
  color: #666;
  white-space: nowrap;
}

/* Kurz-Labels (Wfl/Zi) sind nur für Compact-Mobile-View vorgesehen — in
 * Desktop-Listings ist .immo-prop-label das Lang-Label. Bug 2026-06-03:
 * fehlende display:none-Regel ließ beide Labels nebeneinander sichtbar
 * ("82 m² / Wohnfläche / Wfl"). */
.immo-prop-label-short {
  display: none;
}

/* Details button (round arrow) */
.details-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: #fff;
  background: var(--immo-ci-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.details-button:hover {
  background: var(--immo-ci-color-dark);
  transform: scale(1.05);
  color: #fff;
}

.details-button svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* ── No results ────────────────────────────────────────────────────────── */


/* ── Card-Responsive ─────────────────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  .result-content {
    padding: 1.875rem 2.1875rem;
  }
  .result-props-grid {
    flex-wrap: wrap;
    gap: 0.5rem 0.9375rem;
  }
  .result-props-grid .prop-col {
    flex: 0 0 auto;
  }
  .result-props-grid .prop-col-button {
    margin-left: auto;
  }
}

/* Props grid gap reduction on smaller screens */
@media (min-width: 768px) and (max-width: 1300px) {
  .result-props-grid {
    gap: 1.25rem;
  }
}

/* Tablet: filter adjustments */

@media (max-width: 479px) {
  .result-props-grid {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
  }
}

@media (max-width: 768px) {
  .result-props-grid {
    margin-top: 0;
  }
  .result-item {
    min-height: 0;
  }
}

/* ==========================================================================
   COMPACT MOBILE VIEW (when enabled in config)
   ========================================================================== */

