/*
 * Agent profile pages (real-estate only).
 *
 * Deliberately shares the redesigned property search's design language: the
 * same tokens, the same self-hosted ERA face, and cards built to the same
 * spec as .property-card so a listing reads identically wherever it appears.
 * Self-contained, because these pages are embedded as a fragment and cannot
 * rely on search.css being present.
 */

@font-face {
  font-family: ERA;
  src: url('/real-estate/search-preview/RedHatDisplay-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: ERA;
  src: url('/real-estate/search-preview/RedHatDisplay-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

.agentPageContainer {
  --navy: #0f1f43;
  --red: #c52a32;
  --red-dark: #a9212a;
  --blue: #b3c6e7;
  --paper: #f4f3ef;
  --muted: #657082;
  --line: #dce0e5;

  width: 100%;
  margin: 0;
  color: var(--navy);
  background: #fff;
  font-family: ERA, "Red Hat Display", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.agentPageContainer * { box-sizing: border-box; }

/* ---------- Hero ---------- */

.agentHero {
  padding: clamp(48px, 7vw, 96px) 4%;
  background: var(--navy);
  color: #fff;
}

.agentHeroInner {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: center;
  width: min(1240px, 100%);
  margin: 0 auto;
}

.agentPhoto {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #1b2b51;
  border-radius: 5px;
}

.agentPhoto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.anniversary {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 6px 11px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.agentEyebrow {
  margin: 0 0 9px;
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.agentHero .agentEyebrow { color: var(--blue); }

.agentName {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 3.35vw, 50px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.045em;
}

.agentTitle {
  margin: 11px 0 0;
  color: #d4ddec;
  font-size: 15px;
}

.agentActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.agentButton {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid var(--red);
  border-radius: 3px;
  background: var(--red);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background .2s, border-color .2s, color .2s;
}

.agentButton:hover { border-color: var(--red-dark); background: var(--red-dark); }

.agentButtonOutline {
  border-color: rgba(255, 255, 255, .55);
  background: transparent;
}

.agentButtonOutline:hover {
  border-color: #fff;
  background: #fff;
  color: var(--navy) !important;
}

.agentFacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 32px 0 0;
}

.agentFacts div {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .25);
}

.agentFacts dt {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.agentFacts dd { margin: 0; color: #fff; font-size: 14px; line-height: 1.5; }
.agentFacts a { color: #fff !important; text-decoration: underline; }

/* ---------- Body: one column, full width ---------- */

.agentPage {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) 4% clamp(52px, 6vw, 80px);
}

.agentSection {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.agentSection:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }

.columnTitle {
  margin: 0 0 18px;
  font-size: clamp(23px, 2.4vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.035em;
}

/* The description runs the full measure of the page - nothing sits beside it. */
.section {
  color: #46546b;
  font-size: 16px;
  line-height: 1.7;
}

.designationList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.designation {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  font-size: 14px;
}

.designation i { margin-right: 8px; color: var(--red); }

/* ---------- Listing cards: same spec as .property-card ---------- */

.propertyGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.propertyCard {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  transition: box-shadow .2s, border-color .2s;
}

.propertyCard:hover { border-color: #8095b8; box-shadow: 0 6px 22px #0f1f4310; }

.propertyPhoto {
  position: relative;
  display: block;
  aspect-ratio: 1.52;
  overflow: hidden;
  background: #e6e9ed;
}

.propertyPhoto img[hidden] { display: none; }

.propertyPhoto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

a.propertyPhoto:hover img { transform: scale(1.025); }

.photoPlaceholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8490a3;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .08em;
  pointer-events: none;
}

.photoPlaceholder small { margin-top: 7px; font-size: 11px; font-weight: 400; letter-spacing: 0; }

.propertyStatus {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 2px;
  background: #fff;
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 1px 4px #0001;
}

.propertyBody { padding: 16px 16px 0; }

.propertyPrice {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.04em;
}

.propertyBody h3 {
  margin: 7px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.propertyBody .locality { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.propertyFacts {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  padding: 14px 0 15px;
  color: #566176;
  font-size: 11px;
  min-height: 44px;
}

.propertyFacts b { color: var(--navy); font-weight: 700; }

.cardFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid #eceef1;
  color: var(--muted);
  font-size: 9px;
}

.cardFooter > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cardFooter a { color: var(--navy) !important; font-size: 11px; font-weight: 700; white-space: nowrap; text-decoration: none !important; }
.cardFooter a span { margin-left: 5px; color: var(--red); }

/* Cards with no footer still need breathing room at the bottom. */
.propertyCard .propertyFacts:last-child { padding-bottom: 16px; }

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

@media (max-width: 1100px) {
  .propertyGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .propertyPrice { font-size: 20px; }
  .propertyBody { padding: 12px 12px 0; }
}

@media (max-width: 920px) {
  .agentHeroInner { grid-template-columns: 1fr; }
  .agentPhoto { width: min(320px, 100%); }
}

@media (max-width: 620px) {
  .agentHero { padding: 40px 5%; }
  .agentPage { padding: 36px 5% 48px; }
  .agentFacts { grid-template-columns: 1fr; gap: 14px; }
  .designationList { grid-template-columns: 1fr; }
  .propertyGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .propertyPhoto { aspect-ratio: 1.2; }
  .propertyBody h3 { font-size: 12px; }
  .propertyBody .locality { font-size: 11px; }
  .propertyFacts { gap: 5px 8px; font-size: 10px; }
  .propertyStatus { left: 8px; top: 8px; font-size: 9px; }
  .cardFooter { font-size: 8px; }
  .cardFooter a { font-size: 10px; }
  .agentButton { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .agentPageContainer * { transition: none !important; }
}
