/* =========================================================
   SSCC – style.css (konsolidovaná verze)
   Struktura:
   1) BASE (variables + reset + typography + layout)
   2) COMPONENTS (header/nav/hero/cards/grids/cta/buttons)
   3) PAGES (page-scoped pravidla)
   4) PATCH / OVERRIDES (držet na konci)
========================================================= */

/* =========================================================
   1) BASE
========================================================= */

:root{
  /* Barvy */
  --page-bg:   #E8F5EF;
  --header-bg: #C9E3D6;

  --dark-900:  #0F172A;
  --text-dark: #1E293B;
  --text-muted:#475569;

  /* Layout */
  --container-width: 1200px;
  --radius-lg: 18px;
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);

  /* Mezery (konzistentní rytmus) */
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 36px;
  --space-6: 48px;
}
:root{
  /* ... tvoje stávající proměnné ... */

  /* sjednocený boční padding webu */
  --page-pad: 40px;
  --page-pad-mobile: 20px;
}
:root{ --scroll-offset: 110px; } /* cca výška hlavičky */
section[id], h2[id], h3[id]{ scroll-margin-top: var(--scroll-offset); }
main{ padding-top: 10px; } /* jen jemně, aby se to nedusilo pod headerem */

/* Reset */
*{ margin:0; padding:0; box-sizing:border-box; }
html, body{ min-height:100%; }

body{
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--page-bg);
  color: var(--text-dark);
  line-height: 1.65;
}

/* Typografie */
h1, h2, h3, h4{
  color: var(--dark-900);
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  font-weight: 700;
}
h1{ font-size: 48px; font-weight: 800; margin-bottom: var(--space-5); }
h2{ font-size: 38px; margin-top: var(--space-6); }
h3{ font-size: 24px; margin-top: var(--space-5); }

p{
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}
p:last-child{ margin-bottom: 0; }

/* Kotvy pod sticky header */

/* Layout */
.container{
  max-width: var(--container-width);
  margin: 0 auto;
}

/* Sekce */
.section{ padding: 56px 24px; }
.section.section-compact{ padding: 32px 24px; }

.section-lead{
  font-size: 19px;
  color: var(--text-dark);
  margin-bottom: 32px;
  max-width: 820px;
}

/* Page header (úvod podstránek) */
.page-header{ padding:  32px 24px 36px; }
.page-header h1{ font-size: 42px; margin-bottom: 28px; }
.page-header p{ max-width: 820px; }
.page-header .intro-note{
  font-size: 0.8em;
  max-width: 760px;
}

/* =========================================================
   2) COMPONENTS
========================================================= */

/* Header */
.site-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px 40px;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* Logo + značka */
.header-left{
  display:flex;
  align-items:center;
  gap: 18px;
}
.site-logo{ height: 74px; width:auto; }

.brand-block{
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.brand-name{
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 3px;
  color: #002b22;
}
.site-motto{
  font-size: 18px;
  color: #2f4f44;
  opacity: 1; /* oprava: dříve bylo 1,2 */
}

/* Navigace – jedna definice */
.main-nav{
  display:flex;
  gap: 32px;
  font-size: 17px;
}
.main-nav a{
  color: #1E293B;
  text-decoration:none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  transition: 0.2s ease;
}
.main-nav a:hover,
.main-nav a.active{
  border-bottom-color: #1E293B;
  color: #0F172A;
}

/* Header responsivně */
@media (max-width: 900px){
  .site-header{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .header-left{ align-items:center; }
  .main-nav{
    flex-wrap: wrap;
    gap: 18px;
    font-size: 16px;
  }
}

/* Hero (index) */
.hero{
  width:100%;
  min-height:50vh;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 48px 40px;
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.60),
    rgba(15, 23, 42, 0.35)
  );
}
.hero-inner{
  position:relative;
  max-width: var(--container-width);
  margin: 0 auto;
  width:100%;
  color:#F9FAFB;
}
.hero-title{
  font-size: 36px;
  font-weight:700;
  margin-bottom: 16px;
  color:#F9FAFB;
}
.hero-subtitle{
  font-size: 18px;
  max-width: 720px;
  margin: 0 auto;
  color:#E5E7EB;
}
@media (max-width: 768px){
  .hero{ padding: 32px 20px; min-height: 55vh; }
  .hero-title{ font-size: 26px; }
  .hero-subtitle{ font-size: 16px; }
}

/* Gridy */
.benefits-grid{
  margin-top:40px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:30px;
}
.how-grid{
  margin-top:40px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:32px;
}
.tech-grid,
.app-grid,
.data-grid{
  margin-top:40px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:30px;
}

/* Karty */
.benefit-box,
.how-item,
.tech-card,
.app-card,
.data-card{
  background:#fff;
  padding:26px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.benefit-box:hover,
.how-item:hover,
.tech-card:hover,
.app-card:hover,
.data-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

/* Responsivní gridy */
@media (max-width: 1100px){
  .benefits-grid{ grid-template-columns: repeat(2, 1fr); }
  .how-grid{ grid-template-columns: repeat(2, 1fr); }
  .tech-grid, .app-grid, .data-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px){
  .benefits-grid, .how-grid, .tech-grid, .app-grid, .data-grid{ grid-template-columns: 1fr; }
}

/* CTA */
.cta-section{
  padding: 70px 24px 60px;
  text-align:center;
  background:#D3E7E0;
  color: var(--dark-900);
}
.cta-section h2{ color: var(--dark-900); }
.cta-section p{
  color: var(--text-muted);
  max-width: 760px;
  margin: 14px auto 30px;
}

/* Button */
.btn-primary{
  display:inline-block;
  background:#0F172A;
  color:#fff;
  padding: 14px 30px;
  border-radius: 999px;
  text-decoration:none;
  font-weight:600;
  font-size:16px;
  transition: 0.2s ease;
}
.btn-primary:hover{
  background:#111827;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
}

/* Drobnosti */
.toc-back{
  display:inline-block;
  margin-top:12px;
  font-size:13px;
  text-decoration:none;
  color:#1E293B;
  opacity:0.75;
}
.toc-back:hover{
  opacity:1;
  text-decoration:underline;
}

/* =========================================================
   3) PAGES
========================================================= */

/* ========== ODBORNÁ STRÁNKA (page-odborne) ========== */

body.page-odborne .container{
  max-width: 1320px;
}

/* Layout: TOC + obsah */
body.page-odborne .page-layout{
  display:grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 40px;
  align-items:start;
}

/* TOC panel */
body.page-odborne .toc{
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 140px);
  overflow: auto;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}
body.page-odborne .toc h3{
  font-size: 16px;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}
body.page-odborne .toc details summary{
  cursor:pointer;
  font-weight:700;
  margin: 10px 0 8px;
  list-style:none;
}
body.page-odborne .toc details summary::-webkit-details-marker{ display:none; }
body.page-odborne .toc ul{ margin: 0 0 8px; padding-left: 16px; }
body.page-odborne .toc li{ margin: 6px 0; }
body.page-odborne .toc a{
  color: rgba(15,23,42,0.88);
  text-decoration:none;
  border-bottom: 1px solid transparent;
}
body.page-odborne .toc a:hover{
  border-bottom-color: rgba(15,23,42,0.28);
}
body.page-odborne .toc .toc-footer{
  margin-top: 14px;
  font-size: 12.5px;
  color: rgba(15,23,42,0.72);
  line-height: 1.45;
}

/* Pravý obsah */
body.page-odborne .main-content{
  width:100%;
  min-width:0;
}

/* Kapitoly */
body.page-odborne .tech-section{
  padding: 28px 0;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
body.page-odborne .tech-section:last-child{ border-bottom:none; }

body.page-odborne .tech-section h2{
  font-size: clamp(26px, 2.4vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
body.page-odborne .tech-section h3{
  font-size: 18px;
  margin: 18px 0 8px;
}
body.page-odborne .tech-section p{ margin: 0 0 14px; }

/* Callout */
body.page-odborne .callout{
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(15,23,42,0.10);
  border-left: 6px solid rgba(15,23,42,0.35);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
body.page-odborne .callout p{ margin-bottom: 8px; }
body.page-odborne .callout p:last-child{ margin-bottom: 0; }

/* Dvou-sloupec uvnitř kapitoly (stabilní GRID) */
body.page-odborne .two-col{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items:start;
} 

/* Pro/Con */
body.page-odborne .procon{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0 0;
}
body.page-odborne .procon .card{
  background: rgba(255,255,255,0.6);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}
body.page-odborne .procon .card h4{
  margin: 0 0 8px;
  font-size: 16px;
}
body.page-odborne .procon ul{ margin:0; padding-left: 18px; }
body.page-odborne .procon li{ margin: 6px 0; }

/* Poznámky */
body.page-odborne .small-note{
  font-size: 12.5px;
  color: rgba(15,23,42,0.72);
  margin-top: 10px;
}
body.page-odborne .mini{
  font-size: 80%; /* 50 % bylo už příliš malé */
  line-height: 1.35;
  opacity: 0.9;
}

/* „Nahoru“ link v TOC (normální, ne fixed) */
body.page-odborne aside.toc a.back-to-top{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.55);
  text-decoration: none;
  color: rgba(15,23,42,0.86);
  font-weight: 600;
  box-shadow: none;
}
body.page-odborne aside.toc a.back-to-top:hover{
  background: rgba(255,255,255,0.8);
}

/* Plovoucí „Nahoru“ – používej třídu .to-top */
a.to-top{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(15,23,42,0.88);
  color:#fff;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  transition: transform .15s ease, opacity .15s ease;
}
a.to-top:hover{ transform: translateY(-2px); }

/* Odborná stránka – responsivita */
@media (max-width: 1020px){
  body.page-odborne .page-layout{ grid-template-columns: 1fr; }
  body.page-odborne .toc{ position: relative; top: 0; max-height:none; }
  body.page-odborne .two-col{ grid-template-columns: 1fr; }
  body.page-odborne .procon{ grid-template-columns: 1fr; }
}

/* =========================================================
   4) PATCH / OVERRIDES (držet na konci)
========================================================= */

/* PATCH: seznamy – po resetu potřebují explicitní odsazení */
ul, ol{
  padding-left: 22px;
  margin: 0 0 var(--space-3);
  list-style-position: outside;
}
li{ margin: 6px 0; }
ul ul, ul ol, ol ul, ol ol{
  margin-top: 8px;
  margin-bottom: 0;
  padding-left: 18px;
}

/* PATCH: první nadpis v sekci nemá mít extra margin-top */
.section .container > h1:first-child,
.section .container > h2:first-child,
.section .container > h3:first-child,
.section .container > h1:first-of-type,
.section .container > h2:first-of-type,
.section .container > h3:first-of-type{
  margin-top: 0;
}

/* PATCH: zlepšení čitelnosti dlouhých textů v sekcích (jen top-level tok) */
.section .container > p,
.section .container > .section-lead,
.section .container > ul,
.section .container > ol{
  max-width: 900px;
}

/* PATCH: nadpisy v kartách bez velkého margin-top */
.benefit-box h3,
.how-item h3,
.tech-card h3,
.app-card h3,
.data-card h3{
  margin-top: 0;
  margin-bottom: 8px;
}

/* PATCH: callout jako globální komponenta */
.callout{
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(15,23,42,0.10);
  border-left: 6px solid rgba(15,23,42,0.35);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 18px 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.callout p{ margin-bottom: 8px; }
.callout p:last-child{ margin-bottom: 0; }
.callout ul{ margin: 0; padding-left: 22px; }

.callout--info{ border-left-color: rgba(14,165,233,0.65); }
.callout--ok{ border-left-color: rgba(34,197,94,0.65); }
.callout--warn{ border-left-color: rgba(245,158,11,0.75); }
.callout--danger{ border-left-color: rgba(239,68,68,0.75); }

/* Anchor / scroll */
html{ scroll-behavior: smooth; }
:root{ --scroll-offset: 0px; }
section[id], h2[id], h3[id]{ scroll-margin-top: var(--scroll-offset); }

/* První H2/H3 hned po úvodu bez extra mezery */
.page-header + .section h2,
.page-header + .section h3{ margin-top: 0; }
.tech-section{
  padding: var(--space-6) 0;
}

.tech-section > h2:first-child,
.tech-section > h3:first-child{
  margin-top: 0;
}
.two-col{
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

.tech-section{
  padding: var(--space-6) var(--space-5);
}
.tech-section > *{
  max-width: 1100px;      /* uprav dle tvého containeru */
  margin-left: auto;
  margin-right: auto;
}
main{
  padding-bottom: 120px; /* aby se text neschoval pod .to-top */
}
.to-top{
  bottom: 28px; /* nebo 32px */
}
.tech-section:last-of-type{
  padding-bottom: 120px;
}
/* FIX: stránka musí být scrollovatelná (kotvy + nezmizí obsah) */
html, body{
  height: auto;
}

body{
  overflow-x: hidden;
  overflow-y: auto;
}

main{
  height: auto;
  min-height: 0;
  overflow: visible;
}
html, body{ height:auto; }
body{ overflow-x:hidden; overflow-y:auto; }
main{ height:auto; min-height:0; overflow:visible; }
/* FIX: odborná stránka musí scrollovat (kotvy + nezmizí obsah) */
body.page-odborne{
  overflow-y: auto;
}

body.page-odborne main,
body.page-odborne .main-content,
body.page-odborne .page-layout{
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
:root{ --scroll-offset: 120px; } /* uprav dle výšky headeru */
section[id]{ scroll-margin-top: var(--scroll-offset); }
body.page-odborne .toc{
  position: sticky;
  z-index: 5;
}
body.page-odborne .main-content{
  padding-bottom: 120px; /* kvůli .to-top */
}
body.page-odborne .toc{ z-index: 5; }
body.page-odborne main,
body.page-odborne .main-content,
body.page-odborne .page-layout{
  height: auto !important;
  overflow: visible !important;
}
/* =========================================================
   EMERGENCY FIX – page-odborne: vrať scroll + klikatelné kotvy
   (dej na úplný konec CSS)
========================================================= */

html, body{ height: auto !important; }

body.page-odborne{
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* nejčastější viníci: main/wrappery s 100vh + overflow hidden */
body.page-odborne main,
body.page-odborne .container,
body.page-odborne .page-layout,
body.page-odborne .main-content{
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

/* pokud máš nějaký globální wrapper, zkusíme ho „odjistit“ taky */
body.page-odborne .page,
body.page-odborne .site,
body.page-odborne .layout,
body.page-odborne .content,
body.page-odborne .wrapper{
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

/* aby TOC bylo klikací a nic ho nepřekrývalo */
body.page-odborne .toc{ position: sticky; z-index: 20; }

.decision-tree li{
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(15,23,42,0.10);
}
.decision-tree li strong{
  color: rgba(15,23,42,0.88);
}
.decision-tree .branch{
  margin-top: 10px;
  padding-left: 18px;
  border-left: 3px solid rgba(15,23,42,0.18);
}
.decision-tree .branch p{
  margin: 8px 0 0;
}
.back-to-top{ display:inline-block; margin-top: 18px; }

.to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
}

.two-col{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* =========================================================
   FINAL FIX (keep at very end)
   - stable scrolling
   - reliable anchors
   - predictable 2-col layout
   - safe floating "to top"
========================================================= */

/* 1) kotvy (aby se nadpis neschoval pod header) */
:root{ --scroll-offset: 120px; }  /* uprav dle výšky headeru */
section[id]{ scroll-margin-top: var(--scroll-offset); }

/* 2) zajisti scroll (když by někde bylo 100vh / overflow hidden) */
html, body{
  height: auto !important;
}

body{
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

main{
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding-bottom: 120px; /* rezerva pro .to-top */
}

/* 3) layout pro odborné stránky */
body.page-odborne .page-layout,
body.page-odborne .main-content{
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.page-odborne .toc{
  position: sticky;
  top: calc(var(--scroll-offset) - 12px); /* aby sticky nezačínalo pod headerem */
  z-index: 20;
}

/* 4) dvě kolony – JEDNA autorita (mobile-first) */
.two-col{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

/* 5) "to top" vždy nad obsahem */
.to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
}

/* 6) decision box – JEDNA autorita */
.decision-box{
  background: rgba(15,23,42,0.04);
  border: 1px dashed rgba(15,23,42,0.25);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 18px 0;
}

.decision-box h4{
  font-size: 14px;
  margin: 0 0 8px;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: rgba(15,23,42,0.86);
}

.decision-box ul{ margin: 0; padding-left: 18px; }
.decision-box li{ margin: 6px 0; }

.back-to-top{ display:inline-block; margin-top: 18px; }
/* FIX: header musí být vidět na všech stránkách */
header,
.site-header{
  display: block !important;
  position: sticky;
  top: 0;
  z-index: 200;
}
/* =========================================
   HEADER – COMPACT MODE FOR INNER PAGES
========================================= */

body.page-system .site-header,
body.page-odborne .site-header{
  padding: 10px 24px;
}

body.page-system .site-motto,
body.page-odborne .site-motto{
  display: none; /* motto jen na úvodu */
}

body.page-system .brand-name,
body.page-odborne .brand-name{
  font-size: 14px;
  line-height: 1.2;
}

body.page-system .site-logo,
body.page-odborne .site-logo{
  width: 42px;
  height: auto;
}

/* oddělení hlavičky od obsahu */
.site-header{
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: #cfe7db;
}
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
}
/* =========================================
   HEADER: default = COMPACT (inner pages)
   Homepage can opt-in to expanded header
========================================= */

.site-header{
  padding: 10px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: #cfe7db;
}

/* motto defaultně skryté */
.site-motto{ display:none; }

/* kompaktnější typografie brandu */
.brand-name{
  font-size: 14px;
  line-height: 1.2;
}

.site-logo{
  width: 42px;
  height: auto;
}

/* pokud chceš sticky header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Home: jen drobné odlišení, BEZ rozbití zarovnání */
body.page-home .site-header{
  padding: 14px var(--page-pad); /* sjednoceno */
}

body.page-home .site-motto{
  display: block;
  margin-top: 6px;
}

/* volitelné: na home může být název o chlup menší, ale ne drasticky */
body.page-home .brand-name{
  font-size: 20px;
}

/* NIKDY nenastavuj width loga; drž pouze výšku */
body.page-home .site-logo{
  height: 88px;
  width: auto;
}

/* Sjednocení bočního odsazení: hlavička vs. obsah */
:root{
  --page-pad: 40px;
  --page-pad-mobile: 20px;
}

/* Sekce – sjednocený boční padding */
.section{ padding: 56px var(--page-pad); }
.section.section-compact{ padding: 32px var(--page-pad); }

/* Page header (úvod podstránek) */
.page-header{ padding: 32px var(--page-pad) 36px; }

/* Header */
.site-header{ padding: 14px var(--page-pad); }

/* Mobil */
@media (max-width: 900px){
  .section{ padding-left: var(--page-pad-mobile); padding-right: var(--page-pad-mobile); }
  .section.section-compact{ padding-left: var(--page-pad-mobile); padding-right: var(--page-pad-mobile); }
  .page-header{ padding-left: var(--page-pad-mobile); padding-right: var(--page-pad-mobile); }
  .site-header{ padding-left: var(--page-pad-mobile); padding-right: var(--page-pad-mobile); }
}

/* Header: větší logo a brand */
.site-logo{ height: 88px; }      /* bylo 74px */
.brand-name{
  font-size: 22px;              /* bylo 18px */
  font-weight: 700;             /* bylo 600 */
  letter-spacing: .2px;
}
.site-motto{
  font-size: 16px;              /* bylo 18px, ale 18 je už hodně "tlusté" */
  line-height: 1.25;
}
.site-header{ gap: 18px; }
.main-nav{ flex-wrap: wrap; justify-content: flex-end; }

.main-nav{
  flex-wrap: wrap;  /* když je málo místa, ať se to zalomí kontrolovaně */
  justify-content: flex-end;
}
.site-logo{ height: 88px; width:auto; }
.site-header{
  padding: 14px 0;             /* padding řeší vnitřní wrap */
}

.site-header > *{
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}
/* =========================================
   HEADER – kompaktnější a víc vlevo
========================================= */

.site-header{
  padding: 8px 24px;            /* bylo ~14px 40px */
  align-items: center;
}

/* brand víc vlevo – žádné extra odsazení */
.header-left{
  gap: 14px;                    /* menší mezera mezi logem a textem */
}

/* logo trochu menší, ale pořád dominantní */
.site-logo{
  height: 64px;                 /* bylo 88px */
  width: auto;
}

/* název víc kompaktní */
.brand-name{
  font-size: 20px;              /* bylo 22px */
  line-height: 1.1;
}

/* motto menší, ať hlavička neroste do výšky */
.site-motto{
  font-size: 14px;
  line-height: 1.2;
}
.main-nav{
  font-size: 16px;     /* bylo 17px */
  align-items: center;
}
.page-header{
  padding: 18px var(--page-pad) 28px;   /* bylo 32px … 36px */
}
.page-header h1{
  margin-bottom: 18px;   /* bylo 28px */
}
/* =========================================================
   HEADER – finální kompaktní layout (desktop)
   dej na ÚPLNÝ konec style.css
========================================================= */

/* Zruš „homepage“ výjimky, ať je hlavička jednotná všude */
body.page-home .site-header{ padding: 8px 16px !important; }
body.page-home .site-logo{ height: 64px !important; width: auto !important; }
body.page-home .brand-name{ font-size: 20px !important; }

/* Kompaktní hlavička + víc vlevo */
.site-header{
  padding: 8px 16px !important;   /* víc vlevo než 24px */
  gap: 16px;
  flex-wrap: nowrap;              /* drž to v jednom řádku (desktop) */
}

/* Klíčové: odjistit min-width, která ti rozhazuje layout */
.header-left{
  min-width: 0 !important;        /* zruší staré min-width:360px */
  gap: 12px;
}

/* Logo + brand kompaktně */
.site-logo{ height: 104px; width: auto; }

.brand-name{
  font-size: 20px;
  line-height: 1.1;
}

.site-motto{
  font-size: 14px;
  line-height: 1.2;
  margin-top: 2px;
}

/* Navigace: ať je výš a napravo (a nezůstává „utopená“) */
.main-nav{
  margin-left: auto;              /* posune nav napravo */
  align-items: center;
  gap: 22px;
  font-size: 16px;
  flex-wrap: wrap;                /* když dojde místo, zalomí se kontrolovaně */
}

/* Nav linky méně vysoké = opticky „výš“ */
.main-nav a{
  padding: 2px 0;                 /* místo velkých paddingů */
  line-height: 1.2;
}
.page-header{ padding-top: 10px; }
.page-header h1{ margin-bottom: 14px; }
/* =========================================================
   HEADER – grid layout: brand vlevo, nav vpravo (k spodku loga)
   + page header posun výš
   dej na ÚPLNÝ konec style.css
========================================================= */

/* 1) HLAVIČKA jako grid */
.site-header{
  display: grid !important;
  grid-template-columns: 1fr auto;     /* vlevo brand, vpravo nav */
  grid-template-rows: auto auto;       /* 2 řádky pro přesné zarovnání */
  align-items: start;
  padding: 10px 16px !important;
  gap: 6px 20px;
}

/* brand (logo+text) zabírá oba řádky vlevo */
.header-left{
  grid-column: 1;
  grid-row: 1 / span 2;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0 !important;
}

/* logo */
.site-logo{
  height: 70px;        /* klidně 68–76 dle chuti */
  width: auto;
  display: block;
}

/* brand text kompaktně */
.brand-name{
  font-size: 20px;
  line-height: 1.15;
  margin: 0;
}
.site-motto{
  font-size: 14px;
  line-height: 1.2;
  margin-top: 2px;
}

/* nav doprava a DOLE = k úrovni spodního okraje loga */
.main-nav{
  grid-column: 2;
  grid-row: 2;                       /* druhý řádek */
  justify-self: end;
  align-self: end;                   /* klíč: dolů */
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 16px;
  margin: 0;
}

/* nav linky méně vysoké */
.main-nav a{
  padding: 2px 0;
  line-height: 1.2;
}

/* 2) NADPIS STRÁNKY výš (menší mezera pod hlavičkou) */
.page-header{
  padding-top: 8px !important;      /* bylo ~32 */
  padding-bottom: 24px !important;
}
.page-header h1{
  margin-bottom: 16px !important;
}

/* 3) Mobil: vrať flex sloupec (grid by byl moc těsný) */
@media (max-width: 900px){
  .site-header{
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px !important;
  }
  .main-nav{
    align-self: flex-start;
    justify-self: flex-start;
    grid-row: auto;
    font-size: 16px;
  }
}
/* kotvy nelezou pod hlavičku (pokud je sticky) */
:root{ --scroll-offset: 110px; }
section[id]{ scroll-margin-top: var(--scroll-offset); }
/* =========================================================
   SAFE LOCK (KEEP LAST) — nic nemaž, jen přepiš konflikty
   - hlavička stabilní (brand vlevo, nav vpravo dole)
   - page-header výš
   - kotvy pod sticky header
========================================================= */

:root{
  --page-pad: 40px;
  --page-pad-mobile: 20px;
  --scroll-offset: 110px;
}

/* sjednocené boční paddingy (bez zásahu do vnitřních gridů) */
.section{ padding-left: var(--page-pad) !important; padding-right: var(--page-pad) !important; }
.page-header{ padding-top: 18px !important; padding-bottom: 28px !important; }

@media (max-width: 900px){
  .section{ padding-left: var(--page-pad-mobile) !important; padding-right: var(--page-pad-mobile) !important; }
}

/* kotvy (aby se nadpis neschoval pod sticky header) */
section[id], h2[id], h3[id]{ scroll-margin-top: var(--scroll-offset) !important; }

/* sticky hlavička — jednotně všude */
.site-header{
  position: sticky !important;
  top: 0 !important;
  z-index: 200 !important;
  background: var(--header-bg) !important;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}

/* DESKTOP: grid layout = logo+brand vlevo, nav vpravo dole */
@media (min-width: 901px){
  .site-header{
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto !important;
    align-items: start !important;
    gap: 6px 20px !important;
    padding: 10px var(--page-pad) !important;
  }

  .header-left{
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    min-width: 0 !important;
  }

  .site-logo{
    height: 70px !important;
    width: auto !important;
    display: block !important;
  }

  .brand-name{
    font-size: 20px !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }

  .site-motto{
    font-size: 14px !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
  }

  .main-nav{
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    align-self: end !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    font-size: 16px !important;
    margin: 0 !important;
  }

  .main-nav a{
    padding: 2px 0 !important;
    line-height: 1.2 !important;
  }
}

/* MOBIL: klasicky sloupec */
@media (max-width: 900px){
  .site-header{
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 10px var(--page-pad-mobile) !important;
  }
  .site-logo{ height: 64px !important; }
  .brand-name{ font-size: 18px !important; }
  .site-motto{ font-size: 13px !important; }
  .main-nav{ gap: 16px !important; font-size: 15px !important; }
}
/* ==== FIX: header layout for page-system ==== */
body.page-system .site-header{
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

body.page-system .main-nav{
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}
/* =========================================================
   HEADER – SINGLE SOURCE OF TRUTH (put at VERY END)
   - one layout for all pages
   - reliable wrapping
   - no page-specific hacks
========================================================= */

.site-header{
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 12px var(--page-pad) !important;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);

  position: sticky;
  top: 0;
  z-index: 200;
}

.header-left{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0; /* důležité: zabrání rozbití při zalamování */
}

.logo-link{ display: inline-flex; }

.site-logo{
  height: 70px;
  width: auto;
  display: block;
}

.brand-block{
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-name{
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  color: #002b22;
}

.site-motto{
  font-size: 14px;
  line-height: 1.25;
  color: #2f4f44;
  margin-top: 2px;
}

.main-nav{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;

  gap: 18px;
  margin-left: auto;

  font-size: 16px;
}

.main-nav a{
  color: #1E293B;
  text-decoration: none;
  font-weight: 600;

  padding: 2px 0;
  border-bottom: 2px solid transparent;
  line-height: 1.2;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active{
  border-bottom-color: #0F172A;
  color: #0F172A;
}

/* Mobil */
@media (max-width: 900px){
  .site-header{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px var(--page-pad-mobile) !important;
  }

  .main-nav{
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
    font-size: 16px;
  }

  .site-logo{ height: 60px; }
  .site-motto{ display: none; } /* na mobilu skryjeme motto kvůli výšce */
}
/* ===============================
   HEADER FINAL (single authority)
   Dej na ÚPLNÝ konec style.css
=============================== */

.site-header{
  display: flex !important;
  flex-direction: row !important; /* pojistka proti starým grid/flex variantám */
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px;

  padding: 12px var(--page-pad) !important;
  background: var(--header-bg) !important;
  border-bottom: 1px solid rgba(15,23,42,0.08) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06) !important;

  position: sticky !important;
  top: 0;
  z-index: 200;
}

.header-left{
  display: flex !important;
  align-items: center !important;
  gap: 14px;
  min-width: 0;
}

.logo-link{ display: inline-flex; }

.site-logo{
  height: 70px;
  width: auto;
  display: block;
}

.brand-block{
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-name{
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  color: #002b22;
}

.site-motto{
  font-size: 14px;
  line-height: 1.25;
  color: #2f4f44;
  margin-top: 2px;
}

.main-nav{
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;

  gap: 18px;
  margin-left: auto;

  font-size: 16px;
}

.main-nav a{
  color: #1E293B;
  text-decoration: none;
  font-weight: 600;

  padding: 2px 0;
  border-bottom: 2px solid transparent;
  line-height: 1.2;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active{
  border-bottom-color: #0F172A;
  color: #0F172A;
}

/* Mobil */
@media (max-width: 900px){
  .site-header{
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px;
    padding: 12px var(--page-pad-mobile) !important;
  }

  .main-nav{
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
    font-size: 16px;
  }

  .site-logo{ height: 60px; }
  .site-motto{ display: none; }
}
:root{ --scroll-offset: 110px; } /* cca výška hlavičky */
section[id], h2[id], h3[id]{ scroll-margin-top: var(--scroll-offset); }
main{ padding-top: 10px; } /* jen jemně, aby se to nedusilo pod headerem */

<link rel="stylesheet" href="assets/style.css?v=5">
/* SSCC accordion (details/summary) */
.sscc-accordion{ padding: 10px 0; }
.sscc-accordion > summary{
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.08);
}
.sscc-accordion[open] > summary{ margin-bottom: 10px; }
.sscc-accordion > summary::-webkit-details-marker{ display:none; }

.accordion-body{ padding: 2px 14px 14px; }
.media{ margin: 12px 0 0; }
.media img{
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}
.jump-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:center;
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px dashed rgba(15,23,42,.25);
  border-radius: 12px;
  background: rgba(255,255,255,.55);
}

.jump-links .jump-label{
  font-weight: 700;
  opacity: .85;
  margin-right: 6px;
}

.jump-links a{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.18);
  background: rgba(255,255,255,.75);
  text-decoration: none;
}

.jump-links a:hover{
  transform: translateY(-1px);
}
.img-toggle{
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  box-shadow: 0 10px 25px rgba(2,6,23,0.06);
}

.img-toggle > summary{
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.img-toggle > summary::-webkit-details-marker{ display:none; }

.img-toggle[open] > summary{
  margin-bottom: 10px;
}

.img-toggle img{
  border-radius: calc(var(--radius-lg) - 6px);
}
