/* ============================================================
   Property Showcase Grid  —  3-column top row + 2-column bottom row
   ============================================================ */

/* Grid container: 6-column base so rows divide evenly */
.property-showcase-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

/* Row 1: items 1–3 each span 2 of 6 columns */
.property-showcase-card:nth-child(-n+3) {
  grid-column: span 2;
}

/* Row 2: items 4–5 each span 3 of 6 columns, shorter height to match row 1 */
.property-showcase-card:nth-child(n+4) {
  grid-column: span 3;
  aspect-ratio: 16 / 9;
}

/* Single-row variant (≤ 3 cards): all equal-width */
.property-showcase-grid--single-row .property-showcase-card {
  grid-column: span 2;
}

/* Four-column single-row variant (exactly 4 cards) */
.property-showcase-grid--four-col {
  grid-template-columns: repeat(4, 1fr);
}

.property-showcase-grid--four-col .property-showcase-card {
  grid-column: span 1;
  aspect-ratio: 4 / 3;
}

/* ---- Card shell ---- */
.property-showcase-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  background-color: #1a1a1a;
}

/* ---- Background image ---- */
.property-showcase-card__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.55s ease;
  will-change: transform;
}

.property-showcase-card:hover .property-showcase-card__media,
.property-showcase-card:focus-visible .property-showcase-card__media {
  transform: scale(1.06);
}

/* ---- Default state: gradient + title bar at bottom ---- */
.property-showcase-card__default {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 24px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  color: #fff;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.property-showcase-card:hover .property-showcase-card__default,
.property-showcase-card:focus-visible .property-showcase-card__default {
  opacity: 0;
}

.property-showcase-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.property-showcase-card__location {
  font-size: 0.8rem;
  margin-top: 4px;
  opacity: 0.8;
}

/* ---- Hover overlay ---- */
.property-showcase-card__hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.property-showcase-card:hover .property-showcase-card__hover,
.property-showcase-card:focus-visible .property-showcase-card__hover {
  opacity: 1;
}

/* Logo: rendered white regardless of source colour */
.property-showcase-card__hover-logo {
  max-width: 130px;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

/* Description text */
.property-showcase-card__hover-desc {
  color: #fff;
  margin: 14px 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 30ch;
}

/* ---- Responsive ---- */

/* Tablet: collapse to 2-column grid */
@media (max-width: 900px) {
  .property-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .property-showcase-card:nth-child(-n+3),
  .property-showcase-card:nth-child(n+4),
  .property-showcase-grid--single-row .property-showcase-card,
  .property-showcase-grid--four-col .property-showcase-card {
    grid-column: span 1;
  }

  .property-showcase-grid--four-col {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Let an unpaired final card fill the complete tablet row. */
  .property-showcase-grid--odd > .property-showcase-card:last-child {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
  }
}

/* Mobile: single-column */
@media (max-width: 540px) {
  .property-showcase-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .property-showcase-card:nth-child(-n+3),
  .property-showcase-card:nth-child(n+4),
  .property-showcase-grid--single-row .property-showcase-card,
  .property-showcase-grid--four-col .property-showcase-card {
    grid-column: span 1;
  }

  .property-showcase-grid--odd > .property-showcase-card:last-child {
    grid-column: span 1;
  }

  .property-showcase-grid--four-col {
    grid-template-columns: 1fr;
  }

  .property-showcase-card {
    aspect-ratio: 16 / 9;
  }
}
