/* Original sibling and edge rules adapted to Gutenberg section wrappers. */
.page-sections .tl-block:has(> .topbar) + .tl-block > .txt-individual {
  padding-top: 0;
}
.page-sections
  .tl-block:has(> .topbar)
  + .tl-block
  > :is(.text, .request-banner, .banner.conditions) {
  margin-top: -7rem;
}
@media (min-width: 768px) {
  .page-sections
    .tl-block:has(> .topbar)
    + .tl-block
    > :is(.text, .request-banner, .banner.conditions) {
    margin-top: -10rem;
  }
}
@media (min-width: 1200px) {
  .page-sections
    .tl-block:has(> .topbar)
    + .tl-block
    > :is(.text, .request-banner, .banner.conditions) {
    margin-top: -12rem;
  }
}
.page-sections
  .tl-block:has(> .banner)
  + .tl-block
  > :is(.request:not(.map), .text),
.page-sections
  .tl-block:has(> .request-banner)
  + .tl-block
  > :is(
    .consultation,
    .request-banner,
    .map.request,
    .txt-service,
    .banner.cover
  ),
.page-sections
  .tl-block:has(> .banner.cover)
  + .tl-block
  > :is(.map.consultation, .map.request) {
  margin-top: -12rem;
}
.page-sections .tl-block:has(> .text) + .tl-block > :is(.txt-individual, .text),
.page-sections .tl-block:has(> .txt-individual) + .tl-block > .text,
.page-sections .tl-block:has(> .faq) + .tl-block > .text {
  padding-top: 0;
}
.page-sections .tl-block:has(> .text) + .tl-block > .finance {
  margin-top: 0;
}
.page-sections .tl-block:has(+ .tl-block > .services) > .banner.request-banner,
.page-sections .tl-block:has(+ .tl-block > .choose) > .topbar {
  margin-bottom: 0;
}
.page-sections
  .main
  > .tl-block:last-child
  > :is(.map, .gallery, .ransome, .request-banner) {
  margin-bottom: 0;
}
.page-sections.is-page-light main > .tl-block:first-of-type > .text {
  padding: 10rem 0 7rem;
}
@media (min-width: 768px) {
  .page-sections.is-page-light main > .tl-block:first-of-type > .text {
    padding: 14rem 0 10rem;
  }
}
@media (min-width: 1200px) {
  .page-sections.is-page-light main > .tl-block:first-of-type > .text {
    padding: 18rem 0 12rem;
  }
}

/* Breadcrumbs are one page landmark, independent of Gutenberg section order. */
.app > .tl-page-breadcrumbs {
  position: relative;
  padding: 9rem 0 3rem;
  margin: 0;
  z-index: 3;
}
.app:has(> .main > .tl-block:first-child > :is(.topbar, .topbar-corporative, .lineup, .model, .banner.conditions)) > .tl-page-breadcrumbs {
  position: absolute;
  inset: 9rem 0 auto;
  padding: 0;
}
.tl-breadcrumb-slot { display: none; }
.main > .tl-block:first-child > :is(.topbar, .topbar-corporative, .lineup) > .tl-breadcrumb-slot,
.main > .tl-block:first-child > .model > .model__top > .container-fluid > .tl-breadcrumb-slot {
  display: block;
  min-height: 1.425rem;
  margin-bottom: 3rem;
}
@media (max-width: 767px) {
  .app:has(> .main > .tl-block:first-child > .topbar-corporative) > .tl-page-breadcrumbs {
    top: 23.2rem;
  }
}
@media (min-width: 768px) {
  .app > .tl-page-breadcrumbs { padding-top: 12rem; }
  .app:has(> .main > .tl-block:first-child > :is(.topbar, .topbar-corporative, .lineup, .model, .banner.conditions)) > .tl-page-breadcrumbs { top: 12rem; padding: 0; }
  .main > .tl-block:first-child .tl-breadcrumb-slot { min-height: 1.9rem; }
  .main > .tl-block:first-child > .topbar-corporative > .tl-breadcrumb-slot {
    margin-bottom: 13rem;
  }
}

/* Intro heroes start behind the transparent header in the source design.
   Keep automatic breadcrumbs accessible without inserting a blank header band. */
.app:has(> .main > .tl-block:first-child > .intro) > .tl-page-breadcrumbs {
  position: absolute;
  inset: auto;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Largus's conditions hero keeps its source breadcrumb row inside the
   hero padding; the single automatic landmark overlays that reserved slot. */
.app:has(> .main > .tl-block:first-child > .banner.conditions) > .tl-page-breadcrumbs {
  top: 30rem;
}
.main > .tl-block:first-child > .banner.conditions > .tl-breadcrumb-slot {
  display: block;
  min-height: 1.44rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .main > .tl-block:first-child > .banner.conditions > .tl-breadcrumb-slot {
    min-height: 1.68rem;
  }
}
@media (min-width: 1200px) {
  .app:has(> .main > .tl-block:first-child > .banner.conditions) > .tl-page-breadcrumbs {
    top: 12rem;
  }
}

@media (min-width: 1200px) {
  .main > .tl-block:first-child > .banner.conditions > .tl-breadcrumb-slot {
    min-height: 1.92rem;
    margin-bottom: 13rem;
  }
}

/* Stock filters are a separate section, with the same spacing as other sections. */
.selection {
  padding-top: 7rem;
}
@media (min-width: 768px) {
  .selection { padding-top: 10rem; }
}
@media (min-width: 1200px) {
  .selection { padding-top: 12rem; }
}

/* A hero followed by editorial text needs one shared gap, not two stacked gaps. */
.page-sections .tl-block:has(> .intro):has(+ .tl-block > .text) > .intro {
  margin-bottom: 0;
}
.page-sections .tl-block:has(> .intro) + .tl-block > .text {
  padding-top: clamp(32px, 4vw, 56px);
}

/* Documents and stock without a hero follow the sticky header directly. */
.app:has(> .main > .tl-special-stock:first-child) > .tl-page-breadcrumbs,
.app:has(> .main > #legal-document) > .tl-page-breadcrumbs,
.app:has(> .main > .tl-block:first-child > .docs) > .tl-page-breadcrumbs {
  padding: 24px 0 0;
}
.app:has(> .main > .tl-special-stock:first-child) > .tl-page-breadcrumbs .breadcrumbs__link,
.app:has(> .main > #legal-document) > .tl-page-breadcrumbs .breadcrumbs__link,
.app:has(> .main > .tl-block:first-child > .docs) > .tl-page-breadcrumbs .breadcrumbs__link {
  color: #5b6770;
}
.app:has(> .main > .tl-special-stock:first-child) > .tl-page-breadcrumbs .breadcrumbs__menu > li::after,
.app:has(> .main > #legal-document) > .tl-page-breadcrumbs .breadcrumbs__menu > li::after,
.app:has(> .main > .tl-block:first-child > .docs) > .tl-page-breadcrumbs .breadcrumbs__menu > li::after {
  background-image: none;
  width: 5px;
  height: 5px;
  border-top: 1px solid #a6adb5;
  border-right: 1px solid #a6adb5;
  transform: translateY(-50%) rotate(45deg);
}
.page-sections.is-page-light main > #legal-document.tl-block:first-of-type > .text {
  padding: 24px 0 56px;
}

/* The credit-document page has a compact heading panel below its breadcrumbs. */
.page-sections .main > .tl-block:first-child > .docs {
  padding-top: 0;
}
.page-sections .main > .tl-block:first-child > .docs .docs__head {
  padding: 24px 0 40px;
  margin-bottom: 40px;
}

/* Keep offer headings legible over the shared city background. */
.cars__item-preview-back::after,
.calc__check-item-back::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .94), rgba(255, 255, 255, .72) 35%, transparent 75%);
  pointer-events: none;
}

/* Keep the banner photograph clear when the slide stacks on smaller screens. */
@media (max-width: 1199px) {
  .intro__slide-gift {
    display: none;
  }
}
