/* Approved project presentation. */
.detail-breadcrumb { padding-bottom: 12px; }
.detail-hero { display: block; padding: 0 0 48px; }
.detail-hero-copy { position: relative; padding: 28px 0 32px; }
.detail-hero h1 { font-size: clamp(38px, 5vw, 72px); max-width: none; margin: 16px 0; }
.detail-hero-copy > p { margin: 0; }
.detail-hero-copy .detail-button { position: absolute; right: 0; bottom: 36px; background: transparent; color: var(--ink); border: 1px solid var(--line); }
.detail-hero-copy .detail-button:hover { color: var(--red); border-color: var(--red); }
.detail-cover img { height: clamp(320px, 48vw, 580px); object-fit: cover; object-position: center 45%; }
.detail-cover a { border-radius: 4px; }
.detail-overview { padding: 56px 0 64px; grid-template-columns: 1.25fr .75fr; gap: 10%; }
.detail-overview h2 { font-size: 34px; }
.detail-facts { background: var(--bg-alt); padding: 28px 32px; border-left: 0; border-top: 3px solid var(--red); }
.detail-gallery { grid-template-columns: repeat(12,minmax(0,1fr)); gap: 28px; align-items: center; }
.detail-gallery figure { grid-column: span 6; }
.detail-gallery figure:nth-child(3) { grid-column: span 6; margin: 0; }
.detail-gallery--odd figure:last-child { grid-column: span 6; width: 100%; margin: 0; }
.detail-gallery:not(.detail-gallery--odd) figure:last-child { grid-column: span 6; margin: 0; }
.detail-contact { margin-top: 80px; padding: 56px; background: var(--bg-alt); border-left: 4px solid var(--red); }
.detail-contact h2 { margin: 0 0 16px; font: 600 clamp(30px,3.6vw,48px)/1.15 var(--font-display); letter-spacing: -.03em; }
.detail-contact p { color: var(--slate); margin-bottom: 24px; }
.detail-next { background: transparent; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; margin-top: 56px; padding: 32px 0; }
@media(max-width:767px) {
 .detail-hero-copy { padding: 24px 0; }
 .detail-hero-copy .detail-button { position: static; margin-top: 22px; }
 .detail-cover img { height: auto; }
 .detail-overview { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
 .detail-gallery { grid-template-columns: 1fr; gap: 20px; }
 .detail-gallery figure, .detail-gallery figure:nth-child(3), .detail-gallery--odd figure:last-child, .detail-gallery:not(.detail-gallery--odd) figure:last-child { grid-column: 1; margin: 0; width: 100%; }
 .detail-contact { margin-top: 44px; padding: 28px 24px; }
}
/* Teluk Intan: identical gallery sizes, with the unpaired image centred. */
.detail-gallery--odd figure:nth-child(3) { grid-column: span 6; margin: 0; }
.detail-gallery--odd figure:last-child { grid-column: 4 / 10; width: 100%; margin: 0; }
@media(max-width:767px) {
 .detail-gallery--odd figure:nth-child(3), .detail-gallery--odd figure:last-child { grid-column: 1; }
}

/* --------------------------------------------------------------------------
   Project pages, tablet and mobile (1024px and below only; desktop untouched)
   Title block, overview and gallery heading centred; the project facts in two
   columns, an odd last fact centred on its own row at the same width; type on
   the homepage standard (H1 36/48, section titles 27/32, paragraphs 16,
   card text 14, labels 13).
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .detail-breadcrumb { justify-content: center; font-size: 13px; }

  .detail-hero-copy { text-align: center; }
  .detail-hero .eyebrow { font-size: 13px; }
  .detail-hero h1,
  .detail-hero--long h1 { font-size: 48px; line-height: 1.1; margin-inline: auto; }
  .detail-hero-copy > p { font-size: 16px; }
  .detail-hero-copy .detail-button { position: static; margin-top: 22px; }

  .detail-overview { grid-template-columns: 1fr; gap: 32px; }
  .detail-overview-copy { text-align: center; }
  .detail-overview h2 { font-size: 32px; }
  .detail-summary p { margin-inline: auto; }

  .detail-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
    text-align: center;
  }
  .detail-facts > div + div { margin-top: 0; }
  .detail-facts > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 10px);
  }
  .detail-facts dt { font-size: 13px; }
  .detail-facts dd { font-size: 14px; }

  .detail-gallery-head { text-align: center; }
  .detail-gallery-head h2 { font-size: 32px; }
  .detail-gallery-head p { font-size: 16px; }

  .detail-contact h2 { font-size: 32px; }
  .detail-contact p { font-size: 16px; }
  .detail-next h2 { font-size: 21px; font-weight: 600; }
  .detail-gallery figcaption { font-size: 14px; }
  .detail-gallery figcaption span { font-size: 13px; }
}
/* Tablet: the facts panel held to a comfortable width in the middle. */
@media (min-width: 768px) and (max-width: 1024px) {
  .detail-facts { width: 100%; max-width: 640px; margin-inline: auto; }
}
@media (max-width: 560px) {
  .detail-hero h1,
  .detail-hero--long h1 { font-size: 36px; }
  .detail-overview h2,
  .detail-gallery-head h2,
  .detail-contact h2 { font-size: 27px; }
  .detail-facts { padding: 24px 16px; gap: 22px 12px; }
  .detail-facts > div:last-child:nth-child(odd) { width: calc(50% - 6px); }
  .detail-next h2 { font-size: 20px; }
}

/* Project facts, tablet and mobile: a ruled grid rather than loose text. Each
   fact is a cell, hairlines between them (the panel's line colour showing
   through a 1px gap), the pair in a row the same height, label over value,
   both centred. An odd last fact takes the whole row. */
@media (max-width: 1024px) {
  .detail-facts {
    gap: 1px;
    padding: 0;
    background: var(--line);
    overflow: hidden;
  }
  .detail-facts > div {
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 22px 16px;
    background: var(--bg-alt);
  }
  .detail-facts > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: auto;
  }
  .detail-facts dt {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .detail-facts dd { font-size: 14px; line-height: 1.5; }
}
@media (max-width: 560px) {
  .detail-facts { padding: 0; gap: 1px; }
  .detail-facts > div { padding: 18px 10px; }
  .detail-facts > div:last-child:nth-child(odd) { width: auto; }
  .detail-facts dt { letter-spacing: .06em; }
}
