/* P09: approved layered-gradient directory; shared by all generated cards. */
body.directory-editorial .project-grid {
 --directory-paper:#f7f2ea; --directory-copy-height:238px;
 display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
 gap:24px; align-items:stretch;
}
body.directory-editorial .project-card.editorial-entry {
 display:block; min-width:0; height:100%; padding:0;
 border:1px solid #ad825b32; border-radius:20px; background:var(--directory-paper);
 overflow:hidden; box-shadow:0 9px 28px #08182909;
 transition:box-shadow 420ms ease,border-color 420ms ease;
}
body.directory-editorial .project-card.editorial-entry:hover { transform:none; }
body.directory-editorial .editorial-entry .project-card-main,
body.directory-editorial .editorial-entry:nth-child(even) .project-card-main {
 display:grid; grid-template-columns:minmax(0,1fr);
 grid-template-rows:auto max-content; gap:0; align-content:start;
 height:100%; min-width:0; align-items:stretch;
}
body.directory-editorial .editorial-entry .project-art,
body.directory-editorial .editorial-entry .project-art.project-art--photo,
body.directory-editorial .editorial-entry:nth-child(even) .project-art {
 position:relative; isolation:isolate; order:0; width:100%;
 aspect-ratio:4 / 5; height:auto; min-height:0; max-height:none;
 border:0; border-radius:20px 20px 0 0; overflow:hidden;
 background:var(--directory-paper); color:#577184; box-shadow:none;
}
body.directory-editorial .editorial-entry .project-art { padding:20px; }
body.directory-editorial .editorial-entry .project-art.project-art--photo {
 display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr);
 place-items:center; padding:0;
}
body.directory-editorial .editorial-entry .project-art.project-art--photo::after { content:none; }
body.directory-editorial .editorial-entry .directory-image-surface {
 position:relative; display:block; isolation:isolate; min-width:0; min-height:0;
 justify-self:center; align-self:center; aspect-ratio:var(--directory-native-ratio,4 / 5);
 border-radius:20px 20px 0 0; overflow:hidden; background:var(--directory-paper);
}
body.directory-editorial .editorial-entry .directory-image-surface.is-width-fit { width:100%; height:auto; }
body.directory-editorial .editorial-entry .directory-image-surface.is-height-fit { width:auto; height:100%; }
body.directory-editorial .editorial-entry .project-art--photo img {
 position:absolute; inset:0; display:block; width:100%; max-width:100%;
 height:100%; max-height:none; aspect-ratio:auto; object-fit:contain;
 object-position:center; border-radius:20px 20px 0 0; box-shadow:none;
 scale:1; transform:none; clip-path:none; mask-image:none; transition:none;
}
/* Same blend; photographs use their own native-ratio surface as the boundary. */
body.directory-editorial .editorial-entry .project-art:not(.project-art--photo)::after,
body.directory-editorial .editorial-entry .directory-image-surface::after {
 content:''; display:block; position:absolute; pointer-events:none;
 inset:auto 0 0; z-index:1; height:clamp(40px,4.5vw,60px);
 background:linear-gradient(180deg,rgb(247 242 234 / 0) 0%,rgb(247 242 234 / .34) 52%,rgb(247 242 234 / 1) 100%);
}
body.directory-editorial .editorial-entry .project-art-number,
body.directory-editorial .editorial-entry .project-art-label { position:relative; z-index:2; }
body.directory-editorial .editorial-entry .project-art-label { color:#536e7e; }
body.directory-editorial .editorial-entry .project-card-body {
 position:relative; display:grid; grid-template-columns:minmax(0,1fr);
 grid-template-rows:28px max-content 24px 48px 44px; gap:6px;
 height:auto; min-height:0; width:100%; max-width:none;
 padding:4px 20px 6px; border:0; border-radius:0 0 20px 20px;
 background:var(--directory-paper); align-items:start; overflow:hidden;
}
body.directory-editorial .editorial-entry .project-card-body > * {
 min-width:0; max-width:100%; margin:0; overflow-wrap:anywhere;
}
body.directory-editorial .editorial-entry .project-card-top {
 grid-row:1; width:100%; min-height:0; height:28px;
 display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:nowrap;
}
body.directory-editorial .editorial-entry .project-category {
 color:#85603f; font-size:12px; font-weight:600; line-height:1.4;
}
body.directory-editorial .editorial-entry .status-pill {
 flex-shrink:0; padding:4px 8px; border-radius:999px; font-size:11px; line-height:1.4;
}
body.directory-editorial .editorial-entry h2 {
 grid-row:2; color:#081829; font-size:clamp(21px,1.8vw,26px);
 font-weight:700; line-height:30px; height:auto; max-height:60px;
 display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2;
 overflow:hidden;
}
body.directory-editorial .editorial-entry .editorial-location:not(.project-card-summary) {
 grid-row:3; color:#8a6544; font-size:14px; line-height:24px;
 white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
body.directory-editorial .editorial-entry .project-card-summary {
 grid-row:4; color:#526777; font-size:14px; line-height:24px; max-height:48px;
 display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2;
 overflow:hidden;
}
body.directory-editorial .editorial-entry .project-card-cta {
 grid-row:5; justify-self:start; align-self:end; display:inline-flex;
 align-items:center; justify-content:center; gap:12px;
 height:44px; min-height:44px; max-width:100%; padding:10px 17px;
 border:1px solid #ad825b8c; border-radius:999px; background:#102e4d;
 color:#f2e7d8; font-size:14px; line-height:22px; font-weight:600;
 white-space:nowrap; opacity:.93;
 transition:background-color 300ms ease,opacity 300ms ease,translate 300ms ease;
}
body.directory-editorial .editorial-entry .project-card-cta span { margin:0; }
body.directory-editorial .editorial-entry[data-reveal].is-revealed { animation:none; }
body.directory-editorial .editorial-entry:focus-within { border-color:#ad825b99; box-shadow:0 12px 30px #08182912; }
body.directory-editorial .editorial-entry .project-card-main:focus-visible { outline:3px solid #986b44; outline-offset:-4px; border-radius:20px; }
body.directory-editorial .editorial-entry:focus-within .project-card-cta { opacity:1; background:#193f58; }
@media(hover:hover) and (pointer:fine) {
 body.directory-editorial .project-card.editorial-entry:hover { border-color:#ad825b75; box-shadow:0 12px 32px #08182914; }
 body.directory-editorial .editorial-entry .project-card-main:hover .project-card-cta { opacity:1; translate:0 -1px; background:#193f58; }
}
@media(prefers-reduced-motion:no-preference) {
 body.directory-editorial .editorial-entry.is-revealed:not(.directory-reveal-complete) .project-art { animation:directory-image-fade 420ms ease-out both; }
 body.directory-editorial .editorial-entry.is-revealed:not(.directory-reveal-complete) .project-card-body > * { animation:directory-copy-reveal 430ms cubic-bezier(.22,1,.36,1) both; }
 body.directory-editorial .editorial-entry.is-revealed:not(.directory-reveal-complete) .project-card-body > :nth-child(2) { animation-delay:40ms; }
 body.directory-editorial .editorial-entry.is-revealed:not(.directory-reveal-complete) .project-card-body > :nth-child(3) { animation-delay:80ms; }
 body.directory-editorial .editorial-entry.is-revealed:not(.directory-reveal-complete) .project-card-body > :nth-child(4) { animation-delay:120ms; }
 body.directory-editorial .editorial-entry.is-revealed:not(.directory-reveal-complete) .project-card-body > :nth-child(n+5) { animation-delay:160ms; }
}
@keyframes directory-image-fade { from { opacity:0; } to { opacity:1; } }
@keyframes directory-copy-reveal { from { opacity:0; translate:0 6px; } to { opacity:1; translate:0 0; } }
@media(max-width:1000px) { body.directory-editorial .project-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:680px) { body.directory-editorial .project-grid { grid-template-columns:minmax(0,1fr); gap:22px; } }
@media(prefers-reduced-motion:reduce) {
 body.directory-editorial .project-card.editorial-entry,
 body.directory-editorial .editorial-entry .project-art--photo img,
 body.directory-editorial .editorial-entry .project-card-cta { transition:none!important; scale:1!important; translate:none!important; }
}

/* P09: local framing only. Keep the common card/image stage and copy geometry. */
body.directory-editorial .editorial-entry:is([data-project="al-narges-building"],[data-project="al-orchid-building"],[data-project="safwat-al-shatea-villas"]) .directory-image-surface {
 width:100%; height:100%; aspect-ratio:auto; align-self:stretch; justify-self:stretch;
}
body.directory-editorial .editorial-entry:is([data-project="al-narges-building"],[data-project="al-orchid-building"],[data-project="safwat-al-shatea-villas"]) .project-art--photo img {
 object-fit:cover; object-position:50% 0%;
}
/* The taller Shati source keeps its complete horizontal extent; trim sky/road evenly. */
body.directory-editorial .editorial-entry[data-project="safwat-al-shatea-villas"] .project-art--photo img {
 object-position:50% 50%;
}

/* P09: use the actual name height; 6px grid gap + 2px gives an 8px location gap. */
body.directory-editorial .editorial-entry .project-card-body > h2 { margin-bottom:2px; }

/* P09: directory hero and controls only; project card rules above stay unchanged. */
body.directory-editorial .directory-hero-lead,
body.directory-editorial .directory-hero-rest { display:block; }
body.directory-editorial .directory-hero-lead,
body.directory-editorial .directory-hero-rest { width:fit-content; max-width:100%; }
html[dir="rtl"] body.directory-editorial .inner-hero-content > p { text-align:right; }
body.directory-editorial .directory-controls .filter-button {
 border-radius:999px; border-color:#ad825b80;
 transition:background-color 220ms,border-color 220ms,box-shadow 220ms,transform 220ms;
}
body.directory-editorial .directory-controls .filter-button:is(:hover,.is-active) {
 background:#102e4d; color:#f2e7d8; border-color:#ad825b;
}
body.directory-editorial .directory-controls .filter-button:hover { transform:translateY(-1px); }
body.directory-editorial .search-box input {
 border-radius:999px; border-color:#ad825b80; background:#fbf8f2;
 transition:border-color 220ms,box-shadow 220ms;
}
body.directory-editorial .search-box input:hover { border-color:#ad825b; }
body.directory-editorial .directory-controls .filter-button:focus-visible,
body.directory-editorial .search-box input:focus-visible {
 outline:2px solid #9e6f45; outline-offset:3px; box-shadow:0 0 0 3px #ad825b1a;
}
@media(prefers-reduced-motion:reduce) {
 body.directory-editorial .directory-controls .filter-button,
 body.directory-editorial .search-box input { transition:none; transform:none!important; }
}
