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

.featured-profiles-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(12px, 2vw, 18px);
}

.featured-profiles-header .section-title {
  margin-bottom: 0;
}

.featured-profiles-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--dark-blue);
  font-family: "Oswald", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: clamp(.82rem, 1vw, .95rem);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease;
}

.featured-profiles-view-all svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.featured-profiles-view-all:hover,
.featured-profiles-view-all:focus {
  color: var(--light-blue);
}

.featured-profiles-carousel {
  position: relative;
}

.profile-cards.profile-cards--carousel {
  display: flex;
  grid-template-columns: none;
  gap: clamp(12px, 2vw, 22px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 12px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.profile-cards--carousel .profile-card {
  flex: 0 0 min(82vw, 22rem);
  scroll-snap-align: start;
}

.featured-carousel-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--light-blue);
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--dark-blue);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}

.featured-carousel-control svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.featured-carousel-control--prev {
  left: 8px;
}

.featured-carousel-control--next {
  right: 8px;
}

.featured-carousel-control:not(:disabled):hover,
.featured-carousel-control:not(:disabled):focus {
  border-color: var(--dark-blue);
  background: var(--dark-blue);
  color: #fff;
}

.featured-carousel-control:disabled {
  cursor: default;
  opacity: .35;
}

.featured-carousel-control:disabled:hover,
.featured-carousel-control:disabled:focus {
  border-color: var(--light-blue);
  background: rgba(255, 255, 255, .92);
  color: var(--dark-blue);
}

@media (max-width: 39.99rem) {
  .profile-cards.profile-cards--carousel {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .profile-cards--carousel .profile-card {
    flex: none;
    scroll-snap-align: none;
  }

  .featured-carousel-control {
    display: none;
  }
}

@media (min-width: 40rem) {
  .profile-cards--carousel .profile-card {
    flex-basis: calc((100% - clamp(12px, 2vw, 22px)) / 2);
  }
}

@media (min-width: 64rem) {
  .profile-cards--carousel .profile-card {
    flex-basis: calc((100% - (2 * clamp(12px, 2vw, 22px))) / 3);
  }

  .featured-carousel-control--prev {
    left: -16px;
  }

  .featured-carousel-control--next {
    right: -16px;
  }
}

.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 {
  min-height: 46px;
  margin-left: 6px;
  padding: 0.75rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--light-blue) 40%, #fff);
  border-radius: 8px;
  background: #fff;
  color: var(--dark-blue);
  font: inherit;
}
.profiles-controls select:focus {
  border-color: var(--dark-blue);
  outline: 3px solid color-mix(in srgb, var(--light-blue) 30%, transparent);
}
/* 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;
  }
}
