/* ==========================================================================
   V2 spacing overrides - tighten excessive vertical whitespace
   Built 2026-07-26. Loaded LAST, after Divi's compiled CSS.
   Divi's own stylesheets are untouched; delete this file's <link> to revert.

   TUNING: every gap is a variable below. Raise a number for more breathing
   room, lower it for tighter. Nothing else needs editing.
   ========================================================================== */

:root {
  --v2-image-gap:      25px;  /* was 60px  - above AND below the main image     */
  --v2-row-pad:        25px;  /* was 27px  - top padding of the first row       */
  --v2-module-gap:     25px;  /* was 30px  - under every module (text blocks)   */
  --v2-section-pad:    25px;  /* was 54px  - Divi default section padding       */
  --v2-section-tight:  25px;  /* was 20px  - product pages' second section      */
  --v2-hero-pad:      2vw;  /* was 6vw   - home page hero top padding         */
  --v2-contact-top:    25px;  /* was 100px - contact page top padding           */
  --v2-contact-bot:    25px;  /* was 150px - contact page bottom padding        */
  --v2-whoweare-gap:   25px;  /* was 70px  - who-we-are section bottom margin   */
}

/* --- 1. THE MAIN CULPRIT: 60px hard-coded around the product image ---------
   Only the vertical margins are touched; horizontal auto-centering is kept. */
html body .et_pb_image_0,
html body .et_pb_image_1 {
  margin-top:    var(--v2-image-gap) !important;
  margin-bottom: var(--v2-image-gap) !important;
}

/* --- 2. First row's padding (sits between the nav bar and the image) ------- */
html body .et_pb_row_0.et_pb_row {
  padding-top:    var(--v2-row-pad) !important;
  padding-bottom: var(--v2-row-pad) !important;
}
html body .et_pb_row_1.et_pb_row {
  padding-bottom: var(--v2-row-pad) !important;
}

/* --- 3. Gap under every module - the stack below the image ---------------- */
html body .et_pb_column_0, html body .et_pb_column_1 { padding-top:25px !important; padding-bottom:25px !important; }
html body .et_pb_column .et_pb_module {
  margin-bottom: var(--v2-module-gap) !important;
}
html body .et_pb_gutters3 .et_pb_column .et_pb_module,
html body .et_pb_gutters3.et_pb_row .et_pb_column .et_pb_module {
  margin-bottom: var(--v2-module-gap) !important;
}

/* --- 4. Divi's default 54px section padding ------------------------------- */
html body #main-content .et_pb_section,
html body .et-l--post .et_pb_section {
  padding-top:    var(--v2-section-pad);
  padding-bottom: var(--v2-section-pad);
}

/* --- 5. Product pages: the section holding the description ---------------- */
html body .et_pb_section_1.et_pb_section {
  padding-top:    var(--v2-section-tight) !important;
  padding-bottom: var(--v2-section-tight) !important;
}

/* --- 6. Home page ---------------------------------------------------------- */
html body.home .et_pb_section_0.et_pb_section { padding-top: var(--v2-hero-pad) !important; }
html body.home .et_pb_section_1.et_pb_section {
  padding-top:    var(--v2-section-pad) !important;
  padding-bottom: var(--v2-section-pad) !important;
}
html body.home .et_pb_section_2.et_pb_section {
  padding-top:    var(--v2-section-pad) !important;
  padding-bottom: calc(var(--v2-section-pad) * 1.6) !important;
}

/* --- 7. Contact page (100px top / 150px bottom) --------------------------- */
html body.page-id-284 .et_pb_section_0.et_pb_section {
  padding-top:    var(--v2-contact-top) !important;
  padding-bottom: var(--v2-contact-bot) !important;
}

/* --- 8. Who We Are: 70px trailing margin ---------------------------------- */
html body.page-id-706 .et_pb_section_0.et_pb_section { margin-bottom: var(--v2-whoweare-gap) !important; }
html body.home .et_pb_section_0.et_pb_section { margin-bottom: -0.1% !important; }

/* --- 9. Trim the gap the theme-builder header leaves under the nav -------- */
/* (removed: this trimmed 6px from the header and contradicted "header untouched";
   it also slightly worsened the title/nav-bar collision) */

/* --- 11. HEADER TITLE OVERFLOW FIX -----------------------------------------
   The header section is locked to height:120px (Divi theme-builder), and the
   title carries a 60px top margin. One line of 35px type uses nearly all of
   that 120px, so the moment the title wraps to a second line, the second line
   has nowhere to go: it overflows the section and the nav bar's black
   background paints over it. The title is also right-aligned, which is why the
   escaped word sits at the right rather than centred.

   The title lives in a 3/4-width column of a row that is 80% of the viewport,
   so it wraps below roughly 1450px of window width. Scaling the type down
   below that keeps it on ONE line, which avoids the overflow entirely without
   touching the fixed height or the position:fixed .pre-header background.
   Purely typographic - no structural risk.

   Two independent guards, because widening the window does NOT cure the wrap
   (the row width is capped, so the title column stops growing):

     a) font-size scales with the window and never exceeds the original 35px,
        so the title fits on one line at normal widths;
     b) the title's 60px top margin is reduced to 30px, so that EVEN IF it
        still wraps, two lines fit inside the fixed 120px header instead of
        spilling onto the nav bar.

   (b) is the real safety net - it makes the collision impossible rather than
   merely unlikely. Neither touches the fixed height or the position:fixed
   .pre-header background, so there is no structural risk.

   Confined to >=981px; below that Divi restacks the header itself.

   Tune: if the type looks too small, raise the 2.0vw; if the title still
   wraps AND looks cramped, lower the 30px margin further (10px is safe).    */
@media (min-width: 981px) {
  .et_pb_text_0_tb_header h1 {
    font-size: clamp(16px, 2.0vw, 35px) !important;
    line-height: 1.2 !important;
  }
  .et_pb_text_0_tb_header { margin-top: 30px !important; }
}
html body .et-l--post > .et_pb_section:first-child { padding-top: 0 !important; }

/* --- 10. Mobile: proportionally tighter still ----------------------------- */
@media (max-width: 980px) {
  :root {
    --v2-image-gap:   8px;
    --v2-section-pad: 18px;
    --v2-contact-top: 20px;
    --v2-contact-bot: 24px;
  }
}
