/*
 * MOBILE VIEWPORT + CONTROLLED SECTION TRANSITIONS — V79.6
 *
 * Phone only. Desktop keeps the established JavaScript transition engine.
 * Dynamic viewport units keep every chapter equal to the visible phone area.
 * JavaScript owns vertical chapter transitions, exactly as on desktop.
 */
@media (max-width: 1023px) {
  html[data-home-snap-ready="true"] {
    scroll-snap-type: none !important;
    scroll-padding-top: 0 !important;
    overscroll-behavior-y: contain !important;
  }

  body[data-home-architecture="v1"] {
    overscroll-behavior-y: contain !important;
  }

  body[data-home-architecture="v1"] [data-home-section] {
    scroll-snap-align: none !important;
    scroll-snap-stop: normal !important;
    scroll-margin-top: 0 !important;
    touch-action: pan-x pinch-zoom !important;
  }

  body[data-home-architecture="v1"] [data-home-section="hero"] {
    height: calc(100dvh - var(--home-header-bottom)) !important;
    min-height: calc(100dvh - var(--home-header-bottom)) !important;
    max-height: calc(100dvh - var(--home-header-bottom)) !important;
  }

  body[data-home-architecture="v1"] [data-home-section]:not([data-home-section="hero"]) {
    height: calc(100dvh - var(--home-header-bottom)) !important;
    min-height: calc(100dvh - var(--home-header-bottom)) !important;
    max-height: calc(100dvh - var(--home-header-bottom)) !important;
    overflow: hidden !important;
  }

  /* The chapter background starts below the header. Its useful content starts
     below the two fixed action rows, so neither filters nor cards are hidden. */
  body[data-home-architecture="v1"] [data-home-section="events"] {
    padding-top: calc(var(--home-content-top) - var(--home-header-bottom) + var(--events-top-gap)) !important;
  }

  body[data-home-architecture="v1"] [data-home-section="guide"] {
    padding-top: calc(var(--home-content-top) - var(--home-header-bottom) + var(--guide-top-gap)) !important;
  }

  body[data-home-architecture="v1"] [data-home-section="news"] {
    padding-top: calc(var(--home-content-top) - var(--home-header-bottom) + 12px) !important;
  }

  body[data-home-architecture="v1"] [data-home-section="reports"] {
    padding-top: calc(var(--home-content-top) - var(--home-header-bottom) + var(--reports-top-gap)) !important;
  }

  body[data-home-architecture="v1"] [data-home-section="footer"] {
    padding-top: calc(var(--home-content-top) - var(--home-header-bottom) + 18px) !important;
  }

  /* Horizontal catalogues keep their native gesture. They never become a
     second vertical page scroller competing with the section navigation. */
  body[data-home-architecture="v1"] [data-home-guide-grid],
  body[data-home-architecture="v1"] .home-event-single-carousel,
  body[data-home-architecture="v1"] .home-editorial-carousel {
    touch-action: pan-x pinch-zoom !important;
    overscroll-behavior-x: contain !important;
    overscroll-behavior-y: none !important;
  }
}

@supports not (height: 100dvh) {
  @media (max-width: 1023px) {
    body[data-home-architecture="v1"] [data-home-section="hero"] {
      height: calc(100vh - var(--home-header-bottom)) !important;
      min-height: calc(100vh - var(--home-header-bottom)) !important;
      max-height: calc(100vh - var(--home-header-bottom)) !important;
    }

    body[data-home-architecture="v1"] [data-home-section]:not([data-home-section="hero"]) {
      height: calc(100vh - var(--home-header-bottom)) !important;
      min-height: calc(100vh - var(--home-header-bottom)) !important;
      max-height: calc(100vh - var(--home-header-bottom)) !important;
    }
  }
}
