/* ================================
   Profile Cards — Clean stacked meta
   ================================ */

/* Grid stays the same */
.profile-cards {
  display: grid;
  gap: clamp(8px, 2vw, 14px);
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) { .profile-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .profile-cards { grid-template-columns: repeat(3, 1fr); } }

.profile-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--drop-shadow);
  background: #fff;
  display: block;               /* make the whole card clickable */
  text-decoration: none;
  transform: translateZ(0);     /* improve animation perf */
  transition: transform .25s ease, box-shadow .25s ease;
  outline: none;
}

.profile-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(82,169,201,.35), var(--drop-shadow);
}

.profile-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;          /* uniform heights */
  overflow: hidden;
}

.profile-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

/* Subtle vignette to help text readability without a heavy overlay */
.profile-image::after {
  content: "";
  position: absolute;
  inset: 0;
  /* same scrim strength as the hero; uses the hero token if present, else .35 */
  background: rgba(0,0,0,var(--hero-overlay, .35));
  pointer-events: none;
  z-index: 1; /* overlay sits ABOVE the image but BELOW the text */
}

/* Centered meta group (tight stack, no stretched rows) */
.profile-meta {
  position: absolute;
  inset: 0;
  display: grid;
  justify-items: center;   /* horizontal centering of each line */
  align-content: center;   /* center the row tracks as a group (no stretch) */
  text-align: center;
  padding: clamp(10px, 3vw, 18px);
  row-gap: 0;              /* no extra space between rows */
  transition: transform .25s ease, opacity .25s ease;
  z-index: 2;              /* text ABOVE the overlay */
}

/* Collapse default margins + tighter line rhythm */
.profile-meta > * { margin: 0; }

/* Title (single line, bigger) */
.profile-title {
  font-family: "Oswald", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 1.7rem);
  color: var(--orange);
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Address under title */
.profile-address {
  font-size: clamp(.9rem, 2.2vw, 1rem);
  font-weight: 500;
  color: #fff;
  opacity: 1;                    /* avoid washed-out look */
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  margin-bottom: 0;
  margin-top: -.2rem;
}

/* Price as third line, highlighted */
.profile-price {
  font-size: clamp(1rem, 2.4vw, 1.1rem);
  font-weight: 600;
  color: var(--light-blue);
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
  margin-top: .2rem;
}

/* Hover/focus interaction: lift + gentle zoom, no heavy overlay */
@media (hover:hover) and (pointer:fine) {
  .profile-card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.18); }
  .profile-card:hover .profile-image img { transform: scale(1.04); filter: saturate(1.05); }
  .profile-card:hover .profile-meta { transform: translateY(-2px); }
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  .profile-card,
  .profile-image img,
  .profile-meta { transition: none !important; }
}

/* ----------------
   Legacy cleanup
   ---------------- */
/* If these existed before, hide them to avoid conflicts */
.profile-name,
.profile-info-overlay { display: none !important; }