/* Portfolio: overview (.pf-) and project detail (.pj-) */

/* ---------- Overview ---------- */
.pf-head{padding-top:calc(var(--header-h) + clamp(3rem,7vw,6rem));padding-bottom:clamp(2.5rem,5vw,4rem)}
.pf-head .wrap{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(1.5rem,5vw,5rem);align-items:end}
.pf-head .lead{max-width:30ch;padding-bottom:.35em}

.pf-work{padding-top:0}
.pf-filter{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1.25rem;margin-bottom:clamp(2rem,4vw,3.25rem)}
.pf-filter[hidden]{display:none}
.pf-filter p{font-weight:600;font-size:.95rem;color:var(--soft)}
.pf-filter-btns{display:flex;flex-wrap:wrap;gap:.5rem}
.pf-filter button{min-height:44px;padding:.55rem 1.2rem;border-radius:999px;background:var(--ink);font-weight:600;font-size:.9rem;letter-spacing:.01em;-webkit-tap-highlight-color:transparent;transition:background-color .25s,color .25s,transform .5s var(--ease)}
.pf-filter button[aria-pressed="true"]{background:var(--yellow);color:var(--black)}
.pf-filter button:active{transform:scale(.96);transition:transform .1s ease-out}
@media (hover:hover){
  .pf-filter button[aria-pressed="false"]:hover{background:var(--ink-2);color:var(--yellow)}
}

/* Cards: .work-grid/.work-card from site.css, flat 3-column grid instead of the staggered homepage pair */
.pf-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(2.25rem,4vw,3.5rem) clamp(1rem,2vw,1.75rem);padding-bottom:0}
.pf-grid li:nth-child(even){transform:none}
.pf-grid li[hidden]{display:none}
.pf-grid .cap{align-items:flex-start}
.pf-grid .cap :is(h2,h3){font-family:var(--body);font-weight:600;font-size:1rem;line-height:1.4;letter-spacing:0;text-wrap:pretty}
.pf-grid .cap svg{margin-top:.15rem}
.pf-types{margin-top:.2rem;font-size:.85rem;line-height:1.45;color:var(--soft)}
.pf-in{animation:pf-in .6s var(--ease) both}
@keyframes pf-in{from{opacity:0;transform:translateY(14px)}}

/* ---------- Project detail ---------- */
.pj-hero{padding-top:calc(var(--header-h) + clamp(3rem,6vw,5rem));padding-bottom:0}
.pj-hero .wrap{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(2rem,5vw,5rem);align-items:end}
.pj-hero-text{min-width:0}
.pj-title{font-size:clamp(2.4rem,4.4vw,4rem);overflow-wrap:break-word;hyphens:auto}
.pj-types{display:flex;flex-wrap:wrap;gap:.35rem 1.5rem;margin-top:clamp(1.25rem,2vw,1.75rem);font-size:.8rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--yellow)}
.pj-back{display:inline-flex;align-items:center;gap:.65rem;min-height:44px;margin-top:clamp(1.5rem,3vw,2.5rem);font-weight:600;font-size:.95rem;text-decoration:none;transition:color .25s}
.pj-back svg{width:1.1rem;height:1.1rem;color:var(--yellow);transform:rotate(180deg);transition:transform .45s var(--ease)}
.pj-back:hover{color:var(--yellow)}
.pj-back:hover svg{transform:rotate(180deg) translateX(5px)}
/* One wide format for every project hero; heroFocus.json sets the focal point for portrait photos */
.pj-hero-media{overflow:hidden;background:var(--ink);border-radius:var(--r-l);aspect-ratio:16/9}
.pj-hero-media img{width:100%;height:100%;object-fit:cover}

.pj-body{padding-block:clamp(4rem,8vw,7rem) var(--section)}

/* Rendered Gutenberg HTML (item.content). Text in the right column, sub-headings left, media full width. */
.pj-content{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);column-gap:clamp(2rem,5vw,5rem);align-items:start}
.pj-content>*{grid-column:2;min-width:0;margin:0}
.pj-content>*+*{margin-top:1.15rem}
.pj-content p{max-width:62ch;color:var(--soft);text-wrap:pretty}
.pj-content p:empty,.pj-content .wp-block-spacer{display:none}
.pj-content>p:first-child:not(.pj-h),.pj-content>.wp-block-heading.pj-lead{max-width:40ch;font-size:clamp(1.2rem,1.9vw,1.55rem);line-height:1.45;letter-spacing:-.005em;color:var(--white)}
.pj-content strong{font-weight:600;color:var(--white)}
.pj-content>p:first-child:not(.pj-h)>strong:only-child{font-weight:inherit}
.pj-content a:not(.wp-block-button__link){color:var(--yellow);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.22em;transition:text-decoration-color .2s}
.pj-content a:not(.wp-block-button__link):hover{text-decoration-color:transparent}

/* Sub-headings: bold-only paragraphs (marked .pj-h in the layout) and real heading blocks */
.pj-content>:is(.pj-h,.wp-block-heading){grid-column:1;font-family:var(--display);font-weight:600;font-size:clamp(1.5rem,2.3vw,2rem);line-height:1.15;letter-spacing:-.01em;color:var(--white);text-wrap:balance;max-width:22ch;word-spacing:.08em}
/* A sub-heading spans three rows so a tall heading does not push the text beside it down */
.pj-content>:is(.pj-h,.wp-block-heading):not(.pj-lead){grid-row:span 3}
.pj-content>:is(.pj-h,.wp-block-heading) strong{font-weight:inherit}
.pj-content>:is(.pj-h,.wp-block-heading),.pj-content>:is(.pj-h,.wp-block-heading)+*{margin-top:clamp(2.5rem,5vw,4rem)}
.pj-content>:is(.pj-h,.wp-block-heading):first-child,.pj-content>:is(.pj-h,.wp-block-heading):first-child+*{margin-top:0}
/* Long first heading = intro sentence (projectContent adds .pj-lead): lead style in the text column */
.pj-content>.wp-block-heading.pj-lead{grid-column:2;font-family:var(--body);font-weight:500;text-wrap:pretty;word-spacing:normal}
.pj-content>.pj-lead+*{margin-top:1.15rem}
.pj-content>.pj-lead+:is(.pj-h,.wp-block-heading){margin-top:clamp(2.5rem,5vw,4rem)}

/* Lists: "<strong>Onderdeel:</strong> uitleg" items */
.pj-content ul{display:grid;gap:.9rem;max-width:62ch;color:var(--soft)}
.pj-content li{position:relative;padding-left:1.4rem}
.pj-content li::before{content:"";position:absolute;left:0;top:.72em;width:6px;height:6px;border-radius:50%;background:var(--yellow)}

/* Media: full content width */
.pj-content>:is(.wp-block-image,.wp-block-gallery,.wp-block-video,.wp-block-columns,.wp-block-embed){grid-column:1/-1;margin-top:clamp(1.75rem,3.5vw,3rem)}
.pj-content>:is(.wp-block-image,.wp-block-gallery,.wp-block-video,.wp-block-columns)+:is(.wp-block-image,.wp-block-gallery,.wp-block-video,.wp-block-columns){margin-top:10px}
.pj-content>:is(.wp-block-image.size-medium,.wp-block-image.size-thumbnail,.wp-block-image.is-resized,.wp-block-image.is-narrow){grid-column:2}
/* Transparent logo (Carwash.FM) on a light plate so it stays visible on black */
.pj-content>.wp-block-image.is-resized img{background:var(--white);padding:clamp(1.25rem,3vw,2rem)}
.pj-content figure{margin:0}
.pj-content img{max-width:100%;height:auto}
.pj-content .wp-block-image img{border-radius:var(--r)}
.pj-content .wp-block-image.aligncenter img{margin-inline:auto}
.pj-content figcaption{margin-top:.6rem;font-size:.85rem;color:var(--soft)}

/* Gallery (flex like WordPress: a lone last image fills its row) */
.pj-content .wp-block-gallery{--cols:3;display:flex;flex-wrap:wrap;gap:10px}
.pj-content .wp-block-gallery.columns-1{--cols:1}
.pj-content .wp-block-gallery.columns-2{--cols:2}
.pj-content .wp-block-gallery.columns-3{--cols:3}
.pj-content .wp-block-gallery.columns-4{--cols:4}
.pj-content .wp-block-gallery.columns-default:has(>figure:nth-child(2):last-child){--cols:2}
.pj-content .wp-block-gallery>figure{display:flex;flex-direction:column;flex:1 1 calc((100% - (var(--cols) - 1) * 10px) / var(--cols));min-width:0;overflow:hidden;background:var(--ink);border-radius:var(--r)}
.pj-content .wp-block-gallery>figure img{width:100%;border-radius:0}
.pj-content .wp-block-gallery.is-cropped>figure img{flex:1 0 0%;height:100%;object-fit:cover}
/* Uncropped galleries and single-image galleries: images at most their own size, no empty ink boxes */
.pj-content .wp-block-gallery:not(.is-cropped){align-items:flex-start}
.pj-content .wp-block-gallery:not(.is-cropped)>figure,.pj-content .wp-block-gallery>figure:only-child{background:none}
.pj-content .wp-block-gallery:not(.is-cropped)>figure img,.pj-content .wp-block-gallery>figure:only-child img{flex:none;width:auto;max-width:100%;height:auto;margin-inline:auto;object-fit:contain;border-radius:var(--r)}
.pj-content .wp-block-gallery.columns-1:not(.is-cropped)>figure img{max-height:88svh}
/* A lone portrait at the end of a cropped gallery stays under one screen */
.pj-content .wp-block-gallery.is-cropped>figure{max-height:min(85svh,52rem)}
/* Soccerfanshop flyers: masonry, so the cropped grid does not cut off their text */
.pj-content.pj-soccerfanshop .wp-block-gallery{display:block;columns:3 14rem;column-gap:10px}
.pj-content.pj-soccerfanshop .wp-block-gallery.wp-block-gallery>figure{break-inside:avoid;margin-bottom:10px;max-height:none}
.pj-content.pj-soccerfanshop .wp-block-gallery.wp-block-gallery>figure img{flex:none;height:auto;object-fit:initial}
.pj-content .wp-block-gallery>figure+figure{margin-top:0}

/* Video and columns (e.g. a row of portrait videos) */
.pj-content .wp-block-video{display:flex;justify-content:center}
.pj-content video{display:block;width:auto;max-width:100%;height:auto;max-height:82svh;border-radius:var(--r)}
.pj-content .wp-block-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:10px}
.pj-content .wp-block-column>*+*{margin-top:10px}
.pj-content .wp-block-embed iframe{display:block;width:100%;height:auto;aspect-ratio:16/9;border:0;border-radius:var(--r)}

/* WordPress button -> .btn .btn-y (overrides the inline gradient and white text) */
.pj-content>.wp-block-buttons{display:flex;flex-wrap:wrap;gap:.75rem;justify-content:flex-start;margin-top:clamp(2rem,4vw,3rem)}
.pj-content .wp-block-button__link{display:inline-flex;align-items:center;gap:.9rem;padding:.95rem 1.3rem .95rem 1.6rem;font-family:var(--body);font-weight:600;font-size:.95rem!important;line-height:1.4;letter-spacing:.01em;text-decoration:none;border-radius:999px;background:var(--yellow)!important;color:var(--black)!important;-webkit-tap-highlight-color:transparent;transition:background-color .25s,transform .5s var(--ease)}
.pj-content .wp-block-button__link::after{content:"";flex:none;width:1.15rem;height:1.15rem;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M13 5l7 7-7 7'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M13 5l7 7-7 7'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform .45s var(--ease)}
.pj-content .wp-block-button__link:hover{background:var(--white)!important}
.pj-content .wp-block-button__link:hover::after{transform:translateX(5px)}
.pj-content .wp-block-button__link:active{transform:scale(.96);transition:transform .1s ease-out}

/* "Enthousiast geworden?" panel after the content */
.pj-ask{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1.5rem 2rem;margin-top:clamp(4rem,8vw,6.5rem);padding:clamp(2rem,4vw,3.5rem);background:var(--ink);border-radius:var(--r-l)}

/* Other projects */
.pj-more{padding-top:0}
.pj-more-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:1.5rem 2rem;margin-bottom:clamp(2rem,4vw,3.5rem)}

@media (max-width:1024px){
  .pf-head .wrap,.pj-hero .wrap{grid-template-columns:minmax(0,1fr)}
  .pf-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pj-more .pf-grid li:nth-child(3){display:none}
  .pj-hero-media{aspect-ratio:16/9}
  .pj-title{font-size:clamp(2.4rem,6vw,3.5rem)}
  .pj-content{grid-template-columns:minmax(0,1fr)}
  .pj-content>*,.pj-content>:is(.pj-h,.wp-block-heading),.pj-content>:is(.wp-block-image.size-medium,.wp-block-image.size-thumbnail,.wp-block-image.is-resized,.wp-block-image.is-narrow),.pj-content>.wp-block-heading.pj-lead{grid-column:1}
  .pj-content>:is(.pj-h,.wp-block-heading):not(.pj-lead){grid-row:auto}
  .pj-content>.wp-block-image.is-narrow{max-width:520px}
  .pj-content>:is(.pj-h,.wp-block-heading){max-width:30ch}
  .pj-content>:is(.pj-h,.wp-block-heading)+*,.pj-content>:is(.pj-h,.wp-block-heading):first-child+*{margin-top:1rem}
  .pj-content>.pj-lead+:is(.pj-h,.wp-block-heading){margin-top:clamp(2.5rem,5vw,4rem)}
}
@media (max-width:640px){
  .pf-grid{grid-template-columns:minmax(0,1fr)}
  .pj-more .pf-grid li:nth-child(3){display:block}
  .pf-filter{gap:.75rem}
  .pf-filter button{padding-inline:1rem}
  .pj-hero-media{aspect-ratio:16/9}
  .pj-content .wp-block-gallery.columns-3,.pj-content .wp-block-gallery.columns-4,.pj-content .wp-block-gallery.columns-default{--cols:2}
  .pj-ask{padding:2rem 1.5rem}
  .pj-content .wp-block-gallery>figure{border-radius:var(--r-s)}
}
@media (prefers-reduced-motion:reduce){
  .pf-in{animation:none}
}
