/* Site-wide footer — shared by every Flask page and the React app.
   Self-contained: doesn't depend on landing.css / app.css variables. */
.site-footer {
  --sf-bg: #001a45;          /* deep InsightScholar blue */
  --sf-blue: #00225a;        /* logo blue */
  --sf-text: #c9d5ea;
  --sf-muted: #8ea2c4;
  --sf-line: rgba(255, 255, 255, .1);
  container-type: inline-size;
  position: relative;
  overflow: hidden;
  background: var(--sf-bg);
  color: var(--sf-text);
  border-top: 3px solid #2f5fb3;
  font-size: 14px;
  line-height: 1.55;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer__inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding: 64px 0 44px;
}
.site-footer__logo { display: block; height: 52px; width: auto; }
.site-footer__brand p { color: var(--sf-muted); max-width: 320px; margin: 18px 0 22px; }
.site-footer__socials { display: flex; gap: 10px; }
.site-footer__socials a {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: rgba(255, 255, 255, .08); border-radius: 10px; transition: background .15s, color .15s;
}
.site-footer__socials svg { display: block; }
.site-footer__socials a:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.site-footer__col h4 {
  color: var(--sf-muted); font-size: 12px; font-weight: 700; margin: 0 0 18px;
  text-transform: uppercase; letter-spacing: .08em; font-family: inherit;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.site-footer__col a { transition: color .15s; }
.site-footer__col a:hover { color: #fff; }
.site-footer__touch { display: block; margin-bottom: 10px; }
.site-footer__cta {
  display: inline-flex; align-items: center; margin-top: 10px; height: 40px; padding: 0 16px;
  border-radius: 10px; background: #fff; color: var(--sf-blue) !important; font-weight: 600; white-space: nowrap;
  transition: background .15s;
}
.site-footer__cta:hover { background: #dfe8f7; }
.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--sf-line); padding: 22px 0 28px;
}
.site-footer__bottom p { margin: 0; font-size: 12px; color: var(--sf-muted); }
.site-footer__legal { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer__legal a { font-size: 12px; color: var(--sf-muted); transition: color .15s; }
.site-footer__legal a:hover { color: #fff; }
.site-footer__watermark {
  text-align: center; font-size: clamp(60px, 13vw, 170px); font-weight: 800; letter-spacing: -.02em;
  line-height: .8; color: rgba(255, 255, 255, .04); white-space: nowrap; overflow: hidden;
  pointer-events: none; user-select: none; margin-top: -10px; padding-bottom: 10px;
}

/* Sized by the footer's own width, so it fits beside a sidebar too */
@container (max-width: 860px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@container (max-width: 520px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 30px; padding-top: 48px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Inside app layouts: push to the bottom of the page column */
.main > .site-footer, .auth-shell > .site-footer, .portal-page > .site-footer { margin-top: auto; }
.portal-page { display: flex; flex-direction: column; }
@media print { .site-footer { display: none; } }
