/* ==========================================================================
   Portfolio page — page-specific styles
   Supplements styles.css (.portfolio-card, .portfolio-grid, .subpage-hero).
   All selectors are .pf-* so nothing here can collide with the shared sheet.
   ========================================================================== */

/* ---------- At-a-glance strip ---------- */
.pf-stats { background: var(--navy-dark); color: var(--white); padding: 32px 0 28px; border-bottom: 1px solid rgba(201, 169, 110, .25); }
.pf-stats__list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; text-align: center; max-width: 980px; margin: 0 auto; }
.pf-stat { display: grid; grid-template-areas: "num" "label" "note"; justify-items: center; align-content: start; row-gap: 4px; }
.pf-stat dd:not(.pf-stat__note) { grid-area: num; font-family: var(--font-mono, monospace); font-size: 30px; line-height: 1.1; letter-spacing: -.02em; color: var(--gold-light, #D4B87E); margin: 0; }
.pf-stat dt { grid-area: label; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.pf-stat dd.pf-stat__note { grid-area: note; font-size: 12px; color: rgba(255, 255, 255, .6); margin: 0; }
.pf-stats__cta { margin-top: 24px; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .78); }
.pf-stats__cta a { color: var(--gold-light, #D4B87E); font-weight: 500; white-space: nowrap; }

/* ---------- Filter pills ---------- */
/* Mobile: each row is one horizontally scrolling line, so the bar stays short. */
.pf-controls { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 32px; }
.pf-controls__row { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pf-controls__row::-webkit-scrollbar { display: none; }
.pf-controls__row .pf-pill { flex: 0 0 auto; white-space: nowrap; }
@media (min-width: 900px) {
  /* Desktop: one wrapping row that stays pinned under the nav while the grid scrolls. */
  .pf-controls { position: sticky; top: 108px; z-index: 20; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 28px; margin: 0 0 32px; padding: 12px 16px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--light-gray); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .pf-controls__row { flex-wrap: wrap; justify-content: center; overflow: visible; padding: 0; }
}
.pf-pill { font-family: var(--font-body); font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; padding: 8px 18px; border: 1px solid var(--light-gray); border-radius: var(--radius-btn, 6px); background: transparent; color: var(--charcoal); cursor: pointer; transition: border-color .3s, color .3s, background .3s; }
.pf-pill:hover { border-color: var(--gold); color: var(--gold-accessible); }
.pf-pill--active, .pf-pill--active:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }

/* ---------- Market groups ---------- */
.pf-group { margin-bottom: 56px; }
.pf-group:last-of-type { margin-bottom: 24px; }
.pf-group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; padding-bottom: 12px; margin-bottom: 24px; border-bottom: 1px solid var(--divider, rgba(201, 169, 110, .3)); }
.pf-group__head h2 { font-size: 24px; margin: 0; }
.pf-group__sf { font-family: var(--font-mono, monospace); font-size: 13px; color: var(--slate); }
.pf-group__link { margin-left: auto; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-accessible); }
@media (min-width: 768px) { .pf-group__head h2 { font-size: 28px; } }

/* ---------- Cards ---------- */
.pf-card { display: flex; flex-direction: column; }
.pf-card .portfolio-card__body { flex: 1; }
.pf-card__thesis { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--light-gray); font-size: 14px; line-height: 1.6; color: var(--charcoal); }
.pf-card--other .portfolio-card__meta span:last-child { background: transparent; box-shadow: inset 0 0 0 1px var(--light-gray); }

/* "N suites available" badge: light text on navy. The selector repeats the page's .section ancestry because
   styles.css colours every link with `.section:not(.section--navy) a:not(.btn)` (dark gold, made for light
   backgrounds), which out-ranked a bare `.pf-card__avail` and left the badge text almost unreadable on navy. */
.section:not(.section--navy) .pf-card a.pf-card__avail { display: inline-block; margin-top: 14px; padding: 6px 14px; font-size: 13px; font-weight: 600; letter-spacing: .05em; border-radius: 999px; background: var(--navy); color: var(--white, #fff); box-shadow: inset 0 0 0 1px var(--gold-light, #D4B87E); }
.section:not(.section--navy) .pf-card a.pf-card__avail:hover,
.section:not(.section--navy) .pf-card a.pf-card__avail:focus-visible { background: var(--navy-dark); color: var(--gold-light, #D4B87E); text-decoration: none; }
.pf-card__more { display: inline-block; margin-top: 14px; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-accessible); }

.pf-card { scroll-margin-top: 200px; }
.pf-card .portfolio-card__meta { flex-wrap: wrap; gap: 6px 8px; }
.pf-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; }
.pf-chip { font-size: 11px; letter-spacing: .04em; padding: 3px 10px; border: 1px solid var(--light-gray); border-radius: 999px; color: var(--slate); background: var(--white); }

/* ---------- Portfolio mix (share of gross SF) ---------- */
.pf-mix { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.pf-mix__title { font-size: 22px; margin-bottom: 14px; }
.pf-mix__bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--light-gray); }
.pf-mix__seg { display: block; min-width: 4px; }
.pf-mix__seg--flex, .pf-mix__dot--flex { background: var(--navy); }
.pf-mix__seg--ios, .pf-mix__dot--ios { background: var(--gold); }
.pf-mix__seg--other, .pf-mix__dot--other { background: var(--slate); }
.pf-mix__legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin: 14px 0 0; padding: 0; font-size: 14px; color: var(--charcoal); }
.pf-mix__legend li { display: inline-flex; align-items: center; gap: 8px; }
.pf-mix__legend strong { font-family: var(--font-mono, monospace); font-weight: 500; color: var(--navy); }
.pf-mix__dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.pf-mix__note { margin-top: 10px; font-size: 13px; color: var(--slate); }

/* ---------- Map view ---------- */
.pf-map-wrap { margin-bottom: 24px; }
.pf-map { position: relative; z-index: 0; height: 420px; border-radius: var(--radius-card, 8px); overflow: hidden; background: var(--parchment); box-shadow: var(--shadow-card); }
@media (min-width: 768px) { .pf-map { height: 560px; } }
.pf-map-note { margin-top: 10px; padding: 10px 14px; background: var(--parchment); border-left: 3px solid var(--gold); font-size: 14px; color: var(--charcoal); }
.pf-map-note[hidden], .pf-map-wrap[hidden] { display: none; }
.pf-map-legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin: 14px 0 0; padding: 0; font-size: 13px; color: var(--slate); }
.pf-map-legend li { display: inline-flex; align-items: center; gap: 8px; }
.pf-map-key { width: 12px; height: 12px; transform: rotate(45deg); border: 2px solid var(--navy); display: inline-block; }
.pf-map-key--flex, .pf-pin--flex span { background: var(--navy); border-color: var(--gold) !important; }
.pf-map-key--ios, .pf-pin--ios span { background: var(--gold); border-color: var(--navy) !important; }
.pf-map-key--other, .pf-pin--other span { background: var(--slate); border-color: var(--white) !important; }
.pf-pin span { display: block; width: 20px; height: 20px; transform: rotate(45deg); border: 2px solid var(--navy); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.pf-popup { font-family: var(--font-body); min-width: 190px; }
.pf-popup hr { border: 0; border-top: 1px solid var(--light-gray); margin: 10px 0; }
.pf-popup strong { display: block; color: var(--navy); font-size: 14px; }
.pf-popup__meta { display: block; font-size: 12px; color: var(--slate); margin-top: 2px; }
.pf-popup__links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12px; font-weight: 500; }
.pf-popup__links a { color: var(--gold-accessible); }

/* ---------- Table view ---------- */
.pf-controls[hidden], .pf-table-wrap[hidden], #portfolioGrid[hidden] { display: none; }
.pf-table-wrap { overflow-x: auto; margin-bottom: 24px; }
.pf-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.pf-table th, .pf-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--light-gray); }
.pf-table thead th { background: var(--parchment); border-bottom: 2px solid var(--gold); white-space: nowrap; }
.pf-table tbody th { font-weight: 500; color: var(--navy); }
.pf-table__num { text-align: right !important; font-variant-numeric: tabular-nums; }
.pf-table__sort { font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); background: none; border: 0; padding: 0; cursor: pointer; }
.pf-table__sort:hover { color: var(--gold-accessible); }
[aria-sort="ascending"] .pf-table__sort::after { content: " \25B2"; font-size: 9px; }
[aria-sort="descending"] .pf-table__sort::after { content: " \25BC"; font-size: 9px; }
.pf-table tr.is-hidden { display: none; }

/* ---------- Property detail pages ---------- */
.pf-crumbs { font-size: 13px; color: var(--slate); margin-bottom: 32px; }
.pf-crumbs a { color: var(--gold-accessible); }
/* Links inside running text must not rely on color alone (axe: link-in-text-block). */
.pf-crumbs a, .pf-detail__more a, .pf-note a, .pf-stats__cta a { text-decoration: underline; text-underline-offset: 2px; }
.pf-detail__grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.pf-detail__main h2, .pf-detail__facts h2 { font-size: 26px; margin-bottom: 16px; }
.pf-detail__main p { margin-bottom: 16px; max-width: 62ch; }
.pf-detail__highlights { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 10px; }
.pf-detail__highlights li { position: relative; padding-left: 22px; }
.pf-detail__highlights li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.pf-detail__more a { font-weight: 500; }
.pf-gallery { display: grid; gap: 16px; margin: 0 0 8px; }
.pf-gallery__item { margin: 0; border-radius: var(--radius-card, 8px); overflow: hidden; box-shadow: var(--shadow-card); background: var(--light-gray); }
.pf-gallery__item img { display: block; width: 100%; height: auto; }
.pf-detail__main .pf-detail__specs-title { font-size: 22px; margin: 32px 0 8px; }
.pf-detail__specs { margin: 0 0 24px; max-width: 62ch; }
.pf-detail__specs > div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--light-gray); font-size: 15px; }
.pf-detail__specs dt { color: var(--slate); }
.pf-detail__specs dd { margin: 0; color: var(--charcoal); }
@media (max-width: 520px) { .pf-detail__specs > div { grid-template-columns: 1fr; gap: 2px; } }
.pf-detail__facts { background: var(--parchment); border-radius: var(--radius-card, 8px); padding: 28px; box-shadow: var(--shadow-card); }
.pf-detail__back { display: block; margin-top: 14px; text-align: center; font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.pf-related { list-style: none; margin: 0 0 24px; padding: 0; max-width: 62ch; }
.pf-related li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--light-gray); font-size: 15px; }
.pf-related a { font-weight: 500; }
.pf-related span { font-size: 13px; color: var(--slate); text-align: right; }
.pf-detail__facts dl { margin: 0 0 24px; }
.pf-detail__facts dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--light-gray); font-size: 14px; }
.pf-detail__facts dt { color: var(--slate); }
.pf-detail__facts dd { margin: 0; text-align: right; color: var(--navy); font-weight: 500; }
@media (min-width: 900px) { .pf-detail__grid { grid-template-columns: 1.6fr 1fr; gap: 56px; } }

/* ---------- Filtering state ---------- */
.pf-card.is-hidden, .pf-group.is-hidden { display: none; }
.pf-empty { text-align: center; color: var(--slate); padding: 48px 0; }
.pf-empty[hidden] { display: none; }
.pf-note { text-align: center; font-size: 13px; color: var(--slate); margin-top: 8px; }
.pf-note a { font-weight: 500; white-space: nowrap; }

@media (min-width: 768px) {
  .pf-stats { padding: 40px 0 32px; }
  .pf-stats__list { grid-template-columns: repeat(4, 1fr); }
  .pf-stat dd { font-size: 38px; }
}
