/*
 * SSLK - hlavni styly.
 *
 * Psano mobile-first. Stara sablona mela nulu media queries a skladala
 * layout na floatech s procentnimi sirkami, takze na telefonu nefungovala.
 * Tady je zaklad jednosloupcovy a sirsi rozlozeni se zapina az od 48em.
 */

/* ---------------------------------------------------------------- Tokeny */

:root {
	--accent:        #35aadc;
	--accent-dark:   #1d87b4;
	--accent-soft:   #eaf6fc;

	--ink:           #1f2933;
	--ink-soft:      #52606d;
	--ink-muted:     #7b8794;

	--bg:            #ffffff;
	--bg-soft:       #f6f8f9;
	--line:          #e3e8ec;

	--wrap:          72rem;
	--gutter:        1rem;
	--radius:        6px;

	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
	        "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ------------------------------------------------------------------ Zaklad */

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

html {
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.6;
}

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

a {
	color: var(--accent-dark);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}
a:hover { color: var(--ink); }

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

h1, h2, h3, h4 {
	line-height: 1.25;
	margin: 0 0 .5em;
	font-weight: 600;
	color: var(--ink);
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

p, ul, ol, table { margin: 0 0 1rem; }

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.skip-link {
	position: absolute;
	left: -9999px;
}
.skip-link:focus {
	left: var(--gutter);
	top: var(--gutter);
	z-index: 100;
	padding: .5rem .75rem;
	background: var(--bg);
	border: 2px solid var(--accent);
	border-radius: var(--radius);
}

/* ---------------------------------------------------------------- Hlavicka */

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding-block: 1rem;
	background-image: url("../img/kings.jpg");
	background-repeat: no-repeat;
	background-position: right center;
	background-size: auto 100%;
}

h1.site-title,
.site-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	max-width: 22ch;
}
.site-title a {
	color: var(--ink);
	text-decoration: none;
}
.site-title a:hover { color: var(--accent-dark); }

.site-description {
	margin: .25rem 0 0;
	font-size: .875rem;
	color: var(--ink-muted);
	max-width: 40ch;
}

/* -------------------------------------------------------------------- Menu */

.nav { background: var(--accent); }

.nav__toggle {
	display: flex;
	align-items: center;
	gap: .5rem;
	width: 100%;
	padding: .75rem 0;
	border: 0;
	background: none;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.nav__toggle-bar,
.nav__toggle-bar::before,
.nav__toggle-bar::after {
	display: block;
	width: 1.25rem;
	height: 2px;
	background: currentColor;
	content: "";
}
.nav__toggle-bar { position: relative; }
.nav__toggle-bar::before { position: absolute; top: -6px; }
.nav__toggle-bar::after  { position: absolute; top: 6px; }

.nav__list {
	display: none;
	margin: 0;
	padding: 0 0 .5rem;
	list-style: none;
}
.nav__list.is-open { display: block; }

.nav__list li a,
.nav__list .page_item a {
	display: block;
	padding: .6rem .25rem;
	color: rgba(255, 255, 255, .88);
	text-decoration: none;
	border-top: 1px solid rgba(255, 255, 255, .18);
}
.nav__list a:hover,
.nav__list a:focus-visible { color: #fff; }

.nav__list .current_page_item > a,
.nav__list .current-menu-item > a,
.nav__list .current_page_ancestor > a {
	color: #fff;
	font-weight: 600;
}

/* --------------------------------------------------------------- Obsah */

.site-main {
	padding-block: 1.5rem 3rem;
}

.page-header { margin-bottom: 1.5rem; }
.page-header h1 { margin-bottom: .25rem; }

.entry__date,
.docs__date {
	color: var(--ink-muted);
	font-size: .8125rem;
}

.entry__meta {
	font-size: .8125rem;
	color: var(--ink-muted);
}

/* Rozlozeni "obsah + dokumenty" */
.layout {
	display: grid;
	gap: 2rem;
}

/* ------------------------------------------------------------- Aktuality */

.news__item {
	padding-bottom: 1.25rem;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid var(--line);
}
.news__item:last-child { border-bottom: 0; }

.news__title {
	margin-bottom: .25rem;
	font-size: 1.1875rem;
}
.news__title a { color: var(--ink); text-decoration: none; }
.news__title a:hover { color: var(--accent-dark); }

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

/* První aktualita dostane trochu víc důrazu, jako na staré titulce. */
.news__item--lead .news__title { font-size: 1.5rem; }

/* ------------------------------------------------------------- Dokumenty */

.docs__group { margin-bottom: 1.5rem; }

.docs__title {
	font-size: 1rem;
	padding-bottom: .375rem;
	margin-bottom: .625rem;
	border-bottom: 2px solid var(--accent);
}
.docs__title a { color: var(--ink); text-decoration: none; }
.docs__title a:hover { color: var(--accent-dark); }

.docs__group--depth-1,
.docs__group--depth-2 {
	padding-left: .875rem;
	border-left: 2px solid var(--line);
}
.docs__group--depth-1 .docs__title,
.docs__group--depth-2 .docs__title {
	font-size: .9375rem;
	border-bottom-width: 1px;
	border-bottom-color: var(--line);
}

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

.docs__item {
	padding-block: .4rem;
	border-bottom: 1px solid var(--line);
}
.docs__item:last-child { border-bottom: 0; }

.docs__link { font-weight: 500; }
.docs__date { display: block; }
.docs__desc {
	margin: .2rem 0 0;
	font-size: .875rem;
	color: var(--ink-soft);
	line-height: 1.45;
}

/* --------------------------------------------------------------- Turnaje */

.tournaments + .tournaments { margin-top: 2.5rem; }

.tournaments__heading {
	padding-bottom: .5rem;
	margin-bottom: 1rem;
	border-bottom: 2px solid var(--accent);
}

.tournament-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tournament {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	padding: 1rem;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.tournament--upcoming {
	background: var(--accent-soft);
	border-color: #bfe3f4;
}

.tournament__title { margin: 0; font-size: 1.0625rem; }
.tournament__title a { color: var(--ink); text-decoration: none; }
.tournament__title a:hover { color: var(--accent-dark); }

.tournament__dates {
	margin: 0;
	font-size: .875rem;
	font-weight: 600;
	color: var(--accent-dark);
}

.tournament__excerpt {
	margin: 0;
	font-size: .9375rem;
	color: var(--ink-soft);
}
.tournament__excerpt > :last-child { margin-bottom: 0; }

.tournament__links {
	display: flex;
	flex-wrap: wrap;
	gap: .375rem;
	margin: auto 0 0;
	padding: 0;
	list-style: none;
}

.tournament__link {
	display: inline-block;
	padding: .2rem .5rem;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: .8125rem;
	text-decoration: none;
	color: var(--accent-dark);
}
.tournament__link:hover {
	border-color: var(--accent);
	color: var(--ink);
}

/* Soubor, ktery na disku chybi - oznaceno nocni kontrolou v cronu. */
.tournament__link--missing {
	color: #a4353b;
	border-color: #f0d3d4;
	text-decoration: line-through;
}

/* Prepinac roku v archivu */
.years {
	display: flex;
	flex-wrap: wrap;
	gap: .375rem;
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
}
.years__link {
	display: inline-block;
	padding: .25rem .625rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font-size: .875rem;
	text-decoration: none;
	color: var(--ink-soft);
}
.years__link:hover { border-color: var(--accent); color: var(--ink); }
.years__link[aria-current="page"] {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
	font-weight: 600;
}

/* --------------------------------------------------------------- Paticka */

.site-footer {
	margin-top: 2rem;
	padding-block: 1.25rem;
	border-top: 2px solid var(--accent);
	background: var(--bg-soft);
}
.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .5rem;
	font-size: .875rem;
	color: var(--ink-muted);
}
.site-footer p { margin: 0; }

/* ------------------------------------------------------ Strankovani, WP */

.pagination { margin-top: 2rem; }
.pagination .page-numbers {
	display: inline-block;
	padding: .25rem .625rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-decoration: none;
}
.pagination .current {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.alignleft, .alignright, .aligncenter { margin-bottom: 1rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
	margin: .25rem 0 0;
	font-size: .8125rem;
	color: var(--ink-muted);
}
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: .4rem .5rem; border-bottom: 1px solid var(--line); text-align: left; }

/* ============================================================ >= 48em */

@media (min-width: 48em) {
	:root { --gutter: 1.5rem; }

	h1 { font-size: 2rem; }
	.site-title { font-size: 1.5rem; }

	.site-header__inner { padding-block: 1.5rem; }

	.nav__toggle { display: none; }

	.nav__list {
		display: flex;
		flex-wrap: wrap;
		padding-bottom: 0;
	}
	.nav__list li a,
	.nav__list .page_item a {
		padding: .7rem .875rem;
		border-top: 0;
		border-left: 1px solid rgba(255, 255, 255, .22);
	}
	.nav__list li:first-child a { border-left: 0; }
	.nav__list .current_page_item > a,
	.nav__list .current-menu-item > a,
	.nav__list .current_page_ancestor > a {
		background: rgba(255, 255, 255, .14);
	}

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

	.alignleft  { float: left;  margin-right: 1.25rem; }
	.alignright { float: right; margin-left: 1.25rem; }
}

/* ============================================================ >= 64em */

@media (min-width: 64em) {
	.layout--with-docs {
		grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
		gap: 3rem;
	}
	.tournament-grid { grid-template-columns: repeat(3, 1fr); }
	/* Dve nejnovejsi aktuality vedle sebe, zbytek pres celou sirku -
	   stejna hierarchie jako na stare titulce. */
	.news__list--split {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		column-gap: 1.5rem;
	}
	.news__list--split .news__item:nth-child(n + 3) { grid-column: 1 / -1; }
	.news__list--split .news__item--lead .news__title { font-size: 1.375rem; }

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

/* ============================================================== Tisk */

@media print {
	.nav, .site-footer, .skip-link, .years { display: none; }
	body { color: #000; }
	a { text-decoration: underline; }
}
