/* Staging homepage: Market Insights + Browse by Property Type (reference layout) */
.mk-home-insights {
  --mk-hi-orange: #E6771E;
  --mk-hi-orange-soft: rgba(230, 119, 30, 0.14);
  --mk-hi-navy: #111827;
  --mk-hi-text: #1f2937;
  --mk-hi-muted: #6b7280;
  --mk-hi-border: #e5e7eb;
  --mk-hi-bg: #f3f4f6;
  --mk-hi-card: #ffffff;
  --mk-hi-radius: 14px;
  --mk-hi-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  --mk-hi-up: #159a45;
  --mk-hi-down: #d14343;
  color: var(--mk-hi-text);
  background: var(--mk-hi-bg);
}

.mk-home-insights a {
  text-decoration: none;
  color: inherit;
}

.mk-home-insights__market,
.mk-home-insights__types {
  padding: 40px 0 28px;
}

.mk-home-insights__types {
  padding-top: 8px;
  padding-bottom: 48px;
}

.mk-home-insights__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.mk-home-insights__title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--mk-hi-navy);
}

.mk-home-insights__title-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--mk-hi-orange-soft);
  position: relative;
  flex: 0 0 auto;
}

.mk-home-insights__title-icon--chart::before,
.mk-home-insights__title-icon--chart::after {
  content: "";
  position: absolute;
  bottom: 7px;
  width: 4px;
  border-radius: 2px;
  background: var(--mk-hi-orange);
}

.mk-home-insights__title-icon--chart::before {
  left: 7px;
  height: 8px;
}

.mk-home-insights__title-icon--chart::after {
  left: 13px;
  height: 14px;
  box-shadow: 6px 2px 0 0 var(--mk-hi-orange);
}

.mk-home-insights__title-icon--home::before {
  content: "";
  position: absolute;
  inset: 8px 7px 7px;
  background: var(--mk-hi-orange);
  clip-path: polygon(50% 0, 100% 35%, 100% 100%, 0 100%, 0 35%);
}

.mk-home-insights__link {
  color: var(--mk-hi-orange);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.mk-home-insights__link:hover,
.mk-home-insights__link:focus {
  color: #c96312;
}

.mk-home-insights__grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 1.35fr)
    minmax(0, 1.35fr);
  gap: 16px;
  align-items: stretch;
}

.mk-insight-card {
  background: var(--mk-hi-card);
  border: 1px solid var(--mk-hi-border);
  border-radius: var(--mk-hi-radius);
  box-shadow: var(--mk-hi-shadow);
  padding: 18px 18px 14px;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mk-insight-card__top {
  margin-bottom: 10px;
}

.mk-insight-card__top--split {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.mk-insight-card__label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--mk-hi-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-insight-card__sub {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--mk-hi-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-insight-card__value {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--mk-hi-navy);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.mk-insight-card__delta {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}

.mk-insight-card__delta-note {
  font-weight: 600;
  color: var(--mk-hi-muted);
}

.mk-insight-card__delta--up { color: var(--mk-hi-up); }
.mk-insight-card__delta--down { color: var(--mk-hi-down); }
.mk-insight-card__delta--flat { color: var(--mk-hi-muted); }

.mk-insight-card__spark,
.mk-insight-chart {
  margin-top: auto;
  min-height: 72px;
}

.mk-insight-card--chart .mk-insight-chart {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mk-insight-spark {
  display: block;
  width: 100%;
}

.mk-insight-chart__labels {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
  margin-top: 8px;
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--mk-hi-muted);
}

.mk-insight-chart__labels span {
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  padding: 0 1px;
}

.mk-insight-card__foot {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--mk-hi-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-insight-card__badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--mk-hi-border);
  background: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mk-hi-muted);
  white-space: nowrap;
}

.mk-insight-bars {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.mk-insight-bars__row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
}

.mk-insight-bars__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.mk-insight-bars__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mk-hi-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.mk-insight-bars__track {
  height: 8px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
}

.mk-insight-bars__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f0a14d, var(--mk-hi-orange));
}

.mk-insight-bars__value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--mk-hi-navy);
  white-space: nowrap;
  flex: 0 0 auto;
}

.mk-insight-bars__row:hover .mk-insight-bars__name,
.mk-insight-bars__row:focus .mk-insight-bars__name {
  color: var(--mk-hi-orange);
}

.mk-home-insights__disclaimer {
  margin: 14px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--mk-hi-muted);
}

.mk-home-types__grid {
  display: grid;
  grid-template-columns: repeat(var(--mk-home-types-cols, 5), minmax(0, 1fr));
  gap: 14px;
}

/* Staging homepage bottom panel — full content width with controlled side margins */
body.theme-makler.front-homepage .mk-home-insights--types-panel {
  width: 100%;
  max-width: none;
}

body.theme-makler.front-homepage .mk-home-types--fullbleed .mk-home-types__shell {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

body.theme-makler.front-homepage .mk-home-insights--types-panel .mk-home-insights__types {
  padding-top: 36px;
  padding-bottom: 48px;
}

@media (min-width: 992px) {
  body.theme-makler.front-homepage .mk-home-types--fullbleed .mk-home-types__shell {
    padding-left: 40px;
    padding-right: 40px;
  }
}

.mk-home-type-card {
  position: relative;
  display: block;
  min-height: 168px;
  border-radius: 14px;
  overflow: hidden;
  background-color: #334155;
  background-size: cover;
  background-position: center;
  box-shadow: var(--mk-hi-shadow);
  transition: transform 0.18s ease;
}

.mk-home-type-card:hover,
.mk-home-type-card:focus {
  transform: translateY(-2px);
}

.mk-home-type-card__copy {
  position: absolute;
  left: 14px;
  right: 52px;
  bottom: 14px;
  color: #fff;
  z-index: 1;
}

.mk-home-type-card__title {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.mk-home-type-card__count {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  opacity: 0.92;
}

.mk-home-type-card__badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1;
}

.mk-home-type-card__badge::before {
  content: "";
  position: absolute;
  inset: 9px;
  background: var(--mk-hi-orange);
}

.mk-home-type-card__badge--building::before {
  clip-path: polygon(18% 100%, 18% 38%, 50% 12%, 82% 38%, 82% 100%, 62% 100%, 62% 58%, 38% 58%, 38% 100%);
}

.mk-home-type-card__badge--house::before {
  clip-path: polygon(12% 100%, 12% 48%, 50% 16%, 88% 48%, 88% 100%);
}

.mk-home-type-card__badge--briefcase::before {
  border-radius: 2px;
  inset: 11px 9px 9px;
}

.mk-home-type-card__badge--map::before {
  clip-path: polygon(10% 70%, 30% 28%, 52% 52%, 72% 22%, 90% 70%);
}

.mk-home-type-card__badge--towers::before {
  clip-path: polygon(15% 100%, 15% 45%, 35% 45%, 35% 20%, 65% 20%, 65% 45%, 85% 45%, 85% 100%);
}

.mk-home-type-card__badge--diamond::before {
  clip-path: polygon(50% 8%, 90% 38%, 50% 92%, 10% 38%);
}

@media (max-width: 1200px) {
  .mk-home-insights__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mk-home-types__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .mk-home-insights__market,
  .mk-home-insights__types {
    padding: 28px 0 20px;
  }

  .mk-home-insights__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .mk-home-insights__title {
    font-size: 1.25rem;
  }

  .mk-home-insights__grid {
    grid-template-columns: 1fr;
  }

  .mk-insight-card__label,
  .mk-insight-card__sub,
  .mk-insight-card__delta,
  .mk-insight-card__foot {
    white-space: normal;
  }

  .mk-home-types__grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }

  .mk-home-type-card {
    min-width: 72%;
    scroll-snap-align: start;
  }
}
