/* Linax site — responsive layer.
   The pages are authored with inline styles at desktop scale; this sheet carries the
   breakpoint behaviour, which cannot be expressed inline. Classes are applied in the
   markup (r-*) and mirror an element's desktop intent.

   Breakpoints: 1240 (header), 980 (tablet), 900, 640 (phone), 460 (small phone). */

/* ---------- horizontal overflow guard ---------- */
@media (max-width: 1240px) {
  html, body { overflow-x: hidden; }
  img, svg, video { max-width: 100%; }
}

/* ---------- header ---------- */
@media (max-width: 1240px) {
  .r-hdr {
    height: auto !important;
    min-height: 60px;
    flex-wrap: wrap;
    row-gap: 10px;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
  /* the desktop sheet hides these below 1240 to save room; on touch they come back
     as a scrollable row on the header's second line */
  .r-hdr .hdr-nav {
    display: flex !important;
    order: 9;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .r-hdr .hdr-nav::-webkit-scrollbar { display: none; }
  .r-hdr .hdr-contact { display: inline-flex !important; }
  .r-hdr .hdr-login { display: inline-flex !important; }
  .r-hdr > div[style*="flex: 1"], .r-hdr > div[style*="flex:1"] { flex-basis: 0; }
}
@media (max-width: 640px) {
  .r-hdr { gap: 12px !important; }
  .r-hdr img { height: 24px !important; }
  .r-hdr .hdr-login {
    padding-left: 0 !important;
    border-left: 0 !important;
  }
}

/* ---------- grids ---------- */
@media (max-width: 980px) {
  .r-cmany { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 900px) {
  .r-c2, .r-flow { grid-template-columns: 1fr !important; }
  .r-flow { gap: 12px !important; }
  .r-flow > span[aria-hidden="true"] { display: none !important; }
}
@media (max-width: 640px) {
  .r-cmany { grid-template-columns: 1fr !important; }
  .r-c2, .r-cmany, .r-flow { gap: 14px !important; }
}

/* ---------- flex rows ---------- */
@media (max-width: 900px) {
  .r-wrap { flex-wrap: wrap !important; }
}
@media (max-width: 640px) {
  .r-wrap { gap: 12px !important; }
  /* decorative vertical rules between stacked logos read as noise once wrapped */
  .r-wrap > div[style*="width: 1px"], .r-wrap > div[style*="width:1px"] { display: none !important; }
}

/* ---------- section padding ---------- */
@media (max-width: 900px) {
  .r-pad { padding-left: 28px !important; padding-right: 28px !important; }
  .r-padt { padding-top: 52px !important; }
  .r-padb { padding-bottom: 52px !important; }
}
@media (max-width: 640px) {
  .r-pad { padding-left: 18px !important; padding-right: 18px !important; }
  .r-padt { padding-top: 40px !important; }
  .r-padb { padding-bottom: 40px !important; }
  .r-card { padding: 20px !important; }
}

/* ---------- type ---------- */
@media (max-width: 900px) {
  .r-t1 { font-size: 40px !important; line-height: 1.06 !important; }
  .r-t2 { font-size: 34px !important; line-height: 1.08 !important; }
  .r-t3 { font-size: 29px !important; line-height: 1.12 !important; }
  .r-t4 { font-size: 25px !important; }
  .r-t5 { font-size: 21px !important; }
}
@media (max-width: 640px) {
  .r-t1 { font-size: 32px !important; }
  .r-t2 { font-size: 27px !important; }
  .r-t3 { font-size: 24px !important; }
  .r-t4 { font-size: 21px !important; }
  .r-t5 { font-size: 19px !important; }
}

/* ---------- elements pinned to a desktop pixel size ---------- */
@media (max-width: 980px) {
  .r-fw {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }
}
@media (max-width: 640px) {
  .r-logo { height: 52px !important; }
  image-slot { height: 240px !important; }
}

/* ---------- wide tables scroll rather than squash ---------- */
@media (max-width: 900px) {
  .r-tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---------- touch targets ---------- */
@media (max-width: 900px) {
  .r-hdr {
    /* a wrapped two-row header is too tall to pin over a phone viewport */
    position: static !important;
  }
  button, [role="button"], .r-hdr a { min-height: 44px; }
  .r-hdr a[style*="border-radius: 999px"], .r-hdr a[style*="border-radius:999px"] { min-height: 36px; }
}
