/* Real-project imagery and gallery enhancements */
.hero {
  background:
    linear-gradient(90deg, rgba(22, 16, 11, .93) 0%, rgba(35, 24, 16, .76) 48%, rgba(35, 24, 16, .2) 100%),
    url('../images/hero-project.webp') center 48% / cover no-repeat;
}

.service-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease;
}

.service-card:hover .service-visual img { transform: scale(1.04); }

.recent-work { padding-top: 85px; }

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 285px;
  gap: 15px;
}

.home-project {
  position: relative;
  overflow: hidden;
  background: #241d17;
}

.home-project-wide { grid-column: span 2; }

.home-project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease, opacity .3s ease;
}

.home-project:hover img { transform: scale(1.035); opacity: .88; }

.home-project span {
  position: absolute;
  inset-inline: 16px;
  bottom: 16px;
  width: fit-content;
  padding: 8px 12px;
  color: #fff;
  background: rgba(35, 31, 26, .88);
  font-size: 13px;
  font-weight: 700;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}

.gallery-filters button {
  padding: 10px 17px;
  border: 1px solid #ded2c4;
  background: transparent;
  color: #2f2a24;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.gallery-filters button.active,
.gallery-filters button:hover {
  border-color: #8a5a2b;
  background: #8a5a2b;
  color: #fff;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 355px;
  gap: 16px;
}

.project-item {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #231f1a;
  cursor: zoom-in;
}

.project-item:nth-child(5n + 1) { grid-row: span 2; }
.project-item.hidden { display: none; }

.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, opacity .3s ease;
}

.project-item:hover img { transform: scale(1.035); opacity: .84; }

.project-item span {
  position: absolute;
  inset-inline-start: 15px;
  bottom: 15px;
  padding: 8px 12px;
  background: rgba(35, 31, 26, .88);
  color: #fff;
  font: 700 13px "DM Sans", sans-serif;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 30px;
  background: rgba(20, 17, 14, .94);
}

.lightbox.open { display: flex; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 82vh; object-fit: contain; }
.lightbox p { position: absolute; bottom: 14px; color: #e8ded1; }
.lightbox-close { position: absolute; top: 16px; inset-inline-end: 22px; border: 0; background: none; color: #fff; font-size: 42px; cursor: pointer; }
body.lightbox-open { overflow: hidden; }

@media (max-width: 900px) {
  .home-project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 320px; }
}

@media (max-width: 620px) {
  .hero { background-position: 62% center; }
  .home-project-grid { grid-template-columns: 1fr; grid-auto-rows: 300px; }
  .home-project-wide { grid-column: auto; }
  .project-gallery { grid-template-columns: 1fr; grid-auto-rows: 420px; }
  .project-item:nth-child(5n + 1) { grid-row: auto; }
}
