/* =========================
   Complete Woning Renovatie — detailpagina
   Sluit aan op styles.css + portfolio.css + projecten.css
   ========================= */

/* Voorkom horizontale scroll op alle schermen */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ── Hero ── */
.cwr-hero {
  position: relative;
  color: #fff;
  padding: 100px 0 48px;
  overflow: hidden;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  /* Achtergrond direct op de hero: gradient bovenop de foto */
  background:
    linear-gradient(160deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.72) 60%, rgba(0,0,0,.88) 100%),
    url('fotos_gerangschikt/4.jpg') center 75% / cover no-repeat;
  background-color: #0f1117; /* fallback als afbeelding laadt */
}

/* Behoud de losse bg/overlay divs voor als ze wél in de HTML staan */
.cwr-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('fotos_gerangschikt/4.jpg');
  background-size: cover;
  background-position: center;
}

.cwr-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.72) 60%,
    rgba(0,0,0,.85) 100%
  );
}

.cwr-hero__accent {
  position: absolute;
  top: -80px;
  right: -60px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,95,70,.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 2;
}

.cwr-hero__noise { display: none; }

.cwr-hero > .container {
  position: relative;
  z-index: 3;
  width: 100%;
}

.cwr-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 36px;
  letter-spacing: .02em;
  transition: color .2s;
}

.cwr-hero__back:hover { color: #fff; }

.cwr-hero__tag {
  display: inline-block;
  background: rgba(6,95,70,.18);
  color: #065f46;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid rgba(6,95,70,.25);
}

.cwr-hero__title {
  font-size: clamp(28px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.04;
  margin: 0 0 20px;
  max-width: 700px;
}

.cwr-hero__title span {
  color: #065f46;
}

.cwr-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.cwr-hero__meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(255,255,255,.55);
  font-weight: 500;
}

.cwr-hero__meta-item svg {
  color: #065f46;
  flex-shrink: 0;
}

.cwr-hero__lead {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.7;
  color: rgba(255,255,255,.75);
  max-width: 620px;
  margin: 0 0 36px;
}

/* Scope badges */
.cwr-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cwr-scope__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
}

.cwr-scope__badge svg {
  color: #065f46;
}

/* ── Secties generiek ── */
.cwr-section {
  padding: 80px 0;
  overflow: hidden;
}

.cwr-section--alt {
  background: #f8f8f8;
}

.cwr-section--dark {
  background: var(--dark, #0f1117);
  color: #fff;
}

/* Sectie header */
.cwr-section__header {
  margin-bottom: 48px;
}

.cwr-section__num {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #065f46;
  margin-bottom: 10px;
}

.cwr-section__title {
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1.1;
  color: var(--dark, #111);
  margin: 0 0 12px;
}

.cwr-section--dark .cwr-section__title {
  color: #fff;
}

.cwr-section__bar {
  width: 40px;
  height: 4px;
  background: #065f46;
  border-radius: 2px;
  margin-bottom: 16px;
}

.cwr-section__desc {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  max-width: 580px;
}

.cwr-section--dark .cwr-section__desc {
  color: rgba(255,255,255,.65);
}

/* ── Split layout ── */
.cwr-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.cwr-split--reverse {
  direction: rtl;
}

.cwr-split--reverse > * {
  direction: ltr;
}

/* ── Foto grids ── */
.cwr-photo-grid {
  display: grid;
  gap: 12px;
}

.cwr-photo-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.cwr-photo-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 4-foto grid: 2×2 naast elkaar op desktop */
.cwr-photo-grid--4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cwr-photo-grid--4 .cwr-photo:first-child {
  aspect-ratio: 4/3;
}

.cwr-photo-grid--4 .cwr-photo:not(:first-child) {
  aspect-ratio: 4/3;
}

/* Foto */
.cwr-photo {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #e8e8e8;
  border: 1px solid rgba(0,0,0,.07);
}

.cwr-photo--tall {
  aspect-ratio: 3/4;
}

.cwr-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.cwr-photo:hover img {
  transform: scale(1.04);
}

/* ── Checklist ── */
.cwr-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cwr-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.55;
  color: #333;
}

.cwr-section--dark .cwr-checklist li {
  color: rgba(255,255,255,.8);
}

.cwr-checklist__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(6,95,70,.12);
  border: 1px solid rgba(6,95,70,.3);
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.cwr-checklist__icon svg {
  color: #065f46;
}

/* ── Stat blokken ── */
.cwr-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.cwr-stat {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
}

.cwr-stat__num {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #065f46;
  line-height: 1;
  margin-bottom: 6px;
}

.cwr-stat__label {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── CTA ── */
.cwr-cta {
  padding: 80px 0;
  background: #065f46;
  color: #fff;
  text-align: center;
}

.cwr-cta h2 {
  font-size: clamp(22px, 3.5vw, 44px);
  font-weight: 900;
  letter-spacing: -.025em;
  margin: 0 0 12px;
}

.cwr-cta p {
  font-size: 17px;
  color: rgba(255,255,255,.85);
  margin: 0 0 32px;
}

.cwr-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn--white {
  background: #fff;
  color: #065f46;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}

.btn--white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

.btn--ghost-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}

.btn--ghost-white:hover {
  border-color: #fff;
  background: rgba(255,255,255,.1);
}

/* ── Placeholder ── */
.cwr-photo--placeholder {
  background: linear-gradient(135deg, #e8e8e8, #d4d4d4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  cursor: default;
}

.cwr-photo--placeholder span {
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
  letter-spacing: .04em;
}

/* =========================
   RESPONSIVE
   ========================= */

/* Tablet: 761px – 1024px */
@media (max-width: 1024px) {
  .cwr-hero {
    padding: 80px 0 56px;
    min-height: 48vh;
  }

  .cwr-split {
    gap: 36px;
  }

  .cwr-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobiel: max 760px */
@media (max-width: 760px) {
  /* Hero */
  .cwr-hero {
    padding: 72px 0 48px;
    min-height: auto;
    align-items: flex-start;
  }

  .cwr-hero__accent {
    width: 260px;
    height: 260px;
    top: -40px;
    right: -40px;
  }

  .cwr-hero__back {
    margin-bottom: 24px;
  }

  .cwr-hero__meta {
    gap: 12px;
  }

  /* Secties */
  .cwr-section {
    padding: 56px 0;
  }

  .cwr-section__header {
    margin-bottom: 32px;
  }

  /* Split: altijd 1 kolom, nooit rtl */
  .cwr-split,
  .cwr-split--reverse {
    grid-template-columns: 1fr;
    gap: 28px;
    direction: ltr;
  }

  .cwr-split--reverse > * {
    direction: ltr;
  }

  /* Foto grids: alles 1 kolom op telefoon, netjes onder elkaar */
  .cwr-photo-grid--2,
  .cwr-photo-grid--3,
  .cwr-photo-grid--4 {
    grid-template-columns: 1fr;
  }

  .cwr-photo-grid--4 .cwr-photo:first-child,
  .cwr-photo-grid--4 .cwr-photo:not(:first-child) {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 4/3;
  }

  /* Stats */
  .cwr-stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 28px;
  }

  .cwr-stat {
    padding: 18px 14px;
  }

  .cwr-stat__num {
    font-size: 26px;
  }

  /* CTA */
  .cwr-cta {
    padding: 56px 0;
  }

  .cwr-cta__actions {
    flex-direction: column;
    align-items: center;
  }

  .btn--white,
  .btn--ghost-white {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Scope badges wrappen netjes */
  .cwr-scope {
    gap: 8px;
  }

  .cwr-scope__badge {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Klein mobiel: max 420px */
@media (max-width: 420px) {
  .cwr-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .cwr-stat__num {
    font-size: 22px;
  }

  .cwr-stat__label {
    font-size: 10px;
  }
}

/* =========================
   LIGHTBOX
   ========================= */
.cwr-photo {
  cursor: zoom-in;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  transform: scale(.94);
  transition: transform .25s ease;
}

.lightbox-overlay.is-open img {
  transform: scale(1);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 1001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, .22);
}