/* V4.150 — project galleries; aligned with the certificate card system */
.projects-category-grid { align-items: stretch; }
.project-category-card { display:flex; flex-direction:column; min-width:0; padding:0 !important; overflow:hidden; }
.project-cover-link { display:block; position:relative; overflow:hidden; background:#e9edef; line-height:0; text-decoration:none !important; }
.project-cover-link img { display:block; width:100%; height:clamp(190px,20vw,250px); object-fit:cover; transition:transform .25s ease; }
.project-cover-link:hover img, .project-cover-link:focus-visible img { transform:scale(1.025); }
.project-card-arrow { position:absolute; right:12px; bottom:12px; padding:9px 12px; background:rgba(7,11,15,.88); color:#f4f6f7; font-size:12px; line-height:1.2; border-radius:3px; }
.project-category-card h2 { padding:0 22px; margin:22px 0 8px; font-size:clamp(20px,2vw,24px); line-height:1.2; }
.project-category-card p { padding:0 22px; margin:0 0 18px; color:#637078; line-height:1.65; }
.project-text-link { display:inline-block; align-self:flex-start; margin:auto 22px 22px; color:#66747d; font-size:14px; font-weight:500; text-decoration:none !important; transition:color .18s ease; }
.project-text-link:hover, .project-text-link:focus-visible, .breadcrumb-link:hover, .breadcrumb-link:focus-visible { color:var(--accent,#7da9d2); text-decoration:none !important; }
.breadcrumb-link { color:#aeb7bd; text-decoration:none; font-size:13px; font-weight:500; }
.project-gallery-section .wrap { min-width:0; }
.gallery-heading-row { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin:0 0 22px; }
.gallery-heading-row h2 { margin:0 0 8px; font-size:clamp(24px,3vw,34px); color:#10161b; }
.gallery-heading-row p { margin:0; color:#637078; max-width:760px; }
.gallery-count { flex:0 0 auto; color:#6e7a82; font-size:13px; white-space:nowrap; }
.project-thumbnails { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.project-thumb { position:relative; display:block; min-width:0; overflow:hidden; border:1px solid #d5dce0; border-radius:4px; background:#e9edef; aspect-ratio:3/2; text-decoration:none !important; }
.project-thumb img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .22s ease,filter .22s ease; }
.project-thumb:hover img, .project-thumb:focus-visible img { transform:scale(1.025); filter:brightness(.96); }
.thumb-number { position:absolute; left:9px; bottom:8px; padding:0; border:0; border-radius:0; color:#000; background:none; font-size:11px; font-weight:500; line-height:1; text-shadow:0 1px 2px rgba(255,255,255,.85); pointer-events:none; }
.gallery-back-row { padding-top:24px; border-top:1px solid #d9dfe2; margin-top:26px; }
.gallery-back-row .project-text-link { margin:0; }
.gallery-lightbox { position:fixed; inset:0; z-index:1000; display:none; align-items:center; justify-content:center; gap:clamp(10px,3vw,34px); padding:64px 24px 28px; background:rgba(5,8,11,.94); }
.gallery-lightbox.is-open { display:flex; }
.gallery-lightbox figure { display:flex; flex-direction:column; align-items:center; justify-content:center; width:min(100%,1100px); max-height:100%; margin:0; min-width:0; }
.gallery-lightbox .lightbox-image { display:block; width:auto; max-width:100%; max-height:calc(100vh - 150px); height:auto; object-fit:contain; box-shadow:0 12px 40px rgba(0,0,0,.25); }
.lightbox-caption { padding-top:12px; color:#d5dce0; font-size:13px; }
.gallery-lightbox button { display:flex; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,.28); border-radius:50%; width:44px; height:44px; color:#f3f5f6; background:rgba(255,255,255,.08); cursor:pointer; font:inherit; font-size:26px; flex:0 0 auto; }
.gallery-lightbox button:hover, .gallery-lightbox button:focus-visible { background:rgba(255,255,255,.18); outline:2px solid #7da9d2; outline-offset:2px; }
.gallery-lightbox .lightbox-close { position:absolute; top:18px; right:22px; font-size:30px; }
@media(max-width:800px) { .projects-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .project-thumbnails { gap:10px; } .gallery-lightbox { padding:60px 14px 20px; gap:10px; } .gallery-lightbox button { width:40px; height:40px; } }
@media(max-width:560px) { .projects-category-grid { grid-template-columns:1fr; } .project-cover-link img { height:230px; } .project-thumbnails { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .gallery-heading-row { align-items:flex-start; flex-direction:column; gap:8px; } .gallery-lightbox { gap:7px; padding:58px 8px 16px; } .gallery-lightbox figure { width:calc(100% - 84px); } .gallery-lightbox .lightbox-image { max-height:calc(100vh - 145px); } .gallery-lightbox button { width:34px; height:34px; font-size:22px; } .gallery-lightbox .lightbox-close { width:40px; height:40px; right:12px; top:10px; } }

body.gallery-no-scroll { overflow:hidden; }


/* V4.150 — narrower centered category row, with proportions closer to the site gallery layout. */
.projects-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 1060px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  gap: 24px;
}
.projects-category-grid > .project-category-card { min-width: 0; width: auto; max-width: 100%; }
.project-category-card .project-cover-link { min-width: 0; width: 100%; }
@media (max-width: 900px) { .projects-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (max-width: 600px) { .projects-category-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }


/* V4.152 — compact pagination for galleries with more than nine photos. */
.gallery-pagination { display:flex; align-items:center; justify-content:center; gap:16px; margin:22px 0 4px; }
.gallery-pagination button { border:1px solid #cbd3d8; border-radius:3px; padding:9px 14px; background:#eef1f3; color:#29343b; font:inherit; font-size:13px; cursor:pointer; }
.gallery-pagination button:hover:not(:disabled), .gallery-pagination button:focus-visible { background:#dfe5e8; outline:2px solid var(--accent,#7da9d2); outline-offset:2px; }
.gallery-pagination button:disabled { opacity:.42; cursor:default; }
.gallery-page-status { color:#65727a; font-size:13px; min-width:90px; text-align:center; }

.project-thumb[hidden] { display:none !important; }
.gallery-pagination[hidden] { display:none !important; }

/* V4.153 — subtle, transparent photo sequence numbers. */
.project-thumb .thumb-number { background: transparent !important; color: #000 !important; font-size: 11px !important; font-weight: 500 !important; padding: 2px 4px !important; border: 0 !important; box-shadow: none !important; text-shadow: 0 1px 2px rgba(255,255,255,.7) !important; opacity: .9; }
