/* ================================
   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: 3px;
  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: 1.5rem;
  color: var(--orange);
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0;
  max-width: 95%;

  /* ✅ allow wrapping nicely (instead of forcing ellipsis) */
  white-space: normal;
  overflow: hidden;
}

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

.profile-price {
  /* turn the existing price line into a badge */
  position: absolute;
  bottom: 7px;
  right: -2px;
  z-index: 3;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 7px 12px;
  border-radius: 2px; /* pill */
  background: linear-gradient(
    to bottom right,
    rgba(63,82,91,1),
    rgba(86,117,140,.9)
  );

  color: #fff;
  font-size: .9rem;

  /* nice “floating” look */
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  backdrop-filter: blur(2px);
}

/* 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; }

/* Profile Controls */
.profiles-controls {
  display:flex; gap:10px; align-items:center; justify-content:flex-end;
  margin: 8px 0 14px;
}
.profiles-controls label { font-size:.94rem; color: var(--grey); }
.profiles-controls select {
  margin-left:6px; padding:6px 8px; border-radius:6px; border:1px solid #d7d7d7;
  background:#fff; font: inherit;
}
/* Make area headings occupy a full row inside the cards grid */
.area-heading {
  grid-column: 1 / -1;          /* span all grid columns */
  margin: 22px 0 0;
  font-family: "Oswald", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 800;            /* stronger emphasis than 900’s default blocky look */
  color: var(--dark-blue);
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* Optional: reduce top margin for the first heading */
.profile-cards > .area-heading:first-child {
  margin-top: 6px;
}

/* Safety: ensure cards fill their grid cell (prevents “tiny card” effect) */
.profile-cards .profile-card { 
  width: 100%;
  max-width: none;
}

/* ≥768px: photo | copy, centered as a pair; copy text left */
@media (min-width: 40rem) {
  .profile-title {
    font-weight: 800;
    font-size: 1.2rem;
  }
  .profile-address {
    font-size: 0.8rem;
    font-weight: 500;
  }
  .profile-price {
    font-size: .7rem;
  }
}