/* ==========================================================================
   PreventPartner – Relaties (tags): blocks shared by profile, hub pages,
   professionals overview and the "Gerelateerd" module on knowledge articles.
   Loaded by:
     html/com_content/article/profiel.php       (after professionals.css)
     html/com_content/article/hub.php
     html/com_content/category/professionals.php
     html/mod_tags_similar/prevent.php
   Markup: html/layouts/prevent/related/*.php
   Tokens: same values as professionals.css / the style guide (keep in sync).
   ========================================================================== */

:root {
  --pp-navy: #0C215B; --pp-navy-heading: #202E56; --pp-blue-deep: #143F6C;
  --pp-coral: #E06364; --pp-coral-text: #C24446; --pp-coral-text-on-grey: #B43C3E; --pp-mist: #C1CCD6; --pp-link: #224FAA;
  --pp-text: #22262A; --pp-text-muted: #333333;
  --pp-surface: #F1F1F1; --pp-border: #CCCCCC; --pp-white: #FFFFFF;
  --pp-font: "SUSE", sans-serif; --pp-radius: 4px;
  --pp-space-1: 4px; --pp-space-2: 8px; --pp-space-3: 16px; --pp-space-4: 24px;
  --pp-space-5: 32px; --pp-space-6: 48px; --pp-space-7: 64px;
}

.pp-rel,
.pp-hub,
.pp-filter {
  font-family: var(--pp-font);
  line-height: 1.6;
  color: var(--pp-text);
}
.pp-rel p,
.pp-hub__hero p,
.pp-filter p { margin: 0; }

.pp-rel :focus-visible,
.pp-hub :focus-visible,
.pp-filter :focus-visible { outline: 3px solid var(--pp-link); outline-offset: 2px; }

/* Lists: no bullets/indent (beats ".container-component ul" in user.css) */
.pp-rel ul[role="list"],
.pp-filter ul[role="list"] { margin: 0; padding-left: 0; list-style: none; }

/* Filterable items are never used as scroll anchor: filtering must not move the page (no scrolling) */
[data-pp-keys] { overflow-anchor: none; }

/* Items hidden by the filter (relations.js); beats display:flex/grid on the items */
[data-pp-keys][hidden],
[data-pp-filter-empty][hidden],
.pp-filter[hidden] { display: none !important; }

/* ---------- Shared bits (also outside .pp-profile / .pp-professionals) ---------- */

.pp-rel .pp-eyebrow,
.pp-hub .pp-eyebrow {
  margin: 0;
  font-size: .8125rem;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pp-coral-text);
}
/* Coral text on grey needs the darker coral (5.08:1) */
.pp-rel--grey .pp-eyebrow,
.pp-hub__hero .pp-eyebrow,
.pp-news .pp-eyebrow { color: var(--pp-coral-text-on-grey); }

.pp-rel .pp-arrow { font-weight: 600; color: var(--pp-navy); text-decoration: none; }
.pp-rel .pp-arrow::after { content: " >"; }
.pp-rel a.pp-arrow:hover { text-decoration: underline; }

.pp-rel .pp-meta { font-size: .8125rem; line-height: 18px; color: var(--pp-text-muted); }

.pp-rel .pp-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--pp-space-2);
  padding: 10px 16px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--pp-white);
  text-decoration: none;
  background: var(--pp-navy);
  border: 1px solid var(--pp-navy);
  border-radius: var(--pp-radius);
}
.pp-rel .pp-btn--sec { color: var(--pp-text-muted); background: var(--pp-white); border-color: var(--pp-border); }

.pp-badge {
  align-self: flex-start;
  padding: 1px 6px;
  font-size: .75rem;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pp-white);
  background: var(--pp-navy);
  border-radius: 2px;
}

/* ==========================================================================
   Section: eyebrow + heading + "more" link
   ========================================================================== */

.pp-rel-section {
  container: pp-rel / inline-size;
  margin-top: var(--pp-space-6);
}
.pp-rel-section.pp-rel--grey,
.pp-mod-professionals.pp-rel--grey {
  padding: var(--pp-space-5) var(--pp-space-3);
  background: var(--pp-surface);
  border-radius: var(--pp-radius);
}
@media (min-width: 768px) {
  .pp-rel-section.pp-rel--grey,
  .pp-mod-professionals.pp-rel--grey { padding: var(--pp-space-5); }
}

.pp-rel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--pp-space-3);
  margin-bottom: var(--pp-space-4);
}
.pp-rel-head__text { display: flex; flex-direction: column; gap: var(--pp-space-2); max-width: 62ch; }
.pp-rel-head__titles { display: flex; flex-direction: column; gap: var(--pp-space-2); margin: 0; }
.pp-rel-head__titles .pp-eyebrow { order: -1; } /* visually above the heading, after it in the DOM */
.pp-rel .pp-rel-head__title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 2.25rem;
  font-weight: 600;
  color: var(--pp-navy-heading);
  text-wrap: balance;
}
.pp-rel-head__more { min-height: 24px; }

.pp-rel-empty { margin-top: var(--pp-space-3); color: var(--pp-text-muted); }

/* ==========================================================================
   Tiles (expertises / services): 3 / 2 / 1 columns
   ========================================================================== */

.pp-rtiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--pp-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
@container pp-rel (min-width: 540px) { .pp-rtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container pp-rel (min-width: 820px) { .pp-rtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@supports not (container-type: inline-size) {
  @media (min-width: 576px) { .pp-rtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 992px) { .pp-rtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
}
.pp-rtiles > li { display: flex; }

.pp-rtile {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  background: var(--pp-white);
  border: 1px solid var(--pp-border);
  border-top: 3px solid var(--pp-navy);
  border-radius: var(--pp-radius);
}
.pp-rtile--link:hover,
.pp-rtile--link:focus-within { border-color: var(--pp-navy); }

.pp-rtile__media {
  order: -1; /* after the text in the DOM, on top visually */
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: var(--pp-surface);
  border-bottom: 1px solid var(--pp-border);
}
.pp-rtile__media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.pp-rtile__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--pp-space-2);
  padding: var(--pp-space-3) var(--pp-space-4) var(--pp-space-4);
}
.pp-rel .pp-rtile__title { margin: 0; font-size: 1.125rem; line-height: 25px; font-weight: 600; color: var(--pp-navy-heading); }
.pp-rtile__link { color: var(--pp-navy-heading); text-decoration: none; }
.pp-rtile__link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole tile clickable */
.pp-rtile--link:hover .pp-rtile__link { text-decoration: underline; }
.pp-rtile__link:focus-visible { outline: none; text-decoration: underline; }
.pp-rtile:has(.pp-rtile__link:focus-visible) { outline: 3px solid var(--pp-link); outline-offset: 2px; }
@supports not selector(:has(*)) { .pp-rtile__link:focus-visible { outline: 3px solid var(--pp-link); } }

.pp-rtile__text { font-size: .9375rem; }

/* Subtopics: short line inside the tile (D8); links stay clickable above the stretched link */
.pp-rtile__topics { font-size: .875rem; color: var(--pp-text-muted); }
.pp-rtile__topics-label { margin-right: var(--pp-space-1); }
.pp-rtile__topics ul { display: inline; margin: 0; padding: 0; list-style: none; }
.pp-rtile__topics li { display: inline; }
.pp-rtile__topics li:not(:last-child)::after { content: ", "; }
.pp-rtile__topics a {
  position: relative;
  z-index: 2;
  display: inline-block;
  min-height: 24px; /* WCAG 2.5.8 */
  padding-block: 2px;
  color: var(--pp-link);
}

.pp-rtile__more { margin-top: auto; padding-top: var(--pp-space-2); font-size: .9375rem; }

/* ==========================================================================
   Deep-blue link list (" >")
   ========================================================================== */

.pp-rlinks {
  display: flex;
  flex-direction: column;
  gap: var(--pp-space-3);
  align-self: stretch;
  padding: var(--pp-space-4);
  color: var(--pp-white);
  background: var(--pp-blue-deep);
  border-radius: var(--pp-radius);
}
.pp-rel .pp-rlinks__title,
.pp-rlinks .pp-rlinks__title { margin: 0; font-size: 1.125rem; line-height: 25px; font-weight: 600; color: var(--pp-white); }
.pp-rlinks__list { display: grid; gap: var(--pp-space-2); margin: 0; padding: 0; list-style: none; }
.pp-rlinks__list a,
.pp-rlinks .pp-rlinks__link {
  display: flex;
  justify-content: space-between;
  gap: var(--pp-space-3);
  min-height: 24px;
  color: var(--pp-white);
  text-decoration: none;
}
.pp-rlinks .pp-rlinks__link::after { content: ">"; flex: none; }
.pp-rlinks__list a:hover .pp-rlinks__name { text-decoration: underline; }
.pp-rlinks__text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.pp-rlinks__list small { font-size: .8125rem; line-height: 1.4; color: var(--pp-mist); } /* 6.6:1 on deep blue */
.pp-rlinks :focus-visible { outline-color: var(--pp-white); }

/* ==========================================================================
   People (colleagues / professionals on a hub)
   ========================================================================== */

.pp-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--pp-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pp-people > li { display: flex; }
.pp-mate {
  display: flex;
  align-items: center;
  gap: var(--pp-space-3);
  width: 100%;
  padding: var(--pp-space-3);
  color: inherit;
  text-decoration: none;
  background: var(--pp-white);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
}
.pp-mate:hover { border-color: var(--pp-navy); }
.pp-mate:hover .pp-mate__name { text-decoration: underline; }
.pp-mate__photo {
  flex: none;
  width: 56px;
  height: 56px;
  overflow: hidden;
  background: var(--pp-surface);
  border-radius: 50%;
}
.pp-mate__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.pp-mate__initials { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 600; color: var(--pp-navy); }
.pp-mate__text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; hyphens: auto; } /* long names/professions wrap at 320px (WCAG 1.4.10); Dutch hyphenation via <html lang> */
.pp-mate__name { font-weight: 600; color: var(--pp-navy-heading); }
.pp-mate__role { font-size: .875rem; line-height: 1.4; color: var(--pp-text-muted); }

/* Professionals overview (category/professionals_item.php): same card as above, plus "Ervaring bij".
   The card is an <article> with the name as h2; the name link is stretched over the whole card. */
/* Overview: a little wider than the team cards (more text): 4 per row on a normal screen */
.pp-people--overview { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.pp-mate--item { position: relative; }
.pp-mate h2.pp-mate__name {
  margin: 0;
  font-family: var(--pp-font);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 600;
  color: var(--pp-navy-heading);
}
.pp-mate__link { color: inherit; text-decoration: none; }
.pp-mate__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--pp-radius); }
.pp-mate--item:hover { border-color: var(--pp-navy); }
.pp-mate--item:hover .pp-mate__link { text-decoration: underline; }
.pp-mate__link:focus,
.pp-mate__link:focus-visible { outline: none; }
.pp-mate--item:has(.pp-mate__link:focus-visible) { outline: 3px solid var(--pp-link); outline-offset: 2px; }
@supports not selector(:has(*)) {
  .pp-mate__link:focus-visible { outline: 3px solid var(--pp-link); outline-offset: 2px; }
}
.pp-mate .pp-mate__exp { margin-top: var(--pp-space-1); font-size: .875rem; line-height: 1.4; color: var(--pp-text-muted); }
.pp-mate__exp strong { font-weight: 600; }
.pp-mate .pp-mate__status { margin-top: var(--pp-space-1); font-size: .8125rem; font-weight: 600; color: var(--pp-coral-text); }
.pp-mate__edit { position: relative; z-index: 1; margin-top: var(--pp-space-2); } /* above the stretched link */
.pp-mate--unpublished { border-style: dashed; }

/* Module mod_prevent_professionals: same cards as "Multidisciplinair team" (profile page),
   intro above and "Alle professionals >" below. Grey band: module class " pp-rel--grey". */
.pp-rel .pp-mod-professionals__intro { max-width: 62ch; margin: 0 0 var(--pp-space-4); }
.pp-rel .pp-mod-professionals__more { margin: var(--pp-space-4) 0 0; }
.pp-mod-professionals__more .pp-arrow { display: inline-block; min-height: 24px; }

/* ==========================================================================
   Knowledge / news tiles
   ========================================================================== */

.pp-newslist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--pp-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pp-newslist > li { display: flex; }
.pp-news {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  background: var(--pp-surface);
  border: 1px solid transparent;
  border-radius: var(--pp-radius);
}
/* On a grey band the tiles are white */
.pp-rel--grey .pp-news { background: var(--pp-white); border-color: var(--pp-border); }
.pp-news:hover { border-color: var(--pp-navy); }
.pp-news__media { order: -1; aspect-ratio: 16 / 9; overflow: hidden; background: var(--pp-border); }
.pp-news__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp-news__inner { display: flex; flex: 1; flex-direction: column; gap: var(--pp-space-2); padding: var(--pp-space-4); }
.pp-news__meta { order: -1; } /* above the title visually, after it in the DOM */
.pp-rel .pp-news__title { margin: 0; font-size: 1.125rem; line-height: 25px; font-weight: 600; color: var(--pp-navy-heading); }
.pp-news__link { color: var(--pp-navy-heading); text-decoration: none; }
.pp-news__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pp-news:hover .pp-news__link { text-decoration: underline; }
.pp-news__link:focus-visible { outline: none; text-decoration: underline; }
.pp-news:has(.pp-news__link:focus-visible) { outline: 3px solid var(--pp-link); outline-offset: 2px; }
@supports not selector(:has(*)) { .pp-news__link:focus-visible { outline: 3px solid var(--pp-link); } }
.pp-news__text { font-size: .9375rem; }
.pp-rel .pp-news__more { align-self: flex-start; margin-top: auto; }
.pp-news:hover .pp-news__more { color: var(--pp-navy); border-color: var(--pp-navy); }

/* ==========================================================================
   Filter buttons (overview: per expertise, hub: per subtopic)
   ========================================================================== */

.pp-filter {
  display: flex;
  flex-direction: column;
  gap: var(--pp-space-2);
  margin: var(--pp-space-5) 0 var(--pp-space-4);
  scroll-margin-top: var(--pp-space-6);
}
.pp-filter__label { font-weight: 600; color: var(--pp-navy-heading); }
.pp-filter__list { display: flex; flex-wrap: wrap; gap: var(--pp-space-2); margin: 0; padding: 0; list-style: none; }
.pp-chip {
  min-height: 32px; /* > 24px, WCAG 2.5.8 */
  padding: 4px 12px;
  font: inherit;
  font-size: .875rem;
  line-height: 1.4;
  color: var(--pp-navy-heading);
  background: var(--pp-white);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  cursor: pointer;
}
.pp-chip:hover { border-color: var(--pp-navy); }
.pp-chip[aria-pressed="true"] { color: var(--pp-white); background: var(--pp-navy); border-color: var(--pp-navy); }
.pp-chip:focus-visible { outline: 3px solid var(--pp-link); outline-offset: 2px; }
.pp-chip { scroll-margin-top: var(--pp-space-6); }

/* Dropdown variant (.pp-filter--select): native select on small screens, buttons from 768px */
.pp-filter__select-wrap { display: none; position: relative; max-width: 28rem; }
.pp-filter__select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 40px 10px 12px;
  font: inherit;
  font-size: 1rem; /* 16px: prevents zoom on focus in iOS Safari */
  line-height: 1.4;
  color: var(--pp-navy-heading);
  background: var(--pp-white);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  appearance: none;
  cursor: pointer;
}
.pp-filter__select:hover { border-color: var(--pp-navy); }
.pp-filter__select:focus-visible { outline: 3px solid var(--pp-link); outline-offset: 2px; border-color: var(--pp-navy); }
/* Chevron */
.pp-filter__select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--pp-navy);
  border-bottom: 2px solid var(--pp-navy);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
@media (max-width: 767.98px) {
  .pp-filter--select .pp-filter__list { display: none; }
  .pp-filter--select .pp-filter__select-wrap { display: block; }
}

/* Dropdown only (filter.php 'buttons' => false) and the search field ('search'): label above each control */
.pp-filter__field { display: flex; flex-direction: column; gap: var(--pp-space-1); min-width: 0; }
.pp-filter--dropdown .pp-filter__select-wrap { display: block; }
.pp-filter__input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 28rem;
  min-height: 44px; /* WCAG 2.5.8 */
  padding: 10px 12px;
  font: inherit;
  font-size: 1rem; /* 16px: prevents zoom on focus in iOS Safari */
  line-height: 1.4;
  color: var(--pp-text);
  background: var(--pp-white);
  border: 1px solid #767676; /* 4.5:1 on white: the field must be recognisable (WCAG 1.4.11) */
  border-radius: var(--pp-radius);
}
.pp-filter--dropdown .pp-filter__select { border-color: #767676; }
.pp-filter__input:hover { border-color: var(--pp-navy); }
.pp-filter__input:focus-visible { outline: 3px solid var(--pp-link); outline-offset: 2px; border-color: var(--pp-navy); }
.pp-filter__input::-webkit-search-cancel-button { cursor: pointer; }

@media (forced-colors: active) {
  .pp-filter__select { appearance: auto; padding-right: 12px; }
  .pp-filter__select-wrap::after { display: none; }
}

/* ==========================================================================
   Hub page (expertise / service)
   ========================================================================== */

.pp-hub { container: pp-hub / inline-size; }

.pp-hub__hero {
  display: flex;
  flex-direction: column;
  gap: var(--pp-space-3);
  margin-bottom: var(--pp-space-5);
  padding: var(--pp-space-4) var(--pp-space-3);
  background: var(--pp-surface);
  border-radius: var(--pp-radius);
}
@container pp-hub (min-width: 640px) { .pp-hub__hero { padding: var(--pp-space-5); } }
.pp-hub__titles { display: flex; flex-direction: column; gap: var(--pp-space-2); margin: 0; }
.pp-hub__titles .pp-eyebrow { order: -1; }
.pp-hub .pp-hub__title {
  margin: 0;
  font-size: clamp(1.625rem, 5cqi, 2rem);
  line-height: 1.3;
  font-weight: 600;
  color: var(--pp-navy-heading);
  text-wrap: balance;
}

.pp-hub__main { display: grid; gap: var(--pp-space-5); }
@container pp-hub (min-width: 820px) {
  .pp-hub__main { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .pp-hub__side { position: sticky; top: var(--pp-space-4); }
}
@supports not (container-type: inline-size) {
  @media (min-width: 992px) { .pp-hub__main { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } }
}
.pp-hub__content { min-width: 0; }
.pp-hub__body { max-width: 65ch; }
.pp-hub__body > :first-child { margin-top: 0; }
.pp-hub__body img { max-width: 100%; height: auto; }
.pp-hub__side { display: flex; flex-direction: column; gap: var(--pp-space-3); }

/* ==========================================================================
   "Gerelateerd" module on knowledge articles
   ========================================================================== */

.pp-related { container: pp-rel / inline-size; }
.pp-related__hubs { display: grid; gap: var(--pp-space-3); }
@container pp-rel (min-width: 640px) {
  .pp-related__hubs { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: start; }
}
.pp-related .pp-rel-section:first-child { margin-top: 0; }

/* ==========================================================================
   Profile page: aside spacing for the services tile
   ========================================================================== */

.pp-profile .pp-profile__side .pp-rlinks { width: 100%; }
.pp-profile .pp-rel-section { margin-top: var(--pp-space-6); }

/* Windows high contrast / forced colors */
@media (forced-colors: active) {
  .pp-rlinks, .pp-news, .pp-rtile, .pp-mate, .pp-hub__hero, .pp-rel-section.pp-rel--grey, .pp-mod-professionals.pp-rel--grey { border: 1px solid CanvasText; }
  .pp-mate--item:has(.pp-mate__link:focus-visible) { outline-color: Highlight; }
  .pp-chip[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .pp-rtile:has(.pp-rtile__link:focus-visible),
  .pp-news:has(.pp-news__link:focus-visible) { outline-color: Highlight; }
}
@media print { .pp-filter { display: none !important; } }

/* ==========================================================================
   Module mod_prevent_professionals: same cards as the professionals overview, see overview.css
   ========================================================================== */
