/*
Theme Name: ZŠ Hořín
Theme URI: https://webproskolu.cz/
Author: webproskolu.cz
Author URI: https://webproskolu.cz/
Description: Přístupné hybridní téma pro Základní školu Hořín.
Version: 1.1.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: zs-horin
*/

@font-face {
  font-family: "Bricolage";
  src: url("assets/fonts/bricolage-ext-wght.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Bricolage";
  src: url("assets/fonts/bricolage-wght.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Jakarta";
  src: url("assets/fonts/jakarta-ext-wght.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Jakarta";
  src: url("assets/fonts/jakarta-wght.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Jakarta";
  src: url("assets/fonts/jakarta-wght-italic.woff2") format("woff2-variations");
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --deep: #1b4a78;
  --deep-2: #12365c;
  --primary: #2e70c9;
  --primary-dark: #225b9b;
  --sky: #eaf2fb;
  --pale: #f4f7fb;
  --amber: #e8a516;
  --amber-light: #fbefd2;
  --ink: #16202e;
  --muted: #4a5666;
  --line: #dce4ef;
  --line-strong: #c3d0e1;
  --white: #fff;
  --success: #277447;
  --danger: #a82f25;
  --shadow-sm: 0 8px 24px rgba(18, 54, 92, 0.07);
  --shadow: 0 24px 60px rgba(8, 28, 54, 0.32);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --container: 1200px;
  --content: 760px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

:where(a, button, input, select, textarea) {
  touch-action: manipulation;
}

:where(section[id], h2[id], h3[id], article[id]) {
  scroll-margin-top: 7rem;
}

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Jakarta", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

body.nav-open {
  overflow: hidden;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

figure {
  margin: 0;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
[type="button"],
[type="submit"] {
  cursor: pointer;
}

a {
  color: var(--primary-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--deep);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--deep);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--amber-light);
}

::selection {
  background: var(--amber-light);
  color: var(--deep-2);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.65em;
  color: var(--deep);
  font-family: "Bricolage", "Jakarta", sans-serif;
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.45rem, 6vw, 5.25rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

p {
  margin: 0 0 1.15em;
}

ul,
ol {
  padding-inline-start: 1.35rem;
}

.container {
  width: min(calc(100% - (2 * var(--gutter))), var(--container));
  margin-inline: auto;
}

.content-width {
  width: min(calc(100% - (2 * var(--gutter))), var(--content));
}

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.screen-reader-text:focus,
.skip-link:focus {
  position: fixed !important;
  z-index: 10000;
  top: 0.75rem;
  left: 0.75rem;
  width: auto !important;
  height: auto !important;
  padding: 0.8rem 1rem !important;
  clip: auto !important;
  background: var(--white);
  color: var(--deep);
  font-weight: 750;
}

.eyebrow,
.card-kicker,
.tab-kicker {
  margin: 0 0 0.8rem;
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.76rem 1.3rem;
  border: 2px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--primary-dark);
  color: var(--white);
}

.button-primary:hover {
  background: var(--deep);
  color: var(--white);
}

.button-amber {
  background: var(--amber);
  color: var(--deep-2);
}

.button-amber:hover {
  background: #f0ba46;
  color: var(--deep-2);
}

.button-outline {
  border-color: var(--line-strong);
  color: var(--deep);
}

.button-outline:hover {
  border-color: var(--deep);
  background: var(--sky);
  color: var(--deep);
}

.button-on-dark {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.button-on-dark:hover {
  border-color: var(--white);
  background: var(--white);
  color: var(--deep);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary-dark);
  font-weight: 760;
  text-decoration: none;
}

.text-link:hover span {
  transform: translateX(3px);
}

.text-link span {
  transition: transform 160ms ease;
}

/* Header and navigation */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

@supports (backdrop-filter: blur(12px)) {
  .site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
  }
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.site-branding {
  flex: 0 0 auto;
}

.brand-link,
.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--deep);
  text-decoration: none;
}

.brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  font-family: "Bricolage", sans-serif;
  font-size: 1rem;
  font-weight: 750;
}

.brand-copy span {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.69rem;
}

.primary-navigation {
  align-self: stretch;
  margin-left: auto;
}

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

.primary-menu {
  display: flex;
  height: 100%;
  /* Stretch by natáhlo hover/current pozadí položky přes celou výšku
     hlavičky až k jejímu spodnímu okraji — vypadá to jako hranatý blok
     místo měkké pilulky kolem textu, jak má být podle schválené předlohy.
     Center nechá pilulku (padding + border-radius z .primary-menu a) být
     jen tak vysokou, jak je sama velká, a vycentruje ji v hlavičce. */
  align-items: center;
  gap: 0.1rem;
}

.primary-menu > li {
  position: relative;
  display: flex;
  align-items: center;
}

.primary-menu a {
  display: flex;
  min-height: 46px;
  align-items: center;
  padding: 0.65rem 0.7rem;
  border-radius: 9px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
  background: var(--sky);
  color: var(--deep);
}

.primary-menu .menu-item-has-children > a::after {
  width: 0.42rem;
  height: 0.42rem;
  margin: -0.2rem 0 0 0.4rem;
  border-right: 2px solid currentcolor;
  border-bottom: 2px solid currentcolor;
  content: "";
  transform: rotate(45deg);
}

.sub-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% - 8px);
  left: 0;
  width: max-content;
  min-width: 230px;
  margin: 0;
  padding: 0.55rem;
  visibility: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow);
  list-style: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms;
}

.sub-menu a {
  width: 100%;
  min-height: 44px;
  padding: 0.68rem 0.75rem;
}

.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
}

.icon-link {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--deep);
}

.icon-link svg {
  width: 21px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.header-bakalari {
  padding-inline: 0.95rem;
}

.menu-toggle,
.mobile-nav-actions {
  display: none;
}

/* Front page */

/* Pruh důležitých oznámení nad hlavičkou úvodní stránky.

   Barvy jsou změřené, ne odhadnuté: --ink na --amber-light dává 14,36:1.
   Firemní --primary by na světlém podkladu dalo jen 4,35:1, tedy pod hranicí
   pro běžný text — proto se tu nepoužívá.

   Význam nese slovní štítek „Důležité“, ne teplá barva sama o sobě; barva jako
   jediný nositel informace porušuje WCAG 1.4.1 a zmizí při monochromatickém
   zobrazení nebo u barvosleposti. */
.notice-band {
  border-bottom: 1px solid var(--line-strong);
  background: var(--amber-light);
  color: var(--ink);
}

.notice-band-inner {
  display: flex;
  align-items: baseline;
  gap: clamp(0.7rem, 2vw, 1.15rem);
  padding-block: clamp(0.85rem, 2vw, 1.15rem);
}

.notice-band-label {
  flex: none;
  margin: 0;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--deep-2);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notice-band-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  /* Text píše škola ručně; bez tohohle by dlouhá adresa nebo slovo bez mezer
     přeteklo z pruhu ven, nejcitelněji na úzkém displeji. */
  overflow-wrap: anywhere;
}

.notice-band-list li {
  font-size: 0.95rem;
  line-height: 1.5;
}

.notice-band-list strong {
  color: var(--deep-2);
}

.notice-band-list span {
  display: block;
  color: var(--muted);
}

/* Na malém displeji se pruh drží při zemi záměrně: jinak spolkne velkou část
   první obrazovky a odsune pod ni hlavní nadpis školy — návštěvník, který web
   vidí poprvé, pak nezjistí, kam se dostal.

   Podmínka schválně není jen na šířku. Telefon otočený na šířku (667×375) je
   širší než 600 px, takže by dostal desktopové rozestupy zrovna tam, kde je
   svislého místa nejmíň — změřeno, pruh tam zabíral 58 % výšky.

   Měřeno se dvěma oznámeními, což je maximum, které se vypisuje (viz
   zs_horin_active_notices()), a se skutečným nadpisem z databáze. */
/* Sevření rozestupů platí pro obojí — úzký i nízký displej. */
@media (max-width: 600px), (max-height: 520px) {
  .notice-band-inner {
    gap: 0.4rem;
    padding-block: 0.7rem;
  }

  .notice-band-list {
    gap: 0.35rem;
  }

  .notice-band-list li {
    font-size: 0.88rem;
    line-height: 1.4;
  }
}

/* Do sloupce se štítek láme jen na úzkém displeji, kde se vedle textu nevejde.
   Na nízkém a širokém (telefon otočený na šířku) by sloupec naopak přidal
   řádek navíc tam, kde svislé místo chybí nejvíc — tam zůstává vedle sebe. */
@media (max-width: 600px) {
  .notice-band-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 7vw, 5.25rem) 0;
  background: linear-gradient(160deg, var(--deep-2) 0%, var(--deep) 60%, #245c8f 100%);
  color: var(--white);
}

.hero::before {
  display: none;
}

.hero-grid {
  position: relative;
  display: grid;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 3.75rem);
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
}

.hero-copy h1 {
  max-width: 11ch;
  margin: 1.1rem 0 1.35rem;
  color: var(--white);
  font-size: clamp(2.6rem, 5.4vw, 4.15rem);
}

.hero-lede {
  max-width: 50ch;
  margin-bottom: 1.8rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
}

.hero .eyebrow {
  color: #6fc1f1;
}

.hero .button-row {
  gap: 0.85rem;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  object-fit: cover;
}

.hero-visual figcaption {
  position: absolute;
  bottom: -1.1rem;
  left: -0.9rem;
  display: flex;
  max-width: 240px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  border-radius: 12px;
  background: var(--white);
  color: var(--deep);
  box-shadow: 0 14px 34px rgba(8, 28, 54, 0.28);
  font-size: 0.8rem;
  line-height: 1.35;
}

.hero-visual figcaption strong,
.hero-visual figcaption small {
  display: block;
}

.hero-visual figcaption strong {
  font-family: "Bricolage", sans-serif;
  font-size: 0.88rem;
}

.hero-visual figcaption small {
  margin-top: 0.1rem;
  color: var(--muted);
}

.hero-chip-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(39, 116, 71, 0.18);
}

.quickbar {
  border-bottom: 1px solid var(--line);
  background: var(--pale);
}

.quickbar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.quickbar-grid > a {
  display: flex;
  min-width: 0;
  min-height: 94px;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem clamp(0.7rem, 2vw, 1.35rem);
  border-right: 1px solid var(--line);
  background: var(--pale);
  color: var(--ink);
  text-decoration: none;
}

.quickbar-grid > a:first-child {
  border-left: 1px solid var(--line);
}

.quickbar-grid > a:hover {
  background: var(--white);
}

.quickbar-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--sky);
  color: var(--primary-dark);
}

.quickbar-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.quickbar-grid strong,
.quickbar-grid small {
  display: block;
}

.quickbar-grid strong {
  color: var(--deep);
  font-family: "Bricolage", sans-serif;
  font-size: 0.94rem;
}

.quickbar-grid small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.facts-band {
  padding: 0;
  background: var(--deep-2);
  color: var(--white);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.facts-grid p {
  display: grid;
  min-width: 0;
  min-height: 112px;
  justify-items: center;
  text-align: center;
  align-content: center;
  margin: 0;
  padding: 0.45rem clamp(0.8rem, 2vw, 1.8rem);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.facts-grid p:first-child {
  padding-left: clamp(0.8rem, 2vw, 1.8rem);
}

.facts-grid p:last-child {
  border: 0;
}

.facts-grid strong {
  color: var(--amber);
  font-family: "Bricolage", sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.1;
}

.facts-grid span {
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section {
  padding: clamp(4rem, 7vw, 5.5rem) 0;
}

.section-pale {
  background: var(--pale);
}

/* --white × --pale je jen delta-E 3,7 — pod prahem 10 pro spolehlivé
   rozlišení pouhým odstínem. Na podstránkách (ne na úvodu, tam sekce nesou
   vlastní kontext) proto hranici mezi sekcemi kreslí linka, ne barva. */
.page-shell .section-pale {
  border-block: 1px solid var(--line-strong);
}

.section-heading {
  max-width: 780px;
  margin-bottom: clamp(2rem, 4vw, 3.4rem);
}

/* Čistě dekorativní podpis nadpisu — nenese informaci ani text, takže nízký
   kontrast oproti pozadí nevadí (WCAG 1.4.3 se týká textu, ne ornamentu).
   Zároveň jediné místo, kde se na podstránky dostane teplý akcent značky —
   dřív byl na 13 ze 14 podstránek nula prvků v amber. */
.section-heading h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  margin-top: 0.55rem;
  border-radius: 2px;
  background: var(--amber);
}

.split-heading {
  display: grid;
  max-width: none;
  align-items: end;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
}

.split-heading > p,
.split-heading > .text-link {
  justify-self: end;
  margin-bottom: 0.55rem;
}

.split-heading > p {
  max-width: 48ch;
  color: var(--muted);
}

.class-section {
  background: var(--deep);
  color: var(--white);
}

.class-section h2,
.class-section .eyebrow {
  color: var(--white);
}

.class-section .split-heading > p {
  color: rgba(255, 255, 255, 0.72);
}

.class-link-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.class-link {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 1.5rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.class-link:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  transform: translateY(-2px);
}

.class-link:hover .class-link-go {
  color: var(--white);
}

.class-link-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 1.25rem;
  place-items: center;
  border-radius: 12px;
  /* Světlá dlaždice pod modrou šipkou dávala 3,26:1 a při najetí, kdy karta
     ještě zesvětlá, spadla na 2,81:1. Prohozením na tmavý podklad zůstává
     modrý akcent zachovaný a kontrast je i v tom horším stavu nad 5:1. */
  background: rgba(8, 28, 54, 0.55);
  color: #79c8f3;
  font-size: 1.15rem;
}

.class-link h3 {
  margin-bottom: 0.45rem;
  color: var(--white);
  font-size: 1.2rem;
}

.class-link p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.class-link-go {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  color: #9ad2f5;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Aktuality and notice board mirror the selected city-school template. */

.news-board-grid {
  display: grid;
  align-items: start;
  gap: clamp(2rem, 4vw, 2.5rem);
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
}

.news-list {
  display: grid;
}

.news-list-item {
  display: grid;
  align-items: start;
  gap: 1.35rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: auto minmax(0, 1fr);
}

.news-list-item:first-child {
  padding-top: 0;
}

.news-date-box {
  display: grid;
  width: 64px;
  min-height: 62px;
  place-content: center;
  border-radius: 10px;
  background: var(--deep);
  color: var(--white);
  line-height: 1;
  text-align: center;
}

.news-date-box strong {
  color: inherit;
  font-family: "Bricolage", sans-serif;
  font-size: 1.5rem;
}

.news-date-box span {
  margin-top: 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-tag {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--amber-light);
  color: #80600b;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.news-list-body h3 {
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
}

.news-list-body h3 a {
  color: var(--deep);
  text-decoration: none;
}

.news-list-body p {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.news-list-body .text-link {
  min-height: 36px;
  font-size: 0.85rem;
}

.notice-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.notice-board-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.35rem;
  background: var(--deep);
  color: var(--white);
}

.notice-board-head svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.notice-board-head h3 {
  margin: 0;
  color: var(--white);
  font-size: 1.05rem;
}

.notice-board ul {
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
}

.notice-board li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 1.35rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.notice-board li:last-child a {
  border-bottom: 0;
}

.notice-board li a:hover {
  background: var(--pale);
}

.notice-board li strong {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.4;
}

.notice-board li span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.notice-board-all {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.35rem;
  border-top: 1px solid var(--line);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
}

/* Cards and collections */

.news-grid,
.feature-grid,
.people-grid,
.archive-grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.partner-project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-card,
.feature-card,
.person-card,
.archive-card,
.structured-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.news-card,
.feature-card,
.archive-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.news-card-media,
.feature-card > a,
.archive-card-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--sky);
}

.news-card-media img,
.feature-card > a img,
.archive-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 250ms ease;
}

/* Project posters are text-heavy documents, not cropable photos — show the whole poster. */
.feature-card-project > a img {
  object-fit: contain;
  padding: 0.75rem;
}

/* Partner-program logos (Recyklohraní, Ovoce do škol) are small reference badges,
   not photos or posters — the default 3/2 photo-card height leaves them swimming
   in oversized empty space. Shorter box, white mat instead of the photo-card tint. */
.partner-project-grid .feature-card > a {
  aspect-ratio: 12 / 5;
  background: var(--white);
}

.partner-project-grid .feature-card > a img {
  padding: 1.25rem 2.5rem;
}

.news-card:hover img,
.feature-card:hover img,
.archive-card:hover img {
  transform: scale(1.025);
}

.news-card-placeholder,
.feature-card > a.feature-card-placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  background-image: linear-gradient(135deg, var(--sky), var(--pale));
  text-decoration: none;
}

.feature-card > a.feature-card-placeholder {
  transition: transform 250ms ease;
}

.feature-card:hover a.feature-card-placeholder {
  transform: scale(1.025);
}

.feature-card > a.feature-card-placeholder span {
  font-size: 3.5rem;
  opacity: 0.75;
}

.news-card-placeholder span,
.feature-card-placeholder span {
  color: var(--primary-dark);
  font-family: "Bricolage", sans-serif;
  font-size: 2rem;
  font-weight: 760;
}

.news-card-body,
.feature-card > div,
.archive-card-body {
  padding: 1.3rem;
}

.news-card-body time,
.archive-card-body time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.news-card h3,
.feature-card h3,
.archive-card h2 {
  margin: 0.45rem 0 0.65rem;
  font-size: clamp(1.18rem, 2vw, 1.5rem);
}

.news-card h3 a,
.feature-card h3 a,
.archive-card h2 a {
  color: var(--deep);
  text-decoration: none;
}

.news-card-body > p,
.feature-card p,
.archive-card p {
  color: var(--muted);
  font-size: 0.93rem;
}

.card-content {
  color: var(--muted);
  font-size: 0.93rem;
}

.card-content > :last-child,
.card-note:last-child {
  margin-bottom: 0;
}

.card-note {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.card-meta-list {
  display: grid;
  gap: 0;
  margin: 1rem 0;
  border-top: 1px solid var(--line);
}

.card-meta-list > div {
  display: grid;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(70px, 0.7fr) minmax(0, 1.3fr);
}

.card-meta-list dt,
.card-meta-list dd {
  margin: 0;
  font-size: 0.82rem;
}

.card-meta-list dt {
  color: var(--muted);
}

.card-meta-list dd {
  color: var(--deep);
  font-weight: 700;
}

.document-list {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.document-card {
  display: grid;
  min-height: 82px;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  grid-template-columns: auto minmax(0, 1fr) auto;
  text-decoration: none;
}

.document-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.document-icon {
  display: grid;
  width: 46px;
  height: 52px;
  place-items: center;
  border-radius: 5px 12px 5px 5px;
  background: var(--sky);
  color: var(--primary-dark);
  font-size: 0.68rem;
  font-weight: 850;
}

.document-card strong,
.document-card small {
  display: block;
}

.document-card strong {
  color: var(--deep);
  line-height: 1.35;
}

.document-card small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.document-arrow {
  color: var(--primary-dark);
  font-size: 1.3rem;
  font-weight: 800;
}

.document-group + .document-group {
  margin-top: 3.5rem;
}

/* Byl to obráceně: h3 nesla plnou 2px linku přes celou šířku a nadřazené h2
   nic, takže h3 opticky přebíjela svého rodiče. h3 teď dostává jen tichou
   linku, h2 svůj vlastní podpis níž u .section-heading. */
.document-group > h3 {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line-strong);
}

.people-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.person-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
}

.person-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--sky);
}

.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-body {
  display: grid;
  padding: 1.25rem;
}

.person-body h3 {
  margin-bottom: 0.55rem;
}

.person-body p {
  margin-bottom: 0.45rem;
  color: var(--muted);
}

.person-body a {
  min-height: 36px;
}

/* Skoč na rozvrh: stránka /rozvrhy/ měří na mobilu přes 6000 px a karty tříd
   jsou 800–1300 px vysoké. Bez kotev by rodič ze IV. třídy roloval přes tři
   cizí rozvrhy, aby se dostal ke svému. */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.jump-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--deep);
  font-weight: 700;
  text-decoration: none;
}

.structured-list {
  display: grid;
  gap: 1.2rem;
}

.structured-card {
  padding: clamp(1.25rem, 4vw, 2.2rem);
}

.structured-card header {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.structured-card h3 {
  margin: 0;
}

.structured-card .entry-content {
  margin-top: 1.25rem;
}

/* Kicker nese jedinou informaci, kterou rodič v seznamu rozvrhů hledá
   („I. TŘÍDA, 1. ROČNÍK") — h3 nad ním začíná boilerplatem „Rozvrh hodin
   2026/2027 —", takže kicker musí vizuálně vystoupit, ne zůstat jen malým
   textem nad nadpisem. */
.structured-card .card-kicker {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--amber-light);
  color: var(--ink);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.file-actions > span {
  color: var(--muted);
  font-size: 0.8rem;
}

.empty-state {
  padding: clamp(1.5rem, 4vw, 2.8rem);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--pale);
}

/* Page and post structure */

/* Hlavička vnitřní stránky je rozcestník, ne hero: musí sdělit „kde jsem"
   a pustit návštěvníka k obsahu ještě nad foldem. Velkorysé škály zůstávají
   vyhrazené úvodní stránce. */
.page-masthead,
.archive-header,
.single-header {
  padding: clamp(2.25rem, 4vw, 3rem) 0;
  border-bottom: 1px solid var(--line);
  background: var(--sky);
}

.page-masthead-grid {
  display: grid;
  align-items: center;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
}

.page-masthead-grid > div:only-child {
  grid-column: 1 / -1;
  max-width: 850px;
}

.page-masthead h1,
.archive-header h1,
.single-header h1 {
  max-width: 22ch;
  margin-bottom: 0.35em;
  font-size: clamp(2.2rem, 3.4vw, 3.1rem);
}

.page-lede {
  max-width: 62ch;
  color: #40536a;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.page-masthead-image {
  overflow: hidden;
  border: 8px solid var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.page-masthead-image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.breadcrumbs a {
  color: var(--primary-dark);
}

.page-content-section:has(.entry-content:empty) {
  display: none;
}

/* Sekce uvnitř podstránek dýchají méně než na homepage — obsah je tu cíl,
   ne vyprávění. Platí pro stránky, archivy i detail aktuality. */
.page-shell .section,
.archive-header ~ .section,
.single-header ~ .section {
  padding: clamp(2.5rem, 4.5vw, 3.25rem) 0;
}

/* Dvě navazující sekce stejného tónu splynou v jeden pruh, takže by se v místě
   spoje sečetly obě svislé mezery a mezi nadpisy vznikla díra vypadající jako
   chybějící obsah. Musí stát až za pravidlem výš: to používá zkratku `padding`
   se stejnou specificitou, a dřív zapsané `padding-top` by přebilo zpět. */
.section-pale + .section-pale,
.page-shell .section-pale + .section-pale {
  padding-top: 0;
}

.page-shell .section-heading {
  margin-bottom: clamp(1.4rem, 2.5vw, 2rem);
}

/* Stejná škála jako .entry-content h2 — obě úrovně stojí na podstránce
   vedle sebe a rozdílná velikost by četla jako nekonzistence. */
.page-shell .section-heading h2 {
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
}

.entry-content > * {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.entry-content > :last-child {
  margin-bottom: 0;
}

.entry-content h2 {
  margin-top: 1.7em;
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
}

.entry-content h3 {
  margin-top: 1.6em;
}

/* h2 a h3 byly změřené na stejné barvě (rgb(27,74,120)) a stejné váze (680) —
   jediný rozdíl byl 4,8 px velikosti, málo na to, aby čtenář poznal úroveň.
   h3 dostává vlastní, o stupeň klidnější odstín a váhu; h2 zůstává --deep. */
.entry-content h3,
.structured-card h3,
/* Rubriky dokumentů jsou taky h3 a stály mimo tenhle selektor — na
   /dokumenty/ pak měly stejnou modrou jako nadřazené h2, což je přesně ten
   splývající vztah, kvůli kterému se barva rozlišuje. */
.document-group > h3 {
  color: var(--ink);
  font-weight: 620;
}

.entry-content a:not(.wp-element-button) {
  font-weight: 650;
}

.entry-content blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 5px solid var(--amber);
  background: var(--pale);
  color: var(--deep);
  font-size: 1.08rem;
}

.entry-content .alignwide,
.entry-content .alignfull {
  /* 100vw includes the scrollbar track on non-overlay-scrollbar platforms
     (Windows/Linux desktop browsers), running a few px wider than the
     visible viewport — clip locally instead of a stray horizontal
     scrollbar. Scoped to these breakout rows, not the whole document, so
     an unrelated overflow bug elsewhere (e.g. a too-wide table) still
     shows up as a visible, diagnosable scrollbar rather than vanishing. */
  overflow-x: clip;
}

.entry-content .alignwide {
  width: min(calc(100vw - (2 * var(--gutter))), var(--container));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.entry-content .alignfull {
  width: 100vw;
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.entry-content img {
  border-radius: var(--radius-sm);
}

.entry-content figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: left;
}

.entry-content table,
.structured-card table {
  width: 100%;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td,
.structured-card th,
.structured-card td {
  padding: 0.8rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.entry-content th,
.structured-card th {
  background: var(--sky);
  color: var(--deep);
}

/* Zebra jen na td: hlavičkové th (včetně rolující se první sloupec rozvrhu)
   má sky pozadí už z pravidla výš, zebra by ho v lichém řádku přebila. */
.entry-content tbody tr:nth-child(odd) td {
  background: var(--pale);
}

/* Rolovatelná tabulka (rozvrh) */

.table-scroll .table-scroll-shell {
  position: relative;
}

/* Zaostření rolovatelné tabulky musí být vidět — je to jediný způsob, jak se
   k pravé polovině rozvrhu dostane někdo, kdo nepoužívá myš. */
.table-scroll .table-scroll-viewport:focus-visible {
  outline: 3px solid var(--deep);
  outline-offset: 3px;
}

/* Věta pod tabulkou platí jen tam, kde se tabulka opravdu roluje. Na širokém
   displeji se vejde celá, takže by pokyn posílal rodiče hýbat něčím, co stojí. */
.table-scroll-hint {
  display: none;
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Imported school content */

.school-card-grid,
.contact-card-grid {
  align-items: stretch;
  gap: 1rem;
  /* Break out of the narrow .content-width reading column (760px) up to the
     full .container width (1200px) — same technique as .entry-content
     .alignwide, so a 3-up card row isn't squeezed into prose width. */
  width: min(calc(100vw - (2 * var(--gutter))), var(--container));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
  /* Same scrollbar-gutter guard as .alignwide above — scoped locally. */
  overflow-x: clip;
}

.school-card-grid .wp-block-column,
.contact-card-grid .wp-block-column {
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.school-card-grid h3,
.contact-card-grid h2 {
  margin-top: 0;
}

.school-calendar,
.opening-hours {
  display: grid;
  max-width: 850px;
  gap: 0.65rem;
  margin: 1.25rem 0 2rem;
}

.school-calendar > div,
.opening-hours > div {
  display: grid;
  align-items: start;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  grid-template-columns: minmax(0, 1fr) auto;
}

.school-calendar dt,
.school-calendar dd,
.opening-hours dt,
.opening-hours dd {
  margin: 0;
}

.school-calendar dd,
.opening-hours dd {
  color: var(--deep);
  text-align: right;
}

/* --sky uvnitř --pale sekce dávalo delta-E 3,6 — sdělení („zápisy zatím
   nejsou“) v okolí zanikalo. Amber odstíny drží --ink na 14,36:1 a zároveň
   sedí do palety, kterou má tenhle prázdný stav signalizovat. */
.school-notice {
  max-width: 850px;
  margin: 1.5rem 0 2rem;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line));
  border-left: 5px solid var(--amber);
  border-radius: var(--radius-sm);
  background: var(--amber-light);
}

.school-notice > :first-child {
  margin-top: 0;
}

.school-notice > :last-child {
  margin-bottom: 0;
}

.wp-block-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.wp-block-file__button,
.wp-element-button {
  min-height: 44px;
  border-radius: 999px !important;
  background: var(--primary-dark) !important;
  color: var(--white) !important;
  font-weight: 700;
}

.wp-block-gallery {
  gap: 0.8rem !important;
}

.wp-block-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Jádro WordPressu podkládá popisky v galerii jen slabým přechodem, takže na
   světlé fotce klesne kontrast bílého textu až k 1:1. Ztmavujeme podklad tak,
   aby text nad libovolným snímkem splnil WCAG 2.1 1.4.3 (4,5:1). */
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  box-sizing: border-box;
  padding: 2.2rem 0.85rem 0.7rem;
  background: linear-gradient(
    to top,
    rgba(8, 28, 54, 0.92) 0,
    rgba(8, 28, 54, 0.88) calc(100% - 2rem),
    rgba(8, 28, 54, 0) 100%
  );
  color: var(--white);
}

.single-featured {
  /* Vytažení nesmí přesáhnout spodní padding .single-header (min. 2.25rem),
     jinak obrázek přeteče přes její spodní linku. */
  margin-top: calc(-1 * clamp(1.5rem, 2.5vw, 2rem));
}

.single-featured img {
  width: 100%;
  max-height: 650px;
  border: 8px solid var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

/* Project posters are text-heavy documents, not cropable photos — show the whole poster. */
.single-type-horin_project .single-featured img {
  max-height: 900px;
  background: var(--sky);
  object-fit: contain;
  padding: 1.5rem;
}

.single-header time {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.post-navigation {
  padding-bottom: clamp(3rem, 6vw, 6rem);
}

.post-navigation .nav-links {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-navigation a {
  display: grid;
  min-height: 100px;
  align-content: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.post-navigation span,
.post-navigation strong {
  display: block;
}

.post-navigation span {
  color: var(--muted);
  font-size: 0.76rem;
}

.post-navigation strong {
  margin-top: 0.25rem;
  color: var(--deep);
}

.archive-layout {
  display: grid;
  gap: 2.5rem;
}

.archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.navigation.pagination a,
.navigation.pagination .current {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.navigation.pagination .current {
  border-color: var(--deep);
  background: var(--deep);
  color: var(--white);
}

.search-form {
  display: flex;
  max-width: 620px;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.search-field {
  min-width: 0;
  min-height: 48px;
  flex: 1 1 auto;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.error-page {
  display: grid;
  min-height: 68vh;
  align-items: center;
  padding: 4rem 0;
  background: var(--pale);
}

.error-page .content-width {
  margin-inline: auto;
}

.error-code {
  margin: 0;
  color: var(--line-strong);
  font-family: "Bricolage", sans-serif;
  font-size: clamp(6rem, 18vw, 13rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.7;
}

.error-page .button {
  margin-top: 1rem;
}

.contact-band {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  background: var(--deep);
  color: var(--white);
}

.contact-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.contact-band h2,
.contact-band .eyebrow {
  color: var(--white);
}

.contact-band h2 {
  margin-bottom: 0.3rem;
}

.contact-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

/* Footer */

.site-footer {
  padding-top: clamp(3rem, 6vw, 5rem);
  background: var(--deep-2);
  color: rgba(255, 255, 255, 0.78);
}

.footer-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(260px, 1.2fr) minmax(200px, 0.8fr) minmax(200px, 0.8fr);
}

.footer-brand-link {
  color: var(--white);
}

.footer-brand-link img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--white);
}

.footer-brand-link strong,
.footer-brand-link small {
  display: block;
}

.footer-brand-link strong {
  font-family: "Bricolage", sans-serif;
  font-size: 1.05rem;
}

.footer-brand-link small {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-brand > p {
  margin: 1rem 0 0;
  font-size: 0.86rem;
}

.footer-column h2 {
  margin-bottom: 1rem;
  color: var(--white);
  font-size: 1rem;
  letter-spacing: 0;
}

.footer-column address {
  display: grid;
  gap: 0.55rem;
  font-style: normal;
}

.footer-column a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: rgba(255, 255, 255, 0.82);
}

.footer-menu {
  display: grid;
  gap: 0.35rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-block: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.76rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-credit a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: var(--white);
  text-decoration: underline;
}

.footer-credit img {
  flex: 0 0 auto;
  border-radius: 4px;
}

/* Globální `a:hover` ztmavuje odkaz na --deep, což je barva navržená pro světlé
   pozadí. V patičce leží na tmavě modré a kontrast spadne na 1,35:1 — odkaz na
   název školy při najetí i při ostření z klávesnice prakticky zmizí. Na tmavém
   podkladu proto zesvětlujeme a přidáváme podtržení, aby stav nezáležel jen na
   barvě (WCAG 2.1 1.4.3 a 1.4.1). */
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--white);
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 1080px) {
  .brand-copy span,
  .header-bakalari {
    display: none;
  }

  .primary-menu a {
    padding-inline: 0.55rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 920px) {
	.site-header {
		background: var(--white);
		backdrop-filter: none;
	}

  .header-inner {
    min-height: 74px;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .brand-copy span {
    display: block;
  }

  .menu-toggle {
    display: inline-flex;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-left: auto;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    color: var(--deep);
    font-size: 0.8rem;
    font-weight: 750;
  }

  .menu-toggle-icon {
    display: grid;
    width: 20px;
    gap: 4px;
  }

  .menu-toggle-icon span {
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentcolor;
    transition: transform 150ms ease, opacity 150ms ease;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-icon span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-icon span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .header-actions {
    display: none;
  }

  .primary-navigation {
    position: fixed;
    z-index: 99;
    top: 74px;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    overflow-y: auto;
    margin: 0;
    padding: 1rem var(--gutter) 2rem;
    border-top: 1px solid var(--line);
    background: var(--white);
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-menu {
    display: grid;
    height: auto;
    gap: 0;
  }

  .primary-menu > li {
    display: block;
    border-bottom: 1px solid var(--line);
  }

  .primary-menu a {
    min-height: 50px;
    padding: 0.72rem 0.35rem;
    font-size: 1rem;
  }

  .primary-menu .menu-item-has-children > a::after {
    display: none;
  }

  .sub-menu {
    position: static;
    width: 100%;
    min-width: 0;
    padding: 0 0 0.65rem 1rem;
    visibility: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
  }

  .sub-menu a {
    min-height: 46px;
    color: var(--muted);
    font-size: 0.92rem;
  }

  .mobile-nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1.25rem;
  }

  .mobile-nav-actions a {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
  }

  .hero-grid {
    gap: 3.5rem;
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 12ch;
  }

  .hero-visual {
    width: min(100%, 690px);
    justify-self: center;
  }

  .quickbar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quickbar-grid > a:nth-child(2) {
    border-right: 1px solid var(--line);
  }

  .quickbar-grid > a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .facts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts-grid p:nth-child(2) {
    border-right: 0;
  }

  .facts-grid p:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .news-board-grid {
    grid-template-columns: 1fr;
  }

  .class-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-grid,
  .feature-grid,
  .people-grid,
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-masthead-grid {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.65fr);
  }
}

@media (max-width: 680px) {
  .brand-copy span {
    display: none;
  }

  .brand-copy strong {
    max-width: 18ch;
    font-size: 0.9rem;
  }

  .hero {
    padding-block: 3.5rem 4.2rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .hero-visual figcaption {
    right: auto;
    bottom: -1rem;
    left: 0.25rem;
  }

  .quickbar-grid {
    grid-template-columns: 1fr;
  }

  .quickbar-grid > a,
  .quickbar-grid > a:first-child {
    min-height: 76px;
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .facts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .facts-grid p {
    min-height: 96px;
    padding: 0.7rem;
  }

  .facts-grid p:first-child {
    padding-left: 0.7rem;
  }

  .facts-grid strong {
    font-size: 1.25rem;
  }

  .split-heading {
    display: block;
  }

  .split-heading > p,
  .split-heading > .text-link {
    justify-self: auto;
    margin-top: 1rem;
  }

  .class-link-grid {
    grid-template-columns: 1fr;
  }

  .class-link {
    min-height: 190px;
  }

  .news-list-item {
    gap: 1rem;
  }

  .news-date-box {
    width: 56px;
  }

  .news-grid,
  .feature-grid,
  .people-grid,
  .archive-grid,
  .document-list {
    grid-template-columns: 1fr;
  }

  .page-masthead-grid {
    grid-template-columns: 1fr;
  }

  .page-masthead h1,
  .archive-header h1,
  .single-header h1 {
    font-size: clamp(1.9rem, 8vw, 2.4rem);
  }

  .page-masthead-image {
    width: min(100%, 480px);
  }

  .entry-content .wp-block-table,
  .structured-card .wp-block-table,
  .entry-content > table,
  .structured-card > table {
    overflow-x: auto;
  }

  /* Šest sloupců rozvrhu se na telefon nevejde. Samotné rolování nestačí:
     bez těchhle tří věcí rodič vidí useknutý sloupec a nemá jak poznat, že
     tabulka pokračuje. */

  /* 1. Sloupec s hodinou zůstává stát. Bez něj se po odrolování doprava
        kouká na čtyři názvy předmětů a neví, ke které hodině patří. */
  .table-scroll thead th:first-child,
  .table-scroll tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 1;
    /* Neprůhledné pozadí je podmínka — jinak pod ním prosvítají odrolované
       buňky. `--sky` má th už z výchozího pravidla, tady jen jistota. */
    background: var(--sky);
  }

  /* Roluje se jen tabulka, ne celá figura — popisek a pokyn pod ní musí
     zůstat stát, jinak rodič u odrolované tabulky přijde o vysvětlení os. */
  .table-scroll .table-scroll-viewport {
    overflow-x: auto;
  }

  /* 2. Stín u pravého okraje říká, že obsah pokračuje. Sedí na obalu, který je
        přesně tak vysoký jako tabulka — při rolování neuteče a nepřekryje
        popisek pod ní. */
  .table-scroll .table-scroll-shell::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1.75rem;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92));
    pointer-events: none;
    transition: opacity 0.15s ease;
  }

  /* Doskrolováno na konec — stín by už lhal. Třídu přidává table-scroll.js;
     bez JavaScriptu stín zůstane, což je pořád lepší než utnutá tabulka. */
  .table-scroll.is-at-end .table-scroll-shell::after {
    opacity: 0;
  }

  /* 3. Slovní pokyn pro toho, kdo stín nezaregistruje. */
  .table-scroll-hint {
    display: block;
  }

  .school-calendar > div,
  .opening-hours > div {
    gap: 0.25rem;
    grid-template-columns: 1fr;
  }

  .school-calendar dd,
  .opening-hours dd {
    text-align: left;
  }

  .post-navigation .nav-links {
    grid-template-columns: 1fr;
  }

  .contact-band-inner,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-form {
    align-items: stretch;
    flex-direction: column;
  }

  }

@media (max-width: 380px) {
  .brand-copy strong {
    max-width: 14ch;
    font-size: 0.82rem;
  }

  .menu-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .document-card {
    gap: 0.6rem;
    padding-inline: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .quickbar,
  .facts-band,
  .contact-band,
  .post-navigation,
  .button,
  .text-link {
    display: none !important;
  }

  body {
    color: #000;
    font-size: 11pt;
  }

  .page-masthead,
  .archive-header,
  .single-header,
  .section,
  .section-pale {
    padding: 1rem 0;
    background: #fff;
  }

  a {
    color: #000;
  }
}

/* ---------- Jídelníček na úvodní stránce ---------- */

.menu-panel {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.menu-period {
  margin: 0 0 1rem;
  color: var(--deep);
  font-weight: 600;
}

.menu-body > :first-child { margin-top: 0; }
.menu-body > :last-child { margin-bottom: 0; }

.menu-empty {
  margin: 0;
  color: var(--muted);
}

/* ---------- Vedení školy a třídní učitelky ---------- */

.staff-section { background: var(--pale); }

/* Ředitelka stojí zvlášť a širší než ostatní. Není to hierarchie pro parádu:
   rodič, který řeší přijetí nebo stížnost, potřebuje najít jeden kontakt,
   ne prohledávat mřížku pěti stejných karet. */
.staff-lead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 1.25rem;
  padding: 1.6rem 1.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
}

.staff-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.staff-card {
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.staff-role {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.staff-lead h3,
.staff-card h3 {
  margin: 0 0 0.3rem;
  color: var(--deep);
  font-size: 1.15rem;
}

.staff-dept {
  margin: 0;
  color: var(--muted);
}

.staff-contacts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-contacts li + li { margin-top: 0.3rem; }

.staff-link {
  margin-top: auto;
  padding-top: 0.9rem;
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.staff-link:hover,
.staff-link:focus-visible { text-decoration: underline; }

.staff-note { margin: 1.25rem 0 0; }

@media (max-width: 680px) {
  .staff-lead { flex-direction: column; }
}

/* Datum a kdo aktualitu zveřejnil. Jeden řádek pod drobečkovou navigací —
   rodič chce vědět, jestli je zpráva čerstvá a od koho je, ne aby to hledal. */
.entry-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.entry-byline-sep {
  color: var(--line-strong);
}
