/*
 * Peu únic de FormaCiber (src/site-footer.ts). És l’única regla de peu del lloc: totes les pàgines
 * (portada, partners, sectors, legals, guies, botiga, canvis, aula i accés) el fan servir.
 * Fosc a totes les pàgines, per coherència amb la portada. El text del peu és sempre llegible sobre fons fosc.
 */
.fc-foot {
  --fc-foot-bg: #020a14;
  --fc-foot-ink: #f4f7fb;
  --fc-foot-muted: #9fb2c8;
  --fc-foot-line: rgba(182, 199, 220, 0.14);
  --fc-foot-accent: #1ac5e3;
  position: relative;
  clear: both;
  margin: 0;
  background: linear-gradient(180deg, #05162e 0%, var(--fc-foot-bg) 62%);
  color: var(--fc-foot-muted);
  font-family: Poppins, Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.fc-foot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fc-foot-accent) 28%, #0978ec 72%, transparent);
  opacity: 0.85;
}
.fc-foot__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 3.75rem) clamp(1.25rem, 4vw, 2rem) 1.5rem;
}
.fc-foot--compact .fc-foot__inner { padding-block: 1.5rem 1.1rem; }
.fc-foot__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.fc-foot__brand { min-width: 0; }
.fc-foot__home {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
}
.fc-foot__home:focus-visible,
.fc-foot a:focus-visible { outline: 2px solid var(--fc-foot-accent); outline-offset: 3px; }

/* Logotip: el mateix lockup que la capçalera (escut + FormaCiber.com + etiqueta), en versió de peu. */
.fc-foot .fc-logo { display: inline-flex; align-items: center; gap: 0.7rem; line-height: 1; white-space: nowrap; }
.fc-foot .fc-logo__shield { display: block; width: auto; height: 40px; flex: 0 0 auto; }
.fc-foot .fc-logo__text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.fc-foot .fc-logo__word { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; color: var(--fc-foot-ink); }
.fc-foot .fc-logo__accent { margin-left: -0.02em; color: var(--fc-foot-accent); }
.fc-foot .fc-logo__tld { font-size: 0.78em; font-weight: 500; color: var(--fc-foot-muted); }
.fc-foot .fc-logo__tag { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fc-foot-accent); }
.fc-foot--compact .fc-logo__shield { height: 30px; }
.fc-foot--compact .fc-logo__word { font-size: 1.05rem; }
.fc-foot--compact .fc-logo__tag { display: none; }

.fc-foot__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem clamp(1rem, 2vw, 2rem);
}
.fc-foot__title {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fc-foot-accent);
}
.fc-foot__list { display: grid; gap: 0.1rem; margin: 0; padding: 0; list-style: none; }
.fc-foot__list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.3rem 0;
  border-radius: 6px;
  color: var(--fc-foot-ink);
  text-decoration: none;
  font-size: 0.95rem;
}
.fc-foot__list a:hover,
.fc-foot__list a:focus-visible { color: var(--fc-foot-accent); text-decoration: underline; text-underline-offset: 3px; }

.fc-foot__issuer { margin-top: 1.75rem; font-size: 0.85rem; }
.fc-foot__issuer .issuer-legal { margin: 0 0 0.4rem; line-height: 1.6; }
.fc-foot__issuer p { margin: 0; }
.fc-foot__issuer a { color: var(--fc-foot-muted); }

.fc-foot__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  margin-top: 2.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--fc-foot-line);
  font-size: 0.85rem;
}
.fc-foot__copy { margin: 0; }
.fc-foot__lang { display: inline-flex; align-items: center; gap: 0.4rem; }
.fc-foot__lang a,
.fc-foot__lang-cur {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.35rem;
  border-radius: 6px;
}
.fc-foot__lang a { color: var(--fc-foot-muted); text-decoration: none; }
.fc-foot__lang a:hover,
.fc-foot__lang a:focus-visible { color: var(--fc-foot-ink); text-decoration: underline; text-underline-offset: 3px; }
.fc-foot__lang-cur { color: var(--fc-foot-ink); font-weight: 600; }
.fc-foot__sep { opacity: 0.5; }

/* Versió: enllaç discret a /canvis.html, dins de la barra inferior. */
.af-app-version { margin: 0; font-variant-numeric: tabular-nums; }
.af-app-version a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.6rem;
  border: 1px solid var(--fc-foot-line);
  border-radius: 999px;
  color: var(--fc-foot-muted);
  text-decoration: none;
}
.af-app-version a:hover,
.af-app-version a:focus-visible { color: var(--fc-foot-ink); border-color: rgba(26, 197, 227, 0.5); }

/* Aula (mòbil i tauleta): la barra inferior és fixa; el peu sencer ha de quedar per sobre, amb marge. */
@media (max-width: 860px) {
  body.has-bottom-nav .fc-foot { padding-bottom: calc(var(--bottom-nav-h, 4rem) + 1rem); }
}
/* Lliçó: variant compacta (logo, copyright i versió), visible al final, separada del contingut. */
body.player-page .fc-foot--compact { margin-top: clamp(2rem, 5vw, 3rem); }
body.player-page .fc-foot--compact .fc-foot__inner { padding-block: 1.25rem 1rem; }
body.player-page .fc-foot--compact .fc-foot__bar { margin-top: 1rem; padding-top: 0.9rem; }
/* Reproductor en mode immersiu de vídeo: el peu s’amaga per no tapar el vídeo ni el botó de pantalla completa. */
body.player-video .fc-foot,
body.player-immersive .fc-foot { display: none; }

@media (max-width: 960px) {
  .fc-foot__top { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 720px) {
  .fc-foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.25rem; }
  .fc-foot__list a { min-height: 2.75rem; }
  .af-app-version a { min-height: 2.75rem; }
  .fc-foot__lang a,
  .fc-foot__lang-cur { min-height: 2.75rem; }
}
@media (max-width: 420px) {
  .fc-foot__bar { flex-direction: column; align-items: flex-start; }
}
