/**
 * @file
 * Changes for the go-live (2026-11), on top of the D7 stylesheets:
 * news over the full width, sharper photos, the large project photo viewer.
 */

/* NIEUWS: over the full width between the two lines (as the office pages),
   in two columns: the photo left, title and text right. Items without a photo
   keep the text over the full width. */
body.page-nieuws #content {
  width: 840px;
}
body.page-nieuws .view-nieuws .views-row {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  column-gap: 30px;
  align-items: start;
}
body.page-nieuws .view-nieuws .views-row > .views-field {
  grid-column: 2;
}
body.page-nieuws .view-nieuws .views-row > .views-field-field-foto {
  grid-column: 1;
  grid-row: 1 / span 3;
  margin-top: 0;
}
body.page-nieuws .view-nieuws .views-row:not(:has(.views-field-field-foto)) > .views-field {
  grid-column: 1 / -1;
}
body.page-nieuws .view-nieuws .views-field-title {
  margin-top: 0;
}
body.page-nieuws .views-field-field-foto img {
  display: block;
  width: 100%;
  height: auto;
}

/* PROJECTEN overviews: 2x thumbnails in the same 130 x 110 cells (also in the
   sort tables). */
.views-field-field-overzicht-foto img {
  max-width: 130px;
  max-height: 110px;
  width: auto;
  height: auto;
  vertical-align: middle;
}

/* PROJECT: large photo viewer over the full content width. */
.kpw-slider {
  width: 650px;
  max-width: 100%;
  margin-bottom: 20px;
}
.kpw-slider-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: url("../images/tile.png");
  overflow: hidden;
}
.kpw-slide {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.kpw-slide.is-active {
  display: flex;
}
.kpw-slide a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}
.kpw-slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
.kpw-slider-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.kpw-slider-hit-prev {
  left: 0;
  cursor: w-resize;
}
.kpw-slider-hit-next {
  right: 0;
  cursor: e-resize;
}
.kpw-slider-full {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  cursor: pointer;
}
.kpw-slider-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 8pt;
}
.kpw-slider-bar button {
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  cursor: pointer;
}
.kpw-slider button:focus-visible {
  outline: 1px solid #000;
  outline-offset: 2px;
}

@media screen and (max-width: 920px) {
  body.page-nieuws #content {
    max-width: none;
    width: 100%;
  }
  /* Phone and tablet: one column, the photo above the title; the text is never
     wider than the photo (400px, the size of the existing photos). */
  body.page-nieuws .view-nieuws .views-row {
    display: flex;
    flex-direction: column;
    max-width: 400px;
  }
  body.page-nieuws .view-nieuws .views-row > .views-field-field-foto {
    order: -1;
    margin-bottom: 14px;
  }
  .kpw-slider {
    width: 100%;
  }
}
