/* FSL Office Installations: tablet and mobile layout.
   The page markup carries desktop sizes inline, so these rules override them
   at smaller widths. Desktop (over 900px) is untouched. */

html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.fsl-panel{display:contents}
body{overflow-x:hidden}
.fsl-burger{display:none}

/* ---------- Tablet and below ---------- */
@media (max-width:900px){
  /* Header: logo on the left, three-line menu button on the right */
  header{position:relative;z-index:50}
  .fsl-hdr{flex-wrap:nowrap!important;padding:12px 18px!important}
  .fsl-hdr>a:first-child img{height:44px!important}
  .fsl-burger{display:inline-flex;align-items:center;justify-content:center;margin-left:auto;
    width:46px;height:46px;padding:0;background:#FFFFFF;border:1.5px solid #D5DDD8;border-radius:10px;
    cursor:pointer;-webkit-tap-highlight-color:transparent;transition:border-color .2s,background .2s}
  .fsl-burger:focus-visible{outline:2px solid #1ED760;outline-offset:2px}
  .fsl-burger span{display:block;width:20px;height:2px;background:#0B0F0C;border-radius:2px;position:relative;transition:background .2s}
  .fsl-burger span:before,.fsl-burger span:after{content:"";position:absolute;left:0;width:20px;height:2px;
    background:#0B0F0C;border-radius:2px;transition:transform .25s ease,top .25s ease}
  .fsl-burger span:before{top:-6px}.fsl-burger span:after{top:6px}
  .fsl-open-menu .fsl-burger{border-color:#1ED760;background:#F1FBF4}
  .fsl-open-menu .fsl-burger span{background:transparent}
  .fsl-open-menu .fsl-burger span:before{top:0;transform:rotate(45deg)}
  .fsl-open-menu .fsl-burger span:after{top:0;transform:rotate(-45deg)}

  /* Drop-down panel: slides down over the page */
  .fsl-panel{display:block;position:absolute;top:100%;left:0;right:0;background:#FFFFFF;
    border-top:1px solid #E3E8E5;box-shadow:0 18px 30px rgba(11,15,12,.16);border-radius:0 0 14px 14px;
    visibility:hidden;opacity:0;transform:translateY(-8px);pointer-events:none;
    transition:opacity .2s ease,transform .2s ease,visibility 0s linear .2s}
  .fsl-open-menu .fsl-panel{visibility:visible;opacity:1;transform:none;pointer-events:auto;
    transition:opacity .2s ease,transform .2s ease}
  .fsl-panel .fsl-nav{display:flex!important;flex-direction:column;gap:0!important;padding:4px 18px 0}
  .fsl-nav a{padding:15px 2px!important;border-bottom:1px solid #EEF1EF!important;font-size:17px!important;
    margin:0!important;color:#0B0F0C!important;display:flex;justify-content:space-between;align-items:center}
  .fsl-nav a:after{content:"\203A";font-size:22px;line-height:1;color:#13A94B}
  .fsl-panel .fsl-hcta{display:flex!important;flex-direction:column;align-items:stretch!important;gap:12px!important;padding:16px 18px 20px}
  .fsl-hcta a{text-align:center}

  /* Side-by-side blocks stack full width */
  [style*="flex: 1 1 380px"],[style*="flex: 1 1 400px"],[style*="flex: 1 1 420px"],
  [style*="flex: 1 1 440px"],[style*="flex: 1 1 480px"],[style*="flex: 1 1 520px"]{flex-basis:100%!important}

  /* Large feature photos */
  [style*="height: 400px"],[style*="height: 380px"]{height:300px!important}

  /* Section spacing */
  [style*="padding: 88px 24px"],[style*="padding: 80px 24px"],[style*="padding: 72px 24px"]{padding:60px 22px!important}
  [style*="padding: 72px 24px 64px"]{padding:56px 22px 52px!important}

  /* Headings */
  h1,h2,h3{text-wrap:balance}
  [style*="font-size: 64px"]{font-size:52px!important;line-height:1.06!important}
  [style*="font-size: 56px"]{font-size:46px!important}
  [style*="font-size: 40px"]{font-size:34px!important}
  [style*="font-size: 42px"]{font-size:36px!important}
}

/* ---------- Phones ---------- */
@media (max-width:640px){
  .fsl-hdr>a:first-child img{height:40px!important}

  /* Headings scale down and keep tidy line breaks */
  [style*="font-size: 64px"]{font-size:39px!important;line-height:1.06!important;letter-spacing:-.8px!important}
  [style*="font-size: 56px"]{font-size:34px!important;line-height:1.08!important;letter-spacing:-.5px!important}
  [style*="font-size: 40px"]{font-size:29px!important;line-height:1.12!important}
  [style*="font-size: 42px"]{font-size:29px!important;line-height:1.12!important}
  [style*="font-size: 38px"]{font-size:28px!important;line-height:1.12!important}
  [style*="font-size: 34px"]{font-size:26px!important;line-height:1.15!important}
  [style*="font-size: 32px"]{font-size:25px!important}
  [style*="font-size: 22px"]{font-size:19px!important}
  [style*="font-size: 20px"]{font-size:18px!important}
  [style*="font-size: 18px"]{font-size:16.5px!important}
  h1,h2,h3{overflow-wrap:break-word;hyphens:manual}

  /* Section spacing */
  [style*="padding: 88px 24px"],[style*="padding: 80px 24px"],[style*="padding: 72px 24px"]{padding:44px 18px!important}
  [style*="padding: 72px 24px 64px"]{padding:40px 18px 40px!important}
  [style*="padding: 56px 24px"]{padding:40px 18px!important}
  [style*="padding: 56px 24px 28px"]{padding:40px 18px 24px!important}
  [style*="padding: 36px 24px"]{padding:28px 18px!important}
  [style*="padding: 16px 24px"]{padding-left:18px!important;padding-right:18px!important}

  /* Card inner padding */
  [style*="padding: 32px"]{padding:22px!important}
  [style*="padding: 28px"]{padding:20px!important}

  /* Photos */
  [style*="height: 400px"],[style*="height: 380px"]{height:230px!important}
  [style*="height: 300px"]{height:220px!important}
  [style*="height: 220px"]{height:190px!important}
  [style*="height: 180px"],[style*="height: 190px"]{height:170px!important}

  /* Buttons: full width and easy to tap */
  a[style*="padding: 14px 26px"],a[style*="padding: 14px 20px"]{display:block!important;width:100%;text-align:center;box-sizing:border-box}
  button[type="submit"]{width:100%;min-height:50px}

  /* Forms: 16px text stops iPhones zooming in on tap */
  input,select,textarea{font-size:16px!important;max-width:100%}

  /* Grids that would squeeze to one awkward column go two-up */
  [style*="minmax(110px, 1fr)"],[style*="minmax(160px, 1fr)"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  [style*="minmax(240px, 1fr)"],[style*="minmax(300px, 1fr)"],[style*="minmax(320px, 1fr)"],[style*="minmax(260px, 1fr)"],
  [style*="minmax(220px, 1fr)"]{grid-template-columns:minmax(0,1fr)!important}

  /* Home page services: swipeable row instead of ten stacked cards */
  #services [style*="minmax(220px, 1fr)"]{display:flex!important;overflow-x:auto;scroll-snap-type:x mandatory;
    gap:14px!important;margin:0 -18px!important;padding:4px 18px 14px!important;scroll-padding-left:18px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  #services [style*="minmax(220px, 1fr)"]::-webkit-scrollbar{display:none}
  #services [style*="minmax(220px, 1fr)"]>*{flex:0 0 82%;scroll-snap-align:start}
  .fsl-swipe-hint{display:block!important}

  /* Moving ticker: smaller text */
  .fsl-ticker{font-size:11px!important}

  /* Footer columns */
  footer [style*="flex: 1 1"]{flex-basis:100%!important}
  footer [style*="gap: 56px"],footer [style*="gap: 40px"],footer [style*="gap: 36px"]{gap:26px!important}
  [style*="padding: 30px 40px"]{padding:24px 20px!important}
}

/* Hover lift does nothing useful on touch screens */
@media (hover:none){.fsl-card:hover{transform:none;box-shadow:none}}

/* Logos always keep their true proportions */
footer img,header img{object-fit:contain}
@media (max-width:640px){footer img[src*="final-step-logistics"]{height:70px!important}}