/*
Theme Name: Na maKSimum
Theme URI: https://namaksimum.cz
Description: Téma pro celorepublikový sjezd mládeže KS „Na maKSimum“. Úvodní stránka (hero, úvodní text, karty seminářů) a fotogalerie minulých ročníků.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Author: Na maKSimum
Text Domain: namaksimum
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Fonts: Inter (SIL OFL 1.1, rsms.me/inter), Sligoil Micro (SIL OFL 1.1, Ariel Martín Pérez / Velvetyne).
*/

/* ---------- Fonts ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-latin-700-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-latin-ext-700-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sligoil Micro"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/sligoil-micro-400.woff") format("woff"); }
@font-face { font-family: "Sligoil Micro"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/sligoil-micro-500.woff") format("woff"); }
@font-face { font-family: "Sligoil Micro"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/sligoil-micro-700.woff") format("woff"); }

/* ---------- Tokens ---------- */
:root {
	--nm-purple: #9020b4;
	--nm-blue: #3e85f1;
	--nm-green: #01ef8f;
	--nm-pink: #f726b5;
	--nm-ink: #000;
	--nm-nav-ink: #304254;
	--nm-bg: #fff;
	--nm-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--nm-mono: "Sligoil Micro", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--nm-header-h: 48px;
	--nm-container: 1209px;
	--nm-gutter: 16px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nm-header-h); }
body {
	margin: 0;
	padding-top: var(--nm-header-h);
	background: var(--nm-bg);
	color: var(--nm-ink);
	font-family: var(--nm-sans);
	font-size: 16px;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
.nm-main { display: block; }
.nm-container {
	width: 100%;
	max-width: calc(var(--nm-container) + 2 * var(--nm-gutter));
	margin-inline: auto;
	padding-inline: var(--nm-gutter);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	top: 8px; left: 8px; z-index: 1000;
	padding: 8px 12px; background: #fff; color: #000;
}

/* ---------- Header / navigation ---------- */
.nm-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 100;
	height: var(--nm-header-h);
	background: #fff;
	border-bottom: 1px solid rgba(0, 0, 0, .07);
}
.admin-bar .nm-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .nm-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .nm-header { position: absolute; } }

.nm-nav { height: 100%; display: flex; justify-content: flex-end; align-items: center; padding-right: 16px; }
.nm-nav__list { display: flex; gap: 32px; margin: 0; padding: 0; list-style: none; }
.nm-nav__list a {
	display: block;
	color: var(--nm-nav-ink);
	font-size: 15px;
	line-height: 18px;
	font-weight: 400;
	text-decoration: none;
}
.nm-nav__list a:hover { text-decoration: underline; }
.nm-nav__list .is-active > a,
.nm-nav__list .current_page_item > a,
.nm-nav__list .current-menu-item > a { font-weight: 700; }
.nm-nav__toggle { display: none; }

/* ---------- Hero ---------- */
.nm-hero {
	position: relative;
	height: 735px;
	overflow: clip;
}
.nm-hero__art {
	position: absolute;
	top: -669px;
	left: calc(50% - 372.5px);
	width: 1098px;
	max-width: none;
	pointer-events: none;
	user-select: none;
	animation: nm-fade-down 1.1s cubic-bezier(.2, .7, .2, 1) both;
}
.nm-hero__inner { position: relative; height: 100%; }
.nm-hero__subtitle,
.nm-hero__dates {
	position: absolute;
	margin: 0;
	font-size: 42.9px;
	line-height: 50px;
	font-weight: 700;
	white-space: nowrap;
}
.nm-hero__subtitle { top: 119px; left: calc(var(--nm-gutter) + 11px); }
.nm-hero__dates { top: 540px; left: calc(var(--nm-gutter) + 4px); }
.nm-hero__title {
	position: absolute;
	top: 213px;
	left: calc(var(--nm-gutter) + 4px);
	margin: 0;
	font-family: var(--nm-mono);
	font-size: 150.82px;
	line-height: 131px;
	font-weight: 700;
	letter-spacing: 0;
	white-space: nowrap;
	animation: nm-fade-in 1.2s .15s ease-out both;
}
.nm-hero__logo {
	position: absolute;
	top: 350px;
	left: calc(var(--nm-gutter) + 1079px);
	width: 106px;
	height: 120px;
	fill: #000;
}

@keyframes nm-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes nm-fade-down { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.nm-hero__art, .nm-hero__title { animation: none; }
}

/* ---------- Intro text ---------- */
.nm-intro { padding-bottom: 15px; }
.nm-intro > * { margin: 0 0 47px; padding-inline: 4px; }
.nm-intro > :last-child { margin-bottom: 0; }
.nm-intro p { font-size: 26.67px; line-height: 33px; font-weight: 400; }
.nm-intro a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- Seminars ---------- */
.nm-seminars {
	position: relative;
	padding: 80px 0 46px;
	overflow: clip;
}
.nm-seminars__art {
	position: absolute;
	top: 0;
	left: calc(50% - 815.5px);
	width: 1631px;
	max-width: none;
	pointer-events: none;
	user-select: none;
}
.nm-seminars .nm-container { position: relative; }
.nm-seminars__title {
	margin: 0 0 62px;
	font-family: var(--nm-mono);
	font-size: 73.33px;
	line-height: 73px;
	font-weight: 500;
	text-align: center;
}
.nm-seminars__grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 54px; }
.nm-seminars__col { display: flex; flex-direction: column; gap: 44px; width: 367px; flex: 0 0 367px; }

.nm-card {
	background: var(--nm-blue);
	color: #000;
	padding: 24px 15px 20px;
}
.nm-card__speaker { margin: 0 0 8px; font-size: 26.67px; line-height: 33px; font-weight: 400; }
.nm-card__title { margin: 0 0 7px; font-size: 30.67px; line-height: 42px; font-weight: 700; font-style: italic; }
.nm-card__text { max-width: 333.1px; font-size: 15.07px; line-height: 22px; font-weight: 700; }
.nm-card__text > * { margin: 0 0 22px; }
.nm-card__text > :last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.nm-footer { background: var(--nm-purple); color: #fff; padding-top: 24px; }
.nm-footer__inner {
	min-height: 116px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-left: max(var(--nm-gutter), calc(50% - 600.5px));
	margin-right: max(var(--nm-gutter), calc(50% - 669.5px));
}
.nm-footer__email {
	color: #fff;
	font-size: 20px;
	line-height: 25px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
	word-break: break-all;
}
.nm-footer__social { display: flex; gap: 28px; flex-shrink: 0; }
.nm-footer__icon { display: block; width: 56px; height: 56px; color: #fff; transition: opacity .2s; }
.nm-footer__icon:hover { opacity: .8; }
.nm-footer__icon svg { display: block; width: 100%; height: 100%; }

/* ---------- Photo page (template "Fotogalerie") ---------- */
.nm-photos { padding-bottom: 147px; }
.nm-photos > * {
	max-width: calc(1144px + 2 * var(--nm-gutter));
	margin: 0 auto;
	padding-inline: var(--nm-gutter);
}
.nm-photos > h1:first-child {
	max-width: none;
	margin: 0;
	padding: 32px var(--nm-gutter) 33px;
	background: var(--nm-purple);
	color: #fff;
	font-size: 73.33px;
	line-height: 89px;
	font-weight: 700;
	text-align: center;
}
.nm-photos > h2 {
	margin-top: 231px;
	margin-bottom: 28px;
	font-family: var(--nm-mono);
	font-size: 22.67px;
	line-height: 27px;
	font-weight: 400;
}
.nm-photos > h1:first-child + h2,
.nm-photos > h2:first-child { margin-top: 90px; }
.nm-photos > h2:nth-of-type(odd):not(.has-text-color) { color: var(--nm-green); }
.nm-photos > h2:nth-of-type(even):not(.has-text-color) { color: var(--nm-blue); }
.nm-photos > p { margin-bottom: 28px; font-size: 20px; }

.nm-photos figure.wp-block-image { margin: 0; }
.nm-photos .wp-block-image img { display: block; width: 100%; height: auto; }

.nm-photos .wp-block-gallery.has-nested-images {
	--wp--style--unstable-gallery-gap: 30px;
	gap: 27px 30px;
	margin: 0 auto 27px;
}
.nm-photos .wp-block-gallery.has-nested-images figure.wp-block-image img { height: 100%; }

.nm-photos .wp-block-columns {
	gap: 28px 30px;
	margin-bottom: 30px;
	align-items: flex-start !important;
}
.nm-photos .wp-block-column > * + * { margin-top: 28px; }
.nm-photos > :last-child { margin-bottom: 0; }

/* ---------- Generic pages ---------- */
.nm-page { padding-bottom: 96px; }
.nm-page__banner { background: var(--nm-purple); color: #fff; padding: 32px var(--nm-gutter); text-align: center; }
.nm-page__title { margin: 0; font-size: clamp(32px, 5vw, 73.33px); line-height: 1.2; font-weight: 700; }
.nm-page__content { max-width: 860px; padding-top: 56px; font-size: 18px; line-height: 1.6; }
.nm-page__content h2, .nm-page__content h3 { font-family: var(--nm-mono); font-weight: 500; line-height: 1.15; }

/* ---------- Tablet & mobile (the original also switches layout below desktop) ---------- */
@media (max-width: 1259px) {
	.nm-hero {
		height: auto;
		padding: 25vw 0 9vw;
	}
	.nm-hero__art {
		top: -50vw;
		left: auto;
		right: -8vw;
		width: 92vw;
	}
	.nm-hero__inner { height: auto; }
	.nm-hero__subtitle,
	.nm-hero__title,
	.nm-hero__dates,
	.nm-hero__logo { position: relative; top: auto; left: auto; }
	.nm-hero__subtitle,
	.nm-hero__dates { font-size: clamp(22px, 3.6vw, 42.9px); line-height: 1.17; white-space: normal; }
	.nm-hero__subtitle { margin-left: .16em; }
	.nm-hero__title {
		margin-top: 3vw;
		font-size: clamp(54px, 12.4vw, 150.82px);
		line-height: .87;
	}
	.nm-hero__dates { margin-top: 5vw; }
	.nm-hero__logo {
		position: absolute;
		right: var(--nm-gutter);
		bottom: 0;
		width: clamp(44px, 8.5vw, 106px);
		height: auto;
	}

	.nm-intro p { font-size: clamp(18px, 2.3vw, 26.67px); line-height: 1.24; }
	.nm-intro > * { margin-bottom: 1.4em; }

	.nm-seminars { padding-top: 64px; }
	.nm-seminars__art { top: 0; left: 50%; width: max(1631px, 140vw); transform: translateX(-50%); }
	.nm-seminars__title { font-size: clamp(34px, 6.4vw, 73.33px); line-height: 1.1; margin-bottom: 40px; }
	.nm-seminars__grid { flex-direction: column; align-items: center; gap: 24px; }
	.nm-seminars__col { width: 100%; max-width: 520px; flex: none; gap: 24px; }
}

@media (max-width: 767px) {
	.nm-nav { padding-right: 8px; }
	.nm-nav__toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px; height: 40px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--nm-nav-ink);
		cursor: pointer;
	}
	.nm-nav__icon { display: flex; width: 22px; height: 22px; }
	.nm-nav__icon--close { display: none; }
	.nm-nav__toggle[aria-expanded="true"] .nm-nav__icon--open { display: none; }
	.nm-nav__toggle[aria-expanded="true"] .nm-nav__icon--close { display: flex; }
	.nm-nav__menu {
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: #fff;
		border-bottom: 1px solid rgba(0, 0, 0, .07);
		box-shadow: 0 8px 16px rgba(0, 0, 0, .06);
		display: none;
	}
	.nm-nav__menu.is-open { display: block; }
	.nm-nav__list { flex-direction: column; gap: 0; padding: 8px 0; }
	.nm-nav__list a { padding: 12px 20px; font-size: 16px; }

	.nm-card { padding: 20px 14px 18px; }
	.nm-card__speaker { font-size: 22px; line-height: 28px; margin-bottom: 6px; }
	.nm-card__title { font-size: 25px; line-height: 33px; margin-bottom: 8px; }
	.nm-card__text { font-size: 14px; line-height: 20px; }

	.nm-footer__inner { min-height: 112px; padding-block: 24px; flex-wrap: wrap; }
	.nm-footer__email { font-size: 16px; }
	.nm-footer__social { gap: 18px; }
	.nm-footer__icon { width: 44px; height: 44px; }

	.nm-photos { padding-bottom: 80px; }
	.nm-photos > h1:first-child { font-size: clamp(30px, 8vw, 73.33px); line-height: 1.2; padding-block: 24px; }
	.nm-photos > h2 { margin-top: 96px; }
	.nm-photos > h1:first-child + h2 { margin-top: 48px; }
	.nm-photos .wp-block-gallery.has-nested-images { --wp--style--unstable-gallery-gap: 12px; gap: 12px; margin-bottom: 12px; }
	.nm-photos .wp-block-columns { gap: 12px; margin-bottom: 12px; }
	.nm-photos .wp-block-column > * + * { margin-top: 12px; }
}
