/*
 * HISOLIT sitewide spacing optimization — 2026-10-14
 * Purpose: reduce oversized vertical gaps between consecutive content sections.
 * Keeps hero, CTA, enquiry, navigation, footer, card geometry and content intact.
 */
:root {
  --hisolit-section-space-compact: clamp(38px, 3.8vw, 54px);
  --hisolit-section-space-compact-mobile: 34px;
}

/* Content sections only: keep dedicated hero/CTA/form components unchanged. */
html body:not(#_) :is(
  section.section,
  section.seo-v21-section,
  section.page-section,
  section.content-section,
  section.section--alt,
  section.trust,
  section.proofbar,
  section.brand-band,
  section.platform-band,
  section.logo-band
):not(.hero):not(.page-hero):not(.hero-wrapper):not(.authority-hero):not(.seo-v21-hero):not(.cta):not(.cta-band):not(.platform-enquiry) {
  padding-top: var(--hisolit-section-space-compact) !important;
  padding-bottom: var(--hisolit-section-space-compact) !important;
}

/* Tighten the gap from section intro text to its cards/list without crowding. */
html body:not(#_) section :is(.head, .section-head, .intro) {
  margin-bottom: 24px !important;
}
html body:not(#_) section :is(.head, .section-head) {
  gap: clamp(14px, 2vw, 24px) !important;
}

@media (max-width: 980px) {
  html body:not(#_) :is(
    section.section,
    section.seo-v21-section,
    section.page-section,
    section.content-section,
    section.section--alt,
    section.trust,
    section.proofbar,
    section.brand-band,
    section.platform-band,
    section.logo-band
  ):not(.hero):not(.page-hero):not(.hero-wrapper):not(.authority-hero):not(.seo-v21-hero):not(.cta):not(.cta-band):not(.platform-enquiry) {
    padding-top: 42px !important;
    padding-bottom: 42px !important;
  }
}

@media (max-width: 720px) {
  html body:not(#_) :is(
    section.section,
    section.seo-v21-section,
    section.page-section,
    section.content-section,
    section.section--alt,
    section.trust,
    section.proofbar,
    section.brand-band,
    section.platform-band,
    section.logo-band
  ):not(.hero):not(.page-hero):not(.hero-wrapper):not(.authority-hero):not(.seo-v21-hero):not(.cta):not(.cta-band):not(.platform-enquiry) {
    padding-top: var(--hisolit-section-space-compact-mobile) !important;
    padding-bottom: var(--hisolit-section-space-compact-mobile) !important;
  }
  html body:not(#_) section :is(.head, .section-head, .intro) {
    margin-bottom: 20px !important;
  }
  html body:not(#_) section :is(.head, .section-head) {
    gap: 12px !important;
  }
}

@media (max-width: 420px) {
  html body:not(#_) :is(
    section.section,
    section.seo-v21-section,
    section.page-section,
    section.content-section,
    section.section--alt,
    section.trust,
    section.proofbar,
    section.brand-band,
    section.platform-band,
    section.logo-band
  ):not(.hero):not(.page-hero):not(.hero-wrapper):not(.authority-hero):not(.seo-v21-hero):not(.cta):not(.cta-band):not(.platform-enquiry) {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body:not(#_) * {
    scroll-behavior: auto !important;
  }
}
