/* Teradix footer (foot2), phone and tablet fixes.
   Load after css/teradix-footer.css. Every rule sits inside a max-width block and is scoped
   under .foot2, so the desktop layout is untouched. Logical properties only, so it holds in RTL. */

/* ---- touch widths (phones, tablets, small laptops) ---------------------------------- */
@media (max-width:1024px){
  /* readable sizes: links 15px, column headings 12px, fine print 14px */
  .foot2 .f2-h{font-size:12px;line-height:1.3;margin-block-end:6px}
  .foot2--v2 .f2-h--next{margin-block-start:22px}
  .foot2 .f2-safe{font-size:15px}
  .foot2--v2 .f2-copy{font-size:14px}

  /* every link is a 44px tap target; the rows carry the spacing instead of a grid gap */
  .foot2--v2 .f2-list{display:block}
  .foot2--v2 .f2-list li{display:block}
  .foot2--v2 .f2-link{font-size:15px;line-height:20px;padding-block:12px;min-inline-size:44px;text-align:start}
  .foot2 .f2-link::after{inset-block-end:9px}
  .foot2--v2 .f2-legal .f2-link{font-size:14px}
  .foot2--v2 .f2-item{min-block-size:48px;padding-block:7px}
  .foot2--v2 .f2-prod{gap:0 20px}
  .foot2 a.f2-btn{min-block-size:48px}

  /* legal bar: fine print, legal links and social buttons each on their own line, start aligned */
  .foot2--v2 .f2-legal{flex-direction:row;align-items:center;justify-content:flex-start;gap:0 24px}
}

/* ---- tablets: the scene sits beside the statement instead of under it ---------------- */
@media (min-width:641px) and (max-width:900px){
  .foot2--v3 .f2-top{grid-template-columns:minmax(0,1fr) minmax(0,220px);align-items:center}
  .foot2--v3 .f2-scene{max-inline-size:220px;margin-inline:auto 0}
  .foot2 .f2-safe{white-space:normal}
  .foot2 .f2-safe span{text-wrap:balance}
}
@media (min-width:641px) and (max-width:900px){
  /* products across the full row in three columns, then the four link groups two by two */
  .foot2--v2 .f2-prod{grid-template-columns:repeat(3,minmax(0,1fr))}
  .foot2--v2 .f2-grid{gap:28px 32px}
}
@media (min-width:901px) and (max-width:1024px){
  /* five columns are too narrow here (headings wrap and the lists start at different heights):
     products take the full row, the four link groups sit in one row under them */
  .foot2--v2 .f2-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 28px}
  .foot2--v2 .f2-col--prod{grid-column:1/-1}
  .foot2--v2 .f2-prod{grid-template-columns:repeat(4,minmax(0,1fr))}
  .foot2 .f2-h{letter-spacing:.12em}
}

/* ---- phones ------------------------------------------------------------------------- */
@media (max-width:640px){
  .foot2--v3 .f2-title{font-size:30px;line-height:1.14;overflow-wrap:break-word}
  .foot2 .f2-actions{flex-direction:column;align-items:stretch;gap:20px}
  .foot2 a.f2-btn{justify-content:center;margin-inline-end:6px}
  .foot2 .f2-safe{padding-inline:10px 14px}

  /* the scene is decoration: smaller and centred so it does not push the links down a screen */
  .foot2--v3 .f2-scene{max-inline-size:240px;margin-inline:auto}

  /* link groups stay two across, but each list is ONE column (the base sheet splits each list
     in two, which makes four cramped columns that collide at 390px) */
  .foot2--v2 .f2-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 20px}
  .foot2--v2 .f2-prod{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
  .foot2--v2 .f2-item{gap:10px}
  .foot2--v2 .f2-item b{font-size:14.5px;overflow-wrap:anywhere}
  .foot2--v2 .f2-link{overflow-wrap:break-word}

  .foot2--v2 .f2-base{gap:10px;padding-block-end:8px}
  .foot2 .f2-social{gap:12px;margin-block-start:6px}
}

/* ---- phones under 480: a heading that wraps ("Teams and industries") must not push its list
        lower than the neighbour's, so first headings reserve two lines and sit on the lower one */
@media (max-width:480px){
  .foot2--v2 .f2-col>.f2-h:first-child{display:flex;align-items:flex-end;min-block-size:2.6em}
  .foot2--v2 .f2-col--prod>.f2-h:first-child{display:block;min-block-size:0}
}

/* ---- narrow phones: products in a single column ------------------------------------- */
@media (max-width:400px){
  .foot2--v2 .f2-prod{grid-template-columns:1fr}
  .foot2--v2 .f2-item b{font-size:15px}
}
