/* QH Photo Cards — defaults match the homepage AI Native / Unified Revenue Team
   / Mobile First cards. Style-tab controls override these via {{WRAPPER}} rules. */

.qhw-pcards{
  --qhw-pc-cols:3;
  --qhw-pc-gap:20px;
  --qhw-pc-oc:#000000A6;
  --qhw-pc-och:#06021D54;
  --qhw-pc-pos:50% 50%;
  display:grid;
  grid-template-columns:repeat(var(--qhw-pc-cols), minmax(0, 1fr));
  gap:var(--qhw-pc-gap);
  width:100%;
}
.qhw-pcard{
  position:relative;
  display:block;
  /* Original ThemeREX cards: min-height 31.3vw (~450px at 1440, ~320px at 1024). */
  min-height:31.3vw !important;
  border-radius:20px;
  overflow:hidden;
  isolation:isolate;
  color:inherit;
  text-decoration:none;
  box-sizing:border-box;
}
a.qhw-pcard:hover,
a.qhw-pcard:focus{
  color:inherit;
  text-decoration:none;
}
/* Photo fills the whole card. Use inset stretch (top/right/bottom/left:0) with
   height:auto so a theme `img { height:auto }` cannot shrink it to the file's
   natural 3:2 ratio — that was leaving the bottom ~40% empty. */
.qhw-pcard__media,
.qhw-pcard__overlay{
  position:absolute !important;
  top:0 !important;
  right:0 !important;
  bottom:0 !important;
  left:0 !important;
  width:auto !important;
  height:auto !important;
  max-width:none !important;
  max-height:none !important;
  pointer-events:none;
}
.qhw-pcard__media{
  z-index:0;
  overflow:hidden;
  display:block;
  margin:0;
}
/* The media wrapper already has a definite size (inset-stretched to the
   card), so height:100% resolves and beats a theme `img { height:auto }`. */
html body.qhw-theme .qhw-pcard .qhw-pcard__media .qhw-pcard__img,
html body.qhw-theme .qhw-pcard .qhw-pcard__img,
.qhw-pcard__img{
  position:absolute !important;
  top:0 !important;
  right:0 !important;
  bottom:0 !important;
  left:0 !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:cover !important;
  object-position:var(--qhw-pc-pos, 50% 50%) !important;
  z-index:0;
  margin:0 !important;
  padding:0 !important;
  border:0;
  display:block;
  pointer-events:none;
  transition:filter .35s ease;
}
.qhw-pcard__overlay{
  z-index:1;
  background-color:var(--qhw-pc-oc);
  transition:background-color .35s ease, background-image .35s ease, opacity .35s ease;
}
.qhw-pcard:hover .qhw-pcard__overlay{
  background-color:var(--qhw-pc-och);
}
.qhw-pcard__text{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  top:auto;
  z-index:2;
  display:block;
  width:auto;
  box-sizing:border-box;
  padding:2.3vw 2.1vw;
  text-align:left;
  /* Padding is also set by the Style tab. The 7px under the subtitle matches
     the original info-box margin so the text sits the same distance from the edge. */
}
.qhw-pcard__title{
  margin:0;
  color:#FFFEFE;
  font-family:var(--qhw-font-head, "Funnel Display", "DM Sans", system-ui, sans-serif);
  font-size:35px;
  font-weight:600;
  line-height:1.214;
  letter-spacing:normal;
}
.qhw-pcard__sub{
  margin:0 0 7px;
  color:#D5D5D5;
  font-family:var(--qhw-font-head, "Funnel Display", "DM Sans", system-ui, sans-serif);
  font-size:18px;
  font-weight:400;
  line-height:1.217;
  letter-spacing:normal;
}

/* Text position: the text block is absolutely placed over the photo. */
.qhw-pc--pos-bottom-left .qhw-pcard__text,
.elementor-widget-qhw-photo-cards:not([class*="qhw-pc--pos-"]) .qhw-pcard__text{
  top:auto; bottom:0; left:0; right:0; text-align:left;
}
.qhw-pc--pos-bottom-center .qhw-pcard__text{
  top:auto; bottom:0; left:0; right:0; text-align:center;
}
.qhw-pc--pos-bottom-right .qhw-pcard__text{
  top:auto; bottom:0; left:0; right:0; text-align:right;
}
.qhw-pc--pos-top-left .qhw-pcard__text{
  top:0; bottom:auto; left:0; right:0; text-align:left;
}
.qhw-pc--pos-top-center .qhw-pcard__text{
  top:0; bottom:auto; left:0; right:0; text-align:center;
}
.qhw-pc--pos-top-right .qhw-pcard__text{
  top:0; bottom:auto; left:0; right:0; text-align:right;
}
.qhw-pc--pos-center .qhw-pcard__text{
  top:50%; bottom:auto; left:0; right:0;
  transform:translateY(-50%);
  text-align:center;
}

/* Overlay on/off and gradient. Default is a flat wash (current look). */
.qhw-pc--overlay- .qhw-pcard__overlay,
.elementor-widget-qhw-photo-cards:not(.qhw-pc--overlay-yes) .qhw-pcard__overlay{
  display:none;
}
.qhw-pc--overlay-yes.qhw-pc--grad-yes .qhw-pcard__overlay{
  background-color:transparent;
  background-image:linear-gradient(to top, var(--qhw-pc-oc) 0%, transparent 70%);
}
.qhw-pc--overlay-yes.qhw-pc--grad-yes .qhw-pcard:hover .qhw-pcard__overlay{
  background-color:transparent;
  background-image:linear-gradient(to top, var(--qhw-pc-och) 0%, transparent 70%);
}

/* Greyscale switcher. High specificity + !important so the site-wide img
   filter in qh-site.css cannot override it. The filter is on the PHOTO only
   (not the title), so text stays readable. */
html body.qhw-theme .qhw-pc--grey-yes .qhw-pcard .qhw-pcard__img,
html body.qhw-theme .qhw-pc--grey-yes .qhw-pcard img.qhw-pcard__img,
html body.qhw-theme .elementor-widget-qhw-photo-cards.qhw-pc--grey-yes .qhw-pcard__img{
  filter:grayscale(1) contrast(1.06) !important;
}
html body.qhw-theme .qhw-pc--grey-yes.qhw-pc--colorhover-yes .qhw-pcard:hover .qhw-pcard__img,
html body.qhw-theme .qhw-pc--grey-yes.qhw-pc--colorhover-yes .qhw-pcard:hover img.qhw-pcard__img,
html body.qhw-theme .elementor-widget-qhw-photo-cards.qhw-pc--grey-yes.qhw-pc--colorhover-yes .qhw-pcard:hover .qhw-pcard__img{
  filter:none !important;
}
html body.qhw-theme .qhw-pc--grey-yes:not(.qhw-pc--colorhover-yes) .qhw-pcard .qhw-pcard__img,
html body.qhw-theme .qhw-pc--grey-yes:not(.qhw-pc--colorhover-yes) .qhw-pcard:hover .qhw-pcard__img,
html body.qhw-theme .qhw-pc--grey-yes:not(.qhw-pc--colorhover-yes) .qhw-pcard img:hover,
html body.qhw-theme .elementor-widget-qhw-photo-cards.qhw-pc--grey-yes:not(.qhw-pc--colorhover-yes) .qhw-pcard:hover .qhw-pcard__img{
  filter:grayscale(1) contrast(1.06) !important;
}
html body.qhw-theme .elementor-widget-qhw-photo-cards:not(.qhw-pc--grey-yes) .qhw-pcard .qhw-pcard__img,
html body.qhw-theme .elementor-widget-qhw-photo-cards:not(.qhw-pc--grey-yes) .qhw-pcard:hover .qhw-pcard__img,
html body.qhw-theme .elementor-widget-qhw-photo-cards:not(.qhw-pc--grey-yes) .qhw-pcard img:hover,
html body.qhw-theme .elementor-widget-qhw-photo-cards:not(.qhw-pc--grey-yes) img.qhw-pcard__img{
  filter:none !important;
}

/* Do not set a competing min-height here — Card height in the Style tab
   (and the 31.3vw default above) is the single source. Only tighten padding
   and the title size on small screens. */
@media (max-width:1023px){
  .qhw-pcards{ --qhw-pc-gap:16px; }
  .qhw-pcard__text{ padding:25px; }
}
@media (max-width:767px){
  .qhw-pcard__title{ font-size:28px; line-height:1.2; }
}