/* QH Testimonials Grid: card look copied from the homepage Customer Stories card
   (glass card, 20px radius, DM Sans quote, Funnel Display name/role). */
.qhw-tgrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:30px;
  width:min(1194px,100%);
  margin:0 auto;
  box-sizing:border-box;
}
.qhw-tgrid *,
.qhw-tgrid *::before,
.qhw-tgrid *::after{box-sizing:border-box}
.qhw-tgrid > .qhw-tcard:last-child:nth-child(odd){
  grid-column:1 / -1;
  justify-self:center;
  width:calc(50% - 15px);
}
.qhw-tcard{
  display:flex;
  flex-direction:column;
  gap:30px;
  min-width:0;
  padding:50px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:var(--qhw-card-radius,20px);
  background:linear-gradient(180deg,rgba(18,18,18,.55),rgba(255,255,255,.05));
  box-shadow:0 24px 64px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.14);
  -webkit-backdrop-filter:blur(22px) saturate(1.15);
  backdrop-filter:blur(22px) saturate(1.15);
  transition:background .3s,border .3s,box-shadow .3s,transform .4s;
}
.qhw-tcard:hover{
  border-color:rgba(255,255,255,.28);
  transform:translateY(-3px);
  box-shadow:0 28px 70px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.22);
}
.qhw-tcard__media{width:100%}
.qhw-tcard__media .e-hosted-video{
  position:relative;
  width:100%;
  aspect-ratio:16 / 9;
}
.qhw-tcard__media video{
  display:block;
  width:100% !important;
  height:100% !important;
  object-fit:cover;
  cursor:pointer;
}
.qhw-tcard__media video[controls]{cursor:auto}
.qhw-tcard__media .mejs-container,
.qhw-tcard__media .mejs-inner,
.qhw-tcard__media .mejs-mediaelement,
.qhw-tcard__media .mejs-layers,
.qhw-tcard__media .mejs-poster{
  width:100% !important;
  height:100% !important;
}
.qhw-tcard__media .mejs-poster-img{
  width:100% !important;
  height:100% !important;
  object-fit:cover;
}
.qhw-tcard__media .mejs-controls,
.qhw-tcard__media .mejs-overlay-play,
.qhw-tcard__media .mejs-overlay-button,
.qhw-tcard__media .mejs-offscreen{
  display:none !important;
}
.qhw-tcard__media img{
  display:block;
  width:100%;
  height:auto;
}
.qhw-tcard__body{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:20px;
  flex:1 1 auto;
  min-width:0;
}
.qhw-theme .qhw-tcard__logo{
  display:block;
  width:auto;
  height:auto;
  max-width:60%;
  max-height:40px;
  filter:none !important;
}
.qhw-tcard__body .qhw-custlogo{align-self:flex-start}
.qhw-tcard__quote{
  flex:1 0 auto;
  width:100%;
  margin:0 0 10px;
  color:#c8c8c8;
  font:400 25px/36px var(--qhw-font-body,"DM Sans",system-ui,sans-serif);
  overflow-wrap:anywhere;
}
.qhw-tcard__name,
.qhw-tcard__role{
  margin:0;
  color:#fff;
  font-family:var(--qhw-font-head,"Funnel Display","DM Sans",system-ui,sans-serif);
  font-weight:500;
  letter-spacing:normal;
  text-transform:none;
}
.qhw-tcard__who{width:100%}
.qhw-tcard__name{font-size:18px;line-height:1.217;margin-bottom:5px}
.qhw-tcard__role{font-size:16px;line-height:1.263}
@media (max-width:1024px){
  .qhw-tcard{padding:var(--qhw-card-pad,30px);gap:24px}
  .qhw-tcard__quote{font-size:20px;line-height:30px}
}
@media (max-width:767px){
  .qhw-tgrid{grid-template-columns:minmax(0,1fr);gap:24px}
  .qhw-tgrid > .qhw-tcard:last-child:nth-child(odd){grid-column:auto;justify-self:stretch;width:auto}
  .qhw-tcard__quote{font-size:25px;line-height:36px}
}
@media (prefers-reduced-motion:reduce){
  .qhw-tcard{transition:none}
  .qhw-tcard:hover{transform:none}
}

/* Full colour while a testimonial video plays (class set by qh-site.js) */
.qhw-theme .qhw-tcard.is-playing video,
.qhw-theme .qhw-tcard.is-playing .mejs-poster-img,
.qhw-theme .qhw-tcard.is-playing img.qhw-screen{
  -webkit-filter:none !important;
  filter:none !important;
}
.qhw-theme .qhw-tcard video,
.qhw-theme .qhw-tcard .mejs-poster-img{
  transition:filter .5s ease,-webkit-filter .5s ease;
}

/* The theme's media player (mejs) gets the greyscale too, so clear it on the whole media block */
.qhw-theme .qhw-tcard.is-playing .qhw-tcard__media,
.qhw-theme .qhw-tcard.is-playing .qhw-tcard__media *{
  -webkit-filter:none !important;
  filter:none !important;
}
/* Native controls take over once a video has started */
.qhw-theme .qhw-tcard.has-controls .qhw-pause{display:none !important}
/* A dark uploaded logo is turned white so it stays visible on the dark card */
.qhw-theme .qhw-tcard__logo.qhw-tcard__logo--dark{
  -webkit-filter:brightness(0) invert(1) !important;
  filter:brightness(0) invert(1) !important;
}

/* Logo hover effect off: the logo looks identical hovered or not (card hover or logo hover) */
body.qhw-theme .qhw-tgrid .qhw-tcard .qhw-tcard__logo.qhw-tcard__logo.qhw-tcard__logo:hover,
body.qhw-theme .qhw-tgrid .qhw-tcard:hover .qhw-tcard__logo.qhw-tcard__logo.qhw-tcard__logo{
  -webkit-filter:none !important;
  filter:none !important;
  transform:none !important;
  opacity:1 !important;
}
body.qhw-theme .qhw-tgrid .qhw-tcard .qhw-tcard__logo.qhw-tcard__logo.qhw-tcard__logo.qhw-tcard__logo--dark:hover,
body.qhw-theme .qhw-tgrid .qhw-tcard:hover .qhw-tcard__logo.qhw-tcard__logo.qhw-tcard__logo.qhw-tcard__logo--dark{
  -webkit-filter:brightness(0) invert(1) !important;
  filter:brightness(0) invert(1) !important;
}

/* Every logo: same fixed height as the Horizon logo, width auto, aspect kept, left aligned */
body.qhw-theme .qhw-tgrid .qhw-tcard__body .qhw-tcard__logo.qhw-tcard__logo{
  display:block;
  height:30px;
  max-height:none;
  width:auto;
  max-width:100%;
  object-fit:contain;
  object-position:left center;
  align-self:flex-start;
}
