/* =========================================================
   Suwie — realisatiegalerij
   ---------------------------------------------------------
   Eigen klassen (.realisaties / .realisatie), bewust los van de
   bestaande .gallery/.shot-stijl: die legt het bijschrift als
   overlay óver de foto, en dat werkt niet met hele zinnen als
   "18 zonnepanelen + thuisbatterij, vrijstaande woning Brugge".
   Hier staat het bijschrift onder de foto en blijft het leesbaar.
   ========================================================= */

.realisaties {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px 22px;
}

.realisatie { margin: 0; }

.realisatie-knop {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #dde8e2;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.realisatie-knop:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.realisatie-knop:focus-visible { outline: 2px solid var(--green-500); outline-offset: 3px; }

.realisatie-knop picture { display: block; }
.realisatie-knop img {
  display: block;
  width: 100%;
  /* height:auto neutraliseert het height-attribuut op de <img>; zonder dat
     wint die hint van aspect-ratio en worden staande foto's veel te hoog. */
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .4s ease;
}
.realisatie-knop:hover img { transform: scale(1.04); }

.realisatie figcaption {
  margin-top: 12px;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---- Vergroting ---- */
.vergroot {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 20px;
  background: rgba(8, 20, 17, .93);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.vergroot.is-open { opacity: 1; pointer-events: auto; }

.vergroot img {
  max-width: min(1100px, 92vw);
  max-height: 74vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.vergroot p {
  max-width: 62ch;
  margin: 0;
  color: var(--dark-ink);
  font-size: .98rem;
  line-height: 1.55;
  text-align: center;
}

.vergroot-sluit,
.vergroot-vorige,
.vergroot-volgende {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s ease;
}
.vergroot-sluit:hover,
.vergroot-vorige:hover,
.vergroot-volgende:hover { background: rgba(255, 255, 255, .2); }
.vergroot-sluit:focus-visible,
.vergroot-vorige:focus-visible,
.vergroot-volgende:focus-visible { outline: 2px solid var(--green-400); outline-offset: 2px; }

.vergroot-sluit { top: 20px; right: 22px; width: 42px; height: 42px; font-size: 22px; line-height: 1; }
.vergroot-vorige,
.vergroot-volgende { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 20px; }
.vergroot-vorige { left: 20px; }
.vergroot-volgende { right: 20px; }

@media (max-width: 620px) {
  .vergroot-vorige { left: 8px; }
  .vergroot-volgende { right: 8px; }
  .vergroot img { max-height: 64vh; }
}

@media (prefers-reduced-motion: reduce) {
  .vergroot { transition: none; }
  .shot:hover img { transform: none; }
}
