/* Layout for all pages except the map; colours come from theme.css. */
body { margin: 0; font: 16px/1.5 system-ui, sans-serif; color: var(--text); background: var(--bg); }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1 { font-size: 1.6em; margin: 0.4em 0; }
h2 { font-size: 1.2em; margin: 1.5em 0 0.5em; }
.muted { color: var(--text-muted); }
.gallery { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.gallery li { width: 240px; }
.gallery img { display: block; width: 100%; height: auto; border: 1px solid var(--border-strong); }
.swatch { display: inline-block; width: 18px; height: 12px; margin-right: 8px; border: 1px solid var(--border-strong); }
.selections { margin: 0 0 1em; padding-left: 1.2em; }
.selections li { margin: 2px 0; }
.teaser { margin: 0 0 1.2em; }
.teaser h2 { margin: 0.2em 0 0; }  /* close to its type label and date above */
.teaser .muted { margin: 0; }
.lead { font-size: 1.1em; }
.rich-text img { max-width: 100%; height: auto; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 1em; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
.pager { display: flex; gap: 16px; align-items: center; margin: 1em 0; }
.teaser-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.8em; font-weight: 600; color: #fff; }
.tag-articlepage { background: #2b6cb0; }  /* Hír */
.tag-eventpage { background: #c05621; }    /* Esemény */
.tag-guidepage { background: #6b46c1; }    /* Útmutató */
/* Topics (news.Topic): outlined chips, so they don't compete with the coloured type labels. */
.topic { display: inline-block; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: 0.8em; color: var(--text-muted); text-decoration: none; }
.topic:hover, .topic:focus-visible { color: var(--text); border-color: var(--text-muted); }
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0.5em; }
.topic-filter { margin: 0 0 1em; }
.crumbs { margin: 0; }
/* Zone tables (/hesz/<code>/) have up to nine columns, so their page is wider. */
main:has(.limits) { max-width: 960px; }
.table-scroll { overflow-x: auto; margin: 0 0 1em; }
.limits { border-collapse: collapse; font-size: 0.85em; }
.limits th, .limits td { padding: 3px 8px; border: 1px solid var(--border-strong); text-align: left; vertical-align: top; }
.limits thead th { font-weight: 600; background: var(--bg-header); }
.limits tbody th { white-space: nowrap; }
/* Home page: asymmetric two columns (plans/news-layout.md), main : sidebar = 2 : 1 on wide screens,
   one column with the sidebar below on phones. The page and its header are wider there. */
main:has(.home-layout), body:has(.home-layout) .site-header-inner { max-width: 1080px; }
.home-layout { display: grid; grid-template-columns: 1fr; gap: 16px 40px; }
.home-layout > * { min-width: 0; }  /* long words or URLs must not widen a column */
@media (min-width: 900px) { .home-layout { grid-template-columns: 2fr 1fr; } }
.home-side { align-self: start; padding: 4px 16px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-raised); }
.home-side h2 { margin-top: 0.6em; }
.promise { margin: 0 0 1em; }
.promise p { margin: 0; }
.promise a.muted { font-size: 0.85em; }
/* Fogalomtár (/hesz/fogalmak/): an index line, then one section per term; the law's text as a quote. */
.glossary-index { margin: 1em 0 1.5em; line-height: 1.8; }
.glossary-term { scroll-margin-top: 16px; }
.glossary-term:target h2 { color: var(--link-hover); }
.legal-text { margin: 0.5em 0 1em; padding: 4px 12px; border-left: 3px solid var(--border-strong); font-style: italic; }
.legal-text .muted { font-style: normal; }
/* Login page (templates/account/login.html) and allauth messages. */
.login-form p { display: flex; flex-direction: column; gap: 4px; max-width: 320px; }
.login-form p:has(input[type=checkbox]) { flex-direction: row; align-items: center; gap: 8px; }
.login-form input:not([type=checkbox]) { padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 4px;
  background: var(--bg-raised); color: var(--text); font: inherit; }
.login-form .helptext { display: none; }
.login-form ul.errorlist { color: var(--danger); margin: 0 0 8px; padding-left: 1.2em; }
.messages { margin: 1em 0; padding: 8px 12px 8px 2em; border: 1px solid var(--border-strong); border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Site header (templates/_site_header.html): full-width strip, content centred
   like <main>; logo + name left, menu right. */
.site-header { background: var(--bg-header); border-bottom: 1px solid var(--border); }
.site-header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; max-width: 720px;
  margin: 0 auto; padding: 12px 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.25em; font-weight: 700; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.site-logo { height: 1.6em; width: auto; }
.site-menu { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.logout-form { margin: 0; }
/* Főoldal, Térkép, Bejelentkezés/Kijelentkezés, Admin: links and the logout <button> look the same. */
.menu-button { display: inline-block; padding: 4px 12px; border: 0; border-radius: 4px; background: var(--button);
  color: var(--button-text); font: inherit; font-weight: 600; line-height: 1.5; text-decoration: none; cursor: pointer; }
.menu-button:hover, .menu-button:focus-visible { background: var(--button-hover); color: var(--button-text); }
/* Wagtail's bird on a light badge (its body is black); wiggles on hover. */
.cms-link { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: #e0e0e0;
  align-items: center; justify-content: center; }
.cms-link .icon-wagtail { width: 22px; height: 22px; transform-origin: 70% 70%; }
.cms-link:hover .icon-wagtail, .cms-link:focus-visible .icon-wagtail { animation: wag 0.6s ease-in-out; }
@keyframes wag { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .cms-link .icon-wagtail { animation: none !important; } }
