<!DOCTYPE html>
<html lang="{{ .Language.LanguageCode | default "en" }}" dir="{{ .Language.LanguageDirection | default "ltr" }}">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="{{ .Description | default .Summary | plainify | truncate 160 }}">
  <meta name="author" content="{{ .Params.author | default "Internet for Kids" }}">

  <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} — {{ .Site.Title }}{{ end }}</title>

  {{ partial "extend-head.html" . }}

  {{/* Main stylesheet with Newsreader + custom colors */}}
  <link rel="stylesheet" href="{{ "css/main.css" | relURL }}?v={{ now.Unix }}">
</head>
<body style="background-color:var(--ifk-bg);color:var(--ifk-text)">
  <header style="border-bottom:1px solid #e5e7eb;background:white;position:sticky;top:0;z-index:40">
    <nav style="max-width:64rem;margin:0 auto;padding:1rem;display:flex;justify-content:space-between;align-items:center">
      <a href="{{ "/" | relLangURL }}" style="font-family:var(--ifk-font);font-size:1.35rem;font-weight:600;color:var(--ifk-text);text-decoration:none">
        Internet for Kids
      </a>
      <div style="display:flex;align-items:center;gap:1.5rem;font-family:system-ui,-apple-system,sans-serif;font-size:0.95rem">
        {{ range .Site.Menus.main }}
          {{ if ne .Identifier "locale" }}
          <a href="{{ .URL | relLangURL }}" style="color:#4b5563;text-decoration:none">{{ .Name }}</a>
          {{ end }}
        {{ end }}
        {{ partial "language-switcher.html" . }}
      </div>
    </nav>
  </header>

  <main style="flex:1">
    {{ block "main" . }}{{ end }}
  </main>

  <footer style="border-top:1px solid #e5e7eb;background:white;margin-top:5rem">
    <div style="max-width:64rem;margin:0 auto;padding:3rem 1rem">
      <div style="display:flex;gap:2rem;flex-wrap:wrap;margin-bottom:2rem">
        {{ range .Site.Menus.footer }}
        <a href="{{ .URL | relLangURL }}" style="color:#6b7280;text-decoration:none;font-family:system-ui,sans-serif;font-size:0.875rem">
          {{ .Name }}
        </a>
        {{ end }}
      </div>
      <div style="border-top:1px solid #e5e7eb;padding-top:2rem;text-align:center;font-size:0.85rem;color:#6b7280;font-family:system-ui,sans-serif">
        <p>
          &copy; {{ now.Year }} Internet for Kids | Powered by <a href="https://go.agiliton.eu/vpn-app" style="color:var(--ifk-accent);text-decoration:none">Agiliton VPN</a>
        </p>
        {{ partial "extend-footer.html" . }}
      </div>
    </div>
  </footer>

  {{ partial "rybbit.html" . }}
  {{ partial "structured-data.html" . }}
</body>
</html>
