/* ==========================================================================
   Buchanan Service Co. — mobile layer
   The pages are authored with inline styles, which cannot express media
   queries, so every viewport-conditional override lives here. Rules are keyed
   off the desktop inline values (the runtime normalises them with a space
   after each colon, so both spellings are listed) or off data-* hooks in
   SiteHeader. Nothing here changes the desktop rendering.
   ========================================================================== */

/* ---- header: hamburger / drawer / sticky call bar ------------------------ */
[data-menu-btn]{display:none;}
[data-mobile-drawer]{visibility:hidden;transform:translateX(102%);transition:transform .28s cubic-bezier(.2,.7,.2,1),visibility .28s;}
[data-mobile-drawer][data-open="true"]{visibility:visible;transform:translateX(0);}
[data-mobile-scrim]{opacity:0;pointer-events:none;transition:opacity .24s ease;}
[data-mobile-scrim][data-open="true"]{opacity:1;pointer-events:auto;}
[data-drawer-sub]{display:none;}
[data-drawer-group][data-open="true"] [data-drawer-sub]{display:flex;}
[data-drawer-group][data-open="true"] [data-drawer-caret]{transform:rotate(180deg);}
[data-drawer-group]+[data-drawer-group],[data-drawer-group]+a{border-top:1px solid #EFE9E1;}

@media (min-width:981px){
  [data-mobile-drawer],[data-mobile-scrim],[data-mobile-callbar]{display:none!important;}
}
@media (max-width:980px){
  [data-desktop-nav],[data-header-cta],[data-topbar-detail],[data-topbar-since],[data-topbar-social]{display:none!important;}
  [data-topbar]{font-size:12.5px!important;}
  [data-topbar-inner]{padding-top:6px!important;padding-bottom:6px!important;flex-wrap:nowrap!important;justify-content:center!important;}
  [data-menu-btn]{display:inline-flex!important;}
  [data-header-logo]{height:44px!important;}
  [data-header-bar]{padding-top:10px!important;padding-bottom:10px!important;}
  [data-mobile-callbar]{display:grid!important;}
  /* Reserve the call bar's real rendered height (grid + its own padding), not
     just the inner link, so the footer's legal row is never covered. The
     runtime pins body to viewport height, so padding there would not extend
     the scrollable area — the reserve has to sit on the last real block. */
  footer{padding-bottom:104px!important;}
}

/* ---- page layout -------------------------------------------------------- */
@media (max-width:860px){
  h1{font-size:clamp(30px,7.6vw,42px)!important;line-height:1.1!important;}
  h2{font-size:clamp(25px,6.2vw,33px)!important;line-height:1.15!important;}
  h3{font-size:20px!important;}

  /* single column everywhere, with a denser exception for the city lists */
  [style*="grid-template-columns"]{grid-template-columns:1fr!important;}
  [style*="repeat(4,1fr)"],[style*="repeat(4, 1fr)"]{grid-template-columns:1fr 1fr!important;}
  /* wide intrinsic content (photos) must not floor a 1fr track */
  [style*="grid-template-columns"]>*{min-width:0!important;}
  image-slot,image-slot img,main img{max-width:100%!important;}

  /* desktop-scale gutters between now-stacked blocks */
  [style*="gap:60px"],[style*="gap: 60px"],[style*="gap:56px"],[style*="gap: 56px"],
  [style*="gap:52px"],[style*="gap: 52px"],[style*="gap:48px"],[style*="gap: 48px"],
  [style*="gap:40px"],[style*="gap: 40px"],[style*="gap:36px"],[style*="gap: 36px"]{gap:26px!important;}

  /* roomy card padding */
  [style*="padding:36px"],[style*="padding: 36px"],[style*="padding:34px"],[style*="padding: 34px"],
  [style*="padding:32px"],[style*="padding: 32px"],[style*="padding:30px"],[style*="padding: 30px"],
  [style*="padding:28px"],[style*="padding: 28px"],[style*="padding:26px"],[style*="padding: 26px"]{padding:22px!important;}

  /* section rhythm */
  [style*="padding:90px 24px"],[style*="padding: 90px 24px"],
  [style*="padding:84px 24px"],[style*="padding: 84px 24px"],
  [style*="padding:80px 24px"],[style*="padding: 80px 24px"],
  [style*="padding:72px 24px"],[style*="padding: 72px 24px"],
  [style*="padding:70px 24px"],[style*="padding: 70px 24px"],
  [style*="padding:64px 24px"],[style*="padding: 64px 24px"],
  [style*="padding:60px 24px"],[style*="padding: 60px 24px"],
  [style*="padding:56px 24px"],[style*="padding: 56px 24px"]{padding-top:48px!important;padding-bottom:48px!important;}
  [style*="padding:40px 24px 90px"],[style*="padding: 40px 24px 90px"]{padding-top:26px!important;padding-bottom:48px!important;}
  [style*="padding:56px 24px 32px"],[style*="padding: 56px 24px 32px"]{padding-top:40px!important;padding-bottom:22px!important;}

  /* container gutters — must land after the padding rules above */
  [style*="max-width:1240px"],[style*="max-width: 1240px"],
  [style*="max-width:1080px"],[style*="max-width: 1080px"],
  [style*="max-width:880px"],[style*="max-width: 880px"],
  [style*="max-width:920px"],[style*="max-width: 920px"],
  [style*="max-width:860px"],[style*="max-width: 860px"],
  [style*="max-width:820px"],[style*="max-width: 820px"],
  [style*="max-width:760px"],[style*="max-width: 760px"],
  [style*="max-width:720px"],[style*="max-width: 720px"]{
    padding-left:18px!important;padding-right:18px!important;}

  /* tall desktop media blocks become phone-sized frames */
  [style*="height:440px"],[style*="height: 440px"],
  [style*="height:400px"],[style*="height: 400px"],
  [style*="height:380px"],[style*="height: 380px"],
  [style*="height:360px"],[style*="height: 360px"],
  [style*="height:340px"],[style*="height: 340px"]{height:auto!important;aspect-ratio:4/3!important;}

  /* pieces positioned against a desktop two-column layout */
  [style*="position:sticky"],[style*="position: sticky"]{position:static!important;}
  [style*="bottom:-24px"],[style*="bottom: -24px"],
  [style*="bottom:-20px"],[style*="bottom: -20px"],
  [style*="bottom:-18px"],[style*="bottom: -18px"]{
    position:static!important;display:inline-block!important;margin-top:14px!important;}

  /* hero: logo and headline share a phone-height stack */
  #heroLogo{top:22px!important;width:48vw!important;}
  main>section:first-of-type>div[style*="max-width: 920px"],
  main>section:first-of-type>div[style*="max-width:920px"]{padding-top:186px!important;padding-bottom:56px!important;}
  main>section:first-of-type [style*="width: 1px"],
  main>section:first-of-type [style*="width:1px"]{display:none!important;}
  main>section:first-of-type [style*="gap: 40px"],
  main>section:first-of-type [style*="gap:40px"]{gap:20px 32px!important;}

  /* full-width tap targets for the primary actions */
  main a[style*="padding: 16px 28px"],main a[style*="padding:16px 28px"],
  main a[style*="padding: 18px 30px"],main a[style*="padding:18px 30px"]{
    display:flex!important;align-items:center;justify-content:center;width:100%;box-sizing:border-box;}

  /* 16px keeps iOS Safari from zooming the page on field focus */
  input,select,textarea{font-size:16px!important;}

  iframe{min-height:260px;}
}
