/* Project galleries: scoped components shared by Django and its static preview.
   Global type, navigation and estimator styling remain in site.css. */
.projects-page,.project-detail-page{min-width:0}
.projects-heading{align-items:flex-end;gap:32px;margin-bottom:28px}
.projects-heading>div{max-width:840px;min-width:0}
.projects-page h1,.project-detail-page h1{font-size:clamp(36px,3.8vw,52px);line-height:1.14;letter-spacing:-1px;max-width:1000px}
.projects-page .lead,.project-detail-page .lead{font-size:20px;line-height:1.65;max-width:800px;margin-top:18px}
.projects-heading>.button{flex-shrink:0;white-space:nowrap;font-size:18px;min-height:54px}
.projects-page .eyebrow,.project-detail-page .eyebrow{font-size:16px;line-height:1.45}

/* Explicit layout avoids old generic grid rules or intrinsic image sizes. */
.projects-grid,.projects-page>.grid,.filter-chips+.grid.three{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;align-items:stretch}
.project-filters,.projects-page .filter-chips{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:30px 0 32px;padding:0}
.project-filters a,.projects-page .filter-chips a{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:11px 22px;border:1px solid var(--line,#dcded4);border-radius:999px;background:#fff;color:var(--ink,#26362e);font-family:Arial,Helvetica,sans-serif;font-size:18px;font-weight:400;line-height:1.35;text-align:center;text-decoration:none;white-space:nowrap}
.project-filters a:hover,.projects-page .filter-chips a:hover{background:var(--light-green,#edf2e9);border-color:#b4c3b6}
.project-filters a.active,.project-filters a[aria-current=page],.projects-page .filter-chips a.active,.projects-page .filter-chips a[aria-current=page]{background:var(--green,#304f40);border-color:var(--green,#304f40);color:#fff;font-weight:700}
.project-filters a:focus-visible,.project-card a:focus-visible,.project-gallery button:focus-visible{outline:3px solid var(--accent,#9b754b);outline-offset:4px}
.project-card{display:flex;flex-direction:column;min-width:0;height:100%;border:1px solid var(--line,#dcded4);border-radius:16px;overflow:hidden;background:#fff;box-shadow:0 7px 24px #26362e05}
.project-card .project-image-link{display:block;position:relative;isolation:isolate;width:100%;height:auto;aspect-ratio:16/10;overflow:hidden;background:var(--cream,#f1eee6)}
.project-card .project-image-link>img{display:block;width:100%;height:100%;max-height:none;aspect-ratio:auto;object-fit:cover;object-position:50% 55%;transition:transform .25s ease}
.project-card .project-image-link:hover>img{transform:scale(1.025)}
.project-card .photo-count{display:inline-flex;align-items:center;gap:8px;position:absolute;left:18px;bottom:18px;right:auto;max-width:calc(100% - 36px);padding:9px 13px;border:1px solid #ffffff88;border-radius:8px;background:#fffffff2;color:var(--green,#304f40);font-size:16px;font-weight:700;line-height:1.35;box-shadow:0 2px 12px #00000009}
.project-card .card-body{display:flex;flex-direction:column;flex:1;min-width:0;padding:28px 28px 24px}
.project-card .card-body .eyebrow{font-size:16px;line-height:1.45;margin:0 0 12px}
.project-card .card-body h2,.project-card .card-body h3,.project-card .card-title,.project-card .project-card-title{font-family:Georgia,'Times New Roman',serif;font-size:clamp(27px,2.15vw,32px);font-weight:400;line-height:1.25;letter-spacing:-.35px;margin:0;overflow-wrap:break-word}
.project-card .project-card-title a,.project-card .card-title a,.project-card .card-body h3 a{color:var(--ink,#26362e);text-decoration:none}
.project-card .project-card-title a:hover,.project-card .card-title a:hover{color:var(--green,#304f40);text-decoration:underline;text-underline-offset:5px}
.project-card .card-body>p:not(.eyebrow){font-size:20px;line-height:1.65;color:var(--muted,#626e65);margin-top:16px}
.project-card-footer{margin-top:auto;padding-top:20px}
.project-card .project-meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 12px;font-size:16px;line-height:1.55;color:var(--muted,#626e65);margin:0;overflow-wrap:anywhere}
.project-card .project-meta span+span:before{content:'·';padding-right:12px}
.project-card .text-link{font-size:18px;line-height:1.4;min-height:52px;margin-top:14px}
.projects-empty{grid-column:1/-1;padding:44px 24px}
.projects-empty h2{font-size:30px;line-height:1.3;margin-bottom:14px}
.projects-empty p{font-size:20px}
.project-reference-note{font-size:16px;line-height:1.65;color:var(--muted,#626e65);max-width:940px;margin-top:30px}

.project-back-link{font-size:18px;min-height:52px;margin-bottom:24px}
.project-detail-heading{margin-bottom:28px}
.project-detail-heading>div{min-width:0}
.project-gallery-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;padding-block:18px 20px;border-top:1px solid var(--line,#dcded4)}
.project-gallery-heading p{font-size:18px;line-height:1.55}
.project-gallery-heading strong{display:block;font-size:20px;font-weight:700;color:var(--ink,#26362e)}
.project-gallery-heading p>span{display:block;color:var(--muted,#626e65);margin-top:4px}
.project-gallery-heading>.text-link{flex-shrink:0;font-size:18px}
.project-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:0;align-items:stretch}
.project-gallery .gallery-tile{display:block;position:relative;min-width:0;width:100%;height:auto;min-height:0;aspect-ratio:16/10;padding:0;border:0;border-radius:12px;overflow:hidden;background:var(--cream,#f1eee6);cursor:zoom-in;text-align:left}
.project-gallery .gallery-tile:first-child{grid-column:1/-1;grid-row:auto;aspect-ratio:auto;height:clamp(280px,36vw,520px)}
.project-gallery .gallery-tile>img,.project-gallery .gallery-tile:first-child>img{display:block;width:100%;height:100%;max-height:none;aspect-ratio:auto;object-fit:cover;object-position:50% 55%;transition:filter .2s}
.project-gallery .gallery-tile:hover>img{filter:brightness(.96)}
.project-photo-label{display:flex;align-items:center;justify-content:space-between;gap:12px;position:absolute;left:0;right:0;bottom:0;padding:30px 16px 14px;color:white;background:linear-gradient(transparent,#14251ec9);font-size:16px;line-height:1.45;font-weight:700;pointer-events:none}
.project-gallery .gallery-tile:first-child .project-photo-label{font-size:18px;padding:50px 24px 20px}
.project-gallery .gallery-tile:not(:first-child) .project-photo-label>span:last-child{font-weight:400}
.project-gallery .gallery-tile .photo-count{position:absolute;right:12px;bottom:12px;left:auto;background:#fffffff2;color:var(--green,#304f40);border-radius:8px;font-size:16px;line-height:1.4;max-width:calc(100% - 24px);padding:8px 12px}
.project-detail-page .project-information{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(320px,1fr);gap:48px;margin-top:48px;align-items:start}
.project-detail-page .project-information>article{min-width:0}
.project-detail-page .project-information h2{font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:clamp(29px,2.6vw,36px);line-height:1.22;letter-spacing:-.4px;margin-bottom:22px}
.project-detail-page .project-information article>p:not(.eyebrow):not(.project-reference-note){font-size:20px;line-height:1.7}
.project-detail-page .project-information .project-reference-note{margin-top:24px;font-size:16px}
.project-detail-page .project-enquiry{padding:30px;border-radius:16px;background:var(--light-green,#edf2e9);margin:0;scroll-margin-top:32px}
.project-detail-page .project-enquiry .eyebrow{margin-bottom:14px}
.project-detail-page .project-enquiry dl{margin:24px 0}
.project-detail-page .project-enquiry dt{font-size:16px;line-height:1.5;margin-top:18px}
.project-detail-page .project-enquiry dd{font-size:18px;line-height:1.6;margin:6px 0 18px}
.project-detail-page .project-enquiry .button,.project-detail-page .project-enquiry .text-link{font-size:18px;line-height:1.45;min-height:54px}
.project-detail-page .project-enquiry .text-link{margin-top:14px}
.project-detail-page .photo-credits{font-size:16px;line-height:1.7;margin-top:42px;padding:24px 0;border-top:1px solid var(--line,#dcded4)}
.project-detail-page .photo-credits summary{font-size:18px;min-height:52px;display:list-item;cursor:pointer;padding:10px 0;font-weight:700;color:var(--ink,#26362e)}
.project-detail-page .photo-credits ol{margin:12px 0 0;padding-left:24px}
.project-detail-page .photo-credits li{padding:10px 0 14px;overflow-wrap:anywhere}

/* The dialog shows each complete photograph without cropping. */
.lightbox{width:min(1200px,calc(100vw - 40px));max-height:calc(100dvh - 32px);border:0;border-radius:16px;padding:0;background:#15251e;color:#fff;overflow:auto;box-shadow:0 30px 100px #0006}
.lightbox::backdrop{background:#0b1810dc}
.lightbox-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;font-size:18px;line-height:1.4}
.lightbox-toolbar>strong{font-size:18px;line-height:1.4}
.lightbox-toolbar button,.lightbox-controls button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-width:56px;min-height:54px;padding:12px 20px;border:1px solid #ffffff70;border-radius:8px;background:#ffffff13;color:white;font-family:Arial,Helvetica,sans-serif;font-size:18px;line-height:1.4;font-weight:700}
.lightbox-toolbar button:hover,.lightbox-controls button:hover{background:#ffffff28}
.lightbox-image{display:block;width:100%;height:min(62vh,650px);max-height:none;object-fit:contain;background:#0c1711}
.lightbox-controls{display:flex;justify-content:center;gap:16px;padding:18px 20px 0}
.lightbox-controls:last-child{padding-bottom:22px}
.lightbox-controls button{min-width:150px}
.lightbox-caption{padding:18px 24px 24px;line-height:1.55}
.lightbox-caption p{font-size:18px;margin-bottom:12px;color:white}
.lightbox-caption small,.lightbox-caption a{font-size:16px;color:#dbe5da;line-height:1.6}
.lightbox-caption>a{display:inline-block;min-height:44px;padding:8px 0;margin-left:12px}

@media(max-width:1000px){
  .projects-heading{align-items:flex-start;flex-direction:column;gap:22px}
  .projects-grid,.projects-page>.grid,.filter-chips+.grid.three{gap:26px}
  .project-card .card-body{padding:24px}
  .project-detail-page .project-information{gap:30px;grid-template-columns:minmax(0,1fr) minmax(300px,.9fr)}
  .project-detail-page .project-enquiry{padding:26px}
}
@media(max-width:700px){
  .projects-grid,.projects-page>.grid,.filter-chips+.grid.three{grid-template-columns:minmax(0,1fr);gap:28px}
  .projects-page h1,.project-detail-page h1{font-size:36px;line-height:1.15;letter-spacing:-.65px}
  .projects-page .lead,.project-detail-page .lead{font-size:20px;line-height:1.6;margin-top:16px}
  .projects-heading{gap:22px;margin-bottom:24px}
  .project-filters,.projects-page .filter-chips{gap:10px;margin:26px 0 28px}
  .project-filters a,.projects-page .filter-chips a{font-size:18px;min-height:52px;padding:11px 17px}
  .project-card .card-body{padding:24px 22px}
  .project-card .card-body h2,.project-card .card-body h3,.project-card .card-title,.project-card .project-card-title{font-size:29px}
  .project-card .photo-count{left:14px;bottom:14px;padding:8px 11px;max-width:calc(100% - 28px)}
  .project-card .card-body>p:not(.eyebrow){font-size:18px}
  .project-card-footer{padding-top:18px}
  .project-reference-note{margin-top:26px}
  .project-back-link{margin-bottom:18px}
  .project-detail-heading{margin-bottom:24px}
  .project-gallery-heading{align-items:flex-start;flex-direction:column;gap:8px;padding-block:18px 16px}
  .project-gallery-heading>.text-link{min-height:48px}
  .project-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .project-gallery .gallery-tile{aspect-ratio:4/3;border-radius:10px}
  .project-gallery .gallery-tile:first-child{height:clamp(235px,66vw,340px);grid-row:auto;grid-column:1/-1}
  .project-photo-label{padding:26px 12px 10px;font-size:16px;gap:8px}
  .project-gallery .gallery-tile:first-child .project-photo-label{font-size:18px;padding:42px 16px 16px}
  .project-detail-page .project-information{grid-template-columns:minmax(0,1fr);gap:30px;margin-top:34px}
  .project-detail-page .project-information h2{font-size:31px;margin-bottom:20px}
  .project-detail-page .project-enquiry{padding:26px 24px}
  .project-detail-page .photo-credits{margin-top:30px}
  .lightbox{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}
  .lightbox-toolbar{padding:12px 14px;gap:12px}
  .lightbox-toolbar button{padding:10px 14px;min-height:52px}
  .lightbox-image{height:min(53vh,500px)}
  .lightbox-controls{padding:16px 14px 0;gap:12px}
  .lightbox-controls button{flex:1;min-width:0;min-height:54px;padding:12px}
  .lightbox-caption{padding:18px 18px 20px}
  .lightbox-caption>a{display:block;margin:4px 0 0}
}
@media(prefers-reduced-motion:reduce){.project-card .project-image-link>img,.project-gallery .gallery-tile>img{transition:none}.project-card .project-image-link:hover>img{transform:none}}
@media print{.projects-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.project-filters,.project-gallery-heading>.text-link{display:none}.project-card,.project-gallery .gallery-tile{break-inside:avoid;box-shadow:none}.project-detail-page .project-information{display:block}.project-gallery .gallery-tile:first-child{height:320px}}
