/* Shared spacing roles for ordinary site pages. Publication facsimiles are excluded. */
:root{
  --ap-rhythm-chapter:96px;
  --ap-rhythm-heading:44px;
  --ap-rhythm-row:24px;
  --ap-rhythm-before-rule:52px;
  --ap-rhythm-after-rule:44px;
}

/* B2B, garden and service pages: the gap across every chapter rule is one unit. */
body.b2b-page main > :is(.b2b-section,.farm-section,.svc-section){padding-bottom:var(--ap-rhythm-after-rule)}
body.b2b-page main > :is(.b2b-section,.farm-section,.svc-section):nth-child(n+3) > .b2b-shell:first-child{padding-top:var(--ap-rhythm-before-rule)}
body.b2b-page main :is(.b2b-heading,.farm-heading,.svc-heading){margin-bottom:var(--ap-rhythm-heading)}

/* Company pages use the same chapter and heading-to-content distances. */
body.company-page main .co-section{padding-top:var(--ap-rhythm-chapter)}
body.company-page main .co-section-head{margin-bottom:var(--ap-rhythm-heading)}
body.about-story main :is(.as-purpose,.as-science,.as-people,.as-exchange,.as-close){padding-top:var(--ap-rhythm-chapter);padding-bottom:var(--ap-rhythm-chapter)}
body.about-story main .as-people header{margin-bottom:var(--ap-rhythm-heading)}
body.faq-page main .faq-group{margin-top:80px}
body.faq-page main .faq-group h2{margin-bottom:32px}
body.partnerstvo-page main .partnerstvo-page > section{padding-top:var(--ap-rhythm-chapter);padding-bottom:var(--ap-rhythm-chapter)}
body.partnerstvo-page main .partnerstvo-page > section h2{margin-bottom:32px}
body.partners-page main .partner-intro{padding-bottom:var(--ap-rhythm-before-rule)}
body.partners-page main .organizations{padding-top:var(--ap-rhythm-after-rule)}
body.reviews-page main #cases{padding-top:var(--ap-rhythm-chapter)}
body.reviews-page main :is(#reviews,#cases) > h2{margin-bottom:var(--ap-rhythm-heading)}

/* Catalogue chapters keep their rule, but share one combined space around it. */
body.catalog-product-view main .cat-section{margin-top:var(--ap-rhythm-before-rule);padding-top:var(--ap-rhythm-after-rule)}
body.catalog-product-view main .cat-product-nav + .cat-section{margin-top:0;padding-top:var(--ap-rhythm-heading)}
body.catalog-product-view main .cat-section-heading{margin-bottom:var(--ap-rhythm-heading)}

/* Media, reading and knowledge-base chapters. Card internals are untouched. */
body.knowledge-page main .video-shell > .culture-entry{margin-bottom:var(--ap-rhythm-chapter)}
body.knowledge-page main .ap-video-archive{margin-top:var(--ap-rhythm-before-rule);padding-top:var(--ap-rhythm-after-rule)}
body.knowledge-reader main .reading-head{margin-bottom:var(--ap-rhythm-heading)}
body.knowledge-reader main .reading-related{margin-top:var(--ap-rhythm-before-rule);padding-top:var(--ap-rhythm-after-rule)}
body.knowledge-reader main .reading-related > h2{margin-bottom:var(--ap-rhythm-heading)}
body.knowledge-reader main .reading-content :is(h2,h3,h4){margin-top:var(--ap-rhythm-before-rule)}
body[data-basepath="/base"] .agro-section-heading{margin-top:var(--ap-rhythm-chapter);margin-bottom:var(--ap-rhythm-heading)}
body[data-basepath="/base"] .agro-section-heading h2{margin:0}
body[data-basepath="/base"] .agro-related-materials{margin-top:var(--ap-rhythm-before-rule);padding-top:var(--ap-rhythm-after-rule)}

/* The calendar and solution builder have distinct interactive layouts. */
body.ag-calendar-page main :is(.season,.procurement,.calculator,.knowledge){padding-top:calc(var(--ap-rhythm-chapter)/2);padding-bottom:calc(var(--ap-rhythm-chapter)/2)}
body.ag-calendar-page main .knowledge:last-of-type{padding-bottom:70px}
body[data-ap-page="solution"] main .homeplants{padding-top:var(--ap-rhythm-chapter)}
body[data-ap-page="solution"] main .homeplants h2{margin-top:0}

/* Legal texts and culture lists retain their document/card structure. */
body.company-page main > article :is(h2,h3){margin-top:var(--ap-rhythm-before-rule);margin-bottom:var(--ap-rhythm-row)}
body.knowledge-page main .culture-hub .culture-entry{margin-bottom:var(--ap-rhythm-before-rule)}

@media(min-width:761px) and (max-width:1023px){
  :root{
    --ap-rhythm-chapter:88px;
    --ap-rhythm-heading:40px;
    --ap-rhythm-before-rule:48px;
    --ap-rhythm-after-rule:40px;
  }
}

@media(max-width:760px){
  :root{
    --ap-rhythm-chapter:72px;
    --ap-rhythm-heading:32px;
    --ap-rhythm-row:20px;
    --ap-rhythm-before-rule:40px;
    --ap-rhythm-after-rule:32px;
  }
  body.faq-page main .faq-group{margin-top:64px}
  body.faq-page main .faq-group h2{margin-bottom:24px}
  body.partnerstvo-page main .partnerstvo-page > section h2{margin-bottom:24px}

  /* Bring the field photo and the three route links into view sooner. */
  body.b2b-page main #top.b2b-hero{padding-top:96px}
  body.b2b-page main .b2b-breadcrumb{margin-bottom:20px}
  body.b2b-page main #top .b2b-kicker{margin-bottom:12px}
  body.b2b-page main .b2b-hero-lead{margin-top:18px;margin-bottom:20px}
  body.b2b-page main .b2b-hero-caption{margin-top:16px}
  body.b2b-page main .b2b-hero-image{height:260px;margin-top:16px}
  body.b2b-page main .farm-hero-routes a,
  body.b2b-page main .farm-hero-routes a+a{min-height:0;padding:14px 0}
}

@media print{
  :root{--ap-rhythm-chapter:48px;--ap-rhythm-heading:24px;--ap-rhythm-before-rule:24px;--ap-rhythm-after-rule:24px}
}
