/* DILIGENT CONSTRUCTION — Projects-only UI balance and source-photo framing.
   Applied after prior project styles to keep all other site pages unchanged.
   Original JPEG/PNG/WebP files are never edited, compressed, cropped or replaced. */

/* Project index: orderly, slightly smaller two-column portfolio with true soft-square
   photographic edges rather than only a rounded outer frame. */
.diligent-projects-index .catalog .container {
  width:min(1088px,calc(100% - 76px))!important;
}
.diligent-projects-index .project-grid {
  column-gap:clamp(22px,2.5vw,34px)!important;
  row-gap:clamp(30px,3vw,43px)!important;
  align-items:start;
}
.diligent-projects-index .project-tile {
  min-width:0;
}
.diligent-projects-index .project-tile .project-cover {
  width:100%!important;
  aspect-ratio:1.55 / 1!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:12px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:12px!important;
  background:#ebe9e4!important;
  box-shadow:none!important;
}
.diligent-projects-index .project-tile .project-cover img,
.diligent-projects-index .project-tile[data-bell-bmo] .project-cover img {
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:9px!important;
  box-shadow:none!important;
  transform:none!important;
}
.diligent-projects-index .project-tile .sector {margin-bottom:10px!important}
.diligent-projects-index .project-tile .where {margin-top:12px!important;margin-bottom:6px!important}
.diligent-projects-index .project-tile h3 {font-size:clamp(19px,1.75vw,25px)!important;line-height:1.26!important}
.diligent-projects-index .filters {margin-bottom:34px!important}

/* Project detail: an image-shaped hero with a clear charcoal surround, not a forced
   fullscreen-height canvas. All edges of every original image remain visible. */
.diligent-project-detail main > .detail-hero {
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  padding:calc(var(--header-overlay-height,72px) + 54px) 0 0!important;
  overflow:visible!important;
  background:#191b1c!important;
}
.diligent-project-detail .detail-hero .detail-hero-media,
.diligent-project-detail.project-portrait .detail-hero .detail-hero-media {
  position:relative!important;
  inset:auto!important;
  width:min(1140px,calc(100% - 76px))!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  overflow:visible!important;
  background:transparent!important;
  transform:none!important;
}
.diligent-project-detail .detail-hero .detail-hero-media img {
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:min(66svh,600px)!important;
  min-height:0!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:12px!important;
  transform:none!important;
  filter:none!important;
  box-shadow:none!important;
}
/* Bell's tall original is deliberately capped to avoid a towering portrait hero. */
.diligent-project-detail .detail-hero-media img[src="assets/project-bell-main.jpg"] {
  max-height:min(59svh,515px)!important;
}
.diligent-project-detail .detail-hero .detail-hero-content {
  position:relative!important;
  padding:clamp(20px,2.7vw,34px) 0 clamp(28px,3.4vw,43px)!important;
  background:#191b1c!important;
}
.diligent-project-detail .detail-hero .detail-hero-intro h1 {
  font-size:clamp(31px,3.8vw,56px)!important;
  line-height:1.13!important;
  margin-top:11px!important;
}
.diligent-project-detail .detail-hero .project-top-back {
  top:calc(var(--header-overlay-height,72px) + 10px)!important;
}

/* Overview and gallery: economical spacing, natural photo dimensions and soft corners. */
.diligent-project-detail .detail-summary {
  padding:clamp(42px,4.6vw,66px) 0 clamp(28px,3.7vw,48px)!important;
}
.diligent-project-detail .detail-summary .container {
  gap:clamp(24px,4.2vw,70px)!important;
}
.diligent-project-detail .detail-gallery {
  padding:0 0 clamp(48px,5.5vw,78px)!important;
}
.diligent-project-detail .detail-gallery .container {
  padding-top:clamp(24px,3vw,39px)!important;
}
.diligent-project-detail .detail-gallery-intro {
  margin-bottom:clamp(18px,2.2vw,29px)!important;
}
.diligent-project-detail .detail-gallery-grid {
  align-items:start!important;
  gap:clamp(14px,1.8vw,24px)!important;
}
.diligent-project-detail .detail-gallery-grid figure {
  min-width:0!important;
  min-height:0!important;
  max-height:none!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:12px!important;
  background:transparent!important;
  box-shadow:none!important;
}
.diligent-project-detail .detail-gallery-grid figure img {
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:430px!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:11px!important;
  box-shadow:none!important;
  transform:none!important;
}
/* Downview's one real gallery image sits beside an equal-height editorial caption,
   rather than a short text box followed by dead space. */
.diligent-project-detail .detail-gallery-grid.single-gallery-editorial {
  grid-template-columns:minmax(0,.83fr) minmax(0,1.17fr)!important;
  max-width:1050px!important;
  align-items:stretch!important;
}
.diligent-project-detail .detail-gallery-grid.single-gallery-editorial figure {
  align-self:center!important;
}
.diligent-project-detail .detail-gallery-grid.single-gallery-editorial figure img {
  max-height:410px!important;
}
.diligent-project-detail .detail-gallery-grid.single-gallery-editorial .detail-gallery-note {
  align-self:stretch!important;
  justify-content:center!important;
  gap:12px!important;
  padding:clamp(22px,2.6vw,34px)!important;
  border:1px solid #dfdad2!important;
  border-left:2px solid #bb925a!important;
  border-radius:11px!important;
  background:#f5f4f0!important;
}
.diligent-project-detail .related-nav {
  margin-top:clamp(24px,3vw,42px)!important;
  padding-top:20px!important;
}
@media(max-width:1000px){
  .diligent-projects-index .catalog .container {width:calc(100% - 48px)!important}
  .diligent-project-detail .detail-hero .detail-hero-media {width:calc(100% - 54px)!important}
  .diligent-project-detail .detail-hero .detail-hero-media img {max-height:min(61svh,530px)!important}
  .diligent-project-detail .detail-hero-media img[src="assets/project-bell-main.jpg"] {max-height:min(55svh,480px)!important}
}
@media(max-width:760px){
  .diligent-projects-index .catalog .container {width:calc(100% - 38px)!important}
  .diligent-projects-index .project-grid {grid-template-columns:1fr!important;row-gap:33px!important}
  .diligent-projects-index .project-tile .project-cover {aspect-ratio:1.5 / 1!important;padding:10px!important;border-radius:11px!important}
  .diligent-projects-index .project-tile .project-cover img {border-radius:8px!important}
  .diligent-project-detail main > .detail-hero {padding-top:calc(var(--header-overlay-height,72px) + 49px)!important}
  .diligent-project-detail .detail-hero .detail-hero-media {width:calc(100% - 34px)!important}
  .diligent-project-detail .detail-hero .detail-hero-media img {max-height:min(53svh,440px)!important;border-radius:10px!important}
  .diligent-project-detail .detail-hero-media img[src="assets/project-bell-main.jpg"] {max-height:min(47svh,400px)!important}
  .diligent-project-detail .detail-hero .detail-hero-content {padding:20px 0 31px!important}
  .diligent-project-detail .detail-hero .detail-hero-intro h1 {font-size:clamp(27px,6.8vw,40px)!important}
  .diligent-project-detail .detail-summary {padding:36px 0 27px!important}
  .diligent-project-detail .detail-summary .container {gap:19px!important}
  .diligent-project-detail .detail-gallery .container {padding-top:25px!important}
  .diligent-project-detail .detail-gallery-grid {grid-template-columns:1fr!important;gap:16px!important}
  .diligent-project-detail .detail-gallery-grid figure img {max-height:370px!important;border-radius:10px!important}
  .diligent-project-detail .detail-gallery-grid.single-gallery-editorial {grid-template-columns:1fr!important}
  .diligent-project-detail .detail-gallery-grid.single-gallery-editorial figure img {max-height:380px!important}
  .diligent-project-detail .detail-gallery-grid.single-gallery-editorial .detail-gallery-note {padding:22px!important}
}
@media (prefers-reduced-motion:reduce) {
  .diligent-projects-index .project-cover img,
  .diligent-project-detail .detail-hero-media img,
  .diligent-project-detail .detail-gallery-grid img {transition:none!important;animation:none!important}
}
