/* site-header.css — v78: the home page's top bar for every other page (/gioca/…, /scuole/…). Same colours as site.css
   (light and dark, follows the 🌙 button: data-theme on <html>), same sizes. Everything starts with .sh- so it never mixes
   with the page's own styles. */
.sh-top {
  --sh-surface: #FFFFFF; --sh-fg: #16241A; --sh-muted: #4E5D53; --sh-line: #DCE6D8; --sh-navy: #012169; --sh-green: #3D9150;
  --sh-green-soft: #E6F3E0; --sh-red: #E0303F; --sh-orange: #E2681A; --sh-yellow: #B98200; --sh-blue: #2477C9; --sh-purple: #7E46CF;
  --sh-teal: #11857A; --sh-on: #FFFFFF;
  position: sticky; top: 0; z-index: 1000; background: var(--sh-surface); border-bottom: 1px solid var(--sh-line);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--sh-fg); line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sh-top {
    --sh-surface: #17224A; --sh-fg: #EEF2FF; --sh-muted: #B6C1DE; --sh-line: #2B3A6B; --sh-navy: #A9BEFF; --sh-green: #6CC17E;
    --sh-green-soft: #1C3A2A; --sh-red: #FF7B86; --sh-orange: #FFA060; --sh-yellow: #FFC93C; --sh-blue: #7FC0FF; --sh-purple: #C3A3FF;
    --sh-teal: #5ED6C8; --sh-on: #0E1630;
  }
}
:root[data-theme="dark"] .sh-top {
  --sh-surface: #17224A; --sh-fg: #EEF2FF; --sh-muted: #B6C1DE; --sh-line: #2B3A6B; --sh-navy: #A9BEFF; --sh-green: #6CC17E;
  --sh-green-soft: #1C3A2A; --sh-red: #FF7B86; --sh-orange: #FFA060; --sh-yellow: #FFC93C; --sh-blue: #7FC0FF; --sh-purple: #C3A3FF;
  --sh-teal: #5ED6C8; --sh-on: #0E1630;
}
.sh-top *, .sh-top *::before, .sh-top *::after { box-sizing: border-box; }
.sh-wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sh-top > .sh-wrap { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.sh-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--sh-navy); flex: none; }
.sh-logo { width: 52px; height: 52px; display: block; flex: none; }
.sh-logo svg { width: 100%; height: 100%; display: block; }
.sh-brand b { font-family: 'Kaushan Script', 'Brush Script MT', cursive; font-weight: 400; font-size: 25px; line-height: 1; white-space: nowrap; }
.sh-gi { color: var(--sh-navy); } .sh-in { color: var(--sh-red); }
.sh-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.sh-nav a, .sh-nav .sh-link { white-space: nowrap; font: 700 15px 'Nunito', system-ui, sans-serif; color: var(--sh-fg); text-decoration: none; padding: 9px 10px; border-radius: 12px; border: 0; background: none; cursor: pointer; line-height: 1.25; }
.sh-nav a:hover, .sh-nav .sh-link:hover, .sh-nav a.on, .sh-nav .sh-link[aria-expanded="true"] { background: var(--sh-green-soft); }
.sh-nav .sh-play { background: var(--sh-green); color: var(--sh-on); }
.sh-nav .sh-play:hover { background: var(--sh-green); filter: brightness(1.08); }
.sh-menu { display: none; margin-left: auto; font: 800 15px 'Nunito', system-ui, sans-serif; border: 2px solid var(--sh-line); background: var(--sh-surface); color: var(--sh-fg); border-radius: 12px; padding: 8px 12px; cursor: pointer; min-height: 44px; }
.sh-top .theme-btn { border: 2px solid var(--sh-line); background: var(--sh-surface); color: var(--sh-fg); border-radius: 999px; width: 40px; height: 40px; font-size: 17px; cursor: pointer; flex: none; margin-left: 4px; padding: 0; line-height: 1; }
.sh-lang { display: flex; border: 2px solid var(--sh-line); border-radius: 999px; padding: 2px; flex: none; }
.sh-lb { font: 800 13px 'Nunito', system-ui, sans-serif; border: 0; background: none; color: var(--sh-muted); padding: 5px 10px; border-radius: 999px; cursor: pointer; min-height: 32px; text-decoration: none; display: inline-flex; align-items: center; }
.sh-lb[aria-pressed="true"] { background: var(--sh-navy); color: var(--sh-surface); }
.sh-bs { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #f5c75a; color: #1a1408; text-decoration: none; line-height: 0; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.sh-bs:hover { background: #ffd877; }
.sh-bs svg { display: block; width: 22px; height: 22px; }

.sh-panel { border-top: 1px solid var(--sh-line); background: var(--sh-surface); max-height: calc(100vh - 64px); overflow-y: auto; }
.sh-panel[hidden] { display: none; }
.sh-panel .sh-wrap { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; padding-block: 18px 22px; align-items: start; }
.sh-panel h4 { margin: 0 0 8px; font: 800 12px 'Nunito', system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--sh-muted); }
.sh-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sh-panel .sh-gap { margin-top: 10px; }
.sh-yr { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--sh-fg); font-weight: 700; }
.sh-yr:hover { background: var(--sh-green-soft); }
.sh-yr i { width: 30px; height: 30px; border-radius: 50%; background: var(--c, var(--sh-navy)); color: var(--sh-on); font: 800 15px 'Baloo 2', 'Fredoka', system-ui, sans-serif; font-style: normal; display: grid; place-items: center; flex: none; }
.sh-yr small { color: var(--sh-muted); font-weight: 600; margin-left: auto; }
.sh-c-red { --c: var(--sh-red); } .sh-c-orange { --c: var(--sh-orange); } .sh-c-yellow { --c: var(--sh-yellow); } .sh-c-green { --c: var(--sh-green); }
.sh-c-blue { --c: var(--sh-blue); } .sh-c-purple { --c: var(--sh-purple); } .sh-c-teal { --c: var(--sh-teal); } .sh-c-navy { --c: var(--sh-navy); }
.sh-extra { display: none !important; }
.sh-tools { display: flex; align-items: center; gap: 10px; }

/* second row: the pages of this section (e.g. Il Gioco · Wormy · Teens · A Scuola) */
.sh-sub { border-top: 1px solid var(--sh-line); background: var(--sh-surface); }
.sh-sub .sh-wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 6px; }
.sh-sub .sh-wrap::-webkit-scrollbar { display: none; }
.sh-sub a { white-space: nowrap; font: 700 14px 'Nunito', system-ui, sans-serif; color: var(--sh-muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; }
.sh-sub a:hover { background: var(--sh-green-soft); color: var(--sh-fg); }
.sh-sub a.on { background: var(--sh-navy); color: var(--sh-surface); }

@media (max-width: 1040px) {
  .sh-nav { display: none; }
  .sh-menu { display: block; }
  .sh-tool { display: none !important; }
  .sh-panel .sh-wrap { grid-template-columns: 1fr; gap: 16px; }
  .sh-extra { display: grid !important; }
  .sh-brand b { font-size: 20px; }
}
@media (max-width: 460px) {
  .sh-top > .sh-wrap { gap: 8px; }
  .sh-brand { min-width: 0; gap: 6px; }
  .sh-brand b { font-size: 19px; }
  .sh-logo { width: 42px; height: 42px; }
  .sh-menu { padding: 6px 10px; font-size: 14px; }
  .sh-lb { padding: 4px 8px; font-size: 12px; }
  .sh-bs { width: 34px; height: 34px; } .sh-bs svg { width: 19px; height: 19px; }
}
@media (max-width: 400px) { .sh-brand b { font-size: 17px; } }
@media (max-width: 350px) { .sh-brand b .sh-in { display: none; } }
/* the page's own IT/EN pill at the bottom is not needed: the bar has IT/EN, like the home */
body:has(.sh-top) #lang-pill { display: none !important; }

/* v103: auto-hiding top bar (assets/js/autohide.js) */
.sh-top { transition: transform .28s ease; }
.sh-top.ah-hidden { transform: translateY(-110%); }
html.nav-hidden body:has(.sh-top) .bar, html.nav-hidden body:has(.sh-top).gc--main .gc-hero { top: 0 !important; }
/* v103: bigger logo, same as the home's top bar */
.sh-logo { width: 74px; height: 74px; }
.sh-brand b { font-size: 31px; }
@media (max-width: 1040px) { .sh-logo { width: 60px; height: 60px; } .sh-brand b { font-size: 25px; } }
@media (max-width: 560px) { .sh-logo { width: 46px; height: 46px; } .sh-brand b { font-size: 19px; } }
@media (max-width: 400px) { .sh-logo { width: 42px; height: 42px; } .sh-brand b { font-size: 17px; } }
