/* Responsive polish for the public site (loaded after the other global sheets). Everything here applies only below the desktop
   breakpoints or on touch screens, so the layout at 1280px and above is exactly what it was before. Colours and fonts are unchanged. */

/* ---------- phones: readable text ---------- */
@media (width < 744px) {
  body:not(.panel-page) .text--body,
  body:not(.panel-page) .text--body-medium { font-size: 16px; line-height: 1.5; }
  body:not(.panel-page) .text--footnote { font-size: 14px; line-height: 1.45; }
  body:not(.panel-page) .jb-posted,
  body:not(.panel-page) .jb-tag { font-size: 14px; }
}

/* ---------- touch screens and tablets: comfortable tap targets (44px) ---------- */
@media (width < 1100px), (pointer: coarse) {
  body:not(.panel-page) .rs-nav__logo { display: inline-flex; align-items: center; min-height: 44px; }
  body:not(.panel-page) .footer__social-link { width: 44px; height: 44px; }
  body:not(.panel-page) .footer__bottom .footer__link { display: inline-flex; align-items: center; min-height: 44px; }
  body:not(.panel-page) .footer__column-list { gap: 0; }
  body:not(.panel-page) .footer__column-list .footer__link { display: inline-flex; align-items: center; min-height: 44px; }
  /* hero / carousel pause buttons: keep the look, enlarge the area that reacts to a tap */
  body:not(.panel-page) .homepage-hero__controls,
  body:not(.panel-page) .king-carousel__toolbar-button { position: relative; }
  body:not(.panel-page) .homepage-hero__controls::after,
  body:not(.panel-page) .king-carousel__toolbar-button::after { content: ""; position: absolute; inset: -8px; }
  /* Jobs */
  body:not(.panel-page) .jb-chip { min-height: 44px; }
  body:not(.panel-page) .jb-modal__close { min-width: 44px; min-height: 44px; }
  /* Contact */
  body:not(.panel-page) .cc-link { display: inline-flex; align-items: center; min-height: 44px; }
  body:not(.panel-page) .cf-check { min-height: 44px; display: inline-flex; align-items: center; }
  body:not(.panel-page) .cf-input, body:not(.panel-page) .job-search__input { font-size: 16px; }
  /* Pricing */
  body:not(.panel-page) .pr-link { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- long words and wide content never push the page sideways ---------- */
body:not(.panel-page) main img, body:not(.panel-page) main video, body:not(.panel-page) main iframe { max-width: 100%; }
body:not(.panel-page) main { overflow-wrap: break-word; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ---------- phones only (below 744px): the hero video is shown complete, the footer columns sit side by side ---------- */
@media (width < 744px) {
  /* the whole video frame fits the screen width instead of being cropped to a tall strip; the black behind it is the hero background */
  body:not(.panel-page) .homepage-hero .dynamic-background__video,
  body:not(.panel-page) .homepage-hero .dynamic-background__poster { object-fit: contain; transform: none; }
  /* footer: Company and Support next to each other (Services above and Follow below keep the full width) */
  body:not(.panel-page) .footer__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:not(.panel-page) .footer__column--services,
  body:not(.panel-page) .footer__column--follow { grid-column: 1 / -1; }
}

/* phones only: the service pictures in the carousel under the hero are shown whole (zoomed out, not cropped) inside a 2px black border */
@media (width < 744px) {
  body:not(.panel-page) #grow-your-business .king-carousel__card-background-image {
    object-fit: contain;
    object-position: center top;
    box-sizing: border-box;
    border: 2px solid #000;
    background: #000;
  }
}

/* phones only: the hero is the text on the black background (no video), so the section is only as tall as its text */
@media (width < 744px) {
  body:not(.panel-page) .homepage-hero__background,
  body:not(.panel-page) .homepage-hero__controls-container { display: none; }
  body:not(.panel-page) .homepage-hero__text-container {
    min-height: 0;
    padding: calc(var(--global-nav-height, 80px) + 40px) 0 56px !important;
  }
}
