/* Urban Cranes – mobile-first layer for every page (Nov 2026)
 *
 * Breakpoints (mobile-first inside this file):
 *   base ............... phones, 320–480px
 *   min-width: 360px ... most phones: "Get a quote" back in the header
 *   min-width: 481px ... large phones / small tablets (481–768px)
 *   769px and up ....... desktop and large screens: untouched, the theme's own layout
 *
 * The Impreza theme is desktop-first, so this whole file only applies up to 768px; desktop keeps
 * exactly the layout it had. Inside that range the rules are written phone first, then enhanced.
 * Everything sits in one cascade layer and is !important: the theme writes its per-element styles
 * with !important, and a layered !important beats an unlayered one.
 * Brand colours, fonts and copy come from the theme; nothing here restyles them.
 * Linked by tools/mobile.py; see README "How this copy was built".
 */
@layer uc-mobile {
@media (max-width: 768px) {

  :root {
    --uc-gutter: 16px;   /* side padding on phones */
    --uc-tap: 48px;      /* minimum touch target */
  }

  /* ---------------------------------------------------------------- Header */
  /* Menu icon: full 48px touch target */
  #page-header .w-nav-control {
    min-width: var(--uc-tap) !important;
    min-height: var(--uc-tap) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  /* "Get a quote" was hidden below 601px. Show it from 360px, beside the logo and menu
     (tools/mobile.py moves it back into the phone header; below 360px the theme still hides it). */
  @media (min-width: 360px) and (max-width: 600px) {
    #page-header .ush_btn_1.hidden_for_mobiles {
      display: inline-flex !important;
      align-items: center !important;
      min-height: 44px !important;
      min-width: 0 !important;
      margin: 0 4px 0 8px !important;
      padding: 0 12px !important;
      font-size: 13px !important;
      white-space: nowrap !important;
    }
  }
  @media (min-width: 360px) and (max-width: 480px) {
    #page-header .header-logo img {      /* a little smaller so the button has room */
      height: 56px !important;
      width: auto !important;
    }
  }

  /* ---------------------------------------------------------------- Page banners (inner pages) */
  /* Photo strip + yellow title panel. The photo strip was 420px tall, pushing the page title below the
     first screen on most phones. Same photo, shorter strip. (The home hero below sets its own height.) */
  .l-section .us_custom_328b2c81 {
    min-height: clamp(150px, 40vh, 420px) !important;
  }
  @supports (height: 1svh) {
    .l-section .us_custom_328b2c81 { min-height: clamp(150px, 40svh, 420px) !important; }
  }

  /* ---------------------------------------------------------------- Equipment pages: photo gallery */
  /* Main photo was a fixed 400px tall: 4:3 instead, smaller thumbnails (still 64px to tap) */
  .pwd-gallery-slider,
  .pwd-gallery-slider .swiper-slide {
    height: auto !important;
  }
  .pwd-gallery-slider .swiper-slide img {
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
  }
  .pwd-gallery-thumbs .swiper-slide {
    width: 64px !important;
    height: 64px !important;
  }
  .swiper-button-prev,
  .swiper-button-next {
    min-width: var(--uc-tap) !important;
    min-height: var(--uc-tap) !important;
  }
  .pwd-gallery .swiper-button-prev,
  .pwd-gallery .swiper-button-next {
    top: auto !important;
    bottom: 8px !important;              /* centred in the 64px thumbnail row, as before in the 100px one */
  }

  /* ---------------------------------------------------------------- Equipment pages: spec tables */
  /* Tables already scroll sideways in their own box; make the "Data Sheet" links easy to tap */
  table td a {
    display: inline-block !important;
    min-width: 44px !important;
    padding: 12px 4px !important;
  }
  /* The header row showed twice: the scrolling body keeps a sizing copy of it that the table plugin's
     own stylesheet normally hides (that stylesheet was never loaded on the old site either) */
  .dt-scroll-body thead tr,
  .dt-scroll-body thead th {
    height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: 0 !important;
  }
  .dt-scroll-body .dt-scroll-sizing {
    height: 0 !important;
    overflow: hidden !important;
  }

  /* ---------------------------------------------------------------- Contact page: phone, email, address */
  .cont_icon .w-iconbox-link {
    display: inline-flex !important;
    align-items: center !important;
    min-height: var(--uc-tap) !important;
  }

  /* ---------------------------------------------------------------- Hero */
  /* Video on top, then headline and both buttons. The video gets whatever height is left after
     the headline and buttons, so "Hire a crane" and "Contact us" are on the first screen. */
  .uc-hero {
    --uc-media-h: clamp(150px, calc(100vh - 420px), 380px);
  }
  @supports (height: 1svh) {
    .uc-hero { --uc-media-h: clamp(150px, calc(100svh - 420px), 380px); }
  }
  /* The 1920px photo behind the hero is covered by the video and the yellow panel up to 768px */
  .uc-hero .l-section-img { background-image: none !important; }

  /* Positioning context = the full-width section, not the over-wide column */
  .uc-hero > .l-section-h > .g-cols > .wpb_column,
  .uc-hero > .l-section-h > .g-cols > .wpb_column > .vc_column-inner {
    position: static !important;
  }
  .uc-hero #home_banner_video {
    top: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100% !important;
    height: var(--uc-media-h) !important;
  }
  /* The inner row had negative side margins with nothing to cancel them: text ran 25px off each side */
  .uc-hero .us_custom_c634c22c {
    min-height: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .uc-hero .us_custom_c634c22c > .wpb_column { margin: 0 !important; }
  .uc-hero .us_custom_328b2c81 {             /* empty column that reserves room for the video */
    min-height: var(--uc-media-h) !important;
    padding: 0 !important;
  }
  .uc-hero .us_custom_5c8d24d9 {             /* yellow panel */
    min-height: 0 !important;
    margin-right: 0 !important;
    padding: 20px var(--uc-gutter) 24px !important;
  }
  .uc-hero h1.home_titleHdr {
    font-size: clamp(28px, 9vw, 40px) !important;
    line-height: 1.1 !important;
    margin-bottom: 4px !important;
  }
  .uc-hero h6.home_titleHdr-2 {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }
  .uc-hero .home-btn-wrapper {
    width: 100% !important;
    max-width: 360px !important;
    margin: 16px auto 0 !important;
    gap: 12px !important;
    align-items: stretch !important;
  }
  .uc-hero .home-btn-wrapper .w-btn-wrapper { margin: 0 !important; }
  .uc-hero .home-btn-wrapper .w-btn {
    width: 100% !important;
    min-height: var(--uc-tap) !important;
    justify-content: center !important;
  }
  /* Pause/play: 44px target (icon stays 25px), top-right corner of the video, clear of the buttons */
  #home_play_button {
    width: 44px !important;
    height: 44px !important;
    background-size: 25px 25px !important;
    top: calc(var(--uc-media-h) - 52px) !important;
    bottom: auto !important;
    right: 8px !important;
  }

  /* ---------------------------------------------------------------- Services cards (home, Services page) */
  /* Wide cards instead of squares: same photos and labels, about half the scrolling */
  .w-grid.layout_534 .post_image.has_ratio > div:first-child { padding-bottom: 56.25% !important; }
  .w-grid.layout_534 .w-vwrapper {                   /* the theme pushes the label down by a % meant for squares */
    padding: 12px !important;
    justify-content: center !important;
  }

  /* ---------------------------------------------------------------- Section backgrounds */
  /* Same pictures, phone-sized files (made by tools/mobile_images.py) */
  .l-section.us_custom_6107e31a {            /* services: 1920px, 130 KB -> 768px, 24 KB */
    background-image: url(/wp-content/uploads/2023/05/bg-home-row1-768.webp) !important;
  }
  .l-section.us_custom_374881ee {            /* company overview: only its left edge shows here; 447 KB -> 63 KB */
    background-image: url(/wp-content/uploads/2023/05/bg-home-row7-m.webp) !important;
  }

  /* ---------------------------------------------------------------- Crane types (home, Crane & Equipment Hire page) */
  .w-grid.layout_425 .post_image > a { display: block !important; }   /* whole icon is the link, not a 21px line */
  .w-grid.layout_425 .w-btn { min-height: var(--uc-tap) !important; }

  /* ---------------------------------------------------------------- FAQs */
  /* Answer text had 45–50px side padding: about 180px of text per line on a 320px phone */
  .w-tabs-section-content-h {
    padding: 16px var(--uc-gutter) 24px !important;
  }

  /* ---------------------------------------------------------------- Testimonials carousel */
  .owl-nav .owl-prev,
  .owl-nav .owl-next {
    min-width: var(--uc-tap) !important;
    min-height: var(--uc-tap) !important;
    background-position: center !important;
    right: auto !important;
  }
  .owl-nav .owl-prev { left: calc(50% - var(--uc-tap) - 4px) !important; }   /* side by side, 8px apart */
  .owl-nav .owl-next { left: calc(50% + 4px) !important; }

  /* ---------------------------------------------------------------- Footer */
  #page-footer .menu a {
    display: inline-block !important;
    padding: 13px 8px !important;
  }
  #page-footer .w-iconbox-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: var(--uc-tap) !important;
    min-height: var(--uc-tap) !important;
  }
  #page-footer .footer-txt-bottom p { line-height: 1.6 !important; }
  #page-footer .footer-txt-bottom a {
    display: inline-block !important;
    padding: 11px 2px !important;
  }

  /* ================================================================ Tablet: 481px and up */
  @media (min-width: 481px) {
    .uc-hero .home-btn-wrapper {        /* buttons side by side */
      flex-direction: row !important;
      flex-wrap: wrap !important;
      justify-content: center !important;
      max-width: none !important;
    }
    .uc-hero .home-btn-wrapper .w-btn-wrapper { flex: 0 1 200px !important; }
    .uc-hero h6.home_titleHdr-2 { font-size: 20px !important; }

    /* Two cards per row */
    .w-grid.layout_534 .w-grid-item,
    .w-grid.layout_425 .w-grid-item { width: 50% !important; }
    .w-grid.layout_534 .post_image.has_ratio > div:first-child { padding-bottom: 75% !important; }
  }
}
}
