/* One spacing rhythm for the existing homepage modules. */
body.qm-home-black {
  --home-section-space: 48px;
  --home-section-heading-gap: 32px;
  --home-card-gap: 24px;
}
body.qm-home-black :is(#home-selected-projects, #home-capabilities,
  #home-brand-system, #home-industries, #home-service-comparison,
  #home-brand-anchor, #home-perspectives) {
  padding-top: var(--home-section-space) !important;
  padding-bottom: var(--home-section-space) !important;
}
body.qm-home-black :is(#home-selected-projects, #home-capabilities,
  #home-industries, #home-service-comparison, #home-perspectives)
  :is(.qh-head, .qm-capability-header,
  .qm-home-industry-header, .qm-service-header) {
  margin-bottom: var(--home-section-heading-gap) !important;
}
body.qm-home-black :is(#home-selected-projects, #home-capabilities,
  #home-industries, #home-service-comparison, #home-perspectives)
  :is(.qh-projects, .qm-capability-grid,
  .qm-home-industry-grid, .qm-service-grid, .qhp-grid) {
  gap: var(--home-card-gap);
}
body.qm-home-black #home-brand-system .qm-system-feature { margin-bottom: 0; }
body.qm-home-black .elementor-1622 .qm-home-lab-title {
  --padding-top: var(--home-section-space);
  --padding-bottom: 24px;
  padding-top: var(--home-section-space) !important;
  padding-bottom: 24px !important;
}
/* An expanded details panel changes only its own service card's height. */
body.qm-home-black #home-service-comparison .qm-service-grid { align-items: start; }
body.qm-home-black #home-service-comparison .qm-service-option {
  align-self: start;
  height: auto;
  min-height: 0;
}
body.qm-home-black #home-service-comparison .qm-service-image { flex: 0 0 auto; }
body.qm-home-black #home-service-comparison .qm-service-card-content {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
}
body.qm-home-black #home-service-comparison .qm-service-scope { margin-top: 20px; }
@media (max-width: 1100px) {
  body.qm-home-black { --home-card-gap: 20px; }
}
@media (max-width: 760px) {
  body.qm-home-black {
    --home-section-space: 32px;
    --home-section-heading-gap: 24px;
    --home-card-gap: 18px;
  }
  body.qm-home-black #home-service-comparison .qm-service-value { min-height: 0; }
}

/* Selected project spacing: equal gutters and a consistent image-to-title rhythm. */
body.qm-home-black #home-selected-projects .qh-projects { gap:32px; }
body.qm-home-black #home-selected-projects .qh-head { margin-bottom:40px !important; }
body.qm-home-black #home-selected-projects .qh-project-meta { padding:20px 0; gap:20px; }
body.qm-home-black #home-selected-projects .qh-project-meta small { margin-bottom:8px; }
@media(max-width:1100px) {
 body.qm-home-black #home-selected-projects .qh-projects { gap:24px; }
}
@media(max-width:760px) {
 body.qm-home-black #home-selected-projects .qh-projects { row-gap:32px; }
 body.qm-home-black #home-selected-projects .qh-head { margin-bottom:28px !important; }
 body.qm-home-black #home-selected-projects .qh-project-meta { padding:16px 0; }
}
