/* ==========================================================================
   Dubai developer pages (/dubai-developers) and the community profile on /district/{id} (2026-11-21).
   Builds on dubai-projects.css (+ dubai-project-detail.css on detail pages): same tokens, under .dp-page.
   ========================================================================== */

/* ---- hero: navy band, logo tile, name, chips; a cover photo behind it when there is one ---- */
.pf-hero { position: relative; overflow: hidden; margin: 0 0 18px; border-radius: var(--r); background: linear-gradient(135deg, #142D54 0%, #1d3f73 60%, #23508f 100%); color: #fff; isolation: isolate; }
.pf-hero.has-cover::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--pf-cover) center / cover no-repeat; }
.pf-hero.has-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 33, 66, .94) 0%, rgba(20, 45, 84, .82) 45%, rgba(20, 45, 84, .45) 100%); }
[dir="rtl"] .pf-hero.has-cover::after { background: linear-gradient(270deg, rgba(14, 33, 66, .94) 0%, rgba(20, 45, 84, .82) 45%, rgba(20, 45, 84, .45) 100%); }
.pf-hero__in { display: flex; align-items: center; gap: 26px; min-height: 230px; padding: 34px 36px; }
.pf-hero__text { min-width: 0; }
.pf-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 5px 12px; border-radius: 999px; background: rgba(212, 168, 67, .18); color: #F3D98F; font-size: 13.5px; font-weight: 700; }
.pf-hero h1 { margin: 0; color: #fff; font-size: clamp(28px, 4vw, 44px); font-weight: 800; line-height: 1.2; }
.pf-hero__alt { margin: 6px 0 0; color: rgba(255, 255, 255, .75); font-size: 16px; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.pf-chips li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 14px; backdrop-filter: blur(4px); }
.pf-chips a { display: inline-flex; align-items: center; gap: 7px; color: #fff; text-decoration: none; }
.pf-chips a:hover { text-decoration: underline; }
.pf-chips i { color: var(--gold); }
@media (max-width: 767px) {
  .pf-hero__in { flex-direction: column; align-items: flex-start; gap: 16px; min-height: 0; padding: 24px 20px; }
}

/* ---- logo tile ---- */
.pf-logo { display: grid; flex: none; place-items: center; width: 128px; height: 128px; overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.pf-logo img { width: 84%; height: 84%; object-fit: contain; }
.pf-logo.is-initials { background: linear-gradient(135deg, var(--gold) 0%, #b98b25 100%); }
.pf-logo.is-initials span { color: #fff; font-size: 42px; font-weight: 800; letter-spacing: .02em; }
.pf-logo--sm { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 6px 18px rgba(20, 45, 84, .18); }
.pf-logo--sm.is-initials span { font-size: 24px; }
@media (max-width: 767px) { .pf-logo { width: 88px; height: 88px; border-radius: 18px; } .pf-logo.is-initials span { font-size: 30px; } }

/* ---- headline tiles (market figures) ---- */
.pf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 12px; }
.pf-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh); }
.pf-tile::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--gold); }
.pf-tile__label { color: var(--muted); font-size: 14px; font-weight: 600; }
.pf-tile__value { font-size: 24px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pf-tile__how { color: var(--muted); font-size: 13px; line-height: 1.5; }
.pf-tile__how a { text-decoration: underline; text-underline-offset: 2px; }

/* ---- DLD roster table ---- */
.pf-roster th[scope="row"] a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(20, 45, 84, .25); text-underline-offset: 3px; }
.pf-roster th[scope="row"] a:hover { text-decoration-color: currentColor; }
.pf-ref { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.pf-prog { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.pf-prog__bar { flex: 1; height: 7px; overflow: hidden; border-radius: 4px; background: var(--line); }
.pf-prog__bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--ink), #2f6bb5); }
.pf-prog b { font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* ---- lists (schools, malls, awards...) ---- */
.pf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.pf-card { display: flex; flex-direction: column; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.pf-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.pf-card h3 small { margin-inline-start: auto; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 600; }
.pf-card__ic { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--cream); color: var(--gold-ink); font-size: 18px; }
.pf-card__list { margin: 0; padding: 0; list-style: none; }
.pf-card__list li { padding: 9px 0; border-top: 1px solid var(--line); }
.pf-card__list li:first-child { border-top: 0; }
.pf-card__name { display: block; font-size: 15px; font-weight: 600; line-height: 1.5; }
.pf-card__name a { text-decoration: none; }
.pf-card__name a:hover { text-decoration: underline; }
.pf-card__list small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.pf-card__src { margin: auto 0 0; padding-top: 10px; color: var(--muted); font-size: 13px; }
.pf-card__src a { text-decoration: underline; }

/* ---- gallery grid (opens in the project pages' viewer) ---- */
.pf-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; gap: 10px; }
.pf-shot { position: relative; display: block; overflow: hidden; border-radius: var(--r-sm); background: var(--soft); }
.pf-shot.is-main { grid-column: span 2; grid-row: span 2; }
.pf-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.pf-shot:hover img { transform: scale(1.04); }
.pf-shot__credit { position: absolute; inset-inline-end: 6px; bottom: 6px; max-width: 80%; padding: 2px 8px; overflow: hidden; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.pf-gallery--n1 { grid-template-columns: 1fr; grid-auto-rows: 360px; }
.pf-gallery--n1 .pf-shot.is-main { grid-column: auto; grid-row: auto; }
.pf-gallery--n2 { grid-template-columns: 2fr 1fr; grid-auto-rows: 170px; }
.pf-gallery--n2 .pf-shot.is-main { grid-column: auto; }
.pf-gallery--n2 .pf-shot:not(.is-main) { grid-row: span 2; }
/* a community's photos at the top of its profile: five tiles, the rest in the viewer (2026-11-22) */
.pf-gallery--mosaic { grid-auto-rows: 210px; }
.pf-gallery--mosaic .pf-shot.is-extra { display: none; }
.pf-gallery__foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
@media (max-width: 767px) {
  .pf-gallery, .pf-gallery--n2 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; }
  .pf-gallery--n1 { grid-auto-rows: 220px; }
  .pf-gallery--n2 .pf-shot:not(.is-main) { grid-row: auto; }
  /* on a phone: a swipeable strip of every photo */
  .pf-gallery--mosaic { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .pf-gallery--mosaic::-webkit-scrollbar { display: none; }
  .pf-gallery--mosaic .pf-shot, .pf-gallery--mosaic .pf-shot.is-extra { display: block; flex: 0 0 88%; aspect-ratio: 16 / 10; scroll-snap-align: start; }
  .pf-gallery--mosaic .dp-shot__more { display: none; }
  .pf-gallery__foot { justify-content: space-between; }
}

/* ---- link cards (communities, developers) ---- */
.pf-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.pf-linkcard { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pf-linkcard:hover { border-color: var(--gold); box-shadow: var(--sh); transform: translateY(-1px); }
.pf-linkcard__ic { display: grid; flex: none; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 10px; background: var(--soft); color: var(--ink); font-size: 18px; }
.pf-linkcard__ic img { width: 86%; height: 86%; object-fit: contain; }
.pf-linkcard b { display: block; font-size: 15px; font-weight: 700; line-height: 1.4; }
.pf-linkcard small { display: block; color: var(--muted); font-size: 13px; }

.pf-credits { color: var(--muted); font-size: 13.5px; }
.pf-credits summary { cursor: pointer; font-weight: 600; }
.pf-credits ul { margin: 8px 0 0; padding-inline-start: 18px; line-height: 1.8; }
.pf-credits a { text-decoration: underline; }

/* ---- /dubai-developers list ---- */
.pf-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.pf-search .dp-field--grow { flex: 1 1 280px; }
.pf-search__btns { display: flex; gap: 8px; }
.pf-search__btns .dp-btn i { margin-inline-end: 6px; }
.pf-devgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.pf-dev { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink); text-decoration: none; box-shadow: var(--sh); transition: transform .2s, box-shadow .2s; }
.pf-dev:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20, 45, 84, .06), 0 18px 40px rgba(20, 45, 84, .12); }
.pf-dev__top { position: relative; display: flex; align-items: flex-end; justify-content: space-between; height: 120px; padding: 0 18px; background: linear-gradient(135deg, #142D54, #23508f); }
.pf-dev__top[style] { background: linear-gradient(0deg, rgba(20, 45, 84, .7), rgba(20, 45, 84, .15)), var(--pf-cover) center / cover no-repeat; }
.pf-dev__top .pf-logo { transform: translateY(36px); }
.pf-dev__top .dp-pill { align-self: flex-start; margin-top: 12px; }
.pf-dev__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 46px 18px 18px; }
.pf-dev__name { font-size: 19px; font-weight: 800; line-height: 1.35; }
.pf-dev__meta { color: var(--muted); font-size: 13.5px; }
.pf-dev__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.pf-dev__stats span { display: flex; flex-direction: column; padding: 8px 10px; border-radius: var(--r-sm); background: var(--soft); color: var(--muted); font-size: 12.5px; }
.pf-dev__stats b { color: var(--ink); font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pf-dev__bar { display: flex; height: 6px; margin-top: 10px; overflow: hidden; border-radius: 3px; background: var(--line); }
.pf-dev__bar .is-done { background: var(--good); }
.pf-dev__bar .is-active { background: #2f6bb5; }
.pf-dev__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 14px; color: var(--gold-ink); font-size: 14.5px; font-weight: 700; }

/* ---- community profile on /district/{id} ---- */
.pf-community.dp-page { margin-top: 28px; background: transparent; }
.pf-community .dp-kpis { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.pf-community .dp-kpi small { color: var(--muted); font-size: 12.5px; }
.pf-community .dp-sections { margin-bottom: 0; }
@media (max-width: 767px) { .pf-community .dp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pf-community .dp-section:first-child { margin-top: 0; }
.pf-map { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); }
.pf-map iframe { display: block; width: 100%; height: 340px; border: 0; }
.pf-dist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pf-dist li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.pf-dist i { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--soft); color: var(--ink); font-size: 17px; }
.pf-dist b { display: block; font-size: 15px; font-weight: 600; line-height: 1.4; }
.pf-dist small { color: var(--muted); font-size: 13px; }
