/* ============================================================================
 * footer-radar.css — Radar-side layout fix for the SHARED "Fliar BI" footer
 * (/var/www/html/fliar_site/fliar/footer.php).
 *
 * That footer uses a Bootstrap `.row` / `.col-sm-*` grid that renders fine on
 * market.ai but breaks inside the Radar pages:
 *   1. the `.row` keeps Bootstrap's default negative side-margins (-15px) with
 *      no `.container` to compensate -> ~15px of horizontal PAGE scroll;
 *   2. the `.col-sm-3` "Corporate" column collapses to its content width (~80px)
 *      instead of 25%, so the columns look misaligned/squashed.
 *
 * footer.php is SHARED with market.ai and must NOT be edited — these are
 * Radar-only overrides (this sheet is loaded only by the Radar pages that
 * include the footer: search.php, company.php). Theme-agnostic: layout only —
 * colours stay handled by radar-white.css / radar-dark.css. Scoped entirely
 * under `.footer_main` so nothing else on the page is touched.
 * ========================================================================== */

/* Contain the footer + kill the Bootstrap negative-margin overflow. */
.footer_main { width: 100%; max-width: 100%; overflow-x: hidden; box-sizing: border-box; clear: both; }
.footer_main *, .footer_main *::before, .footer_main *::after { box-sizing: border-box; }
.footer_main .row {
  margin-left: 0 !important; margin-right: 0 !important;
  display: flex; flex-wrap: wrap; width: 100%;
}

/* Restore the intended 5 / 4 / 3 proportions. !important because search.php's
   `body.classic-filters-collapsed .row > .col-sm-3 { flex:0 0 0; max-width:0 }`
   (meant for the results filter column) also matches the footer's col-sm-3 at a
   higher specificity (0,3,1) and collapses it to 0 — these win it back for the
   footer only. */
.footer_main .row > .col-sm-5 { flex: 0 0 41.6667% !important; max-width: 41.6667% !important; }
.footer_main .row > .col-sm-4 { flex: 0 0 33.3333% !important; max-width: 33.3333% !important; }
.footer_main .row > .col-sm-3 { flex: 0 0 25% !important;       max-width: 25% !important; }

/* The full-width strip below the columns (india.png). */
.footer_main + div[style*="e5e5e5"],
.footer_main ~ div[style*="e5e5e5"] {
  width: 100% !important; max-width: 100% !important; box-sizing: border-box; overflow-x: hidden;
}
.footer_main ~ div[style*="e5e5e5"] img { max-width: 100%; height: auto; }

/* Phones/tablets: stack to one column, tame the heavy 40px inline padding,
   centre the left-aligned link text so a single column reads cleanly. */
@media (max-width: 767.98px) {
  .footer_main .row > [class*="col-sm-"] {
    flex: 0 0 100% !important; max-width: 100% !important;
    padding: 24px 20px !important; text-align: center !important;
  }
  .footer_main .row > [class*="col-sm-"] h2,
  .footer_main .row > [class*="col-sm-"] h4,
  .footer_main .row > [class*="col-sm-"] p[style*="text-align:left"],
  .footer_main .row > [class*="col-sm-"] a { text-align: center !important; }
  .footer_main img[src*="fliar.png"] { width: 150px !important; }
}
