:root {
	--color-text: #23302a;
	--color-muted: #5f6f66;
	--color-accent: #3d7a4f;
	--color-accent-dark: #2c5c3a;
	--color-bg: #fbfaf6;
	--color-surface: #ffffff;
	--color-border: #e3e1d8;
	--radius: 10px;
	--container: 960px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--color-text);
	background: var(--color-bg);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

a { color: var(--color-accent); }
a:hover { color: var(--color-accent-dark); }

img { max-width: 100%; height: auto; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* Hlavička a menu */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; flex-wrap: wrap; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--color-accent-dark); text-decoration: none; letter-spacing: -.01em; }

.main-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.main-menu a { display: block; padding: .45rem .9rem; border-radius: 999px; color: var(--color-text); text-decoration: none; }
.main-menu a:hover { background: #eef3ee; }
.main-menu a.active { background: var(--color-accent); color: #fff; }

.main-menu li { position: relative; }
.main-menu .menu-label { display: block; padding: .45rem .9rem; border-radius: 999px; cursor: default; }
.has-submenu > a::after, .has-submenu > .menu-label::after { content: " ▾"; font-size: .75em; opacity: .7; }
.has-submenu:hover > .menu-label, .has-submenu:focus-within > .menu-label { background: #eef3ee; }
.has-active > a, .has-active > .menu-label { box-shadow: inset 0 0 0 1px var(--color-accent); }
.main-menu .submenu { display: none; position: absolute; top: 100%; left: 0; z-index: 10; min-width: 220px; flex-direction: column; gap: .1rem; padding: .4rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.has-submenu:hover > .submenu, .has-submenu:focus-within > .submenu { display: flex; }
.main-menu .submenu a { border-radius: 6px; }

.menu-toggle { display: none; padding: .5rem 1rem; border: 1px solid var(--color-border); border-radius: 999px; background: none; font: inherit; cursor: pointer; }

@media (max-width: 700px) {
	.menu-toggle { display: block; }
	.main-menu { display: none; width: 100%; padding-bottom: 1rem; }
	.menu-open .main-menu { display: block; }
	.main-menu ul { flex-direction: column; }
	.main-menu .submenu { display: flex; position: static; min-width: 0; padding: 0 0 0 1rem; background: none; border: 0; box-shadow: none; }
	.has-submenu > a::after, .has-submenu > .menu-label::after { content: none; }
}

/* Obsah */
main { flex: 1; padding-top: 2.5rem; padding-bottom: 3rem; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; margin: 0 0 1.5rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.page-content { overflow-wrap: break-word; }
.page-content img { border-radius: var(--radius); }
.page-content figure { margin: 1.5rem 0; }
.page-content figcaption { color: var(--color-muted); font-size: .9rem; }
.page-content table { border-collapse: collapse; width: 100%; }
.page-content td, .page-content th { border: 1px solid var(--color-border); padding: .5rem; }
.page-content iframe { max-width: 100%; }

/* Sekce stránky */
.section-text { margin-bottom: 2.5rem; }
.section-text > h2:first-child { margin-top: 0; }

.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(320px, 60vh, 560px); margin-bottom: 2.5rem; overflow: hidden; background: var(--color-accent-dark); color: #fff; }
.page > .hero:first-child { margin-top: -2.5rem; }
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.hero-with-image::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15, 30, 20, .78), rgba(15, 30, 20, .3)); }
.hero-inner { padding-top: 3rem; padding-bottom: 3rem; }
.hero h1, .hero h2 { margin: 0 0 1rem; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; color: #fff; }
.hero-content { max-width: 640px; font-size: 1.15rem; }
.hero-content > :first-child { margin-top: 0; }
.hero-content > :last-child { margin-bottom: 0; }
.hero a { color: #fff; }

.notice, .flash { padding: .75rem 1rem; border-radius: var(--radius); background: #fff6d6; border: 1px solid #ecd98a; margin-bottom: 1.5rem; }

/* Galerie */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.gallery-item { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--color-border); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.04); }

/* Dokumenty */
.documents ul { list-style: none; padding: 0; margin: 0; }
.documents li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem; padding: .8rem 1rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: .5rem; }
.documents li::before { content: "PDF"; font-size: .7rem; font-weight: 700; color: #fff; background: #c0392b; padding: .1rem .35rem; border-radius: 4px; }
.documents small { color: var(--color-muted); }
.documents .download { margin-left: auto; font-size: .9rem; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 95vw; max-height: 95vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { display: block; max-width: 95vw; max-height: 85vh; border-radius: 6px; }
.lightbox-caption { color: #fff; text-align: center; margin: .5rem 0 0; }
.lightbox-close { position: fixed; top: 12px; right: 16px; font-size: 2.5rem; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

/* Patička */
.site-footer { border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: .9rem; padding: 1.5rem 0; }
.site-footer .container { display: flex; justify-content: space-between; gap: 1rem; }
