/* ============================================================
   Divano - Projects portfolio & Case Study styles
   Identity tones: #001416 / #3e5252 · accent #E4D3C0
   ============================================================ */

.pf-wrap { padding: 56px 0 96px; }

/* ---- Full-width grid on desktop ----
   The page wraps the grid in .pf-wrap > .container (bootstrap, ~1170px cap).
   On wide screens let the container run edge-to-edge with fluid padding so the
   side rail + card grid get real width. Border-box + symmetric
   padding keeps it inside the viewport - no horizontal scroll. Tablet/phone
   keep the capped container untouched. */
@media (min-width: 1200px) {
  .pf-wrap .container {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
    margin-left: 0; margin-right: 0;
    padding-left: clamp(32px, 4vw, 72px);
    padding-right: clamp(32px, 4vw, 72px);
  }
}

/* ---- Layout: left filter rail · card grid ---- */
.pf-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  /* the theme's .container is fluid here, so on a 2560px screen the column
     stretched past 2100px. Cap the reading width and centre it. The cap is
     sized for a comfortable 3-up card width, not for the old single banner
     (which needed a much tighter cap to stop it growing taller than the fold). */
  max-width: 1500px;
  margin-inline: auto;
}

/* ---- Side filter list - by type (Villa, Apartment, Hotel, Office, GYM …) ---- */
.pf-side {
  position: sticky; top: 100px;
  display: flex; flex-direction: column; gap: 1px;
  border-left: 1px solid rgba(228, 211, 192, 0.16);
}
.pf-side button {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; background: none; border: 0;
  font-family: 'Dosis', sans-serif; font-weight: 600;
  font-size: 13.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #9fb0ac; cursor: pointer;
  padding: 12px 18px; margin-left: -1px;
  border-left: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.pf-side button:hover { color: #eef3f1; }
.pf-side button.active {
  color: #fff; border-left-color: #E4D3C0;
  background: linear-gradient(to right, rgba(228, 211, 192, 0.09), transparent 80%);
}
.pf-side__n { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: rgba(228, 211, 192, 0.55); }
.pf-side button.active .pf-side__n { color: #E4D3C0; }

/* ---- Grid ---- homepage and projects page both run a multi-column card grid.
   The projects page drops to 2-up earlier because the 236px filter rail eats
   into the row width. */
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.pf-layout .pf-grid { grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 1399px) { .pf-layout .pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pf-grid { grid-template-columns: 1fr; } }

/* side rail becomes a horizontal chip strip on top for tablet/phone */
@media (max-width: 860px) {
  .pf-layout { grid-template-columns: 1fr; gap: 22px; }
  .pf-side {
    position: static; flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; gap: 4px; border-left: 0;
    border-bottom: 1px solid rgba(228, 211, 192, 0.16);
    padding-bottom: 2px; scrollbar-width: none;
  }
  .pf-side::-webkit-scrollbar { display: none; }
  .pf-side button {
    flex: 0 0 auto; width: auto; margin-left: 0; white-space: nowrap;
    border-left: 0; border-bottom: 2px solid transparent; padding: 10px 14px;
  }
  .pf-side button.active { border-left-color: transparent; border-bottom-color: #E4D3C0; background: none; }
  .pf-side__n { display: none; }
  .pf-layout .pf-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  /* image ratio is the site-wide 4:3 from the .pf-card__img base - no override here */
  .pf-layout .pf-card__name { font-size: 19px; }
  .pf-layout .pf-card__body { padding: 16px 18px; }
}

.pf-card {
  display: block; position: relative; overflow: hidden;
  background: #001416; border-radius: 4px;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(.22,1,.36,1), transform 0.6s cubic-bezier(.22,1,.36,1),
              box-shadow 0.4s ease;
}
.pf-card.in { opacity: 1; transform: none; }
.pf-card:hover { box-shadow: 0 26px 60px rgba(0,20,22,0.5); }
/* single source of truth for the card crop - 4:3 on every page, every width */
.pf-card__img { position: relative; overflow: hidden; aspect-ratio: 4 / 3; }
/* projects page: the same 4:3 card as the homepage, at grid scale */
.pf-layout .pf-card__name { font-size: 21px; }
.pf-layout .pf-card__body { padding: 20px 22px; }
.pf-card__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.9s cubic-bezier(.22,1,.36,1);
}
.pf-card:hover .pf-card__img img { transform: scale(1.07); }
.pf-card__badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(0,20,22,0.72); color: #E4D3C0;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 2px; backdrop-filter: blur(4px);
}
.pf-card__ov {
  position: absolute; inset: 0; z-index: 1;
  /* stronger, taller dark wash so light photos don't wash out the labels */
  background: linear-gradient(to top, rgba(0,20,22,0.96) 0%, rgba(0,20,22,0.7) 32%, rgba(0,20,22,0.25) 62%, rgba(0,20,22,0) 100%);
}
.pf-card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 20px 22px; }
/* text-shadow guarantees legibility even where the wash is thin */
.pf-card__cat { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #E4D3C0; margin-bottom: 5px; text-shadow: 0 1px 10px rgba(0,20,22,0.8); }
.pf-card__name { display: block; font-family: 'Dosis', sans-serif; font-size: 23px; font-weight: 500; color: #fff; line-height: 1.15; text-shadow: 0 1px 12px rgba(0,20,22,0.85); }
.pf-card__meta { display: block; margin-top: 6px; font-size: 12px; letter-spacing: 0.04em; color: #e9f0ee; opacity: 0.95; text-shadow: 0 1px 10px rgba(0,20,22,0.8); }
.pf-card__view {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #E4D3C0;
  text-shadow: 0 1px 10px rgba(0,20,22,0.8);
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.4s, opacity 0.4s, margin-top 0.4s;
}
.pf-card:hover .pf-card__view { max-height: 26px; opacity: 1; }
@media (hover: none) { .pf-card__view { max-height: 26px; opacity: 1; } }

.pf-empty { text-align: center; color: #cbdad6; opacity: 0.7; padding: 40px 0; }

/* ============================================================
   CASE STUDY (project.html) - editorial journey
   Type scale: title 72 · section 40 · sub 18 · body 17 · caption 14 · meta 12
   ============================================================ */

/* the legacy theme paints every <section> #18191b - keep the case study on the page gradient */
#csApp section, #csApp .cs-hero { background: transparent !important; }

/* content column */
.cs-col { max-width: 1120px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.cs-section { padding: clamp(64px, 9vw, 110px) 0 0; }

/* reveals */
.csr { opacity: 0; transform: translateY(26px); transition: opacity 0.85s cubic-bezier(.22,1,.36,1), transform 0.85s cubic-bezier(.22,1,.36,1); transition-delay: var(--d, 0ms); }
.csr.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .csr { opacity: 1 !important; transform: none !important; transition: none; } }

/* buttons */
.cs-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px; border: 1px solid #E4D3C0; color: #E4D3C0;
  font-family: 'Dosis', sans-serif; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; font-size: 13px; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color 0.4s, transform 0.4s;
}
/* <button> elements inherit a light background from the legacy theme - kill it */
button.cs-btn { background: transparent; border-radius: 0; }
.cs-btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #E4D3C0; transform: scaleX(0); transform-origin: right; transition: transform 0.45s cubic-bezier(.22,1,.36,1); }
.cs-btn:hover { color: #001416; transform: translateY(-2px); }
.cs-btn:hover::before { transform: scaleX(1); transform-origin: left; }
.cs-btn--solid { background: #E4D3C0; color: #001416; }
.cs-btn--solid::before { background: #fff; }

/* ---- chapter headers ---- */
.cs-sh { position: static !important; width: auto !important; height: auto !important; margin-bottom: clamp(28px, 4vw, 46px); }
.cs-sh__t { font-family: 'Dosis', sans-serif; font-weight: 300; text-transform: uppercase; letter-spacing: 0.1em; color: #fff; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.5rem); line-height: 1.1; margin: 0; }
.cs-sh__s { color: #9fb0ab; font-size: 18px; line-height: 1.7; margin: 12px 0 0; max-width: 56ch; }

/* ============ 1 · HERO ============ */
.cs-hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.cs-hero__bg { position: absolute; inset: -8% 0; z-index: 0; }
.cs-hero__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); will-change: transform; }
.cs-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,20,22,0.95) 0%, rgba(0,20,22,0.45) 45%, rgba(0,20,22,0.25) 100%); }
.cs-hero__inner { position: relative; z-index: 2; width: 100%; max-width: 1240px; margin: 0 auto; padding: 140px clamp(20px, 4vw, 40px) 100px; /* bottom room so the facts cards overlap empty image, not the tags */ }
.cs-hero__grid { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.cs-hero__cat { font-size: 12px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: #E4D3C0; }
.cs-hero__title { font-family: 'Dosis', sans-serif; font-weight: 300; text-transform: uppercase; letter-spacing: 0.07em; color: #fff; font-size: clamp(2.6rem, 1.6rem + 4.4vw, 4.5rem); line-height: 1.04; margin: 16px 0 0; max-width: 15ch; text-align: left !important; /* theme centers every h1 */ }
.cs-hero__loc { margin-top: 14px; color: #d6e0dc; letter-spacing: 0.05em; font-size: 16px; }
.cs-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.cs-hero__facts { display: flex; flex-direction: column; gap: 18px; padding-left: 28px; border-left: 1px solid rgba(228,211,192,0.35); min-width: 150px; }
.cs-hero__fact .v { display: block; font-family: 'Dosis', sans-serif; font-weight: 500; font-size: 19px; color: #fff; letter-spacing: 0.04em; }
.cs-hero__fact .k { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(228,211,192,0.75); margin-top: 3px; }
.cs-hero__tags { display: flex; flex-wrap: wrap; gap: 0 34px; margin-top: 44px; padding: 20px 0; border-top: 1px solid rgba(228,211,192,0.22); }
.cs-hero__tags span { position: relative; font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: #cbdad6; padding: 4px 0; }
.cs-hero__tags span:not(:last-child)::after { content: ""; position: absolute; right: -19px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: rgba(228,211,192,0.5); transform: translateY(-50%); }
@media (max-width: 860px) {
  .cs-hero { min-height: 92svh; }
  .cs-hero__grid { flex-direction: column; align-items: flex-start; gap: 28px; }
  .cs-hero__facts { flex-direction: row; flex-wrap: wrap; gap: 20px 28px; border-left: 0; border-top: 1px solid rgba(228,211,192,0.35); padding: 20px 0 0; }
}

/* ============ 2 · FACTS - quiet hairline row ============ */
.cs-facts {
  display: flex; flex-wrap: wrap; gap: 26px clamp(30px, 5vw, 70px);
  margin-top: clamp(40px, 6vw, 70px);
  padding: 26px 0;
  border-top: 1px solid rgba(228,211,192,0.22);
  border-bottom: 1px solid rgba(228,211,192,0.22);
}
/* label and value read as one line: "LOCATION  Mudon, Dubai" */
.cs-fact { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.cs-fact .k { flex: 0 0 auto; font-size: 11px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(228,211,192,0.75); }
.cs-fact .v { min-width: 0; color: #eef3f1; font-size: 15.5px; line-height: 1.6; letter-spacing: 0.02em; }

/* ============ 3 · PROJECT STORY ============ */
.cs-story2 { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.cs-story2__label .cs-sh { position: sticky; top: 120px; margin: 0; }
.cs-story2__body p { color: #d6e0dc; line-height: 1.9; font-size: 17px; margin: 0 0 22px; }
.cs-story2__body .cs-lead { font-size: 20px; line-height: 1.85; color: #eef3f1; }
.cs-inline-k { color: #E4D3C0; font-weight: 600; letter-spacing: 0.04em; }
@media (max-width: 760px) { .cs-story2 { grid-template-columns: 1fr; gap: 20px; } .cs-story2__label .cs-sh { position: static; } }

/* ============ 4 · STATISTICS ============ */
.cs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: clamp(48px, 7vw, 80px) 0 0; text-align: center; }
.cs-stat { padding: 10px 12px; }
.cs-stat__n { display: block; font-family: 'Dosis', sans-serif; font-weight: 200; font-size: clamp(3rem, 2rem + 4vw, 4.6rem); line-height: 1; color: #E4D3C0; font-variant-numeric: tabular-nums; }
.cs-stat__l { display: block; margin-top: 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: #cbdad6; }
@media (max-width: 640px) { .cs-stats { grid-template-columns: 1fr; gap: 0; } }

/* ============ 5 · CINEMATIC FULL-BLEED ============ */
.cs-cine { width: 100%; margin: clamp(70px, 9vw, 120px) 0 0; }
/* !important beats the theme global img height rules */
.cs-cine img { width: 100% !important; height: clamp(340px, 62vh, 640px) !important; object-fit: cover; display: block; }

/* ============ 6 · TIMELINE ============ */
.cs-tl { position: relative; padding-left: 30px; }
.cs-tl::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(to bottom, rgba(228,211,192,0.6), rgba(228,211,192,0.08)); }
.cs-tl__item { position: relative; display: grid; grid-template-columns: 64px 1fr 300px; gap: 24px; align-items: center; padding: 30px 0; }
.cs-tl__item::before { content: ""; position: absolute; left: -25.5px; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: #E4D3C0; transform: translate(-50%, -50%); box-shadow: 0 0 0 5px rgba(228,211,192,0.14); }
.cs-tl__item:not(:last-child) { border-bottom: 1px solid rgba(228,211,192,0.1); }
.cs-tl__n { font-family: 'Dosis', sans-serif; font-weight: 200; font-size: 44px; color: rgba(228,211,192,0.45); line-height: 1; }
.cs-tl__txt h3 { font-family: 'Dosis', sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: 0.1em; color: #fff; font-size: 21px; margin: 0 0 8px; }
.cs-tl__txt p { color: #c3d2cd; line-height: 1.8; font-size: 16px; margin: 0; max-width: 58ch; }
.cs-tl__img { display: block; overflow: hidden; border-radius: 6px; aspect-ratio: 4 / 3; }
.cs-tl__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s cubic-bezier(.22,1,.36,1); }
.cs-tl__img:hover img { transform: scale(1.06); }
@media (max-width: 860px) {
  .cs-tl__item { grid-template-columns: 44px 1fr; }
  .cs-tl__n { font-size: 30px; }
  .cs-tl__img { grid-column: 2; }
}

/* ============ 7 · TRANSFORMATION (before / after drag slider) ============
   The finished ("after") photo fills the frame; the "before" photo sits on
   top, clipped to the left of the divider. Drag the handle - or use the
   arrow keys - to wipe between the two.                                    */
.cs-ba {
  /* --pos drives both the clip on the "before" image and the divider position */
  --pos: 50%;
  /* ONE fixed 4:3 frame for every pair. The ratio must never depend on the
     photo's orientation - before and after share this box, so if it flipped
     the divider would stop lining up with the imagery. JS still adds --land
     for landscape pairs, but that now only widens the box, never re-crops it. */
  max-width: 460px; margin-inline: auto;
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 6px; user-select: none; cursor: ew-resize;
  touch-action: pan-y; /* let the page scroll vertically; horizontal drags move the divider */
  border: 1px solid rgba(228,211,192,0.2);
  box-shadow: 0 22px 60px rgba(0,20,22,0.45);
}
.cs-ba:focus-visible { outline: 2px solid #E4D3C0; outline-offset: 3px; }
.cs-ba img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; pointer-events: none;
  -webkit-user-drag: none; user-select: none;
}
.cs-ba__after { z-index: 1; }
/* the "before" image is clipped to the left of the divider */
.cs-ba__before { z-index: 2; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

/* corner labels - before top-left, after top-right (both always visible) */
.cs-ba__label {
  position: absolute; top: 14px; z-index: 4; pointer-events: none;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  background: rgba(0,20,22,0.8); color: #E4D3C0; padding: 7px 14px; border-radius: 2px;
}
.cs-ba__label--before { left: 14px; }
.cs-ba__label--after { right: 14px; }

/* vertical divider + round grab handle riding on --pos */
.cs-ba__divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 3;
  width: 2px; margin-left: -1px; pointer-events: none;
  background: rgba(255,255,255,0.9); box-shadow: 0 0 12px rgba(0,20,22,0.55);
}
.cs-ba__handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(228,211,192,0.96); color: #001416;
  box-shadow: 0 4px 16px rgba(0,20,22,0.45);
  touch-action: none; /* the handle itself never pans the page */
}
.cs-ba__handle svg { width: 20px; height: 20px; display: block; }

.cs-ba__hint {
  position: absolute; left: 50%; bottom: 16px; z-index: 4; transform: translateX(-50%);
  pointer-events: none; white-space: nowrap;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  background: rgba(228,211,192,0.92); color: #001416; padding: 7px 14px; border-radius: 2px;
  transition: opacity 0.5s ease;
}
.cs-ba--touched .cs-ba__hint { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .cs-ba__hint { transition: none; } }
/* landscape pairs get a wider box only - the 4:3 ratio above is untouched */
.cs-ba--land { max-width: 720px; }
.cs-ba__thumbs { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.cs-ba__thumb {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: none; border: 1px solid rgba(228,211,192,0.25); border-radius: 4px; padding: 6px 14px 6px 6px;
  color: #cbdad6; font-family: 'Dosis', sans-serif; font-weight: 600; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: border-color 0.3s, color 0.3s;
}
.cs-ba__thumb img { width: 52px; height: 38px; object-fit: cover; border-radius: 2px; display: block; }
.cs-ba__thumb:hover { border-color: #E4D3C0; color: #fff; }
.cs-ba__thumb.active { border-color: #E4D3C0; color: #E4D3C0; }

/* ============ 8 · ON SITE strip ============ */
.cs-proc__strip {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(228,211,192,0.4) rgba(255,255,255,0.06);
}
/* the rail height stays fixed; aspect-ratio then derives the width, so every
   frame in the strip is the same 4:3 box instead of one box per photo shape */
.cs-proc__shot {
  flex: 0 0 auto; height: 220px; aspect-ratio: 4 / 3; scroll-snap-align: start;
  border-radius: 4px; overflow: hidden; background: #001416;
  filter: saturate(0.8);
  transition: filter 0.4s, transform 0.4s;
}
.cs-proc__shot:hover { filter: saturate(1); transform: translateY(-3px); }
.cs-proc__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* height only - the 4:3 ratio above still applies and sets the width */
@media (max-width: 700px) { .cs-proc__shot { height: 160px; } }

/* ============ 9 · MATERIAL PALETTE - figure captions, no boxes ============ */
.cs-pal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.cs-pal__img { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: 2px; }
.cs-pal__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.9s cubic-bezier(.22,1,.36,1); }
.cs-pal__card:hover .cs-pal__img img { transform: scale(1.05); }
.cs-pal__card h3 { font-family: 'Dosis', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: #E4D3C0; font-size: 12px; margin: 14px 0 5px; }
.cs-pal__card p { color: #9fb0ab; font-size: 14px; line-height: 1.65; margin: 0; }
.cs-pal__card.no-img h3 { color: #fff; font-size: 14px; }
.cs-pal__mono { display: none; }
@media (max-width: 900px) { .cs-pal { grid-template-columns: 1fr 1fr; } }

/* ============ 10 · EDITORIAL GALLERY ============ */
.cs-ed { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cs-ed__shot { position: relative; display: block; overflow: hidden; border-radius: 4px; background: #001416; }
/* same 4:3 crop for every tile - the mosaic varies by SPAN, not by ratio */
.cs-ed__shot.half { grid-column: span 3; aspect-ratio: 4 / 3; }
.cs-ed__shot.third { grid-column: span 2; aspect-ratio: 4 / 3; }
.cs-ed__shot.hide { display: none; }
.cs-ed__more { grid-column: 1 / -1; text-align: center; padding-top: 16px; }
.cs-ed__more .cs-btn span { opacity: 0.65; }
.cs-ed__shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s cubic-bezier(.22,1,.36,1); }
.cs-ed__shot:hover img { transform: scale(1.05); }
.cs-ed__cap {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: #E4D3C0; background: rgba(0,20,22,0.75); padding: 6px 12px; border-radius: 2px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s;
}
.cs-ed__shot:hover .cs-ed__cap { opacity: 1; transform: none; }
@media (max-width: 700px) {
  .cs-ed { grid-template-columns: 1fr 1fr; }
  /* span only - the 4:3 ratio from the base rules carries through to phones */
  .cs-ed__shot.half, .cs-ed__shot.third { grid-column: span 1; }
}

/* ============ 11 · IN BRIEF - plain list ============ */
.cs-hl { list-style: none; margin: 0; padding: 0; columns: 2 300px; column-gap: 60px; }
.cs-hl li { position: relative; padding: 7px 0 7px 26px; color: #d6e0dc; font-size: 16.5px; line-height: 1.7; break-inside: avoid; }
.cs-hl li::before { content: ""; position: absolute; left: 2px; top: 1em; width: 7px; height: 7px; transform: rotate(45deg); background: rgba(228,211,192,0.7); }

/* ============ 12 · QUIET CLOSING LINE ============ */
.cs-cta { text-align: center; padding: clamp(90px, 12vw, 150px) 24px 0; }
.cs-cta p { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; color: #eef3f1; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); margin: 0 0 14px; }
.cs-cta a { display: inline-block; color: #E4D3C0; font-family: 'Dosis', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; border-bottom: 1px solid rgba(228,211,192,0.4); padding-bottom: 6px; transition: color 0.35s, border-color 0.35s; }
.cs-cta a:hover { color: #fff; border-color: #E4D3C0; }

/* ============ 13 · RELATED + NAV ============ */
.cs-rel .pf-grid { margin-top: 6px; }
/* Guard: the section is the three closest projects, one row. If that ever
   grows, the desktop still shows a single row - the phone rail (mobile.css)
   is the place for more. */
.cs-rel__rail > .pf-card:nth-child(n+4) { display: none; }
.cs-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: clamp(44px, 6vw, 70px) 0 20px; margin-top: clamp(44px, 6vw, 70px); border-top: 1px solid rgba(228,211,192,0.16); }
.cs-nav a { color: #E4D3C0; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; transition: color 0.3s; }
.cs-nav a:hover { color: #fff; }
.cs-nav .all { color: #fff; border: 1px solid rgba(228,211,192,0.4); padding: 12px 22px; border-radius: 2px; transition: all 0.35s; }
.cs-nav .all:hover { background: #E4D3C0; color: #001416; border-color: #E4D3C0; }

/* ---- Shared lightbox ---- */
.dv-lb { position: fixed; inset: 0; z-index: 99999; background: rgba(0,20,22,0.97); display: none; align-items: center; justify-content: center; padding: 4vh 6vw; }
.dv-lb.open { display: flex; }
.dv-lb-fig { margin: 0; display: flex; }
.dv-lb-fig img { max-width: 90vw; max-height: 86vh; object-fit: contain; box-shadow: 0 24px 70px rgba(0,0,0,0.55); }
.dv-lb-x, .dv-lb-prev, .dv-lb-next { background: none; border: 1px solid rgba(255,255,255,0.28); color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; transition: 0.3s; z-index: 2; display: flex; align-items: center; justify-content: center; }
.dv-lb-x:hover, .dv-lb-prev:hover, .dv-lb-next:hover { background: #E4D3C0; border-color: #E4D3C0; color: #001416; }
.dv-lb-x { position: absolute; top: 22px; right: 26px; }
.dv-lb-prev { position: absolute; left: 3vw; }
.dv-lb-next { position: absolute; right: 3vw; }
.dv-lb-cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #fff; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.dv-lb-name { color: #E4D3C0; margin-right: 14px; }
@media (max-width: 600px) { .dv-lb-prev { left: 8px; } .dv-lb-next { right: 8px; } .dv-lb-x { top: 12px; right: 12px; } }

/* ------------------------------------------------------------
   Projects page: medium rectangular cards, two per row on laptop.
   Each cover shows IN FULL on a dark mat (object-fit: contain) -
   no harsh cropping, so the photo reflects the whole project.
   Portrait covers (3:4) fill the frame exactly; the occasional
   landscape cover shows fully with a slim mat top and bottom.
   ------------------------------------------------------------ */
/* two-layer cover: a blurred fill (bg) behind the full photo (fg).
   Home grid keeps the fg cover-cropped (bg hidden behind it); the
   projects page shows the fg IN FULL over the blurred fill. */
.pf-card__bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.pf-card__fg {
  position: relative; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.pf-layout .pf-card__img {
  height: auto !important;
  background: #00161a;
}
.pf-layout .pf-card__fg { object-fit: cover !important; }
.pf-layout .pf-card__bg {
  filter: blur(24px) brightness(0.5) saturate(1.1);
  transform: scale(1.2);
}
.pf-layout .pf-card:hover .pf-card__bg { transform: scale(1.2); }
.pf-layout .pf-card { width: 100%; }
/* Cards keep the shared 4:3 crop from .pf-card__img at every width - the old
   5:2 / 3:2 banner ratios existed only because each card filled a whole row. */
/* Phone: one card per row, still landscape (client: "مستطيل أيضاً"). Compact
   type, tight padding and no view-CTA keep the text block from swallowing the
   frame - desktop title sizing used to leak down and do exactly that. */
@media (max-width: 600px) {
  .pf-layout .pf-grid { grid-template-columns: 1fr; }
  .pf-layout .pf-card__body { padding: 13px 15px; }
  .pf-layout .pf-card__name { font-size: 18px; }
  .pf-layout .pf-card__cat { font-size: 10px; margin-bottom: 3px; }
  .pf-layout .pf-card__meta { font-size: 11.5px; margin-top: 3px; }
  .pf-layout .pf-card__view { display: none !important; }
}
