/* De Wierde Site Builder 2.0 – geïntegreerde pagina's */
.dwi-page {
  --dwi-blue: var(--dw-blue, #0D3B66);
  --dwi-blue-dark: #082f54;
  --dwi-green: var(--dw-green, #6BBE45);
  --dwi-soft: #eef5fb;
  --dwi-text: #2f3740;
  --dwi-border: #dce8f1;
  color: var(--dwi-text);
}

.dwi-page * { box-sizing: border-box; }
.dwi-section { padding: 84px 24px; }
.dwi-soft { background: linear-gradient(135deg, #f7fbfe 0%, #edf5fb 100%); }

.dwi-page-hero { padding: 78px 24px; }
.dwi-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .95fr);
  gap: 72px;
  align-items: center;
}
.dwi-hero-copy h1 { font-size: clamp(40px, 5vw, 58px); margin-bottom: 22px; }
.dwi-hero-copy p { max-width: 650px; font-size: 18px; }
.dwi-hero-image {
  min-height: 390px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(13, 59, 102, .14);
}
.dwi-hero-image img { width: 100%; height: 100%; min-height: 390px; object-fit: cover; display: block; }

.dwi-pills { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.dwi-pills a,
.dwi-pills button {
  border: 1px solid #d9e5ee;
  background: #fff;
  color: var(--dwi-blue) !important;
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}
.dwi-pills a:hover,
.dwi-pills button:hover { background: var(--dwi-green); border-color: var(--dwi-green); color: #fff !important; }

.dwi-heading { text-align: center; max-width: 820px; margin: 0 auto 36px; }
.dwi-heading-left { text-align: left; margin-left: 0; }
.dwi-heading h1,
.dwi-heading h2 { font-size: clamp(34px, 4vw, 48px); }
.dwi-heading p { max-width: 760px; margin-left: auto; margin-right: auto; }
.dwi-heading-left p { margin-left: 0; }

.dwi-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}
.dwi-feature-grid article,
.dwi-purpose-grid article,
.dwi-summary-grid article {
  background: #fff;
  border: 1px solid var(--dwi-border);
  border-left: 4px solid var(--dwi-green);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 16px 42px rgba(13, 59, 102, .06);
}
.dwi-feature-grid h3,
.dwi-purpose-grid h3 { margin-bottom: 12px; font-size: 22px; }
.dwi-feature-grid p,
.dwi-purpose-grid p { margin: 0; font-size: 16px; }

.dwi-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 34px;
}
.dwi-photo {
  width: 100%;
  height: 260px;
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(13, 59, 102, .10);
}
.dwi-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .28s ease; }
.dwi-photo:hover img { transform: scale(1.035); }
.dwi-gallery-action { display: flex; justify-content: center; margin-top: 34px; }
.dwi-photo-grid-all .dwi-photo:nth-child(7n+1) { height: 330px; }

.dwi-purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.dwi-cta-section { padding-top: 46px; }
.dwi-cta {
  background: linear-gradient(135deg, var(--dwi-blue-dark), var(--dwi-blue));
  color: #fff;
  border-radius: 26px;
  padding: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
  box-shadow: 0 24px 60px rgba(8, 47, 84, .18);
}
.dwi-cta h2,
.dwi-cta p { color: #fff !important; }
.dwi-cta h2 { font-size: clamp(31px, 4vw, 44px); margin-bottom: 16px; }
.dwi-kicker-light {
  display: inline-block;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 20px;
}
.dwi-kicker-light::after { content: ""; display: block; width: 46px; height: 3px; background: var(--dwi-green); margin-top: 11px; }
.dwi-white-button { background: #fff !important; border-color: #fff !important; color: var(--dwi-blue) !important; }
.dwi-outline-button { background: transparent !important; border: 1px solid #fff !important; color: #fff !important; }
.dwi-cta .dwi-outline-button:hover,
.dwi-cta .dwi-white-button:hover { background: var(--dwi-green) !important; border-color: var(--dwi-green) !important; color: #fff !important; }

/* Geschiedenis */
.dwi-history-hero {
  min-height: 500px;
  padding: 104px 24px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--dwi-blue-dark), var(--dwi-blue));
  background-size: cover;
  background-position: center;
  color: #fff;
}
.dwi-history-hero h1 { color: #fff !important; font-size: clamp(44px, 6vw, 66px); margin-bottom: 22px; }
.dwi-history-hero p { color: #fff !important; max-width: 770px; font-size: 20px; line-height: 1.7; }

.dwi-history-strip { padding: 28px 24px; background: #fff; }
.dwi-history-strip-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.dwi-history-strip .dwi-photo { height: 150px; border-radius: 10px; box-shadow: none; }

.dwi-history-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  gap: 65px;
  align-items: center;
}
.dwi-history-intro-grid.dwi-one-column { grid-template-columns: minmax(0, 780px); }
.dwi-history-intro-image .dwi-photo { height: 430px; }

.dwi-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.dwi-summary-grid article { display: flex; flex-direction: column; gap: 8px; }
.dwi-summary-grid strong { color: var(--dwi-blue); font-size: 22px; }
.dwi-summary-grid span { line-height: 1.6; }

.dwi-history-timeline { background: #fff; }
.dwi-history-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .95fr);
  gap: 54px;
  align-items: center;
  margin-top: 54px;
}
.dwi-history-event.dwi-reverse .dwi-history-copy { order: 2; }
.dwi-history-event.dwi-no-image { grid-template-columns: minmax(0, 780px); }
.dwi-history-copy {
  background: #fff;
  border: 1px solid var(--dwi-border);
  border-radius: 24px;
  padding: 38px;
  box-shadow: 0 18px 46px rgba(13, 59, 102, .07);
}
.dwi-history-copy h3 { font-size: clamp(27px, 3vw, 35px); margin-bottom: 16px; }
.dwi-history-number {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dwi-blue);
  color: #fff;
  font-weight: 900;
  margin-bottom: 20px;
}
.dwi-history-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--dwi-soft);
  border-left: 4px solid var(--dwi-green);
  border-radius: 12px;
  padding: 17px 19px;
  margin-top: 22px;
}
.dwi-history-media .dwi-photo { height: 370px; }
.dwi-history-gallery .dwi-photo { height: 260px; }

/* Lightbox */
.dwi-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 44px;
  background: rgba(2, 18, 31, .95);
}
.dwi-modal.is-open { display: flex; }
.dwi-modal figure { margin: 0; max-width: min(1240px, 90vw); max-height: 88vh; text-align: center; }
.dwi-modal img { display: block; max-width: 100%; max-height: 82vh; margin: auto; border-radius: 12px; object-fit: contain; }
.dwi-modal figcaption { color: #fff; margin-top: 10px; }
.dwi-modal-close,
.dwi-modal-prev,
.dwi-modal-next {
  position: absolute;
  border: 0;
  background: #fff;
  color: var(--dwi-blue);
  cursor: pointer;
}
.dwi-modal-close { top: 18px; right: 20px; width: 48px; height: 48px; border-radius: 50%; font-size: 34px; }
.dwi-modal-prev,
.dwi-modal-next { top: 50%; transform: translateY(-50%); width: 52px; height: 72px; border-radius: 14px; font-size: 42px; }
.dwi-modal-prev { left: 18px; }
.dwi-modal-next { right: 18px; }
.dwi-modal-count { position: absolute; bottom: 16px; color: #fff; font-weight: 800; }
.dwi-empty-message { text-align: center; }

@media (max-width: 1020px) {
  .dwi-hero-grid,
  .dwi-history-intro-grid,
  .dwi-history-event,
  .dwi-cta { grid-template-columns: 1fr; }
  .dwi-history-event.dwi-reverse .dwi-history-copy { order: 0; }
  .dwi-feature-grid,
  .dwi-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dwi-purpose-grid { grid-template-columns: 1fr; }
  .dwi-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dwi-history-strip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dwi-cta .dw-actions { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .dwi-section,
  .dwi-page-hero { padding: 58px 20px; }
  .dwi-history-hero { min-height: 420px; padding: 78px 20px; }
  .dwi-feature-grid,
  .dwi-summary-grid,
  .dwi-photo-grid,
  .dwi-history-strip-grid { grid-template-columns: 1fr; }
  .dwi-hero-image,
  .dwi-hero-image img { min-height: 285px; }
  .dwi-photo,
  .dwi-history-gallery .dwi-photo { height: 245px; }
  .dwi-history-intro-image .dwi-photo,
  .dwi-history-media .dwi-photo { height: 290px; }
  .dwi-cta { padding: 34px 25px; }
  .dwi-history-copy { padding: 28px; }
  .dwi-modal { padding: 20px; }
  .dwi-modal-prev,
  .dwi-modal-next { width: 42px; height: 58px; font-size: 32px; }
  .dwi-modal-prev { left: 6px; }
  .dwi-modal-next { right: 6px; }
}


/* 2.1 – rustige fotogalerij zonder knop- of themakaders */
.dw-site.dwi-page .dwi-photo-grid button.dwi-photo,
.dw-site.dwi-page .dwi-history-strip button.dwi-photo,
.dw-site.dwi-page .dwi-history-media button.dwi-photo,
.dw-site.dwi-page .dwi-history-gallery button.dwi-photo,
.dw-site.dwi-page .dwi-history-intro-image button.dwi-photo {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 260px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  line-height: 0 !important;
  box-shadow: 0 18px 42px rgba(13, 59, 102, .10) !important;
}
.dw-site.dwi-page .dwi-photo-grid button.dwi-photo img,
.dw-site.dwi-page .dwi-history-strip button.dwi-photo img,
.dw-site.dwi-page .dwi-history-media button.dwi-photo img,
.dw-site.dwi-page .dwi-history-gallery button.dwi-photo img,
.dw-site.dwi-page .dwi-history-intro-image button.dwi-photo img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  object-fit: cover !important;
}
.dw-site.dwi-page .dwi-photo-grid button.dwi-photo:hover,
.dw-site.dwi-page .dwi-photo-grid button.dwi-photo:focus {
  background: transparent !important;
  border: 0 !important;
}
.dw-site.dwi-page .dwi-more-photos {
  width: auto !important;
  min-width: 0 !important;
}
/* De kleinere historische galerijen behouden hun eigen hoogte. */
.dw-site.dwi-page .dwi-history-strip button.dwi-photo { height: 150px !important; border-radius: 10px !important; box-shadow: none !important; }
.dw-site.dwi-page .dwi-history-intro-image button.dwi-photo { height: 430px !important; }
.dw-site.dwi-page .dwi-history-media button.dwi-photo { height: 370px !important; }
.dw-site.dwi-page .dwi-history-gallery button.dwi-photo { height: 260px !important; }

/* 2.5 – extra foto’s zichtbaar op dezelfde pagina en koppeling naar verkoop */
.dwi-extra-gallery-details {
  margin-top: 34px;
  text-align: center;
}
.dwi-extra-gallery-details > summary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 0 !important;
  cursor: pointer;
  list-style: none;
}
.dwi-extra-gallery-details > summary::-webkit-details-marker { display: none; }
.dwi-extra-gallery-details[open] > summary { margin-bottom: 8px; }
.dwi-extra-gallery-details[open] > summary::after {
  content: "  – minder tonen";
  font-size: .88em;
  font-weight: 700;
  margin-left: 6px;
}
.dwi-extra-photo-grid {
  text-align: left;
  margin-top: 28px;
  padding-top: 6px;
}
.dwi-sale-link-section {
  padding-top: 34px;
  padding-bottom: 34px;
  background: #fff;
}
.dwi-sale-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 42px;
  align-items: center;
  padding: 40px 46px;
  border: 1px solid var(--dwi-border);
  border-top: 4px solid var(--dwi-green);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff 0%, #f7fbfe 100%);
  box-shadow: 0 18px 48px rgba(13, 59, 102, .08);
}
.dwi-sale-link-card h2 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 3vw, 38px);
}
.dwi-sale-link-card p {
  max-width: 760px;
  margin: 0;
}
.dwi-sale-link-card .dw-btn { white-space: nowrap; }
@media (max-width: 820px) {
  .dwi-sale-link-card { grid-template-columns: 1fr; padding: 32px 26px; gap: 24px; }
  .dwi-sale-link-card .dw-btn { justify-self: start; white-space: normal; }
}
