/**
 * Witthöft Immobilien – Anlage Top-Objekte Styles
 * CDN Version 1.0
 */

/* ============================================================
   SLIDER CONTAINER
   ============================================================ */
.is--anlage-top__wrap {
  position: relative;
  overflow: hidden;
}

.is--anlage-top__grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.is--anlage-top__grid::-webkit-scrollbar {
  display: none;
}

/* Slider Arrows */
.wh-atop-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-80%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-size: 20px;
  color: #1a1a1a;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.wh-atop-slider__arrow:hover {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.wh-atop-slider__arrow--left { left: 12px; }
.wh-atop-slider__arrow--right { right: 12px; }
.wh-atop-slider__arrow.is--hidden { opacity: 0; pointer-events: none; }

@media (max-width: 768px) {
  .wh-atop-slider__arrow { display: none; }
}

/* ============================================================
   CARD
   ============================================================ */
.wh-atop-card {
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  width: 340px;
  scroll-snap-align: start;
}
.wh-atop-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

@media (max-width: 1200px) {
  .wh-atop-card { width: 310px; }
}
@media (max-width: 768px) {
  .wh-atop-card { width: 280px; }
  .is--anlage-top__grid { gap: 14px; }
}

/* ============================================================
   IMAGE AREA
   ============================================================ */
.wh-atop-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0f0f0;
}
.wh-atop-card__slides {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}
.wh-atop-card__slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}
.wh-atop-card__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   OBJEKTART BADGE – oben links (Teal, wie im Screenshot)
   ============================================================ */
.wh-atop-card__type-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #038c8d;
  color: #fff;
  font-family: 'Encode Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  z-index: 7;
  border-radius: 2px;
}

/* ============================================================
   IMAGE SLIDER ARROWS
   ============================================================ */
.wh-atop-card__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 8;
  font-size: 18px;
  color: #333;
  line-height: 1;
  padding: 0;
}
.wh-atop-card:hover .wh-atop-card__arrow { opacity: 1; }
.wh-atop-card__arrow:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.wh-atop-card__arrow--left { left: 10px; }
.wh-atop-card__arrow--right { right: 10px; }

@media (max-width: 768px) {
  .wh-atop-card__arrow { display: none; }
}

/* ============================================================
   IMAGE SLIDER DOTS
   ============================================================ */
.wh-atop-card__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 8;
}
.wh-atop-card:hover .wh-atop-card__dots { opacity: 1; }
@media (max-width: 768px) {
  .wh-atop-card__dots { opacity: 1; }
}
.wh-atop-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background 0.2s ease;
}
.wh-atop-card__dot.wh-atop-dot-active { background: #fff; }

/* ============================================================
   SOLD / RENTED BANNER
   ============================================================ */
.wh-atop-card__sold-banner {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wh-atop-card__sold-text {
  background: #038c8d;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 28px;
  transform: rotate(-8deg);
}

/* ============================================================
   BODY
   ============================================================ */
.wh-atop-card__body {
  padding: 20px 22px 18px;
}
@media (max-width: 600px) {
  .wh-atop-card__body { padding: 16px 18px 16px; }
}

.wh-atop-card__title {
  font-family: 'Encode Sans', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wh-atop-card__location {
  font-size: 13px;
  color: #777;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wh-atop-card__location::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #038c8d;
  flex-shrink: 0;
}

/* ============================================================
   KEY FACTS
   ============================================================ */
.wh-atop-card__facts {
  display: flex;
  align-items: flex-end;
  border-top: 1px solid #eee;
  padding-top: 14px;
  gap: 0;
}
.wh-atop-card__fact {
  flex: 1;
  min-width: 0;
  padding-right: 10px;
}
.wh-atop-card__fact:not(:last-of-type) {
  border-right: 1px solid #eee;
  margin-right: 10px;
}
.wh-atop-card__fact-value {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wh-atop-card__fact-label {
  font-size: 9px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

/* ============================================================
   CTA ARROW
   ============================================================ */
.wh-atop-card__cta {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f2f2f2;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  margin-left: auto;
  color: #333;
}
.wh-atop-card:hover .wh-atop-card__cta {
  background: #038c8d;
  color: #fff;
}
.wh-atop-card__cta svg { width: 15px; height: 15px; }
