/* CW Kozijnen: projecten (inc/cw-projecten.php, single-cw_project.php, assets/cw-projecten.js).
   De tegel is een kopie van het Elementor-component Projecttegel (ID 173), maar dan door
   de server opgebouwd zodat nieuwe projecten automatisch verschijnen. */

/* ---------- Tegel ---------- */
.cw-ptegel { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 280px; overflow: hidden; background: #222; color: #fff; text-decoration: none; }
.cw-ptegel:hover, .cw-ptegel:focus { color: #fff; }
.cw-ptegel-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.cw-ptegel:hover .cw-ptegel-img, .cw-ptegel:focus-visible .cw-ptegel-img { transform: scale(1.03); }
.cw-ptegel-ov { position: absolute; inset: 0; background: linear-gradient(rgba(12,13,12,0) 40%, rgba(12,13,12,.9) 100%); }
.cw-ptegel-rij { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 26px 24px; }
.cw-ptegel-kol { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.cw-ptag { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 10px; background: var(--cw-groen, #8DC21F); clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); color: #fff; }
.cw-ptag svg { width: 15px; height: 15px; flex: none; color: #fff; stroke: currentColor; }
.cw-ptag span { font-family: var(--cw-font-tekst, Barlow), sans-serif; font-size: 12.5px; font-weight: 700; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase; }
.cw-ptegel-kop { margin: 0; font-family: var(--cw-font-kop, "Saira Condensed"), sans-serif; font-size: 26px; font-weight: 800; line-height: 1; text-transform: uppercase; color: #fff; text-wrap: balance; }
.cw-ptegel-plaats { font-family: var(--cw-font-tekst, Barlow), sans-serif; font-size: 15px; line-height: 1.5; color: #c9ccc9; }
.cw-ptegel-pijl { flex: none; display: flex; align-items: center; justify-content: center; width: 58px; height: 44px; background: #fff; color: #0c0d0c; font-size: 20px; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); transition: background-color .25s, color .25s; }
.cw-ptegel:hover .cw-ptegel-pijl { background: var(--cw-groen, #8DC21F); color: #fff; }
@media (max-width: 767px) {
	.cw-ptegel-rij { padding: 0 18px 18px; gap: 14px; }
	.cw-ptegel-kop { font-size: 24px; }
	.cw-ptegel-pijl { width: 48px; height: 38px; font-size: 18px; }
}

/* Blokken op home en productpagina's: tegels staan direct in het raster [data-cw="projecten"] */
[data-cw-projecten] > .cw-ptegel { min-height: 280px; }

/* ---------- Overzicht /projecten/ ---------- */
.cw-pfilter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.cw-pfilter button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border: 1.5px solid #d3d6d2; border-radius: 0; background: #fff; color: #0c0d0c; font-family: var(--cw-font-tekst, Barlow), sans-serif; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.cw-pfilter button span { font-weight: 500; color: #5b605b; }
.cw-pfilter button:hover, .cw-pfilter button:focus { background: #fff; color: #0c0d0c; border-color: #0c0d0c; }
.cw-pfilter button.is-on, .cw-pfilter button.is-on:hover, .cw-pfilter button.is-on:focus { background: #0c0d0c; border-color: #0c0d0c; color: #fff; }
.cw-pfilter button.is-on span { color: var(--cw-groen, #8DC21F); }
.cw-pfilter button:focus-visible { outline: 2px solid var(--cw-groen, #8DC21F); outline-offset: 2px; }
.cw-plijst { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cw-plijst .cw-ptegel { min-height: 340px; }
.cw-plijst .cw-ptegel[hidden] { display: none; }
.cw-plijst-leeg { margin: 0; padding: 40px 0; font-size: 17px; color: #444944; }
@media (max-width: 1199px) { .cw-plijst { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
	.cw-plijst { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.cw-plijst .cw-ptegel { min-height: 280px; }
	.cw-pfilter { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 22px; padding: 0 20px 4px; scrollbar-width: none; }
	.cw-pfilter::-webkit-scrollbar { display: none; }
	.cw-pfilter button { flex: none; }
}

/* ---------- Losse projectpagina ---------- */
.cw-project { --g: var(--cw-groen, #8DC21F); font-family: var(--cw-font-tekst, Barlow), sans-serif; color: #0c0d0c; }
.cw-project-hero { position: relative; z-index: 2; background: #0c0d0c; color: #fff; padding: 104px 50px 0; }
.cw-project-hero-in { max-width: 1344px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: end; }
.cw-project-hero-tekst { padding: 56px 0 64px; display: flex; flex-direction: column; align-items: flex-start; }
.cw-project .cw-kruimel { margin: 0 0 26px; font-size: 14px; font-weight: 500; color: #bfc3bf; word-spacing: 4px; }
.cw-project .cw-kruimel a { color: #bfc3bf; text-decoration: none; }
.cw-project .cw-kruimel a:hover { color: #fff; }
.cw-project .cw-kruimel b { color: #fff; font-weight: 600; }
.cw-project-hero h1 { margin: 16px 0 18px; font-family: var(--cw-font-kop, "Saira Condensed"), sans-serif; font-size: 72px; font-weight: 800; line-height: .9; text-transform: uppercase; color: #fff; text-wrap: balance; }
.cw-project-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; font-size: 16px; color: #c9ccc9; }
.cw-project-meta span { display: inline-flex; align-items: center; gap: 8px; }
.cw-project-meta svg { width: 17px; height: 17px; color: var(--g); }
.cw-project-hero-foto { margin-bottom: -48px; }
.cw-project-hero-foto img { display: block; width: 100%; height: 540px; max-width: none; object-fit: cover; clip-path: polygon(64px 0, 100% 0, 100% 100%, 0 100%); }
@media (max-width: 1024px) { .cw-project-hero h1 { font-size: 56px; } .cw-project-hero-foto img { height: 420px; } }
@media (max-width: 767px) {
	.cw-project-hero { padding: 80px 20px 0; }
	.cw-project-hero-in { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.cw-project-hero-tekst { padding: 16px 0 28px; }
	.cw-project-hero h1 { font-size: 42px; }
	.cw-project-hero-foto img { height: 280px; clip-path: none; }
}

.cw-project-body { padding: 128px 50px 96px; background: #EDF0F1; }
.cw-project-body-in { max-width: 1344px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 72px; align-items: start; }
.cw-project-tekst { font-size: 18px; line-height: 1.65; color: #444944; }
.cw-project-tekst > :first-child { margin-top: 0; }
.cw-project-tekst h2, .cw-project-tekst h3 { font-family: var(--cw-font-kop, "Saira Condensed"), sans-serif; font-weight: 800; text-transform: uppercase; line-height: 1; color: #0c0d0c; margin: 1.4em 0 .5em; }
.cw-project-tekst h2 { font-size: 34px; }
.cw-project-tekst h3 { font-size: 26px; }
.cw-project-tekst p { margin: 0 0 1em; }
.cw-project-tekst a { color: #5e8a0f; }
.cw-project-kaart { position: sticky; top: calc(var(--cw-header-h, 76px) + 24px); background: #fff; padding: 28px 26px 26px; }
.cw-project-kaart::before { content: ""; position: absolute; left: 0; top: 0; width: 64px; height: 5px; background: var(--g); }
.cw-project-kaart h2 { margin: 0 0 14px; font-family: var(--cw-font-kop, "Saira Condensed"), sans-serif; font-size: 26px; font-weight: 800; text-transform: uppercase; line-height: 1; }
.cw-project-kaart dl { margin: 0 0 22px; }
.cw-project-kaart dl div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid #e6e8e5; font-size: 15.5px; line-height: 1.45; }
.cw-project-kaart dt { color: #5b605b; }
.cw-project-kaart dd { margin: 0; font-weight: 600; }
.cw-project-kaart p { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: #444944; }
.cw-project-knop { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 14px 22px; background: var(--g); color: #fff; font-size: 16.5px; font-weight: 600; text-decoration: none; transition: background-color .2s; }
.cw-project-knop:hover, .cw-project-knop:focus { background: var(--cw-groen-hover, #7caf15); color: #fff; }
.cw-project-tel { display: block; margin-top: 12px; text-align: center; font-size: 15px; color: #0c0d0c; text-decoration: none; }
.cw-project-tel b { border-bottom: 2px solid var(--g); }
@media (max-width: 1024px) { .cw-project-body-in { grid-template-columns: minmax(0, 1fr); gap: 40px; } .cw-project-kaart { position: static; } }
@media (max-width: 767px) { .cw-project-body { padding: 80px 20px 64px; } .cw-project-tekst { font-size: 16.5px; } }

/* Foto's */
.cw-project-fotos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 48px; grid-column: 1 / -1; }
.cw-project-fotos a { display: block; overflow: hidden; background: #ddd; aspect-ratio: 4 / 3; }
.cw-project-fotos img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.cw-project-fotos a:hover img { transform: scale(1.03); }
@media (max-width: 767px) { .cw-project-fotos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* Meer projecten */
.cw-project-meer { padding: 96px 50px; background: #fff; }
.cw-project-meer-in { max-width: 1344px; margin: 0 auto; }
.cw-project-meer-kop { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.cw-project-meer h2 { margin: 6px 0 0; font-family: var(--cw-font-kop, "Saira Condensed"), sans-serif; font-size: 48px; font-weight: 800; text-transform: uppercase; line-height: .95; }
.cw-project-meer .cw-eyebrow-p { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #5e8a0f; }
.cw-project-meer-link { font-weight: 600; color: #0c0d0c; text-decoration: none; border-bottom: 2px solid var(--g); white-space: nowrap; }
.cw-project-meer .cw-plijst .cw-ptegel { min-height: 320px; }
@media (max-width: 767px) { .cw-project-meer { padding: 64px 20px; } .cw-project-meer h2 { font-size: 36px; } .cw-project-meer-kop { flex-direction: column; align-items: flex-start; } }

/* Lichtbak */
.cw-lb { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(12,13,12,.94); }
.cw-lb[hidden] { display: none; }
.cw-lb img { max-width: calc(100vw - 140px); max-height: calc(100vh - 120px); object-fit: contain; display: block; }
.cw-lb button { position: absolute; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 0; border-radius: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.cw-lb button:hover, .cw-lb button:focus { background: var(--cw-groen, #8DC21F); color: #fff; }
.cw-lb-sluit { top: 20px; right: 20px; }
.cw-lb-vorige { left: 20px; top: 50%; transform: translateY(-50%); }
.cw-lb-volgende { right: 20px; top: 50%; transform: translateY(-50%); }
.cw-lb-teller { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #bfc3bf; font-size: 14px; }
@media (max-width: 767px) { .cw-lb img { max-width: 100vw; max-height: calc(100vh - 140px); } .cw-lb-vorige, .cw-lb-volgende { top: auto; bottom: 12px; transform: none; } }

/* Binnen Elementor-content zet ".elementor img" de hoogte op auto: de tegelfoto moet de hele tegel vullen. */
.cw-ptegel img.cw-ptegel-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; border-radius: 0; }
