/* ============================================================
   ZŠ Krásného 24 – hlavní styly veřejné části webu
   Bento design: neutrální pozadí "Křída", oranžovo-žluto-červený gradient,
   bílé karty se zaoblením, Space Grotesk (nadpisy Bold, popisky Medium, text Regular)
   ============================================================ */

:root {
  --bg: #F7F6F4;
  --ink: #3A2418;
  --muted: #7A6047;
  --accent-orange-text: #9E4B00; /* tmavší oranžová pro TEXT (kontrast 4,5:1); #FF9123 zůstává pro plochy a dekoraci */
  --card-bg: #fff;
  --card-border: #D3D1CC;
  --radius: 20px;
  --accent-orange: #FF9123;
  --accent-yellow: #FFCC00;
  --accent-red: #FF3D3D;
  --gradient: linear-gradient(135deg, #FF9123 0%, #FFCC00 55%, #FF3D3D 100%);
  --gradient-line: linear-gradient(90deg, #FF9123 0%, #FFCC00 50%, #FF3D3D 100%);
  --footer-bg: #F1EFEB;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Space Grotesk', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.035em; }

/* ── HORNÍ LIŠTA ── */
.hdr-top { background: var(--footer-bg); border-bottom: 1px solid var(--card-border); height: 14px; }
.icon-logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.icon-logo-inline { width: 16px; height: 16px; object-fit: contain; vertical-align: middle; margin-right: 4px; }
.icon-social { width: 18px; height: 18px; flex-shrink: 0; }

/* ── HEADER ── */
.hdr { background: var(--bg); position: sticky; top: 0; z-index: 200; border-bottom: 1px solid var(--card-border); }
.hdr-inner { max-width: 1080px; margin: 0 auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; height: 80px; gap: 16px; }

.logo-area { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 70px; width: auto; object-fit: contain; }

/* Navigace */
.nav-toggle { display: none; width: 40px; height: 40px; border: none; background: none; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; flex-shrink: 0; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-overlay { display: none; }
.nav-close { display: none; }
body.nav-open { overflow: hidden; }
.main-nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.main-nav > a,
.main-nav > .has-sub > a { font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 11px; border-radius: 8px; transition: background .12s, color .12s; display: block; white-space: nowrap; }
.main-nav > a:hover,
.main-nav > .has-sub > a:hover { background: #fff; color: var(--accent-orange-text); }
.main-nav > a.active,
.main-nav > .has-sub > a.active { color: var(--ink); background: #fff; }

/* Dropdown */
.has-sub { position: relative; }
.has-sub::before { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 6px; }
.sub-toggle { display: none; }
.sub-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; background: #fff; border: 1px solid var(--card-border); border-radius: 14px; box-shadow: 0 12px 32px rgba(58,36,24,.12); min-width: 230px; padding: 6px; z-index: 300; }
.sub-menu a { display: block; padding: 9px 13px; font-size: 13px; font-weight: 500; color: var(--ink); border-radius: 8px; transition: background .1s, color .1s; }
.sub-menu a:hover { background: var(--bg); color: var(--accent-orange-text); }

/* Dropdown – jen na šířkách nad 900px (najetí myší) */
@media (min-width: 901px) {
  .has-sub > a::after { content: ' ▾'; font-size: 10px; opacity: .5; }
  .has-sub:hover .sub-menu { display: block; }
}

/* Barevný proužek */
.hdr-accent { height: 3px; background: var(--gradient-line); position: sticky; top: 80px; z-index: 199; }

/* ── BENTO MŘÍŽKA (homepage, aktuality, kontakty) ── */
.bento-section { padding: 40px 40px 64px; max-width: 1080px; margin: 0 auto; }
.bento-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.bento-head h1, .bento-head h2 { font-size: 30px; margin-bottom: 6px; }
.bento-head .bento-head-sub { font-size: 13.5px; color: var(--muted); }
.bento-head .bento-head-link { font-size: 13px; font-weight: 600; color: var(--accent-orange-text); }
.bento-head .bento-head-link:hover { text-decoration: underline; }

/* Výška řádku je nejméně 148 px, ale dlaždice se natáhne, když se do ní nevejde delší název (jinak by text přetékal). */
.bento-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(148px, auto); grid-auto-flow: dense; gap: 14px; }

.bento-tile { background: var(--card-bg); border: 1.5px solid var(--card-border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; transition: box-shadow .15s, transform .15s; color: var(--ink); }
a.bento-tile:hover { box-shadow: 0 10px 26px rgba(58,36,24,.1); transform: translateY(-2px); }
.bento-tile svg { flex-shrink: 0; }
.bento-tile-label { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.035em; font-size: 13.5px; }
.bento-tile-eyebrow { font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-orange-text); margin-bottom: 6px; }
.bento-tile-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.035em; font-size: 15px; line-height: 1.3; margin-bottom: 4px; }
.bento-tile-date { font-size: 12px; color: var(--muted); }

.bento-col-2 { grid-column: span 2; }
.bento-col-full { grid-column: 1 / -1; }
.bento-row-2 { grid-row: span 2; }

.bento-hero { grid-column: span 2; grid-row: span 2; border-radius: var(--radius); background: var(--gradient); padding: 30px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink); }
.bento-hero-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.bento-hero h1 { font-size: 36px; line-height: 1.05; margin-bottom: 16px; }
.bento-hero-cta { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 9px; font-size: 13px; font-weight: 700; width: fit-content; transition: box-shadow .15s, transform .15s; }
.bento-hero-cta:hover { box-shadow: 0 10px 26px rgba(58,36,24,.25); transform: translateY(-2px); color: #fff; }

.bento-tile--news-lead { justify-content: center; }
.bento-tile-stack { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.bento-tile-half { flex: 1; min-height: 0; background: var(--accent-yellow); border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.bento-tile-half:hover { box-shadow: 0 10px 26px rgba(58,36,24,.15); transform: translateY(-2px); }
.bento-tile-half--orange { background: var(--accent-orange); }
.bento-tile-half-text { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.035em; font-size: 12px; line-height: 1.3; }
.bento-tile--social { background: var(--accent-orange); border: none; color: var(--ink); }
.bento-tile--social .bento-tile-eyebrow { color: var(--ink); opacity: .7; }
.bento-tile-featured { grid-column: span 2; grid-row: span 2; border-radius: var(--radius); overflow: hidden; position: relative; background: linear-gradient(150deg, #FF3D3D 0%, #FF9123 55%, #FFCC00 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; color: var(--ink); }
.bento-tile-featured .bento-tile-eyebrow { color: var(--ink); opacity: .7; }
.bento-tile-featured .bento-tile-title { font-size: 22px; }
.bento-tile-featured .bento-tile-date { color: var(--ink); opacity: .7; }
.bento-tile-img-placeholder { height: 44px; border-radius: 10px; background: #FFE7C2; }

/* Fotka vyplní dlaždici, ale neurčuje výšku řádku (ta se řídí textovými dlaždicemi). */
.bento-tile--photo { padding: 0; overflow: hidden; position: relative; }
.bento-tile--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.bento-empty { grid-column: 1 / -1; color: var(--muted); font-size: 14px; padding: 32px 0; text-align: center; }

/* ── OBECNÝ SECTION (stránky, kde bento mřížka nedává smysl) ── */
.section { padding: 52px 24px; }
.section-alt { background: var(--footer-bg); border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.section-inner { max-width: 1060px; margin: 0 auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.section-head h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ''; display: inline-block; width: 5px; height: 22px; background: var(--accent-orange); border-radius: 3px; flex-shrink: 0; }
.section-head a { font-size: 13.5px; color: var(--accent-orange-text); font-weight: 600; }
.section-head a:hover { text-decoration: underline; }
.page-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.035em; font-size: 30px; margin-bottom: 28px; }

/* ── AKTUALITY – GRID (archiv aktualit, starší výpisy) ── */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { background: var(--card-bg); border: 1.5px solid var(--card-border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s; display: block; color: var(--ink); }
.news-card:hover { box-shadow: 0 10px 26px rgba(58,36,24,.1); transform: translateY(-2px); color: var(--ink); }
.news-card-img { height: 160px; overflow: hidden; background: linear-gradient(135deg, #FFE7C2, #FFD3A0); display: flex; align-items: center; justify-content: center; }

/* Dlaždice podstránek/dokumentů na rodičovské stránce (_dlazdice.php): stejný vzhled
   jako dlaždice aktualit - bílá dlaždice (.bento-tile) se zaobleným proužkem s okolím. */
.dlazdice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 32px; }
.dlazdice-grid .bento-tile { min-height: 148px; gap: 14px; }
.dlazdice-img { width: 100%; height: 44px; border-radius: 10px; object-fit: cover; }
@media (max-width: 640px) { .dlazdice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-img-placeholder { font-size: 48px; }
.news-card-body { padding: 18px; }
.news-tag { font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 500; color: var(--accent-orange-text); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; }
.news-card h3 { font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.news-card p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.news-date { font-size: 12px; color: var(--muted); margin-top: 12px; }
.news-empty { color: var(--muted); font-size: 14px; padding: 32px 0; }

.news-card-archive { background: var(--gradient); border-color: transparent; }
.news-card-archive .news-card-img { background: transparent; }
.news-card-archive .news-tag { color: var(--ink); opacity: .7; }
.news-card-archive:hover { color: var(--ink); }

/* ── AKTUALITY – DETAIL ── */
.news-detail-wrap { display: flow-root; }
.news-detail-foto { float: right; width: 38%; max-width: 280px; max-height: 360px; height: auto; object-fit: cover; border-radius: 14px; margin: 4px 0 16px 28px; }
/* Aktualita bez fotky: barevný přechod ve stejném místě a velikosti jako fotka. */
.news-detail-foto--prechod { aspect-ratio: 16 / 9; background: linear-gradient(120deg, #FF9123, #FFCC00 55%, #FF3D3D); }
@media (max-width: 700px) {
  .news-detail-foto { float: none; display: block; width: 100%; max-width: none; max-height: 240px; margin: 0 0 20px; }
  /* Na mobilu je přechod jen nízký pruh, aby neodsouval text. */
  .news-detail-foto--prechod { aspect-ratio: auto; height: 80px; }
}
.news-detail-content { font-size: 15px; line-height: 1.75; color: var(--ink); }
.news-detail-content p { margin-bottom: 1em; }
.news-detail-content ul, .news-detail-content ol { margin: 0 0 1em; padding-left: 1.6em; }
.news-detail-content ul { list-style: disc; }
.news-detail-content ol { list-style: decimal; }
.news-detail-content ul ul { list-style: circle; }
.news-detail-content ul ul ul { list-style: square; }
.news-detail-content li { margin-bottom: .35em; padding-left: .2em; }
.news-detail-content li > ul, .news-detail-content li > ol { margin: .35em 0 0; }
.news-detail-content li::marker { color: var(--accent-orange); }
.news-detail-content blockquote { margin: 1.5em 0; padding: 20px 26px; border-radius: 16px; background: var(--accent-yellow); font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.035em; font-size: 16px; line-height: 1.4; }
.news-detail-content hr { border: none; border-top: 1px solid var(--card-border); margin: 2em 0; }
.news-detail-content .ql-align-center { text-align: center; }
.news-detail-content .ql-align-right { text-align: right; }
.news-detail-content .ql-align-justify { text-align: justify; }
.news-detail-content .ql-indent-1 { padding-left: 3em; }
.news-detail-content .ql-indent-2 { padding-left: 6em; }
.news-detail-content .ql-indent-3 { padding-left: 9em; }
.news-detail-content .ql-indent-4 { padding-left: 12em; }
.news-detail-content .ql-indent-5 { padding-left: 15em; }
.news-detail-content .ql-indent-6 { padding-left: 18em; }
.news-detail-content .ql-indent-7 { padding-left: 21em; }
.news-detail-content .ql-indent-8 { padding-left: 24em; }
.news-detail-content iframe.ql-video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 16px; margin-bottom: 1em; }
/* Editor ukládá k obrázku width/height (atributy i inline styl). Bez height:auto se na úzkém displeji
   zúží jen šířka a obrázek se deformuje; !important přebíjí i inline styl z editoru. */
.news-detail-content img { max-width: 100%; height: auto !important; border-radius: 12px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-orange-text); font-size: 13px; font-weight: 600; margin-bottom: 22px; }
.back-link:hover { text-decoration: underline; }

/* ── INFO GRID (úvod – důležité informace) ── */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.info-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; }
.info-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.info-card-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.info-card-icon svg { width: 22px; height: 22px; }
.info-card-icon.qi-orange { color: var(--accent-orange); background: #FFF0E0; }
.info-card-icon.qi-yellow { color: #CC6E00; background: #FFF8E0; }
.info-card-icon.qi-red { color: var(--accent-red); background: #FFE8E8; }
.info-card h3 { font-size: 16px; font-weight: 700; }
.info-card p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.info-card .more-link { font-size: 13px; color: var(--accent-orange-text); font-weight: 600; display: inline-block; margin-top: 12px; }
.info-card .more-link:hover { text-decoration: underline; }

/* ── KONTAKTY ── */
.kontakt-collapsible-list { margin-top: 32px; }
.kontakt-collapsible { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; scroll-margin-top: 100px; }
.kontakt-collapsible summary { cursor: pointer; list-style: none; padding: 18px 22px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.035em; font-size: 15px; display: flex; align-items: center; justify-content: space-between; }
.kontakt-collapsible summary::-webkit-details-marker { display: none; }
.kontakt-collapsible summary::after { content: '▾'; font-weight: 400; font-size: 13px; opacity: .55; transition: transform .15s; }
.kontakt-collapsible[open] summary::after { transform: rotate(180deg); }
.kontakt-collapsible summary:hover { color: var(--accent-orange-text); }
.kontakt-collapsible-body { padding: 0 22px 20px; }
.kontakt-person { padding: 12px 0; border-top: 1px solid var(--bg); }
.kontakt-person:first-child { border-top: none; padding-top: 0; }
.kontakt-person strong { display: block; font-size: 15px; }
.kontakt-person .pozice { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kontakt-person .kontakt-line { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Statický (nerozvíjecí) seznam osob – stejný vzhled jako .kontakt-collapsible, jen bez <summary> */
.kontakt-static-list { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 18px 22px 6px; }

/* ── DOKUMENTY – DLAŽDICE (pro stránky, kde se hodí místo seznamu) ── */
.doc-tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.doc-tile { display: flex; align-items: center; gap: 12px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; padding: 14px 16px; color: var(--ink); transition: box-shadow .15s, border-color .15s; }
.doc-tile:hover { box-shadow: 0 10px 26px rgba(58,36,24,.1); border-color: var(--accent-orange); color: var(--ink); }
.doc-tile-icon { font-size: 26px; flex-shrink: 0; }
.doc-tile-name { font-size: 14px; font-weight: 600; flex: 1; line-height: 1.35; }
.doc-tile-size { font-size: 12px; color: var(--muted); flex-shrink: 0; }

/* ── JÍDELNÍČEK ── */
.jidelnicek-info { color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.jidelnicek-info .kontakt-static-list { margin-top: 16px; padding: 18px 22px; }

/* ── DOKUMENTY ── */
.doc-category { margin-bottom: 32px; }
.doc-category h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--card-border); display: flex; align-items: center; gap: 8px; }
.doc-category h3::before { content: '📁'; font-size: 16px; }
.doc-list { list-style: none; }
.doc-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--card-border); }
.doc-list li:last-child { border-bottom: none; }
.doc-list a { font-size: 14px; color: var(--ink); flex: 1; transition: color .12s; }
.doc-list a:hover { color: var(--accent-orange-text); }
.doc-size { font-size: 12px; color: var(--muted); }
.doc-icon { font-size: 18px; flex-shrink: 0; }

/* ── TABULKA (obecná) ── */
.public-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.public-table th { background: var(--footer-bg); font-size: 13px; font-weight: 700; padding: 10px 14px; text-align: left; border-bottom: 2px solid var(--card-border); }
.public-table td { padding: 10px 14px; border-bottom: 1px solid var(--card-border); font-size: 14px; }
.public-table tr:last-child td { border-bottom: none; }

/* ── TLAČÍTKA (obecné) ── */
.btn-primary { background: var(--ink); color: #fff; padding: 13px 26px; border-radius: 9px; font-size: 15px; font-weight: 700; letter-spacing: -0.035em; font-family: 'Space Grotesk', sans-serif; transition: opacity .15s; display: inline-block; }
.btn-primary:hover { opacity: .85; color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--card-border); padding: 12px 24px; border-radius: 9px; font-size: 15px; font-weight: 600; transition: border-color .15s, color .15s; display: inline-block; }
.btn-secondary:hover { border-color: var(--accent-orange); color: var(--accent-orange-text); }

/* ── FOOTER ── */
.site-footer { background: var(--footer-bg); color: var(--ink); padding: 0 0 24px; margin-top: 56px; }
.footer-accent { height: 3px; background: var(--gradient-line); }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 40px 40px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 32px; }
.footer-grid .footer-nadpis { font-family: 'Space Grotesk', sans-serif; color: var(--ink); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer-logo { height: 56px; width: auto; object-fit: contain; }
.footer-grid p { font-size: 13px; line-height: 1.8; color: var(--muted); }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 6px; }
.footer-grid ul a { font-size: 13px; color: var(--ink); transition: color .12s; display: flex; align-items: center; gap: 6px; }
.footer-grid ul a:hover { color: var(--accent-orange-text); }
.footer-social { display: flex; gap: 14px; margin-top: 16px; }
.footer-social a { color: var(--muted); transition: color .12s; }
.footer-social a:hover { color: var(--accent-orange-text); }
.footer-social .icon-social { width: 22px; height: 22px; }
.footer-bottom { border-top: 1px solid var(--card-border); padding: 16px 40px 0; max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; gap: 8px; }
.footer-bottom a { color: var(--muted); transition: color .12s; }
.footer-bottom a:hover { color: var(--accent-orange-text); }
.footer-links { display: flex; flex-wrap: wrap; column-gap: 16px; row-gap: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-hero, .bento-tile-featured { grid-column: span 2; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-tile-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .bento-section { padding: 28px 20px 48px; }

  /* Mobilní navigace – výsuvný panel zprava */
  .nav-toggle { display: flex; }
  .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(58,36,24,.45); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; z-index: 900; }
  .nav-overlay.open { opacity: 1; visibility: visible; }
  .nav-close { display: flex; align-items: center; justify-content: center; align-self: flex-end; width: 36px; height: 36px; margin-bottom: 8px; border: none; border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 16px; cursor: pointer; }
  .main-nav { position: fixed; top: 0; right: 0; bottom: 0; width: min(300px, 82vw); flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; background: #fff; padding: 16px 20px 24px; box-shadow: -8px 0 28px rgba(58,36,24,.18); overflow-y: auto; z-index: 1000; transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility .28s ease; }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  .main-nav > a { width: 100%; }
  .has-sub { width: 100%; display: flex; flex-wrap: wrap; align-items: center; }
  .has-sub > a { flex: 1; }
  .sub-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: none; background: none; font-size: 14px; color: var(--muted); cursor: pointer; transition: transform .15s; }
  .sub-toggle[aria-expanded="true"] { transform: rotate(180deg); }
  .sub-menu { position: static; display: none; width: 100%; box-shadow: none; border: none; padding: 0 0 6px 14px; }
  .has-sub.open .sub-menu { display: block; }
}
@media (max-width: 600px) {
  .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(140px, auto); }
  .bento-hero, .bento-tile-featured { grid-column: span 2; grid-row: span 2; }
  /* Dlaždice aktualit jsou ve dvou sloupcích úzké, delší názvy se zalamují na 3 až 4 řádky. */
  .bento-tile--aktualita { padding: 14px; }
  .bento-tile--aktualita .bento-tile-title { font-size: 14px; }
  .bento-hero h1 { font-size: 28px; }
  .news-grid { grid-template-columns: 1fr; }
  .doc-tile-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   IKONOVÁ SADA ZŠ KRÁSNÉHO 24
   ============================================================ */

/* Ikony jsou plné tvary, barvu dědí z textové barvy rodiče. */
.ikona { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ikona svg { width: 100%; height: 100%; display: block; }

/* ── Ikony v bílých bento dlaždicích (úvod, kontakty) ── */
.bento-icon { display: inline-flex; width: 20px; height: 20px; color: var(--accent-orange); }
.bento-icon svg { width: 100%; height: 100%; display: block; }

/* ── Karty Důležité informace / Poradenské služby ──
   Tahové ikony byly 22 px; plné tvary snesou 24 px a v barvě .qi-* drží kontrast. */
.info-card-icon svg { width: 24px; height: 24px; }

/* ── Kontaktní řádky (telefon, e-mail) ── */
.kontakt-line svg,
.kontakt-inline-icon svg { width: 14px; height: 14px; }
.kontakt-line .kontakt-inline-icon,
.kontakt-inline-icon { display: inline-flex; width: 14px; height: 14px; margin-right: 6px; color: var(--accent-orange); vertical-align: -2px; }

/* ── Seznam dokumentů ── */
.doc-icon { width: 18px; height: 18px; display: flex; color: var(--accent-orange); }
.doc-icon svg { width: 18px; height: 18px; display: block; }
.doc-list li:hover .doc-icon { color: #e07d10; }

/* Typ souboru textem místo emoji – čitelnější než glyf a přečte ho i čtečka. */
.doc-type { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); flex-shrink: 0; }

/* ── Dlaždice dokumentů (Školská rada) ── */
.doc-tile-icon { width: 26px; height: 26px; display: flex; color: var(--accent-orange); }
.doc-tile-icon svg { width: 26px; height: 26px; display: block; }

/* ── Náhrada obrázku v kartách (aktuality, rozcestník, dokumenty) ── */
.news-card-img-placeholder { width: 56px; height: 56px; display: flex; color: var(--accent-orange); opacity: .9; }
.news-card-img-placeholder svg { width: 56px; height: 56px; display: block; }

/* Emoji v nadpisu kategorie dokumentů nahrazeno proužkem ve firemní oranžové. */
.doc-category h3::before { content: ''; display: inline-block; width: 5px; height: 16px; background: var(--accent-orange); border-radius: 3px; font-size: inherit; flex-shrink: 0; }

/* Postupné objevování prvků při scrollování (assets/js/reveal.js přidává třídu .reveal) */
.reveal { opacity: 0; translate: 0 22px; scale: .94; transition: opacity .6s ease, translate .7s cubic-bezier(.22, .61, .36, 1), scale .7s cubic-bezier(.22, .61, .36, 1), box-shadow .15s, transform .15s; }
.reveal.is-visible { opacity: 1; translate: 0 0; scale: 1; }
/* Text po řádcích: blok je skrytý, dokud ho skript nerozdělí na slova (.is-split); slova pak vplynou podle řádku. */
.reveal-text { opacity: 0; }
.reveal-text.is-split { opacity: 1; }
.reveal-word { display: inline-block; opacity: 0; translate: 0 10px; transition: opacity .9s ease, translate .9s cubic-bezier(.22, .61, .36, 1); }
.reveal-text.is-visible .reveal-word { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce), print { .reveal, .reveal-text { opacity: 1; translate: none; scale: none; transition: none; } .reveal-word { opacity: 1; translate: none; transition: none; } }

/* Okno s nastavením cookies a zástupný blok mapy (assets/js/cookies.js) */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 780px; margin: 0 auto; background: var(--card-bg); border: 1.5px solid var(--card-border); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(58, 36, 24, .18); padding: 18px 22px; display: flex; gap: 22px; align-items: center; z-index: 1000; }
.cookie-banner[hidden] { display: none; }
.cookie-banner-text strong { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.035em; font-size: 15px; display: block; margin-bottom: 4px; }
.cookie-banner-text p { font-size: 13px; line-height: 1.55; color: var(--muted); margin: 0; }
.cookie-banner-text a, .mapa-souhlas a { color: var(--accent-orange-text); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn { padding: 10px 16px; border-radius: 9px; border: 1.5px solid var(--card-border); background: #fff; color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.cookie-btn:hover { box-shadow: 0 6px 16px rgba(58, 36, 24, .12); transform: translateY(-1px); }
.cookie-btn--primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.footer-link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--muted); cursor: pointer; transition: color .12s; }
.footer-link-btn:hover { color: var(--accent-orange-text); }
.mapa-souhlas { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 26px; background: linear-gradient(135deg, #FFF3DC, #FFE2B8); }
.mapa-souhlas-text strong { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.035em; font-size: 15px; }
.mapa-souhlas-text p { font-size: 13px; line-height: 1.5; margin: 4px 0 0; color: var(--ink); opacity: .75; }
.mapa-souhlas-akce { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex-shrink: 0; font-size: 12.5px; }
@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .cookie-banner-actions { flex-direction: column; }
  .bento-tile--mapa { grid-row: span 2; }
  .mapa-souhlas { flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; padding: 16px; }
}
@media (prefers-reduced-motion: reduce), print { .cookie-btn:hover { transform: none; } }
@media print { .cookie-banner { display: none; } }

/* ── PŘÍSTUPNOST ── */
/* Odkaz "Přeskočit na obsah": skrytý, dokud ho nezaostří klávesnice. */
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 3000; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 9px; font-weight: 700; font-size: 14px; }
.skip-link:focus { top: 12px; }
/* Viditelné zaostření pro klávesnici (tmavý obrys, kontrast ke světlému pozadí přes 10:1). */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
main:focus { outline: none; }
/* Větší plochy pro kliknutí a ťuknutí (min. 24 px, WCAG 2.2). */
.footer-social a { display: inline-flex; padding: 5px; }
.footer-grid ul a { padding: 3px 0; }
.footer-links a, .footer-link-btn { display: inline-block; padding: 5px 0; }
.back-link { padding: 3px 0; }
.doc-list a { padding: 4px 0; }
