/**
 * GM Accessibility — WCAG 2.1 AA
 *
 * 1.4.3  Contrast (Minimum)
 * 1.4.4  Resize text
 * 1.4.12 Text Spacing
 * 2.1.1  Keyboard
 * 2.2.2  Pause, Stop, Hide
 * 2.4.1  Bypass Blocks (skip-link)
 * 2.4.7  Focus Visible
 * 2.4.11 Focus Not Obscured (widget z-index)
 */

/* -------------------------------------------------------------------------- */
/* OpenDyslexic — SIL OFL 1.1 (lokalna datoteka, brez CDN)                    */
/* -------------------------------------------------------------------------- */
@font-face {
	font-family: "OpenDyslexic";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/opendyslexic-regular.woff2") format("woff2");
}

/* -------------------------------------------------------------------------- */
/* 2.4.1 Bypass Blocks — skip-link je prvi Tab na strani                      */
/* -------------------------------------------------------------------------- */
.gm-a11y-skip {
	position: absolute;
	left: 1rem;
	top: 1rem;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	background: #101828;
	color: #ffffff;
	font-family: "Open Sans", system-ui, sans-serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
	text-decoration: underline;
	border-radius: 0.25rem;
	transform: translateY(-200%);
	transition: transform 0.15s ease;
}

.gm-a11y-skip:focus,
.gm-a11y-skip:focus-visible {
	transform: translateY(0);
	outline: 3px solid #e94e1b;
	outline-offset: 3px;
	color: #ffffff;
}

/* -------------------------------------------------------------------------- */
/* 2.4.7 Focus Visible — jasen okvir ob tipkovnici, ne ob miški              */
/* -------------------------------------------------------------------------- */
:focus-visible {
	outline: 3px solid #e94e1b;
	outline-offset: 3px;
}

#main-content:focus {
	outline: none;
}

html[data-gm-a11y-contrast="yellow"] :focus-visible {
	outline-color: #ffff00;
}

html[data-gm-a11y-contrast="white"] :focus-visible {
	outline-color: #ffffff;
}

/* -------------------------------------------------------------------------- */
/* 1.4.4 Resize text — html font-size + zoom (Tailwind px v Chromium)        */
/* Koraki: 90 / 100 / 110 / 120 / 130 %                                      */
/* -------------------------------------------------------------------------- */
html[data-gm-a11y-font="90"] {
	font-size: 90%;
}

html[data-gm-a11y-font="110"] {
	font-size: 110%;
}

html[data-gm-a11y-font="120"] {
	font-size: 120%;
}

html[data-gm-a11y-font="130"] {
	font-size: 130%;
}

@supports (zoom: 1) {
	html[data-gm-a11y-font="90"] {
		zoom: 0.9;
		font-size: 100%;
	}

	html[data-gm-a11y-font="110"] {
		zoom: 1.1;
		font-size: 100%;
	}

	html[data-gm-a11y-font="120"] {
		zoom: 1.2;
		font-size: 100%;
	}

	html[data-gm-a11y-font="130"] {
		zoom: 1.3;
		font-size: 100%;
	}
}

/* -------------------------------------------------------------------------- */
/* 1.4.3 / 1.4.6 Visok kontrast                                               */
/* Widget (.gm-a11y) ohrani lastne barve — pravila so spodaj po teh.         */
/* -------------------------------------------------------------------------- */
html[data-gm-a11y-contrast="yellow"],
html[data-gm-a11y-contrast="yellow"] body {
	background: #000000 !important;
	color: #ffff00 !important;
}

html[data-gm-a11y-contrast="yellow"] body *:not(.gm-a11y):not(.gm-a11y *):not(.gm-a11y-skip) {
	background-color: #000000 !important;
	background-image: none !important;
	color: #ffff00 !important;
	border-color: #ffff00 !important;
	box-shadow: none !important;
	text-shadow: none !important;
}

html[data-gm-a11y-contrast="yellow"] a:not(.gm-a11y a):not(.gm-a11y-skip) {
	color: #ffff00 !important;
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
}

html[data-gm-a11y-contrast="white"],
html[data-gm-a11y-contrast="white"] body {
	background: #000000 !important;
	color: #ffffff !important;
}

html[data-gm-a11y-contrast="white"] body *:not(.gm-a11y):not(.gm-a11y *):not(.gm-a11y-skip) {
	background-color: #000000 !important;
	background-image: none !important;
	color: #ffffff !important;
	border-color: #ffffff !important;
	box-shadow: none !important;
	text-shadow: none !important;
}

html[data-gm-a11y-contrast="white"] a:not(.gm-a11y a):not(.gm-a11y-skip) {
	color: #ffffff !important;
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
}

html[data-gm-a11y-contrast="yellow"] img,
html[data-gm-a11y-contrast="yellow"] video,
html[data-gm-a11y-contrast="white"] img,
html[data-gm-a11y-contrast="white"] video {
	opacity: 1;
	filter: contrast(1.15);
}

/* Invertirane barve (temni način) — WCAG 1.4.3 alternativa teme */
html.gm-a11y-invert {
	filter: invert(1) hue-rotate(180deg);
}

html.gm-a11y-invert img,
html.gm-a11y-invert video,
html.gm-a11y-invert picture,
html.gm-a11y-invert iframe,
html.gm-a11y-invert .gm-a11y {
	filter: invert(1) hue-rotate(180deg);
}

/* Siva skala */
html.gm-a11y-grayscale {
	filter: grayscale(1);
}

html.gm-a11y-invert.gm-a11y-grayscale {
	filter: invert(1) hue-rotate(180deg) grayscale(1);
}

html.gm-a11y-invert.gm-a11y-grayscale img,
html.gm-a11y-invert.gm-a11y-grayscale video,
html.gm-a11y-invert.gm-a11y-grayscale picture,
html.gm-a11y-invert.gm-a11y-grayscale iframe,
html.gm-a11y-invert.gm-a11y-grayscale .gm-a11y {
	filter: invert(1) hue-rotate(180deg);
}

/* -------------------------------------------------------------------------- */
/* Berljivost — OpenDyslexic + 1.4.12 Text Spacing                            */
/* -------------------------------------------------------------------------- */
html.gm-a11y-dyslexia,
html.gm-a11y-dyslexia body,
html.gm-a11y-dyslexia button,
html.gm-a11y-dyslexia input,
html.gm-a11y-dyslexia textarea,
html.gm-a11y-dyslexia select {
	font-family: "OpenDyslexic", "Comic Sans MS", "Arial", sans-serif !important;
	letter-spacing: 0.08em;
	word-spacing: 0.16em;
}

html.gm-a11y-spacing,
html.gm-a11y-spacing body {
	line-height: 1.8 !important;
	letter-spacing: 0.12em !important;
	word-spacing: 0.16em !important;
}

html.gm-a11y-spacing p,
html.gm-a11y-spacing li,
html.gm-a11y-spacing h1,
html.gm-a11y-spacing h2,
html.gm-a11y-spacing h3,
html.gm-a11y-spacing h4,
html.gm-a11y-spacing h5,
html.gm-a11y-spacing h6 {
	line-height: 1.8 !important;
	letter-spacing: 0.12em !important;
	word-spacing: 0.16em !important;
}

html.gm-a11y-links a:not(.gm-a11y a):not(.gm-a11y-skip) {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 0.2em !important;
	background-color: #fff3cd !important;
	color: #101828 !important;
	box-shadow: inset 0 0 0 2px #101828;
}

html[data-gm-a11y-contrast="yellow"].gm-a11y-links a:not(.gm-a11y a):not(.gm-a11y-skip),
html[data-gm-a11y-contrast="white"].gm-a11y-links a:not(.gm-a11y a):not(.gm-a11y-skip) {
	background-color: transparent !important;
	box-shadow: none;
}

/* -------------------------------------------------------------------------- */
/* 2.2.2 / 2.3.3 Ustavi animacije (enako kot prefers-reduced-motion)          */
/* -------------------------------------------------------------------------- */
html.gm-a11y-reduced-motion {
	scroll-behavior: auto !important;
}

html.gm-a11y-reduced-motion *,
html.gm-a11y-reduced-motion *::before,
html.gm-a11y-reduced-motion *::after {
	animation: none !important;
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.01ms !important;
	transition-delay: 0s !important;
	scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
	html:not(.gm-a11y-allow-motion) {
		scroll-behavior: auto !important;
	}

	html:not(.gm-a11y-allow-motion) *,
	html:not(.gm-a11y-allow-motion) *::before,
	html:not(.gm-a11y-allow-motion) *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* -------------------------------------------------------------------------- */
/* Veliko kazalo — 2.5.5 Target Size (pomoč pri motoričnih ovirah)            */
/* -------------------------------------------------------------------------- */
html.gm-a11y-big-cursor,
html.gm-a11y-big-cursor * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 32 32'%3E%3Cpath fill='%23fff' stroke='%23101828' stroke-width='2' d='M4 3 L4 24 L9.5 18.8 L14.8 30 L18.6 28.4 L13.2 17.2 L21 17.2 Z'/%3E%3C/svg%3E") 4 2, auto !important;
}

html.gm-a11y-big-cursor a,
html.gm-a11y-big-cursor button,
html.gm-a11y-big-cursor [role="button"],
html.gm-a11y-big-cursor input,
html.gm-a11y-big-cursor select,
html.gm-a11y-big-cursor textarea,
html.gm-a11y-big-cursor label {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 32 32'%3E%3Cpath fill='%23e94e1b' stroke='%23fff' stroke-width='2' d='M4 3 L4 24 L9.5 18.8 L14.8 30 L18.6 28.4 L13.2 17.2 L21 17.2 Z'/%3E%3C/svg%3E") 4 2, pointer !important;
}

/* -------------------------------------------------------------------------- */
/* Widget — brand #E94E1B / ink #101828 / Space Grotesk + Open Sans           */
/* -------------------------------------------------------------------------- */
.gm-a11y {
	--gm-a11y-brand: #e94e1b;
	--gm-a11y-brand-hover: #9f3110;
	--gm-a11y-ink: #101828;
	--gm-a11y-muted: #4a5565;
	--gm-a11y-surface: #f9fafb;
	--gm-a11y-border: #e5e7eb;
	--gm-a11y-hover: #f2f2f7;
	--gm-a11y-radius: 0.5rem;
	--gm-a11y-offset: 1.25rem;
	--gm-a11y-btn: 3.5rem;
	position: relative;
	z-index: 99990;
	font-family: "Open Sans", system-ui, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--gm-a11y-ink);
	-webkit-text-size-adjust: 100%;
}

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

.gm-a11y__toggle {
	position: fixed;
	bottom: var(--gm-a11y-offset);
	right: var(--gm-a11y-offset);
	z-index: 99992;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--gm-a11y-btn);
	height: var(--gm-a11y-btn);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--gm-a11y-brand);
	color: #ffffff;
	box-shadow: 0 4px 16px rgba(16, 24, 40, 0.28);
	cursor: pointer;
}

.gm-a11y--left .gm-a11y__toggle {
	right: auto;
	left: var(--gm-a11y-offset);
}

.gm-a11y__toggle:hover,
.gm-a11y__toggle:focus-visible {
	background: var(--gm-a11y-brand-hover);
}

.gm-a11y__toggle[aria-expanded="true"] {
	background: var(--gm-a11y-ink);
}

.gm-a11y__icon {
	display: block;
}

.gm-a11y__backdrop {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: rgba(16, 24, 40, 0.45);
}

.gm-a11y__panel[hidden],
.gm-a11y__backdrop[hidden] {
	display: none !important;
}

.gm-a11y__panel {
	position: fixed;
	z-index: 99991;
	bottom: calc(var(--gm-a11y-offset) + var(--gm-a11y-btn) + 0.75rem);
	right: var(--gm-a11y-offset);
	display: flex;
	flex-direction: column;
	width: min(22.5rem, calc(100vw - 2rem));
	max-height: min(36rem, calc(100vh - 6.5rem));
	overflow: hidden;
	background: #ffffff;
	color: var(--gm-a11y-ink);
	border: 1px solid var(--gm-a11y-border);
	border-radius: var(--gm-a11y-radius);
	box-shadow: 0 12px 40px rgba(16, 24, 40, 0.22);
}

.gm-a11y--left .gm-a11y__panel {
	right: auto;
	left: var(--gm-a11y-offset);
}

.gm-a11y__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	border-bottom: 3px solid var(--gm-a11y-ink);
	background: #ffffff;
}

.gm-a11y__title {
	margin: 0;
	font-family: "Space Grotesk", "Open Sans", sans-serif;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--gm-a11y-ink);
}

.gm-a11y__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 1px solid var(--gm-a11y-border);
	border-radius: 0.375rem;
	background: #ffffff;
	color: var(--gm-a11y-ink);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.gm-a11y__close:hover {
	background: var(--gm-a11y-hover);
}

.gm-a11y__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 0.5rem 1.25rem 1rem;
	-webkit-overflow-scrolling: touch;
}

.gm-a11y__section {
	margin: 0;
	padding: 1rem 0;
	border-bottom: 1px solid var(--gm-a11y-border);
}

.gm-a11y__section:last-child {
	border-bottom: 0;
}

.gm-a11y__heading {
	margin: 0 0 0.75rem;
	font-family: "Space Grotesk", "Open Sans", sans-serif;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--gm-a11y-ink);
}

.gm-a11y__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.gm-a11y__font-value {
	min-width: 3.5rem;
	font-weight: 700;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.gm-a11y__btn,
.gm-a11y__choice,
.gm-a11y__reset {
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--gm-a11y-ink);
	background: #ffffff;
	border: 1px solid var(--gm-a11y-border);
	border-radius: 0.375rem;
	cursor: pointer;
}

.gm-a11y__btn {
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
}

.gm-a11y__btn:hover,
.gm-a11y__choice:hover {
	background: var(--gm-a11y-hover);
}

.gm-a11y__btn--ghost {
	flex: 1 1 auto;
	font-weight: 400;
	color: var(--gm-a11y-muted);
}

.gm-a11y__grid {
	display: grid;
	gap: 0.5rem;
}

.gm-a11y__choice {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.65rem 0.85rem;
	text-align: left;
}

.gm-a11y__choice[aria-pressed="true"] {
	border-color: var(--gm-a11y-ink);
	background: var(--gm-a11y-hover);
	box-shadow: inset 0 0 0 2px var(--gm-a11y-ink);
}

.gm-a11y__swatch {
	flex: 0 0 1.25rem;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 0.2rem;
	border: 1px solid var(--gm-a11y-border);
}

.gm-a11y__swatch--default {
	background: linear-gradient(135deg, #ffffff 50%, #e94e1b 50%);
}

.gm-a11y__swatch--yellow {
	background: #ffff00;
	border-color: #000000;
}

.gm-a11y__swatch--white {
	background: #ffffff;
	border-color: #000000;
}

.gm-a11y__footer {
	padding: 0.85rem 1.25rem 1.15rem;
	border-top: 1px solid var(--gm-a11y-border);
	background: var(--gm-a11y-surface);
}

.gm-a11y__reset {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.65rem 1rem;
	background: var(--gm-a11y-ink);
	color: #ffffff;
	border-color: var(--gm-a11y-ink);
}

.gm-a11y__reset:hover,
.gm-a11y__reset:focus-visible {
	background: var(--gm-a11y-brand);
	border-color: var(--gm-a11y-brand);
	color: #ffffff;
}

.gm-a11y__live {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Visok kontrast: widget ostane berljiv (specifičnost > body *) */
html[data-gm-a11y-contrast="yellow"] .gm-a11y,
html[data-gm-a11y-contrast="yellow"] .gm-a11y *,
html[data-gm-a11y-contrast="white"] .gm-a11y,
html[data-gm-a11y-contrast="white"] .gm-a11y * {
	background-image: none;
	text-shadow: none;
}

html[data-gm-a11y-contrast="yellow"] .gm-a11y__panel,
html[data-gm-a11y-contrast="white"] .gm-a11y__panel,
html[data-gm-a11y-contrast="yellow"] .gm-a11y__header,
html[data-gm-a11y-contrast="white"] .gm-a11y__header,
html[data-gm-a11y-contrast="yellow"] .gm-a11y__body,
html[data-gm-a11y-contrast="white"] .gm-a11y__body {
	background: #ffffff !important;
	color: #101828 !important;
}

html[data-gm-a11y-contrast="yellow"] .gm-a11y__toggle,
html[data-gm-a11y-contrast="white"] .gm-a11y__toggle {
	background: #e94e1b !important;
	color: #ffffff !important;
}

html[data-gm-a11y-contrast="yellow"] .gm-a11y__reset,
html[data-gm-a11y-contrast="white"] .gm-a11y__reset {
	background: #101828 !important;
	color: #ffffff !important;
}

/* Mobilni: listina od spodaj, polna širina (WCAG 1.4.10 Reflow) */
@media (max-width: 36rem) {
	.gm-a11y {
		--gm-a11y-offset: 0.85rem;
		--gm-a11y-btn: 3.25rem;
	}

	.gm-a11y__panel {
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
		max-height: 90vh;
		border-radius: 0.75rem 0.75rem 0 0;
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
	}

	.gm-a11y--left .gm-a11y__panel {
		left: 0;
		right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gm-a11y-skip {
		transition: none;
	}
}

@media print {
	.gm-a11y,
	.gm-a11y-skip {
		display: none !important;
	}
}

@media (forced-colors: active) {
	.gm-a11y__toggle,
	.gm-a11y__choice,
	.gm-a11y__btn,
	.gm-a11y__reset,
	.gm-a11y__close {
		border: 2px solid ButtonText;
	}
}
