/* Projects only: contained carousel, details and native gallery dialog. */
#projects .pbes-project-carousel { --project-capacity: 4; --project-gap: 20px; min-width: 0; }
#projects .pbes-project-track { display: flex; gap: var(--project-gap); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 0 12px; }
#projects .pbes-project-track::-webkit-scrollbar { display: none; }
#projects .pbes-project-track > .pbes-project-card { flex: 0 0 calc((100% - (var(--project-capacity) - 1) * var(--project-gap)) / var(--project-capacity)); min-width: 0; scroll-snap-align: start; }
#projects .pbes-project-card .pbes-card-image { display: block; aspect-ratio: 1.7; }
#projects .pbes-project-card h3 a { color: inherit; }
#projects .pbes-project-card h3 a:hover { color: var(--pbes-green); }
#projects .pbes-project-card { display: flex; flex-direction: column; }
#projects .pbes-project-card .pbes-card-image { flex-shrink: 0; }
#projects .pbes-project-card .pbes-card-body { height: auto; padding: 16px; flex: 1; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr auto; column-gap: 4px; }
#projects .pbes-project-card .pbes-type-badges { grid-column: 1 / -1; grid-row: 1; }
#projects .pbes-project-card h3 { grid-column: 1 / -1; grid-row: 2; }
#projects .pbes-project-card .pbes-card-location { grid-column: 1 / -1; grid-row: 3; }
#projects .pbes-project-card .pbes-delivery-status { grid-column: 1; grid-row: 4; align-self: center; margin-bottom: 0; }
#projects .pbes-project-card .pbes-project-view { grid-column: 2; grid-row: 4; align-self: center; justify-self: start; }
@media (max-width: 600px) {
 #projects .pbes-project-card .pbes-card-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto auto; }
 #projects .pbes-project-card .pbes-delivery-status { justify-self: start; white-space: nowrap; }
 #projects .pbes-project-card .pbes-project-view { grid-column: 1; grid-row: 5; white-space: nowrap; }
}
#projects .pbes-project-card :is(h3, p, span) { overflow-wrap: anywhere; }
#projects .pbes-project-view { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 13px; color: var(--pbes-green); margin-top: 10px; min-height: 32px; }
#projects .pbes-project-view .pbes-icon { width: 17px; height: 17px; }
#projects .pbes-project-carousel-controls { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
#projects .pbes-project-carousel-controls[hidden] { display: none; }
#projects .pbes-project-carousel-controls button { border: 1px solid #d7e5df; background: #fff; color: var(--pbes-green); border-radius: 50%; width: 40px; min-height: 40px; cursor: pointer; font: inherit; }
#projects .pbes-project-carousel-controls button:hover { background: #eaf5ef; }
#projects .pbes-project-carousel-controls button[aria-disabled="true"] { opacity: .35; cursor: default; }
#projects .pbes-project-dots { display: flex; flex-wrap: wrap; justify-content: center; max-width: min(100%, 300px); gap: 0; }
#projects .pbes-project-dots button { width: 24px; min-height: 40px; border: 0; background: transparent; position: relative; }
#projects .pbes-project-dots button::before { content: ''; display: block; width: 6px; height: 6px; margin: auto; border-radius: 50%; background: #c4d2cb; }
#projects .pbes-project-dots button[aria-current="true"]::before { background: #e0001b; }
#projects .pbes-project-carousel-controls [data-project-pause] { width: auto; border-radius: 8px; padding: 5px 10px; font-size: 12px; }
#projects :is(a, button, .pbes-project-track):focus-visible, .pbes-project-page :is(a, button):focus-visible { outline: 3px solid #038759; outline-offset: 3px; }
#projects .pbes-project-track:focus-visible { outline-offset: -3px; }
/* Case study and image viewer: scoped to Projects, without changing the carousel. */
.pbes-project-page { padding: 24px 0 42px; color: #123a32; }
.pbes-project-case { min-width: 0; }
.pbes-project-breadcrumb { font-size: 12px; line-height: 1.6; margin-bottom: 28px; color: #334d43; overflow-wrap: anywhere; }
.pbes-project-breadcrumb ol { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; list-style: none; padding: 0; margin: 0; }
.pbes-project-breadcrumb li { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.pbes-project-breadcrumb-current { flex: 0 1 auto; }
.pbes-project-breadcrumb [aria-current='page'] { min-width: 0; font-weight: 450; }
.pbes-project-breadcrumb-separator { flex-shrink: 0; color: #81948b; font-weight: 400; }
.pbes-project-breadcrumb .pbes-icon { width: 17px; height: 17px; }
.pbes-project-breadcrumb a { color: #075c39; font-weight: 700; border-radius: 3px; }
.pbes-project-breadcrumb-home { display: inline-flex; align-items: center; }
.pbes-project-breadcrumb a:hover { color: #00844f; text-decoration: underline; text-underline-offset: 3px; }
.pbes-project-breadcrumb a:focus-visible { outline: 3px solid #038759; outline-offset: 3px; }
.pbes-project-hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); align-items: start; gap: clamp(24px, 4vw, 56px); }
.pbes-project-hero--text { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 3vw, 40px); }
.pbes-project-hero-context { min-width: 0; border-left: 1px solid #dceae3; padding-left: clamp(24px, 3vw, 40px); }
.pbes-project-hero--text .pbes-project-facts { margin-top: 0; }
.pbes-project-hero--text .pbes-project-summary { margin-bottom: 0; }
.pbes-project-heading { min-width: 0; }
.pbes-project-heading .pbes-eyebrow { margin-bottom: 12px; }
.pbes-project-heading h1 { font-size: clamp(28px, 3vw, 44px); letter-spacing: -.035em; line-height: 1.13; overflow-wrap: anywhere; margin: 0 0 20px; }
.pbes-project-detail-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.pbes-project-detail-badges span { padding: 5px 10px; border-radius: 5px; background: #e4f3eb; color: #075c39; font-size: 12px; font-weight: 700; }
.pbes-project-summary { font-size: 15px; line-height: 1.65; font-weight: 450; color: #304e43; margin: 20px 0; max-width: 55ch; }
.pbes-project-summary p { margin: 0 0 12px; }
.pbes-project-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; margin: 24px 0 0; }
.pbes-project-facts > div { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding-left: 14px; border-left: 1px solid #dceae3; }
.pbes-project-facts > div:first-child { padding-left: 0; border-left: 0; }
.pbes-project-facts .pbes-icon { width: 24px; height: 24px; flex: 0 0 24px; margin-top: 2px; color: #0a5840; }
.pbes-project-facts dt { font-size: 12px; color: #345a4c; font-weight: 650; }
.pbes-project-facts dd { margin: 4px 0 0; font-size: 14px; font-weight: 700; line-height: 1.5; color: #143c30; overflow-wrap: anywhere; }
.pbes-project-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.pbes-project-hero-actions .pbes-button { flex: 1 1 auto; min-height: 44px; padding: 10px 14px; font-size: 13px; }
.pbes-project-hero-actions .pbes-button:only-child { flex: 0 1 auto; }
.pbes-project-hero-actions .pbes-button--outline { background: #fff; }
.pbes-project-hero-actions .pbes-button--outline:hover { background: #eef7f2; }
.pbes-project-hero-actions .pbes-button[href='#project-gallery']:hover .pbes-icon { transform: translateY(2px); }
.pbes-project-primary-image { display: block; position: relative; aspect-ratio: 1.6; border-radius: 10px; overflow: hidden; background: #f0f5f2; box-shadow: 0 6px 20px rgb(10 51 37 / 8%); border: 1px solid #dbe9e2; }
.pbes-project-primary-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pbes-project-enlarge { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 34px; height: 34px; background: rgb(15 28 27 / 65%); border: 1px solid rgb(255 255 255 / 55%); color: white; border-radius: 50%; pointer-events: none; }
.pbes-project-enlarge .pbes-icon { width: 19px; height: 19px; }
.pbes-project-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 28px; background: linear-gradient(110deg, #eef8f4, #f6faf8); border: 1px solid #e3eee7; border-radius: 12px; padding: clamp(20px, 3vw, 28px); margin-top: 32px; }
.pbes-project-overview-copy { min-width: 0; }
.pbes-project-overview--full { grid-template-columns: minmax(0, 1fr); }
.pbes-project-overview--full .pbes-project-rich-text { max-width: none; }
.pbes-project-overview-copy > h2, .pbes-project-gallery-heading > h2 { margin: 0 0 16px; font-size: clamp(23px, 2.2vw, 30px); font-weight: 750; line-height: 1.2; letter-spacing: -.025em; border-left: 4px solid #e0001b; padding-left: 14px; }
.pbes-project-rich-text { max-width: 86ch; line-height: 1.65; font-size: 15px; font-weight: 450; color: #28483b; overflow-wrap: anywhere; }
.pbes-project-highlights { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: stretch; gap: 12px; padding: 0; margin: 0; list-style: none; min-width: 0; }
.pbes-project-highlights li { min-width: 0; padding: 18px 16px; border: 1px solid #e1ede5; border-radius: 9px; background: rgb(255 255 255 / 94%); }
.pbes-project-highlight-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #e0f3ea; color: #08643e; margin-bottom: 16px; }
.pbes-project-highlight-icon .pbes-icon { width: 26px; height: 26px; }
.pbes-project-highlights h3 { margin: 0 0 8px; font-size: 14px; font-weight: 750; line-height: 1.35; color: #143c30; overflow-wrap: anywhere; }
.pbes-project-highlights h3::after { content: ''; display: block; width: 26px; height: 2px; background: #e0001b; margin-top: 10px; }
.pbes-project-highlights p { margin: 0; font-size: 13px; line-height: 1.6; color: #456154; overflow-wrap: anywhere; }
.pbes-project-highlights li > :last-child { margin-bottom: 0; }
.pbes-project-rich-text :is(p, ul, ol, h2, h3, h4, blockquote) { margin: 0 0 16px; }
.pbes-project-rich-text > :last-child { margin-bottom: 0; }
.pbes-project-rich-text :is(ul, ol) { padding-left: 24px; }
.pbes-project-rich-text a { text-decoration: underline; color: #075c39; }
.pbes-project-rich-text :is(img, video, iframe) { max-width: 100%; height: auto; }
.pbes-project-rich-text table { display: block; max-width: 100%; overflow-x: auto; }
.pbes-project-gallery { margin-top: 30px; }
.pbes-project-gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.pbes-project-gallery-heading h2 { margin-bottom: 0 !important; }
.pbes-project-gallery-heading > span { display: inline-flex; gap: 10px; align-items: center; color: #36594a; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pbes-project-gallery-heading .pbes-icon { width: 18px; height: 18px; }
.pbes-project-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pbes-project-gallery figure { margin: 0; min-width: 0; }
.pbes-project-gallery figure a { display: block; position: relative; aspect-ratio: 1.8; border-radius: 9px; overflow: hidden; background: #edf5f1; box-shadow: 0 3px 12px rgb(10 51 37 / 6%); }
.pbes-project-gallery figure img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s; }
.pbes-project-gallery figure a:hover img { transform: scale(1.035); }
.pbes-project-gallery figcaption { font-size: 12px; line-height: 1.5; color: #5c7165; margin-top: 7px; overflow-wrap: anywhere; }
.pbes-project-neighbors { margin-top: 20px; background: #f2f8f5; border: 1px solid #e1ece5; border-radius: 12px; padding: 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; }
.pbes-project-neighbors a { display: flex; gap: 12px; align-items: center; color: #20473c; min-height: 44px; font-size: 12px; }
.pbes-project-neighbors small { display: block; color: #6b8175; font-size: 11px; margin-bottom: 3px; }
.pbes-project-neighbors strong { display: block; font-weight: 750; font-size: 13px; overflow-wrap: anywhere; }
.pbes-project-neighbors .pbes-icon { width: 24px; height: 24px; flex-shrink: 0; }
.pbes-project-neighbors [rel='next'] { justify-content: flex-end; text-align: right; }
.pbes-project-neighbors [rel] > .pbes-icon { box-sizing: content-box; padding: 10px; border-radius: 50%; background: #fff; border: 1px solid #e5eee9; }
.pbes-project-neighbors a:hover { color: #00844f; }
.pbes-project-back { justify-content: center; }
/* Native modal + native fullscreen; viewport remains independent of zoomed image dimensions. */
.pbes-project-lightbox { width: min(1280px, calc(100% - 48px)); max-width: none; height: min(860px, calc(100dvh - 48px)); max-height: none; padding: 20px; margin: auto; border: 1px solid rgb(255 255 255 / 24%); border-radius: 16px; background: linear-gradient(130deg, rgb(29 41 47 / 97%), rgb(15 24 30 / 98%)); color: #f4f7f8; overflow: hidden; box-shadow: 0 18px 80px rgb(0 0 0 / 40%); }
.pbes-project-lightbox[open] { display: block; }
.pbes-viewer-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 14px; height: 100%; min-width: 0; }
.pbes-project-lightbox::backdrop { background: rgb(5 12 18 / 85%); backdrop-filter: blur(7px); }
.pbes-viewer-shell:fullscreen { padding: 20px; box-sizing: border-box; width: 100%; height: 100dvh; margin: 0; border: 0; border-radius: 0; max-height: none; background: #0e171d; }
.pbes-viewer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-width: 0; }
.pbes-viewer-header > div:first-child { min-width: 0; }
.pbes-viewer-header h2 { font-size: 16px; line-height: 1.4; color: #fff; margin: 0; overflow-wrap: anywhere; }
.pbes-viewer-header p { color: #c8d6dc; font-size: 13px; margin: 6px 0 0; }
.pbes-viewer-header-actions { display: flex; gap: 10px; flex-shrink: 0; }
.pbes-project-lightbox button { touch-action: manipulation; display: grid; place-items: center; border: 1px solid rgb(225 240 244 / 35%); border-radius: 50%; background: rgb(12 22 29 / 78%); color: white; width: 40px; height: 40px; cursor: pointer; padding: 8px; font: inherit; }
.pbes-project-lightbox button:hover { background: #344b56; }
.pbes-project-lightbox button:disabled { opacity: .4; cursor: default; }
.pbes-project-lightbox button .pbes-icon { width: 22px; height: 22px; }
.pbes-project-lightbox :is(button, a):focus-visible { outline: 3px solid #6fe4b0; outline-offset: 3px; }
.pbes-lightbox-stage { min-height: 0; min-width: 0; position: relative; border-radius: 10px; overflow: hidden; background: rgb(0 0 0 / 14%); }
.pbes-viewer-viewport { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; user-select: none; }
.pbes-viewer-viewport img { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: center; user-select: none; }
/* Keep the image box tied to the stage rather than the grid's intrinsic track size. */
.pbes-project-case .pbes-viewer-viewport > [data-gallery-active] { position: absolute; inset: 0; }
.pbes-viewer-viewport.is-zoomed { cursor: grab; }
.pbes-viewer-viewport.is-panning { cursor: grabbing; }
.pbes-lightbox-stage > button { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; }
.pbes-lightbox-stage [data-gallery-prev] { left: 12px; }
.pbes-lightbox-stage [data-gallery-next] { right: 12px; }
.pbes-viewer-zoom { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; padding: 4px; border: 1px solid rgb(255 255 255 / 35%); border-radius: 40px; background: rgb(10 18 25 / 85%); gap: 4px; }
.pbes-viewer-zoom button { border: 0; background: transparent; width: 36px; height: 36px; }
.pbes-viewer-thumbnails { display: flex; align-items: center; gap: 10px; overflow-x: auto; overflow-y: hidden; min-width: 0; padding: 4px; scrollbar-width: thin; scrollbar-color: #658175 transparent; }
.pbes-viewer-thumbnails button { width: 88px; height: 62px; border-radius: 6px; border: 2px solid transparent; padding: 0; flex: 0 0 88px; overflow: hidden; }
.pbes-viewer-thumbnails button[aria-current='true'] { border-color: #59d99f; box-shadow: 0 0 0 1px #59d99f; }
.pbes-viewer-thumbnails img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pbes-viewer-feedback { margin: 0; font-size: 12px; color: #f5d4a2; }
.pbes-viewer-feedback:empty { display: none; }
.pbes-project-lightbox [hidden] { display: none !important; }
.pbes-gallery-open { overflow: hidden; }
@media (max-width: 1100px) {
 #projects .pbes-project-carousel { --project-capacity: 3; --project-gap: 16px; }
 .pbes-project-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .pbes-project-overview { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 800px) {
 .pbes-project-hero--text { grid-template-columns: minmax(0, 1fr); }
 .pbes-project-hero-context { border-left: 0; padding-left: 0; }
 .pbes-project-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
 .pbes-project-heading h1 { max-width: 24ch; }
 .pbes-project-facts { margin-top: 22px; }
 .pbes-project-summary { max-width: 65ch; }
 .pbes-project-primary-image { max-height: 480px; }
 .pbes-project-primary-image { aspect-ratio: 1.45; }
 .pbes-project-neighbors { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
 .pbes-project-back { grid-column: 1/-1; grid-row: 2; }
}
@media (max-width: 600px) {
 #projects .pbes-project-carousel { --project-capacity: 2; --project-gap: 10px; }
 #projects .pbes-project-card .pbes-card-body { padding: 11px 9px; }
 #projects .pbes-project-card h3 { font-size: 15px; line-height: 1.35; }
 #projects .pbes-project-card .pbes-card-location, #projects .pbes-delivery-status { font-size: 12px; }
 #projects .pbes-type-badges span { font-size: 11px; padding: 4px 6px; }
 #projects .pbes-project-view { min-height: 44px; font-size: 12px; }
 #projects .pbes-project-carousel-controls > button { min-height: 44px; min-width: 44px; }
 #projects .pbes-project-dots button { min-height: 44px; }
 .pbes-project-page { padding: 20px 0 30px; }
 .pbes-project-breadcrumb { margin-bottom: 22px; font-size: 11px; }
 .pbes-project-facts { gap: 16px 12px; }
 .pbes-project-facts > div { padding-left: 0; border-left: 0; }
 .pbes-project-hero-actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 20px; }
 .pbes-project-highlights { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
 .pbes-project-highlights li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 6px 12px; padding: 14px; }
 .pbes-project-highlight-icon { grid-row: auto; width: 42px; height: 42px; margin: 0; }
 .pbes-project-highlights li:has(h3):has(p) .pbes-project-highlight-icon { grid-row: span 2; }
 .pbes-project-highlights li:has(.pbes-project-highlight-icon:only-child) { grid-template-columns: minmax(0, 1fr); }
 .pbes-project-highlights li:not(:has(.pbes-project-highlight-icon)) { grid-template-columns: minmax(0, 1fr); }
 .pbes-project-highlights h3 { margin: 0; }
 .pbes-project-highlights h3::after { margin-top: 6px; }
 .pbes-project-gallery-grid { gap: 12px; }
 .pbes-project-gallery-heading > span { font-size: 11px; gap: 5px; }
 .pbes-project-gallery .pbes-project-enlarge { width: 28px; height: 28px; bottom: 7px; right: 7px; }
 .pbes-project-neighbors { padding: 12px; }
 .pbes-project-neighbors a { gap: 7px; }
 .pbes-project-lightbox { width: calc(100% - 16px); height: calc(100dvh - 16px); padding: 12px 8px; border-radius: 12px; }
 .pbes-viewer-shell { gap: 10px; }
 .pbes-viewer-header { padding: 0 4px; gap: 8px; }
 .pbes-viewer-header h2 { font-size: 13px; }
 .pbes-viewer-header-actions { gap: 4px; }
 .pbes-viewer-header-actions button { width: 44px; height: 44px; }
 .pbes-lightbox-stage [data-gallery-prev] { left: 4px; }
 .pbes-lightbox-stage [data-gallery-next] { right: 4px; }
 .pbes-viewer-zoom button { width: 44px; height: 44px; }
 .pbes-viewer-thumbnails { gap: 8px; }
 .pbes-viewer-thumbnails button { flex-basis: 62px; width: 62px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
 #projects .pbes-project-track { scroll-behavior: auto; }
 .pbes-project-gallery figure img { transition: none; transform: none; }
}
