/* Styles of the rent-widget-page.html post template: hero (title, subtitle, picture) + rent booking widget v2.
   Loaded by partials/section-rent-widget-page-hero.html only. Design tokens come from the Free2move homepage
   prototype (see crh-styles.css, used by the Fleet on Demand page); only what this hero needs is kept here. */

.rwp-root {
  --rwp-ink: #1e0046;
  --rwp-text-2: #4b336b;
  --rwp-sky: #1a5ee8;
  --rwp-radius-card: 24px;
  --rwp-shadow-lift: 0 20px 50px rgba(30, 0, 70, .1), 0 8px 16px -6px rgba(30, 0, 70, .1);
  font-family: -apple-system, Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--rwp-ink);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
.rwp-root :focus-visible { outline: 3px solid var(--rwp-sky); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .rwp-root * { transition: none !important; scroll-behavior: auto !important; }
}
/* anchors of the CMS content scroll smoothly (only on pages using this template) */
html:has(.rwp-root) { scroll-behavior: smooth; }

/* ---- Hero ---- */
/* The hero sits inside the site header, which already provides the violet background.
   The widget opens its calendar and place suggestions below itself: the hero must not clip them, and must stay above
   the CMS content that follows. */
.rwp-hero { position: relative; z-index: 2; color: #fff; }
/* The site header (.crh-hero) clips its content (overflow: hidden, crh-styles.css): on this template it contains the
   widget, whose calendar and place suggestions must be able to overflow onto the CMS content below. */
header.crh-hero:has(.rwp-root) { overflow: visible; }
.rwp-hero-inner { position: relative; z-index: 1; padding: 24px 0 56px; }
.rwp-hero h1 {
  font-weight: 700;
  color: #fff;
  font-size: clamp(2rem, 5vw, 48px);
  line-height: 1.1;
}
.rwp-root .rwp-hero-sub { /* .crh-root p (specificity 0,1,1) would otherwise turn the subtitle dark purple */
  color: rgba(255, 255, 255, .85);
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 34ch;
}
.rwp-hero-media {
  border-radius: var(--rwp-radius-card);
  overflow: hidden;
  box-shadow: var(--rwp-shadow-lift);
  background: rgba(255, 255, 255, .08);
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  display: block;
}
.rwp-widget-col { margin-top: 24px; }

@media (max-width: 991px) {
  .rwp-hero-media { margin-top: 28px; aspect-ratio: 16 / 10; }
}

/* Below 576px Bootstrap's .container is fluid. Keep its side padding (the padding shorthand above resets it):
   without it the .row's negative margins overflow the viewport and the text touches the screen edges. */
@media (max-width: 575.98px) {
  .rwp-hero-inner { padding-left: 15px; padding-right: 15px; }
}

@media (min-width: 992px) {
  .rwp-widget-col { margin-top: 0; }
  /* The widget overlaps the lower part of the hero picture, as in the design. The text column keeps the same space
     below it, so that a long subtitle never ends up behind the widget. */
  .rwp-widget { max-width: 76%; margin-top: -100px; }
  .rwp-hero:not(.rwp-hero--no-picture) .rwp-hero-text { padding-bottom: 100px; }

  /* No picture (none set, or it failed to load): nothing to overlap, so no negative margin (it would cover the
     headline), a wider text column and a widget as wide as the container. */
  .rwp-hero--no-picture .rwp-hero-text { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .rwp-hero--no-picture .rwp-widget { max-width: 100%; margin-top: 0; }
}

/* ---- Widget vs host page ----
   The widget ships a Tailwind reset and utility classes, this site loads Bootstrap, whose utilities are !important.
   Scoped to the widget so they do not leak into the CMS content below the hero. */
.rwp-widget .\@7xl\:mb-0 { margin-bottom: 0 !important; } /* beats Bootstrap's mb-4 / mb-5 on the same blocks */
.rwp-widget .\@7xl\:place-content-end { margin-top: 20px !important; } /* space above the search button when stacked */
.rwp-widget figure { margin: 0; } /* Bootstrap gives figures a bottom margin */
.rwp-widget .ct-day-controls__wrapper,
.rwp-widget .ct-day-selection__names { color: #000 !important; } /* date picker text inherits the white hero color */

/* The widget's Tailwind reset sets img { display: block } on the whole page: it stacks the flags of the header
   language selector above their labels and the app badges of the footer. Restore the default for the site chrome only
   (Bootstrap's d-none / d-block utilities on the logos are !important too, and win on specificity). */
header img:not(.crh-brand-logo),
footer img { display: inline !important; }
