/* ==========================================================
   isyBoard – stile comune a tutte le pagine
   ========================================================== */

/* Lexend (SIL Open Font License, vedi fonts/OFL-lexend.txt): pensato per una
   lettura più facile. Un solo file "variabile" con tutti gli spessori, 100-900. */
@font-face {
  font-family: "Lexend";
  src: url("../fonts/lexend.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --blu: #1b5fd1;
  --blu-scuro: #0f3f94;
  --blu-chiaro: #e8f0fd;
  --giallo: #ffb627;
  --verde: #1f9d55;
  --rosso: #d64545;

  --testo: #1a1d23;
  --testo-tenue: #5b6472;
  --sfondo: #ffffff;
  --sfondo-alt: #f5f7fa;
  --bordo: #dde2ea;

  --raggio: 10px;
  --ombra: 0 6px 24px rgba(16, 33, 66, 0.08);
  --font: "Lexend", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", Consolas, "Fira Code", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  font-family: var(--font);
  color: var(--testo);
  background: var(--sfondo);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Solo le immagini: una regola su "svg" sovrascriverebbe l'attributo
   display="none" che Blockly usa per nascondere le sue barre di scorrimento. */
img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blu);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.contenitore {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Pulsanti ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  padding: 0.7em 1.3em;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primario {
  background: var(--blu);
  color: #fff;
}

.btn-primario:hover {
  background: var(--blu-scuro);
}

.btn-secondario {
  background: transparent;
  color: var(--blu);
  border-color: var(--blu);
}

.btn-secondario:hover {
  background: var(--blu-chiaro);
}

/* ---------- Intestazione ---------- */

.intestazione {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bordo);
}

.intestazione .contenitore {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo img {
  height: 34px;
  width: auto;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a {
  color: var(--testo);
  text-decoration: none;
  font-weight: 500;
}

.menu a:hover,
.menu a[aria-current="page"] {
  color: var(--blu);
}

.menu .btn {
  color: #fff;
  padding: 0.5em 1.1em;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--testo);
}

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }

  .menu {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--bordo);
    box-shadow: var(--ombra);
  }

  .menu.aperto {
    display: flex;
  }

  .menu li {
    width: 100%;
    text-align: center;
    padding: 0.75rem 0;
  }
}

/* ---------- Piè di pagina ---------- */

.pie {
  background: #11151c;
  color: #c4cad4;
  padding: 3rem 0 2rem;
  font-size: 0.95rem;
}

.pie .contenitore {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.pie img {
  height: 30px;
  width: auto;
  margin-bottom: 0.8rem;
}

.pie h4 {
  color: #fff;
  margin: 0 0 0.6rem;
}

.pie ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pie li {
  margin-bottom: 0.35rem;
}

.pie a {
  color: #c4cad4;
  text-decoration: none;
}

.pie a:hover {
  color: #fff;
}

.pie .copyright {
  grid-column: 1 / -1;
  border-top: 1px solid #262c36;
  padding-top: 1.2rem;
  font-size: 0.85rem;
  color: #7d8592;
}

@media (max-width: 760px) {
  .pie .contenitore {
    grid-template-columns: 1fr;
  }
}
