/* Wider Discover layout only. The approved phone composition remains untouched.
   Specificity intentionally survives the preserved client's lazy route CSS. */
@media (min-width: 640px) {
  html .integrated-discovery.hero-search-option-c:has(.home-flow) {
    --home-wide-width: 1280px;
    --home-wide-hero-height: clamp(660px, calc(100svh - 140px), 860px);
  }

  html .integrated-discovery.hero-search-option-c .id-page:has(.home-flow) {
    width: 100%;
    max-width: var(--home-wide-width);
    /* Retain the existing single page scroller and reserved fixed-nav height. */
    height: calc(100dvh - 63px - env(safe-area-inset-bottom));
    overflow-x: clip;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  html .integrated-discovery.hero-search-option-c:has(.home-flow) .id-bottom-nav {
    width: 100%;
    max-width: var(--home-wide-width);
  }
  html .integrated-discovery.hero-search-option-c:has(.home-flow) .id-bottom-nav ul {
    max-width: 1100px;
    margin-inline: auto;
  }

  html .integrated-discovery.hero-search-option-c .home-flow .riviera-mobile-photo-hero {
    width: 100%;
    max-width: none;
    min-height: var(--home-wide-hero-height);
    margin-inline: 0;
  }
  html .integrated-discovery.hero-search-option-c .home-flow .riviera-mobile-photo-hero > .absolute img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    /* The original is portrait photography: a central crop retains the lantern,
       umbrella pine and yachts instead of the old phone-specific sky offset. */
    object-position: 50% 30% !important;
    transform: none;
  }
  html .integrated-discovery.hero-search-option-c .home-flow .riviera-mobile-photo-hero > .container-page {
    width: 100%;
    max-width: none;
    min-height: var(--home-wide-hero-height);
    padding: 32px 32px 40px;
    gap: 24px;
  }
  html .integrated-discovery.hero-search-option-c .home-flow .riviera-mobile-photo-hero .riviera-hero-mark {
    --reference-logo-width: 240px;
    padding: 0;
    gap: 10px;
    transform: none;
  }
  html .integrated-discovery.hero-search-option-c .home-flow .riviera-hero-mark__strapline {
    margin-top: 2px;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.3;
    transform: none;
  }
  html .integrated-discovery.hero-search-option-c .home-flow .home-weather-slot {
    width: 100%;
    max-width: 640px;
    margin: auto auto 0;
  }

  html .integrated-discovery.hero-search-option-c .home-flow .home-sheet {
    padding-inline: 16px;
  }
  html .integrated-discovery.hero-search-option-c .home-flow .home-sheet > nav > .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }
  html .integrated-discovery.hero-search-option-c .home-flow .snap-x {
    scroll-padding-inline: 20px;
  }
}

/* A short landscape tablet needs a lower scene crop to retain the boats. */
@media (min-width: 640px) and (max-width: 1099px) and (min-aspect-ratio: 1/1) {
  html .integrated-discovery.hero-search-option-c .home-flow .riviera-mobile-photo-hero > .absolute img {
    object-position: 50% 46% !important;
  }
  html .integrated-discovery.hero-search-option-c .home-flow .riviera-hero-mark__strapline {
    /* Keep the original teal lettering legible where this crop meets the pine. */
    text-shadow: 0 0 2px #fffdf5, 0 0 5px #fffdf5;
  }
}

@media (min-width: 1100px) {
  html .integrated-discovery.hero-search-option-c .home-flow .home-sheet > nav > .grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  html .integrated-discovery.hero-search-option-c .home-flow .riviera-mobile-photo-hero > .absolute img {
    object-position: 50% 42% !important;
  }
  html .integrated-discovery.hero-search-option-c .home-flow .riviera-mobile-photo-hero > .container-page {
    padding-top: 64px;
  }
}
