/* P09: loaded last on generated project detail pages only. No project content. */
html body.project-profile-standard[data-project] .project-detail { padding-top:100px; }
html body.project-profile-standard[data-project] .showcase-overview { color:#5d7082; font-size:18px; line-height:1.8; font-weight:400; margin-block:14px 20px; }
html body.project-profile-standard[data-project] .project-profile-section { margin-top:clamp(36px,5vw,70px); padding-top:26px; padding-bottom:0; }
html body.project-profile-standard[data-project] .project-profile-section h2 { font-size:clamp(28px,3vw,42px); line-height:1.4; margin-bottom:24px; }
html body.project-profile-standard[data-project] .project-profile-section ul { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin:0; padding:0; list-style:none; }
html body.project-profile-standard[data-project] .project-profile-section li,
html body.project-profile-standard[data-project] .project-profile-section li:first-child { display:block; grid-column:auto; min-width:0; margin:0; padding:26px; border:1px solid #ad825b45; border-radius:20px; background:#ffffffa8; color:#40576a; font-size:17px; line-height:1.85; font-weight:400; }
html body.project-profile-standard[data-project] .project-profile-section li:hover { transform:translateY(-3px); border-color:var(--copper); box-shadow:0 12px 28px #081b3014; }
html body.project-profile-standard[data-project] .feature-heading { margin:0 0 1em; color:inherit; font-size:1.17em; line-height:inherit; font-weight:700; }
html body.project-profile-standard[data-project] .feature-description { margin:0 0 1em; color:inherit; font-size:inherit; line-height:inherit; font-weight:400; }
html body.project-profile-standard[data-project] .profile-item-copy { display:grid; gap:8px; min-width:0; }
html body.project-profile-standard[data-project] .profile-item-copy strong { color:inherit; font:inherit; font-weight:700; }
html body.project-profile-standard[data-project] .profile-item-copy > span { font:inherit; }
html body.project-profile-standard[data-project] .project-scope-intro { color:#243e51; font-size:18px; line-height:1.8; margin-block:0 22px; }
html body.project-profile-standard[data-project] .review-scope li svg { display:block; width:30px; height:30px; margin-bottom:12px; }
html body.project-profile-standard[data-project] .showcase-gallery-region { min-width:0; }
html body.project-profile-standard[data-project] .showcase-gallery-title { font-size:clamp(28px,3vw,42px); line-height:1.3; margin-block:0 18px; }
html body.project-profile-standard[data-project] .project-closing-cta p { color:inherit; font-size:1rem; line-height:normal; max-width:none; margin:0 0 1em; }
/* Remove the historical ID-scoped pseudo overlay; keep each existing hero image. */
html body.project-profile-standard[data-project] .project-detail-hero .inner-hero-bg::after { content:none; }
@media(max-width:980px) {
 html body.project-profile-standard[data-project] .project-profile-section ul { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
 html body.project-profile-standard[data-project] .project-detail { padding-top:75px; }
 html body.project-profile-standard[data-project] .project-profile-section ul { grid-template-columns:minmax(0,1fr); }
}

/* P09: shared project profile, extracted from the approved Shati reference. */
html body.project-profile-standard[data-project] .project-slider-view,
html body.project-profile-standard[data-project] .project-showcase-copy,
html body.project-profile-standard[data-project] .project-fact,
html body.project-profile-standard[data-project] .project-profile-section li,
html body.project-profile-standard[data-project] .project-closing-cta,
html body.project-profile-standard[data-project] .project-return-link,
html body.project-profile-standard[data-project] .public-project-status,
html body.project-profile-standard[data-project] .project-gallery-dialog button,
html body.project-profile-standard[data-project] .project-closing-cta .button { border-radius:20px; }
/* FIX-03: one bounded frame contains the image, arrows, metadata and existing rail. */
html body.project-profile-standard[data-project] .showcase-integrated-frame {
 position:relative; width:94%; max-width:100%; margin-inline:auto;
 aspect-ratio:var(--project-frame-ratio,.89115); border-radius:20px;
 overflow:hidden; isolation:isolate; background:#081b30;
}
html body.project-profile-standard[data-project] .showcase-integrated-frame .project-slider-view {
 position:absolute; inset:0; display:block; width:100%; max-width:100%; height:100%;
 min-height:0; max-height:none; margin:0;
}
html body.project-profile-standard[data-project] .showcase-integrated-frame .showcase-slide {
 position:absolute; inset:0; display:block; width:100%; height:100%; min-height:0; margin:0;
}
html body.project-profile-standard[data-project] .showcase-integrated-frame .showcase-slide > a {
 display:block; width:100%; max-width:100%; height:100%; min-height:0; border-radius:20px;
}
html body.project-profile-standard[data-project] .showcase-integrated-frame .project-slider-view img {
 display:block; width:100%; height:100%; max-height:none; border-radius:20px;
 object-fit:cover; object-position:var(--project-image-position,50% 30%);
}
html body.project-profile-standard[data-project] .showcase-integrated-frame > button {
 position:absolute; top:50%; transform:translateY(-50%); z-index:3;
 display:flex; align-items:center; justify-content:center; width:44px; height:44px;
 min-height:44px; padding:0; border-radius:50%; border:1px solid #d39a6899;
 background:#081b30bf; color:#f2e7d8; font-size:22px; box-shadow:0 3px 10px #03111f1a;
}
html body.project-profile-standard[data-project] .showcase-integrated-frame > .showcase-previous { inset-inline-start:10px; inset-inline-end:auto; }
html body.project-profile-standard[data-project] .showcase-integrated-frame > .showcase-next { inset-inline-end:10px; inset-inline-start:auto; }
html body.project-profile-standard[data-project] .showcase-integrated-frame > button:hover { background:#17364ae6; }
html body.project-profile-standard[data-project] .showcase-integrated-frame > button:focus-visible { outline:2px solid #e4bb92; outline-offset:2px; }
html body.project-profile-standard[data-project] .showcase-overlay-footer {
 position:absolute; inset:auto 0 0; z-index:2; min-width:0;
 background:linear-gradient(0deg,#081b30d1,#081b30b8 70%,#081b3059);
}
html body.project-profile-standard[data-project] .showcase-overlay-footer .project-slider-controls {
 display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px;
 min-height:30px; margin:0; padding:6px 16px 0;
}
html body.project-profile-standard[data-project] .showcase-overlay-footer .project-slider-counter { color:#e4bb92; font-size:13px; }
html body.project-profile-standard[data-project] .showcase-overlay-caption {
 margin:0; min-width:0; color:#f2e7d8; font-size:12px; line-height:1.35; overflow-wrap:anywhere;
}
html body.project-profile-standard[data-project] .showcase-overlay-footer .project-slider-thumbnails {
 position:relative; width:min(100%,552px); height:72px; margin:0 auto; padding:10px 16px;
 overflow:hidden; overflow:clip; touch-action:pan-y;
}
html body.project-profile-standard[data-project] .showcase-overlay-footer .project-slider-thumbnails button {
 top:10px; left:16px; width:64px; height:52px; padding:3px; border-radius:10px;
 border:1px solid #d39a6870; background:#081b3099; opacity:.8; transform:scale(1);
}
html body.project-profile-standard[data-project] .showcase-overlay-footer .project-slider-thumbnails button[aria-pressed="true"] {
 transform:scale(1.12); opacity:1; border-color:#e4bb92;
}
html body.project-profile-standard[data-project] .showcase-overlay-footer .project-slider-thumbnails img {
 display:block; width:100%; height:100%; border-radius:7px; object-fit:cover; object-position:center;
}
@media(max-width:600px) {
 html body.project-profile-standard[data-project] .showcase-overlay-caption { font-size:11px; }
 html body.project-profile-standard[data-project] .showcase-overlay-footer .project-slider-controls { gap:8px; padding-top:5px; }
 html body.project-profile-standard[data-project] .showcase-overlay-footer .project-slider-thumbnails { height:60px; padding-block:8px; }
 html body.project-profile-standard[data-project] .showcase-overlay-footer .project-slider-thumbnails button { top:8px; width:48px; height:44px; }
}

/* Shared matching metadata pills. */
html body.project-profile-standard[data-project] .project-detail-hero .detail-meta {
 display:flex; flex-wrap:wrap; align-items:center; gap:8px;
}
html body.project-profile-standard[data-project] .project-detail-hero .detail-meta > span {
 display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box;
 min-height:34px; margin:0; padding:5px 14px; border-radius:999px;
 border:1px solid #d39a688c; background:#081b30b3; color:#f2e7d8;
 font-size:14px; font-weight:600; line-height:1.3;
}
/* Shared project hero. English paints the mirrored shade separately. */
html body.project-profile-standard[data-project] .project-detail-hero .inner-hero-bg {
  opacity: 1;
  background-image: linear-gradient(90deg, rgba(3,17,31,0) 0%, rgba(3,17,31,0) 12%, rgba(3,17,31,.03) 28%, rgba(3,17,31,.28) 48%, rgba(3,17,31,.78) 72%, rgba(3,17,31,.97) 100%), var(--project-hero-image, url('assets/hero-concept.webp'));
  background-position:center; background-size:cover;
}
html[dir="ltr"] body.project-profile-standard[data-project] .project-detail-hero .inner-hero-bg {
  background-image: var(--project-hero-image, url('assets/hero-concept.webp'));
}

@media(prefers-reduced-motion:reduce) {
 html body.project-profile-standard[data-project] .project-profile-section li:hover { transform:none; }
}

.project-gallery-dialog[open] {
  background: #061522 url("assets/project-lightbox-background.png") center / cover no-repeat;
}

/* Preserve the Al Yasmin pilot caption styling. */
body[data-project="al-jasmin-building"] .project-gallery-dialog[open] > p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 12px;
  overflow-wrap: anywhere;
}
body[data-project="al-jasmin-building"] .project-gallery-dialog p > bdi:first-child {
  color: #e4bb92;
  font-variant-numeric: tabular-nums;
}

/* P14: shared image track with one 12px gutter to each arrow. */
.project-gallery-dialog[open] {
  grid-template-columns: minmax(44px, 1fr) minmax(0, max-content) minmax(44px, 1fr);
  grid-template-rows: 44px minmax(0, 1fr) auto;
  gap: 6px 12px;
  padding: 8px 14px;
  scrollbar-width: none;
}
.project-gallery-dialog .service-gallery-controls {
  display: contents;
}
.project-gallery-dialog .viewer-close {
  position: static;
  grid-area: 1 / 1 / 2 / -1;
  justify-self: end;
}
.project-gallery-dialog[open] > img {
  grid-area: 2 / 2;
  place-self: center;
  width: auto;
  max-width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  object-fit: contain;
}
.project-gallery-dialog :is(.viewer-previous, .viewer-next) {
  position: static;
  grid-row: 2;
  align-self: center;
}
.project-gallery-dialog .viewer-previous {
  grid-column: 1;
  justify-self: end;
}
.project-gallery-dialog .viewer-next {
  grid-column: 3;
  justify-self: start;
}
.project-gallery-dialog[open] > p {
  grid-area: 3 / 1 / 4 / -1;
}
