.projects-page-main{padding-top:1.4rem}
.projects-page-head{position:relative;display:flex;align-items:center;justify-content:center;min-height:6.2rem;margin-bottom:1.2rem}
.projects-page-back{position:absolute;left:0;top:50%;transform:translateY(-50%);font-size:1rem;color:#5a5a5a;display:inline-flex;align-items:center;gap:.45rem}
.projects-page-back:hover{color:#111}
.projects-page-title{font-size:4.25rem;line-height:1;letter-spacing:-.12rem;text-align:center}
.projects-list-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem;margin-bottom:2.2rem}
.projects-list-card{position:relative;display:block;aspect-ratio:1.55/1;border-radius:.75rem;overflow:hidden;background:#ddd;color:#fff;cursor:pointer}
.projects-list-card img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.projects-list-card::after{content:"";position:absolute;inset:38% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.78))}
.projects-list-card:hover img{transform:scale(1.025)}
.projects-list-card-copy{position:absolute;left:1.25rem;right:4rem;bottom:1.15rem;z-index:2;display:flex;flex-direction:column;gap:.12rem}
.projects-list-card-copy strong{font-size:2rem;line-height:.98;letter-spacing:-.035rem}
.projects-list-card-copy small{font-size:.82rem;line-height:1.15;color:#fff}
.projects-list-card-arrow{position:absolute;right:1.15rem;bottom:1.05rem;z-index:2;width:2.1rem;height:2.1rem;border-radius:50%;background:#fff;color:#111;display:grid;place-items:center;font-size:1.3rem;line-height:1}
.projects-page-request{margin-top:2.2rem}
.projects-page-contacts{margin-top:2.5rem}
.projects-page-footer{margin-top:2rem}

.project-detail-main{padding-top:1.4rem}
.project-detail-heading{position:relative;display:flex;align-items:center;justify-content:center;min-height:6.2rem;margin-bottom:1.5rem}
.project-detail-title{font-size:4.25rem;line-height:1;letter-spacing:-.12rem;text-align:center}
.project-detail-breadcrumbs{position:absolute;left:0;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;color:#9c9c9c;font-size:.93rem;max-width:38%}
.project-detail-breadcrumbs a:hover{color:#111}
.project-detail-intro{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:4rem;align-items:center;margin-bottom:1.45rem}
.project-detail-main-photo{border-radius:.7rem;overflow:hidden;background:#fff;aspect-ratio:1.34/1;cursor:zoom-in}
.project-detail-main-photo img{width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.project-detail-main-photo:hover img{transform:scale(1.018)}
.project-detail-meta{padding-left:.4rem}
.project-detail-meta h1{font-size:2.5rem;line-height:1;letter-spacing:-.055rem;margin-bottom:.55rem}
.project-detail-meta p{font-size:1.05rem;color:#333}
.project-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.2rem;margin-bottom:2.5rem}
.project-gallery-item{border-radius:.65rem;overflow:hidden;background:#ddd;aspect-ratio:1.42/1;cursor:zoom-in}
.project-gallery-item img{width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.project-gallery-item:hover img{transform:scale(1.025)}
.project-gallery-empty{display:none}

.project-lightbox[hidden]{display:none}
.project-lightbox{position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,.72);display:grid;place-items:center;padding:2rem}
.project-lightbox-dialog{position:relative;width:min(76rem,calc(100vw - 5rem));min-height:35rem;max-height:calc(100dvh - 4rem);padding:2.35rem 5.1rem;background:#191919;border-radius:.65rem;display:grid;place-items:center;box-shadow:0 2rem 6rem #0007}
.project-lightbox-image{display:block;max-width:100%;max-height:calc(100dvh - 9rem);width:auto;height:auto;object-fit:contain;border-radius:.35rem}
.project-lightbox-close{position:absolute;right:.7rem;top:.35rem;color:var(--orange);font-size:1.6rem;line-height:1;width:2rem;height:2rem;display:grid;place-items:center}
.project-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);width:2rem;height:1.45rem;border-radius:.18rem;background:var(--orange);color:#fff;display:grid;place-items:center;font-size:1.15rem;font-weight:700;line-height:1}
.project-lightbox-prev{left:1.5rem}.project-lightbox-next{right:1.5rem}
body.project-lightbox-open{overflow:hidden}

@media(max-width:1000px){
  .projects-page-main,.project-detail-main{padding-top:12px}
  .projects-page-head,.project-detail-heading{min-height:58px;margin-bottom:10px;align-items:flex-end;padding-bottom:4px}
  .projects-page-title,.project-detail-title{font-size:32px;letter-spacing:-1px}
  .projects-page-back{font-size:11px;top:10px;transform:none}
  .project-detail-breadcrumbs{position:absolute;left:0;right:0;top:4px;transform:none;max-width:none;font-size:10px;gap:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .projects-list-grid{gap:10px;margin-bottom:18px}
  .projects-list-card{border-radius:10px}
  .projects-list-card-copy{left:12px;right:40px;bottom:11px}
  .projects-list-card-copy strong{font-size:18px}
  .projects-list-card-copy small{font-size:10px}
  .projects-list-card-arrow{right:10px;bottom:10px;width:25px;height:25px;font-size:16px}
  .project-detail-intro{grid-template-columns:1fr;gap:14px;margin-bottom:12px}
  .project-detail-main-photo{border-radius:10px;aspect-ratio:1.35/1}
  .project-detail-meta{padding:0 2px 6px}
  .project-detail-meta h1{font-size:28px;margin-bottom:4px}
  .project-detail-meta p{font-size:13px}
  .project-gallery-grid{gap:10px;margin-bottom:20px}
  .project-gallery-item{border-radius:9px}
  .projects-page-request{margin-top:18px}
  .projects-page-contacts{margin-top:18px}
  .project-lightbox{padding:12px}
  .project-lightbox-dialog{width:calc(100vw - 24px);min-height:0;max-height:calc(100dvh - 24px);padding:42px 42px;background:#191919;border-radius:10px}
  .project-lightbox-image{max-height:calc(100dvh - 108px);border-radius:6px}
  .project-lightbox-close{right:7px;top:5px;font-size:24px}
  .project-lightbox-nav{width:28px;height:24px;font-size:16px}
  .project-lightbox-prev{left:7px}.project-lightbox-next{right:7px}
}
@media(max-width:620px){
  .projects-list-grid{grid-template-columns:1fr}
  .projects-list-card{aspect-ratio:1.55/1}
  .project-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .project-gallery-item{aspect-ratio:1.3/1}
  .project-detail-main-photo{aspect-ratio:1.25/1}
  .project-lightbox-dialog{padding:42px 34px 28px}
}


/* v25 — project images keep their full natural ratio, with no gray filler */
.projects-list-grid{
  align-items:start;
}
.projects-list-card{
  aspect-ratio:auto!important;
  height:auto!important;
  background:transparent!important;
  align-self:start;
}
.projects-list-card img{
  position:relative;
  display:block;
  width:100%;
  height:auto!important;
  object-fit:contain!important;
}

.project-detail-intro{
  align-items:start;
}
.project-detail-main-photo{
  aspect-ratio:auto!important;
  height:auto!important;
  padding:0!important;
  background:transparent!important;
  align-self:start;
}
.project-detail-main-photo img{
  display:block;
  width:100%;
  height:auto!important;
  object-fit:contain!important;
}

.project-gallery-grid{
  align-items:start;
}
.project-gallery-item{
  aspect-ratio:auto!important;
  height:auto!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  background:transparent!important;
  align-self:start;
  line-height:0;
}
.project-gallery-item img{
  display:block;
  width:100%;
  height:auto!important;
  object-fit:contain!important;
}

/* mobile: keep exactly the same behavior, no forced card ratio */
@media(max-width:1000px){
  .projects-list-card,
  .project-detail-main-photo,
  .project-gallery-item{
    aspect-ratio:auto!important;
    height:auto!important;
  }
}


/* v33 — project cards aligned with homepage project cards */
.projects-list-grid{
  align-items:stretch!important;
}

.projects-list-card{
  position:relative!important;
  height:35rem!important;
  min-height:35rem!important;
  aspect-ratio:auto!important;
  border-radius:.8rem!important;
  overflow:hidden!important;
  background:#ddd!important;
  align-self:stretch!important;
}

.projects-list-card > img{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}

.projects-list-card-copy{
  left:2.7rem!important;
  right:6.2rem!important;
  bottom:3rem!important;
  gap:.6rem!important;
}

.projects-list-card-copy strong{
  font-size:3rem!important;
  line-height:1.05!important;
  letter-spacing:0!important;
}

.projects-list-card-copy small{
  font-size:1.45rem!important;
  line-height:1.15!important;
  margin-top:0!important;
}

.projects-list-card-arrow{
  right:2.7rem!important;
  bottom:3rem!important;
  width:2.75rem!important;
  height:2.75rem!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  display:block!important;
}

.projects-list-card-arrow img{
  width:100%!important;
  height:100%!important;
  display:block!important;
}

/* Supplied orange arrow in every enlarged project-photo viewer */
.project-lightbox-nav{
  width:32px!important;
  height:32px!important;
  padding:0!important;
  background:transparent!important;
  border-radius:0!important;
  color:transparent!important;
  font-size:0!important;
}
.project-lightbox-nav img{
  display:block!important;
  width:32px!important;
  height:32px!important;
}
.project-lightbox-prev img{
  transform:rotate(180deg);
}

@media(max-width:1000px){
  .projects-list-grid{
    gap:15px!important;
  }
  .projects-list-card{
    height:250px!important;
    min-height:250px!important;
    border-radius:10px!important;
  }
  .projects-list-card-copy{
    left:20px!important;
    right:62px!important;
    bottom:20px!important;
    gap:7px!important;
  }
  .projects-list-card-copy strong{
    font-size:25px!important;
  }
  .projects-list-card-copy small{
    font-size:13px!important;
  }
  .projects-list-card-arrow{
    right:20px!important;
    bottom:20px!important;
    width:28px!important;
    height:28px!important;
  }
  .project-lightbox-nav,
  .project-lightbox-nav img{
    width:32px!important;
    height:32px!important;
  }
}
