:root {
  --space-section: 1.5rem; /* 24 px */
  --space-block:   2.25rem;/* 36 px */
  --space-text:    1rem;   /* 16 px */
}

/* 0  Main content wrapper (shrinks 90 px → 24 px) ------------------------ */
#content {
  padding-top: var(--space-section) !important;
  padding-bottom: var(--space-section) !important;
}

/* 1  Global sections ------------------------------------------------------ */
section {
  padding-top: var(--space-section) !important;
  padding-bottom: var(--space-section) !important;
}

/* 1.a Header strip (no-top) ---------------------------------------------- */
section.no-top {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: var(--space-text) !important; /* tiny gap under header */
}

.text-fit-wrapper {
  padding-bottom: var(--space-text) !important; /* trims extra air */
}

/* 2  Logical blocks inside a section ------------------------------------- */
.heading-block,
.subtitle,
h1, h2, h3, h4, h5, h6,
.card,
.project-card,
.feature-box,
.de-team-list,
.gallery-item,
.timeline-container,
.custom-section,
.row:not(:last-child) {
  margin-bottom: var(--space-block) !important;
}

/* 3  Text flow ------------------------------------------------------------ */
p,
li {
  margin-bottom: var(--space-text) !important;
}

/* 4  Bootstrap helpers override (pt-5 / pb-5) ----------------------------- */
.pt-5 { padding-top:  var(--space-section) !important; }
.pb-5 { padding-bottom: var(--space-section) !important; }

/* 5  Footer gap ----------------------------------------------------------- */
footer {
  padding: var(--space-section) 0 !important; /* shrink 60px → 24px */
}

.subfooter {
  margin-top: var(--space-block) !important; /* shrink 50px default */
}

/* 6  Utility helpers ------------------------------------------------------ */
.mb-text    { margin-bottom: var(--space-text)    !important; }
.mb-block   { margin-bottom: var(--space-block)   !important; }
.mb-section { margin-bottom: var(--space-section) !important; }

/* 7  Images --------------------------------------------------------------- */
img {
  display: block;
  margin-top:  var(--space-text);
  margin-bottom: var(--space-text);
}

/* 1. Убираем любой transform у заголовков после анимации WOW.js */
.wow.animated.fadeInUp {
  transform: none !important;
}

/* 2. Восстанавливаем субпиксельное сглаживание и единый рендеринг */
.big-heading {
  /* Для WebKit-браузеров */
  -webkit-font-smoothing: subpixel-antialiased;
  /* Для Firefox на macOS */
  -moz-osx-font-smoothing: grayscale;
  /* Оптимизация рендеринга текста */
  text-rendering: optimizeLegibility;
}