/* ========================================
   ZSMH Design System
   Centralny CSS subor — premenne, base styles, utility triedy
   Zdroj: dizajn-manual-zsmh.pdf (Marec 2026)
   ======================================== */

/* ----------------------------------------
   1. CSS Custom Properties
   ---------------------------------------- */
:root {
	/* Fonty — 2 fonty podľa dizajn manuálu v3:
	   Trebuchet MS — všetko (nadpisy, text, nav, buttons, labels)
	   Libre Bodoni — len 3 špeciálne momenty (hero h1 na tmavom, citáty, stats čísla) */
	--font-heading: 'Trebuchet MS', 'Lucida Grande', sans-serif;
	--font-body: 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
	--font-display: 'Libre Bodoni', Georgia, serif;

	/* Primarne farby — orange */
	--gcid-primary-color: #f19e00;
	--gcid-primary-dark: #d38900;
	--gcid-primary-light: #fdf2e1;
	--gcid-primary-cream: #fdf6ee;
	--orange-bright: #ffb020;
	--orange-darker: #ce8900;
	--orange-medium: #f9e7c5;
	--orange-glow: rgba(241, 158, 0, .12);

	/* Sekundarne farby — purple / navy */
	--gcid-secondary-color: #4147a6;
	--purple-deep: #2d3180;
	--purple-light: #5b60c4;
	--navy: #1a1d3e;
	--navy-deep: #12142d;
	--navy-mid: #252850;
	--gcid-blue: #1e90ff;
	--blue-soft: #4da6ff;
	--gcid-green: #27ae60;
	--gcid-red: #e85151;
	--gcid-teal: #82c0c7;

	/* Text */
	--gcid-heading-color: #1a1a1a;
	--gcid-body-color: #3a3a3a;
	--gcid-muted-color: #6b6b6b;
	--gcid-light-color: #767676; /* WCAG AA: 4.54:1 na bielom (predtym #999 = 2.8:1) */
	--text-on-dark: #e8e8f0;
	--text-on-dark-muted: rgba(255,255,255,.65);

	/* Neutralne */
	--gcid-border-color: #e8e8e8;
	--border-dark: rgba(255,255,255,.08);
	--gcid-white: #ffffff;
	--bg-warm: #fdf8f0;
	--bg-light: #f8f6f2;
	--bg-cream: #fef9f0;

	/* Specialna paleta — Historia skoly */
	--historia-burgundy: #7a2e3b;
	--historia-gold: #b8860b;
	--historia-cream: #faf6f0;
	--historia-navy: #1a1d3e;

	/* Layout — podľa dizajn manuálu */
	--content-max-width: 1080px;
	--section-padding: 56px;
	--section-padding-mobile: 32px;
	--module-gutter: 30px;

	/* Space scale */
	--space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
	--space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
	--space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;

	/* Velkosti textu */
	--text-xs: 12px;
	--text-sm: 14px;
	--text-base: 16px;
	--text-lg: 18px;
	--text-xl: 24px;
	--text-2xl: 36px;
	--text-3xl: 48px;
	--text-4xl: 56px;

	/* Border radius */
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--radius-xl: 28px;
	--radius-2xl: 40px;

	/* Shadows */
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
	--shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
	--shadow-glow: 0 0 60px rgba(241, 158, 0, .15);
	--shadow-deep: 0 20px 60px rgba(26, 29, 62, .2);

	/* Transitions */
	--transition-fast: 150ms ease;
	--transition-base: 250ms ease;
	--transition-slow: 400ms ease;
}

/* ----------------------------------------
   2. Base Typography
   ---------------------------------------- */
*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: 1.65;
	color: var(--gcid-body-color);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--gcid-heading-color);
	line-height: 1.15;
	margin: 0 0 0.5em;
	letter-spacing: -.01em;
}

/* Libre Bodoni — len na hero h1 tmavom pozadí, citáty a stats čísla.
   Na svetlom pozadí sa Libre Bodoni NEPOUŽÍVA. */
.zsmh-ds-display {
	font-family: var(--font-display);
	font-weight: 700;
}

a {
	color: var(--gcid-secondary-color);
	text-decoration: none;
	transition: color var(--transition-fast);
}

a:hover {
	color: var(--gcid-primary-color);
}

/* ----------------------------------------
   3. Layout Utilities
   ---------------------------------------- */
.zsmh-ds-container {
	max-width: var(--content-max-width);
	margin: 0 auto;
	padding: 0 var(--space-6);
}

.zsmh-ds-container--wide {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 var(--space-6);
}

.zsmh-ds-container--full {
	width: 100%;
	max-width: none;
}

/* Divi .container backward compatibility — used by existing templates
   (single-udalosti, archive-udalosti, triedy, ucitelia etc.) */
.container {
	width: 80%;
	max-width: 1080px;
	margin-left: auto;
	margin-right: auto;
}

.zsmh-ds-page {
	background: var(--gcid-white);
}

.zsmh-ds-section {
	padding: var(--section-padding) 0;
}

.zsmh-ds-section--cream {
	background-color: var(--gcid-primary-cream);
}

.zsmh-ds-section--light {
	background-color: var(--bg-light);
}

.zsmh-ds-section--warm {
	background-color: var(--bg-cream);
}

.zsmh-ds-section--green-pale {
	background-color: #f0faf3;
}

.zsmh-ds-section--dark {
	background: linear-gradient(170deg, var(--navy-deep) 0%, var(--navy) 60%, var(--navy-mid) 100%);
	color: var(--text-on-dark);
	position: relative;
	overflow: hidden;
}

.zsmh-ds-section--dark::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 500px;
	height: 500px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(241,158,0,.06) 0%, transparent 70%);
	pointer-events: none;
}

.zsmh-ds-section--dark h1,
.zsmh-ds-section--dark h2,
.zsmh-ds-section--dark h3,
.zsmh-ds-section--dark h4 {
	color: var(--gcid-white);
}

/* Purple accent section */
.zsmh-ds-section--purple {
	background: linear-gradient(160deg, var(--purple-deep) 0%, var(--gcid-secondary-color) 100%);
	color: var(--gcid-white);
	position: relative;
	overflow: hidden;
}

.zsmh-ds-section--purple h1,
.zsmh-ds-section--purple h2,
.zsmh-ds-section--purple h3,
.zsmh-ds-section--purple h4 {
	color: var(--gcid-white);
}

/* ----------------------------------------
   4. Grid System
   ---------------------------------------- */
.zsmh-ds-grid {
	display: grid;
	gap: var(--module-gutter);
}

.zsmh-ds-grid--2 { grid-template-columns: repeat(2, 1fr); }
.zsmh-ds-grid--3 { grid-template-columns: repeat(3, 1fr); }
.zsmh-ds-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
	.zsmh-ds-grid--3,
	.zsmh-ds-grid--4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.zsmh-ds-grid--2,
	.zsmh-ds-grid--3,
	.zsmh-ds-grid--4 {
		grid-template-columns: 1fr;
	}

	.zsmh-ds-section {
		padding: var(--section-padding-mobile) 0;
	}

	.zsmh-ds-container {
		padding: 0 var(--space-5);
	}
}

/* ----------------------------------------
   5. Component Base Styles
   ---------------------------------------- */

/* Section Headers — default left, center cez ACF pole */
.zsmh-ds-section-header {
	margin-bottom: var(--space-12);
}
.zsmh-ds-section-header--center {
	text-align: center;
}

.zsmh-ds-section-header .zsmh-ds-display {
	margin-bottom: var(--space-4);
}

.zsmh-ds-section-header .zsmh-ds-text-muted {
	line-height: 1.7;
}
.zsmh-ds-section-header--center .zsmh-ds-text-muted {
	max-width: 640px;
	margin: 0 auto;
}

/* Labels / Kickers */
.zsmh-ds-label {
	display: inline-block;
	font-family: var(--font-heading);
	font-size: 12.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--gcid-primary-color);
	margin-bottom: var(--space-3);
}

.zsmh-ds-section--dark .zsmh-ds-label {
	color: var(--orange-bright);
}

/* Buttons */
.zsmh-ds-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-3) var(--space-6);
	font-family: var(--font-heading);
	font-size: var(--text-sm);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	border: none;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: all var(--transition-base);
	text-decoration: none;
}

.zsmh-ds-btn--primary {
	background: linear-gradient(135deg, var(--gcid-primary-color), var(--gcid-primary-dark));
	color: var(--gcid-white);
	box-shadow: 0 4px 12px rgba(241, 158, 0, .3);
}

.zsmh-ds-btn--primary:hover {
	background: linear-gradient(135deg, var(--orange-bright), var(--gcid-primary-color));
	color: var(--gcid-white);
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(241, 158, 0, .4);
}

/* Section CTA — voliteľné tlačidlo pod obsahom sekcie */
.zsmh-ds-section-cta {
	margin-top: var(--space-6, 24px);
	text-align: center;
}

.zsmh-ds-btn--outline {
	background: transparent;
	color: var(--gcid-primary-color);
	border: 2px solid var(--gcid-primary-color);
}

.zsmh-ds-btn--outline:hover {
	background: var(--gcid-primary-color);
	color: var(--gcid-white);
}

.zsmh-ds-btn--white {
	background: var(--gcid-white);
	color: var(--gcid-heading-color);
	box-shadow: var(--shadow-md);
}

.zsmh-ds-btn--white:hover {
	background: var(--gcid-primary-light);
	transform: translateY(-1px);
}

/* SK aliasy pre ACF select */
.zsmh-ds-btn--primarne { background: var(--gcid-primary-color); color: var(--gcid-white); }
.zsmh-ds-btn--primarne:hover { background: var(--gcid-primary-dark); transform: translateY(-1px); }
.zsmh-ds-btn--obrys { background: transparent; color: var(--gcid-primary-color); border: 2px solid var(--gcid-primary-color); }
.zsmh-ds-btn--obrys:hover { background: var(--gcid-primary-color); color: var(--gcid-white); }
/* Na tmavom pozadí — obrys button s bielym */
.zsmh-ds-section--dark .zsmh-ds-btn--obrys,
.zsmh-ds-section--dark.zsmh-ds-cta .zsmh-ds-btn--obrys { color: var(--gcid-white); border-color: rgba(255,255,255,.4); }
.zsmh-ds-section--dark .zsmh-ds-btn--obrys:hover,
.zsmh-ds-section--dark.zsmh-ds-cta .zsmh-ds-btn--obrys:hover { background: var(--gcid-white); color: var(--gcid-heading-color); }

/* Cards */
.zsmh-ds-card {
	background: var(--gcid-white);
	border: 1px solid var(--gcid-border-color);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	transition: transform var(--transition-base), box-shadow var(--transition-base);
	position: relative;
}

.zsmh-ds-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--gcid-primary-color), var(--gcid-secondary-color));
	opacity: 0;
	transition: opacity var(--transition-base);
}

.zsmh-ds-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

.zsmh-ds-card:hover::before {
	opacity: 1;
}

.zsmh-ds-card__body {
	padding: var(--space-6);
}

/* Link Arrow */
.zsmh-ds-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-family: var(--font-heading);
	font-size: .85rem;
	font-weight: 700;
	color: var(--gcid-primary-dark);
	transition: gap .2s, color .2s;
}

.zsmh-ds-link-arrow:hover {
	gap: var(--space-3);
	color: var(--gcid-secondary-color);
}

.zsmh-ds-section--dark .zsmh-ds-link-arrow { color: var(--orange-bright); }
.zsmh-ds-section--dark .zsmh-ds-link-arrow:hover { color: var(--gcid-white); }


/* ----------------------------------------
   6. Utility Classes
   ---------------------------------------- */
.zsmh-ds-text-center { text-align: center; }
.zsmh-ds-text-muted { color: var(--gcid-muted-color); }
.zsmh-ds-text-light { color: var(--gcid-light-color); }
.zsmh-ds-text-sm { font-size: var(--text-sm); }
.zsmh-ds-text-lg { font-size: var(--text-lg); }
.zsmh-ds-text-xl { font-size: var(--text-xl); }

.zsmh-ds-mt-0 { margin-top: 0; }
.zsmh-ds-mb-0 { margin-bottom: 0; }
.zsmh-ds-mb-1 { margin-bottom: 16px; }
.zsmh-ds-mb-2 { margin-bottom: 32px; }
.zsmh-ds-mb-3 { margin-bottom: 48px; }

/* ----------------------------------------
   7. Accessibility — Focus Visible
   ---------------------------------------- */
/* Globálny focus štýl — oranžový na svetlom, biely na tmavom */
:focus-visible {
	outline: 2px solid var(--gcid-primary-color);
	outline-offset: 2px;
}

/* Na tmavých sekciách biely outline */
.zsmh-ds-section--dark :focus-visible,
.zsmh-ds-section--purple :focus-visible,
.zsmh-ds-hero :focus-visible,
.zsmh-ds-hero--default :focus-visible,
.zsmh-ds-hero--fullscreen :focus-visible,
.zsmh-ds-hero--centered :focus-visible {
	outline-color: #ffffff;
}

/* Na oranžovom pozadí (top bar, primary buttons) biely outline */
.zsmh-top-bar :focus-visible,
.zsmh-ds-btn--primary:focus-visible,
.zsmh-ds-btn--primarne:focus-visible {
	outline-color: #ffffff;
}

/* Input focus — jemnejší štýl */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--gcid-primary-color);
	outline-offset: 0;
}

/* Accessible visually-hidden */
.zsmh-ds-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ----------------------------------------
   8. Farebné témy (univerzálne stránky)
   ---------------------------------------- */

/* Teplá — hnedo-zlatá */
.zsmh-ds-page--theme-warm {
	--gcid-primary-color: #c87a1a;
	--gcid-primary-dark: #a66315;
	--gcid-primary-light: #fdf2e1;
	--orange-bright: #d4920a;
	--navy: #3d2a14;
	--navy-deep: #2a1d0e;
}

/* Klasická — víno-zlatá */
.zsmh-ds-page--theme-classic {
	--gcid-primary-color: #b8860b;
	--gcid-primary-dark: #8a6508;
	--gcid-primary-light: #f2e8d4;
	--orange-bright: #d4a017;
	--navy: #5a1f2a;
	--navy-deep: #3d1520;
}

/* Prírodná — zelená */
.zsmh-ds-page--theme-nature {
	--gcid-primary-color: #27ae60;
	--gcid-primary-dark: #1e8c4d;
	--gcid-primary-light: #e8f5ee;
	--orange-bright: #2ecc71;
	--navy: #1a3a2a;
	--navy-deep: #0f2519;
}

/* ----------------------------------------
   9. Back to Top Button
   ---------------------------------------- */
.zsmh-back-to-top {
	position: fixed;
	bottom: 80px;
	right: 24px;
	z-index: 9998;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: var(--gcid-primary-color);
	color: var(--gcid-white);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .3s, visibility .3s, transform .3s, background .2s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.zsmh-back-to-top.visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.zsmh-back-to-top:hover {
	background: var(--gcid-primary-dark);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}

.zsmh-back-to-top:active {
	transform: translateY(0);
}

@media (max-width: 767px) {
	.zsmh-back-to-top {
		bottom: 16px;
		right: 16px;
		width: 40px;
		height: 40px;
		font-size: 18px;
	}
}
