/*
 * DICHANA v8.5.76 — Eight-Page Effective Top-Gap Correction
 * Working source: v8.5.75, retaining cumulative v8.5.74 corrections.
 *
 * Root cause corrected:
 * v8.5.75 still used 124–134px top padding, very close to v8.5.70's
 * 122–154px range. Because these pages already reserve header space,
 * the visible result was negligible. v8.5.76 controls the effective gap
 * after the header reserve instead of recreating a second large offset.
 */

body.hero-top-balance-v8576 {
  --dcn-v8576-hero-top: clamp(34px, 2.6vw, 48px);
  --dcn-v8576-hero-bottom: clamp(52px, 4.2vw, 70px);
  --dcn-v8576-scroll-offset: 108px;
}

/* Exact eight-page hero sections. */
html body.hero-top-balance-v8576.product-library-redesign-v8556.product-library-ux-v8559.product-library-hero-compact-v8560
main.product-library-page > section.product-library-hero,
html body.hero-top-balance-v8576.phase1-batch4-v8550.production-content-v8550
main.process-content-v8561 > section.batch4-page-hero,
html body.hero-top-balance-v8576.factory-standard-v8562.phase1-batch4-v8550
main.standard-v8562 > section.standard-v8562-hero,
html body.hero-top-balance-v8576.blog-v8563.production-content-v8550
main.production-content-v8550 > section.blog-hero-v8563,
html body.hero-top-balance-v8576.phase1-batch2-v8547.production-content-v8550
main.service-detail-page-v8547 > section.page-hero.batch2-page-hero {
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: auto !important;
  padding-top: var(--dcn-v8576-hero-top) !important;
  padding-bottom: var(--dcn-v8576-hero-bottom) !important;
  margin-top: 0 !important;
  justify-content: flex-start !important;
  align-content: flex-start !important;
}

/* Release legacy height/centering from the actual hero grids. */
html body.hero-top-balance-v8576.product-library-redesign-v8556
section.product-library-hero > .container.product-library-hero-grid,
html body.hero-top-balance-v8576.phase1-batch4-v8550
section.batch4-page-hero > .container.batch4-hero-grid,
html body.hero-top-balance-v8576.factory-standard-v8562
section.standard-v8562-hero > .container.standard-v8562-hero-grid,
html body.hero-top-balance-v8576.phase1-batch2-v8547
section.page-hero.batch2-page-hero > .container.batch2-hero-grid {
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: auto !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
  align-items: center !important;
  align-content: center !important;
}

html body.hero-top-balance-v8576.blog-v8563
section.blog-hero-v8563 > .container {
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: auto !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Remove offsets from the first visible content itself. */
html body.hero-top-balance-v8576 .product-library-hero-copy,
html body.hero-top-balance-v8576 .batch4-hero-copy,
html body.hero-top-balance-v8576 .standard-v8562-hero-copy,
html body.hero-top-balance-v8576 .blog-hero-v8563 > .container,
html body.hero-top-balance-v8576 .batch2-hero-copy {
  margin-top: 0 !important;
  padding-top: 0 !important;
  transform: none !important;
}

html body.hero-top-balance-v8576 :is(
  .product-library-hero-visual,
  .batch4-hero-visual,
  .standard-v8562-hero-gallery,
  .batch2-hero-visual
) {
  margin-top: 0 !important;
  transform: none !important;
}

@media (max-width: 1120px) {
  body.hero-top-balance-v8576 {
    --dcn-v8576-hero-top: calc(38px + env(safe-area-inset-top));
    --dcn-v8576-hero-bottom: 54px;
    --dcn-v8576-scroll-offset: calc(94px + env(safe-area-inset-top));
  }
}

@media (max-width: 760px) {
  body.hero-top-balance-v8576 {
    --dcn-v8576-hero-top: calc(26px + env(safe-area-inset-top));
    --dcn-v8576-hero-bottom: 42px;
    --dcn-v8576-scroll-offset: calc(82px + env(safe-area-inset-top));
  }

  html body.hero-top-balance-v8576.product-library-redesign-v8556
  section.product-library-hero > .container.product-library-hero-grid,
  html body.hero-top-balance-v8576.phase1-batch4-v8550
  section.batch4-page-hero > .container.batch4-hero-grid,
  html body.hero-top-balance-v8576.factory-standard-v8562
  section.standard-v8562-hero > .container.standard-v8562-hero-grid,
  html body.hero-top-balance-v8576.phase1-batch2-v8547
  section.page-hero.batch2-page-hero > .container.batch2-hero-grid {
    align-items: stretch !important;
    align-content: flex-start !important;
  }
}

@media (max-width: 430px) {
  body.hero-top-balance-v8576 {
    --dcn-v8576-hero-top: calc(22px + env(safe-area-inset-top));
    --dcn-v8576-hero-bottom: 38px;
  }
}

body.hero-top-balance-v8576 main [id] {
  scroll-margin-top: var(--dcn-v8576-scroll-offset);
}
