:root {
  --fs-h1: clamp(28px, 3.2vw, 42px);
} /* tune to your design */

h1 {
  font-size: var(--fs-h1);
  line-height: 1.2;
}

/* Ensure the same size even when <h1> is inside sectioning elements */
:where(section, article, aside, nav) h1 {
  font-size: var(--fs-h1);
}
@media only screen and (max-width: 767px) {
  .organisatie_details {
    padding-left: 0px !important;
    padding-right: 0px !important;
    display: flex;
    justify-content: center;
  }

  .container {
    padding-right: 0px !important;
    padding-left: 0px !important;
  }
}

.readmore {
  position: inherit;
  padding-left: 18px;
  background: #fff;
  box-shadow: 0px 10px 20px rgb(0 61 85 / 10%);
  border-radius: 0px;
  width: 100%;
  display: inline-block;
}

.grid-item {
  margin-bottom: 15px;
}

.grid-sizer,
.grid-item {
  width: 346px;
}

.service-grid {
  width: calc(100% - 366px);
}

@media screen and (max-width: 1199px) {
  /* 5 columns for larger screens */
  .grid-sizer,
  .grid-item {
    width: 275px !important;
  }

  .service-grid {
    width: calc(100% - 300px) !important;
  }
}

@media screen and (max-width: 991px) {
  /* 5 columns for larger screens */
  .grid-sizer,
  .grid-item {
    width: 350px !important;
  }

  .service-grid {
    width: calc(100% - 2px) !important;
  }

  .col-sm-12 {
    width: 100%;
  }
}

@media screen and (max-width: 750px) {
  /* 5 columns for larger screens */
  .grid-sizer,
  .grid-item {
    width: 100% !important;
  }

  .service-grid {
    width: calc(100%) !important;
    padding-left: 0px;
  }

  .col-sm-12 {
    width: 100%;
  }

  .gridpad {
    padding-left: 15px;
    padding-right: 15px;
  }

  .gridpadno {
    padding-left: 0px !important;
    padding-right: 0px !important;
  }

  .gridpadm {
    padding-left: 15px;
    padding-right: 30px;
  }

  /* keep this ONLY as a mobile fallback, do not override org-left gallery on desktop */
  @media (max-width: 750px) {
    .gallery__container {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
    }
  }

  .gallery__container .gc__item {
    margin-right: 0px;
  }

  .imgmobile {
    width: 100% !important;
  }

  body > section.result > div > div > div.grid.col-sm-12 {
    width: 100% !important;
    max-width: 100% !important;
  }
}
.message_text {
  position: relative;
  font-size: 15px !important;
  --fade-bg: #fff;
}
.message_text.clamped {
  max-height: 370px;
  overflow: hidden;
}
.message_text.clamped::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.6em; /* ≈ half a line */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    var(--fade-bg) 80%
  );
  pointer-events: none;
}

.testimonial__item .message_text {
  font-size: 15px;
  line-height: 1.5;
  margin-top: 6px;
}
.testimonial__item .message_text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: none;
}

.readmore-once {
  align-self: flex-start;
  display: none;
  visibility: visible;
  align-items: center;
  gap: 0.5rem;
  margin: 10px 0;
  background: #51588c;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.06s ease;
}
.readmore-once::after {
  content: "›››";
  letter-spacing: 0.04em;
  font-weight: 500;
  opacity: 0.9;
  margin-left: 7px;
  font-size: 15px;
}
.readmore-once:hover {
  background: #141a4f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.readmore-once:active {
  transform: translateY(1px);
}
.readmore-once:focus {
  outline: 3px solid rgba(29, 35, 107, 0.35);
  outline-offset: 2px;
}
.readmore-once[aria-expanded="true"] {
  background: #fff;
  color: #1b2161;
  border-color: #1b2161;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04);
}
.readmore-once[aria-expanded="true"]::after {
  content: "×";
  font-size: 18px;
  line-height: 1;
  margin-left: 0.25rem;
}
.message_text + .readmore-once {
  margin-top: 10px;
  display: none;
}
.testimonial__item .readmore-once {
  display: none;
}
.video-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

/* default tall ratio until we know better */
.video-wrapper:not([data-auto-img="1"]) {
  aspect-ratio: 9/16;
}
.video-wrapper.is-landscape:not([data-auto-img="1"]) {
  aspect-ratio: 16/9;
}

/* fill the box for any direct media child or Plyr container */
.video-wrapper > video,
.video-wrapper > iframe,
.video-wrapper > .js-player,
.video-wrapper > img,
.video-wrapper > .yt-click,
.video-wrapper > .plyr {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* plain images cover the wrapper */
.video-wrapper img {
  object-fit: cover;
}

/* Plyr poster also covers the wrapper */
.video-wrapper .plyr__poster {
  background-size: cover;
  background-position: center center;
}

/* clicks go to YT iframe */
.video-wrapper iframe {
  pointer-events: auto !important;
}

.plyr__control--overlaid {
  background-color: #1d236b;
  color: #fff;
}
.plyr--video .plyr__controls {
  min-height: 56px;
  padding: 8px 10px;
}
.plyr--full-ui input[type="range"] {
  color: #51588c;
}
.video-wrapper .plyr__video-embed > iframe,
.video-wrapper iframe {
  pointer-events: auto !important;
}

/* External / social videos: natural height (no forced aspect-ratio) */
.video-wrapper.is-auto {
  aspect-ratio: auto !important;
}

/* Undo absolute-fill for auto wrappers (including Plyr) */
.video-wrapper.is-auto > video,
.video-wrapper.is-auto > iframe,
.video-wrapper.is-auto > .js-player,
.video-wrapper.is-auto > img,
.video-wrapper.is-auto > .yt-click,
.video-wrapper.is-auto > .plyr {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

/* Images inside auto wrappers should not crop */
.video-wrapper.is-auto img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
}

.link {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.link.btn {
  text-decoration: none;
}

/* --- Pinterest: no forced aspect-ratio box, no iframe stretching --- */
.pin-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  background: transparent;
  overflow: visible; /* stop clipping */
}

/* Placeholder BEFORE Pinterest injects the iframe */
.pin-embed > a[data-pin-do="embedPin"] {
  display: block;
  width: 100% !important;
  aspect-ratio: 2 / 3; /* temporary placeholder only */
  border-radius: 12px;
  background: #fff;
}

/* Once iframe exists, hide the placeholder so it can't add extra height */
.pin-embed.pin-ready > a[data-pin-do="embedPin"] {
  display: none !important;
}

/* The real Pinterest iframe should be normal-flow and sized by JS */
.pin-embed iframe {
  display: block !important;
  width: 100% !important;
  height: 0 !important; /* JS sets the real px height */
  border: 0 !important;
  border-radius: 12px;
}

.pin-embed iframe {
  max-width: 100% !important;
}

/* keep your overlay working */
.pin-embed .pin-overlay {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 5;
}

.testimonials .row {
  margin-left: 0;
  margin-right: 0;
}
.testimonials .col-12 {
  padding-left: 0;
  padding-right: 0;
}
.testimonials .owl-carousel,
.testimonials .owl-stage-outer,
.testimonials .owl-stage {
  width: 100%;
}
.testimonial__slider .owl-item {
  padding: 0;
}
.testimonial__item {
  width: 100%;
  box-sizing: border-box;
}
.testimonial__item img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 767px) {
  .testimonials .container {
    padding-left: 0;
    padding-right: 0;
  }
}
.testimonials .row {
  margin-left: 0;
  margin-right: 0;
}
.testimonials .col-12 {
  padding-left: 0;
  padding-right: 0;
}
.testimonials .owl-carousel,
.testimonials .owl-stage-outer,
.testimonials .owl-stage {
  width: 100%;
}

/* Equal-height cards in each slide row */
.testimonials .owl-stage {
  display: flex;
}
.testimonial__slider .owl-item {
  display: flex;
}
.testimonial__item {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}
:root {
  --testi-ratio: 16/9;
}
@media (max-width: 1199px) {
  :root {
    --testi-ratio: 3/2;
  }
}

.testimonial__slider .owl-stage {
  display: flex;
  align-items: stretch;
}
.testimonial__slider .owl-item {
  display: flex;
}
.testimonial__item {
  display: flex;
  flex-direction: column;
  height: auto;
}
.testimonial__slider .owl-height {
  height: auto !important;
}

/* Dedicated media wrapper so Owl never collapses the height */
.testimonial__item .testi-media {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.testimonial__item .testi-media > a,
.testimonial__item .testi-media > img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
}

.testimonial__item .testi-media img {
  display: block;
  width: 100% !important;
  height: auto !important;
  background: #fff;
}

/* Fallback for very old browsers without aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
  .testimonial__item .testi-media {
    height: 0;
    padding-top: 56.25%;
  }
}

/* Keep stage wrapper from forcing odd heights */
.testimonials .owl-stage-outer {
  height: auto !important;
}

/* Spacing for text bits */
.testimonial__item .testimonial__author {
  margin-top: 10px;
}
.testimonial__item p {
  margin-top: 6px;
}

/* Title under the image: allow wrapping and keep space for 2 lines */
.testimonial__author__text .h5 {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.3;
  white-space: normal !important;
  word-break: break-word;
}

/* Clean 2-line clamp for modern browsers (prevents clipping by Owl height) */
@supports (-webkit-line-clamp: 2) {
  .testimonial__author__text .h5 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Non-WebKit fallback: cap visual height to ~2 lines */
@supports not (-webkit-line-clamp: 2) {
  .testimonial__author__text .h5 {
    max-height: calc(2 * 1em * 1.3);
  }
}

/* Dots/nav spacing stays tight */
.testimonial__slider .owl-item {
  padding: 0;
}

@media (max-width: 991.98px) {
  .testimonials .container {
    padding-left: 0;
    padding-right: 0;
  }
  .testimonials .row {
    margin-left: 0;
    margin-right: 0;
  }
  .testimonials .col-12 {
    padding-left: 0;
    padding-right: 0;
  }
  .testimonials .owl-carousel,
  .testimonials .owl-stage-outer,
  .testimonials .owl-stage {
    width: 100%;
  }
  .testimonial__slider .owl-item {
    padding: 0;
  }
  .testimonial__item {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
  }
  .testimonial__slider .owl-stage {
    display: flex;
    align-items: stretch;
  }
  .testimonial__slider .owl-item {
    display: flex;
  }
  .testimonial__slider .owl-height {
    height: auto !important;
  }
  .testimonial__item .testi-media {
    position: relative;
    aspect-ratio: var(--testi-ratio);
    border-radius: 12px;
    overflow: hidden;
    flex: 0 0 auto;
  }
  .testimonial__item .testi-media > a,
  .testimonial__item .testi-media > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
  }
  .testimonial__item .testi-media img {
    object-fit: cover;
    height: 100% !important;
    width: 100% !important;
  }
  .testimonial__author__text .h5 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (min-width: 992px) {
  .testimonials .container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .testimonials .row {
    margin-left: -15px !important;
    margin-right: -15px !important;
  }
  .testimonials .col-12 {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .testimonial__slider .owl-stage {
    display: flex;
  }
  .testimonial__slider .owl-item {
    display: flex;
  }
  .testimonial__item {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .testimonial__item .testi-media {
    position: relative;
    aspect-ratio: var(--testi-ratio);
    border-radius: 12px;
    overflow: hidden;
  }
  .testimonial__item .testi-media > a,
  .testimonial__item .testi-media > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .testimonial__item .testi-media img {
    object-fit: contain;
    background: #fff;
  }
  .testimonial__author__text .h5 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

.testimonial__item .testi-body {
  padding: 12px 16px 16px 16px;
}

@media (min-width: 992px) {
  .testimonial__item .testi-body {
    padding: 14px 18px 18px 18px;
  }
}

/* keep the media flush; padding is only in .testi-body */
.testimonial__item .testi-media {
  margin: 0;
}

/* tidy spacing inside the padded area */
.testimonial__item .testimonial__author {
  margin-top: 8px;
}
.testimonial__item .message_text {
  margin-top: 6px;
}
.testimonial__item .readmore-once {
  margin-left: 0;
}
/* --- Natural-height testimonial images, flush to sides --- */
.testimonial__slider .owl-stage,
.testimonials .owl-stage {
  display: block !important;
}

.testimonial__slider .owl-item {
  display: block !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.testimonial__item {
  display: block !important;
}

/* Remove forced aspect-ratio/absolute fill for testimonial media */
.testimonial__item .testi-media {
  position: static !important;
  aspect-ratio: auto !important;
}

.testimonial__item .testi-media > a,
.testimonial__item .testi-media > img {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important; /* keep natural height */
  display: block;
}

.testimonial__item .testi-media img {
  object-fit: initial !important; /* no cropping */
  object-position: center top;
}
.mfp-gallery button.mfp-close {
  width: 40px;
  height: 40px;
  top: 50px;
  right: 10px;
}
/* Image-only cards: no fixed aspect-ratio, keep natural image ratio */
.video-wrapper[data-auto-img="1"] {
  aspect-ratio: auto !important;
  background: transparent;
}

/* Let linked images size naturally, not as full-screen video */
.video-wrapper[data-auto-img="1"] > a {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

/* Image itself: keep original proportions (horizontal, square, vertical) */
.video-wrapper[data-auto-img="1"] img {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important; /* or 'cover' if you prefer cropping */
}
div#videocon {
  width: 100%;
}
/* Layout for the extra "Video of Reel" block */
.extracontainer {
  width: 100%;
  display: flex;
  flex-direction: column; /* default: video above, text below */
  gap: 20px;
}

/* On larger screens: side-by-side ONLY for portrait videos */
@media (min-width: 992px) {
  .extracontainer.is-portrait {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .extracontainer.is-portrait #videocon {
    flex: 0 0 320px;
    max-width: 320px;
  }

  .extracontainer.is-portrait .extratext {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .extracontainer.is-portrait .extratext .message_text {
    margin-top: 0;
  }
}

/* Wrapper uses the generic .video-wrapper aspect-ratio logic */
#videocon .video-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

/* Make sure Plyr can't collapse inside the wrapper */
#videocon .video-wrapper > .plyr,
#videocon .video-wrapper > video,
#videocon .video-wrapper > iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.is-portrait .extratext {
  max-width: 350px;
}

.header img {
  width: 100%;
  height: auto;
  display: block;
}
/* Organisation logo: keep aspect ratio and scale nicely on all screens */
.org_logo {
  max-width: 260px;
  width: 100%;
}

.org_logo img {
  display: block;
  width: 100%;
  height: auto !important; /* prevent vertical distortion */
}

/* Slightly smaller on mobile so it doesn’t dominate */
@media (max-width: 767px) {
  .org_logo {
    max-width: 200px;
  }
}

.gallery__container .gc__item {
  width: 240px;
  margin: 0;
}
.gallery__container .gc__item picture,
.gallery__container .gc__item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* ===============================
   ORGANISATIE – GRIDLESS LAYOUT
   =============================== */

/* Main 2-column layout */
.org-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  width: 100%;
  max-width: 100%;
}

/* Desktop: content left (~66%), timeline right (~34%) */
@media (min-width: 992px) {
  .org-layout {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

/* Neutralise ALL masonry sizing inside new layout */
.org-layout .grid-sizer {
  display: none !important;
}
/* HARD reset legacy masonry sizing INSIDE organisatie page */
.org-layout .grid-sizer,
.org-layout .grid-item,
.org-layout .service-grid {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  margin: 0 !important;
}

/* LEFT column */
.org-left {
  width: 100%;
}

/* RIGHT column timeline: single vertical column */
.org-right {
  width: 100%;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
/* Timeline must NEVER become multi-column */
.timeline-list {
  display: flex;
  flex-direction: column !important;
}

.timeline-list > * {
  width: 100% !important;
}

/* Timeline cards should always be full-width here */
.timeline-list .message,
.timeline-list .grid-item {
  width: 100% !important;
  max-width: 100% !important;
}

/* Load-more button spacing */
.org-right .laadmeer {
  margin-top: 10px;
}

/* Mobile: stack everything naturally */
@media (max-width: 991px) {
  .org-layout {
    grid-template-columns: 1fr;
  }
}
/* ===============================
   LAYOUT: LEFT FLOAT + TIMELINE COLUMNS
   (1 column beside left; 3 columns after left ends)
   =============================== */

.org-wrap::after {
  content: "";
  display: block;
  clear: both;
}

@media (min-width: 992px) {
  .org-left {
    float: left;
    width: 66.666%;
  }

  /* Use CSS columns to mimic Masonry column behavior */
  .org-timeline {
    overflow: hidden; /* makes it sit next to the float */
    column-width: 346px; /* your old tile width */
    column-gap: 20px; /* Masonry gutter */
  }

  .org-timeline .message {
    display: inline-block;
    width: 100%;
    margin: 0 0 15px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
  }

  /* Load more should span full width */
  .org-timeline .laadmeer {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    width: 100%;
    margin-top: 10px;
  }
}

@media (max-width: 991px) {
  .org-left {
    float: none;
    width: 100%;
  }
  .org-timeline {
    column-width: auto;
    column-count: 1;
    column-gap: 0;
  }
  .org-timeline .message {
    display: block;
    width: 100%;
  }
}

/* ===============================
   FOTO GALERIJ: restore ORIGINAL styles from style.css
   (your screenshot shows: 120x90, float left, margins)
   =============================== */

.gallery__container .gc__item {
  height: 90px;
  width: 120px;
  float: left;
  margin-right: 20px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center center;
}
