/* ==========================================================================
   Site footer — Medics Online Academy
   Markup: templates/footer.html

   Isolation contract (same as site_header.css)
   - Every selector starts with #mhp-site-footer: nothing leaks to the page.
   - Legacy/page CSS (bare `footer`, `nav`, `a`, `h2`, `*` rules, LMS Sass…)
     is reverted on footer elements; SVG internals are left untouched.
   - px units only, so the page's root font-size cannot rescale it.
   ========================================================================== */

/* Private font alias: the header/footer use "MHP Montserrat" so that loading it can never
   change how page content that names plain "Montserrat" renders (some pages only load
   certain Montserrat weights and rely on the browser's fallback for the others).
   Same files Google Fonts serves for Montserrat (variable font, weights 400-800). */
@font-face {
  font-family: "MHP Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm459Wdhyzbi.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "MHP Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


#mhp-site-footer,
#mhp-site-footer :where(*:not(svg, svg *)),
#mhp-site-footer :where(*:not(svg, svg *))::before,
#mhp-site-footer :where(*:not(svg, svg *))::after {
  all: revert;
  box-sizing: border-box;
}

/* Some legacy page stylesheets set typography with !important on bare elements
   (e.g. `h2 { font-family: Roboto !important }`, `button { font-family: Inter !important }`).
   Pin it here, scoped to this component only. */
#mhp-site-footer :where(*:not(svg, svg *)) {
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
}
#mhp-site-footer,
#mhp-site-footer :where(*:not(svg, svg *)) {
  font-family: "MHP Montserrat", "Segoe UI", Arial, sans-serif !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-shadow: none !important;
}

#mhp-site-footer {
  --mhp-red: #ee343b;
  display: block;
  clear: both;
  width: 100%;
  margin: 35px 0 0;
  padding: 65px 0 18px;
  background: #000;
  color: #fff;
  font-family: "MHP Montserrat", "Segoe UI", Arial, sans-serif;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
}
#mhp-site-footer a { color: inherit; text-decoration: none; cursor: pointer; }
#mhp-site-footer :focus-visible { outline: 3px solid var(--mhp-red); outline-offset: 3px; }

#mhp-site-footer .mhp-sf-container { width: min(1640px, 85.4167%); margin: 0 auto; }
#mhp-site-footer .mhp-sf-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 55px; }
#mhp-site-footer .mhp-sf-grid > div { min-width: 0; }

/* Brand column */
#mhp-site-footer .mhp-sf-logo { display: inline-block; }
#mhp-site-footer .mhp-sf-logo-img { display: block; width: 220px; max-width: 100%; height: auto; border: 0; }
#mhp-site-footer .mhp-sf-tagline { margin: 14px 0 0 !important; font-size: 13px !important; font-weight: 400 !important; line-height: 1.8 !important; color: #ddd !important; } /* page CSS styles bare `p` with !important */
#mhp-site-footer .mhp-sf-social { display: block; margin-top: 18px; }
#mhp-site-footer .mhp-sf-social-title { display: block; margin-bottom: 10px; font-size: 13px !important; font-weight: 600 !important; color: #fff; }
#mhp-site-footer .mhp-sf-social-icons { display: flex; flex-wrap: wrap; gap: 10px; }
#mhp-site-footer .mhp-sf-social-link {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px;
  width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--mhp-red);
  transition: color .2s ease, transform .2s ease;
}
#mhp-site-footer .mhp-sf-social-link:hover,
#mhp-site-footer .mhp-sf-social-link:focus-visible { color: #c71925; transform: translateY(-2px); }
#mhp-site-footer .mhp-sf-social-svg { display: block; width: 20px; height: 20px; }
#mhp-site-footer .mhp-sf-apps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
#mhp-site-footer .mhp-sf-app { display: inline-block; }
#mhp-site-footer .mhp-sf-app-img { display: block; width: 112px; height: auto; border: 0; }

/* Link columns */
#mhp-site-footer .mhp-sf-col { display: flex; flex-direction: column; align-items: flex-start; }
#mhp-site-footer .mhp-sf-heading { margin: 0 0 10px; padding: 0; font-size: 17px !important; font-weight: 700 !important; line-height: 1.3 !important; color: #fff; }
#mhp-site-footer .mhp-sf-link {
  display: block; margin: 4px 0; font-size: 13px !important; line-height: 1.8 !important; color: #ddd;
  overflow-wrap: anywhere; transition: color .2s ease;
}
#mhp-site-footer .mhp-sf-link:hover,
#mhp-site-footer .mhp-sf-link:focus-visible { color: #ff777c; }

/* Bottom bar */
#mhp-site-footer .mhp-sf-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
  margin-top: 35px; padding-top: 15px; border-top: 1px solid #444;
  font-size: 12px !important; color: #aaa;
}
#mhp-site-footer .mhp-sf-policy {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin: 0; padding: 0; background: transparent; box-shadow: none; position: static;
}
#mhp-site-footer .mhp-sf-policy-link { color: #aaa; font-size: 12px !important; transition: color .2s ease; }
#mhp-site-footer .mhp-sf-policy-link:hover,
#mhp-site-footer .mhp-sf-policy-link:focus-visible { color: var(--mhp-red); }

/* Responsive */
@media (max-width: 1280px) {
  #mhp-site-footer .mhp-sf-container { width: 92%; }
  #mhp-site-footer .mhp-sf-grid { gap: 32px; }
}
@media (max-width: 900px) {
  #mhp-site-footer { padding-top: 48px; }
  #mhp-site-footer .mhp-sf-grid { grid-template-columns: repeat(3, 1fr); }
  #mhp-site-footer .mhp-sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  #mhp-site-footer { padding-top: 40px; }
  #mhp-site-footer .mhp-sf-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  #mhp-site-footer .mhp-sf-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 340px) {
  #mhp-site-footer .mhp-sf-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  #mhp-site-footer *, #mhp-site-footer *::before, #mhp-site-footer *::after { transition: none !important; }
}
