/* EduKa 2 – digitalna brošura ------------------------------------------- */

.eb {
	--eb-navy: #174659;
	--eb-green: #86c66b;
	--eb-ink: #23282b;
	--eb-muted: #5d6a70;
	--eb-line: #dfe4e6;
	--eb-bg: #ffffff;
	--eb-soft: #f4f7f4;
	--eb-accent: var(--eb-green);
	--eb-accent-soft: #e8f2e2;
	--eb-max: 46rem;
	--eb-nav: 19rem;

	position: relative;
	display: flex;
	gap: 0;
	align-items: flex-start;
	color: var(--eb-ink);
	background: var(--eb-bg);
	font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.62;
	-webkit-text-size-adjust: 100%;
}

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

.eb [data-chap="k1"] { --eb-accent: #db462b; --eb-accent-soft: #fbe7e2; }
.eb [data-chap="k2"] { --eb-accent: #57988f; --eb-accent-soft: #e4efed; }
.eb [data-chap="k3"] { --eb-accent: #8f8f2b; --eb-accent-soft: #f0f0da; }

/* ---------- navigacija ---------- */

.eb-nav {
	flex: 0 0 var(--eb-nav);
	width: var(--eb-nav);
	position: sticky;
	top: 0;
	max-height: 100vh;
	overflow-y: auto;
	padding: 1.75rem 1rem 3rem 0;
	border-right: 1px solid var(--eb-line);
	scrollbar-width: thin;
}

.eb-nav-brand { display: block; margin: 0 0 1.1rem; }
.eb-nav-brand img { width: 130px; height: auto; display: block; }

.eb-search { position: relative; margin: 0 0 .5rem; }

.eb .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;
}

.eb-search input {
	width: 100%;
	padding: .5rem 2rem .5rem .7rem;
	font: inherit;
	font-size: .93rem;
	color: var(--eb-ink);
	background: var(--eb-soft);
	border: 1px solid var(--eb-line);
	border-radius: 6px;
}

.eb-search input::-webkit-search-cancel-button,
.eb-search input::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.eb-search input:focus { outline: 2px solid var(--eb-navy); outline-offset: 1px; }

.eb-search-clear {
	position: absolute;
	right: .25rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1.7rem;
	height: 1.7rem;
	font-size: 1.15rem;
	line-height: 1;
	color: var(--eb-muted);
	background: none;
	border: 0;
	cursor: pointer;
}

.eb-searchinfo {
	margin: 0 0 .75rem;
	font-size: .82rem;
	color: var(--eb-muted);
}

.eb-nav-list,
.eb-nav-list ul { margin: 0; padding: 0; list-style: none; }

.eb-nav-group + .eb-nav-group { margin-top: 1.1rem; }

.eb-nav-label {
	display: block;
	margin: 0 0 .35rem;
	font-family: Montserrat, Roboto, sans-serif;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--eb-muted);
}

.eb-nav-ch > a {
	display: block;
	padding: .3rem .55rem;
	font-size: .95rem;
	font-weight: 500;
	color: var(--eb-ink);
	text-decoration: none;
	border-left: 3px solid transparent;
	border-radius: 0 4px 4px 0;
}

.eb-nav-ch > a:hover,
.eb-nav-ch > a:focus-visible { background: var(--eb-soft); }

.eb-nav-ch.is-active > a {
	color: var(--eb-navy);
	font-weight: 700;
	border-left-color: var(--eb-accent);
	background: var(--eb-accent-soft);
}

.eb-nav-sub { display: none; margin: .15rem 0 .5rem; }
.eb-nav-ch.is-active .eb-nav-sub { display: block; }

.eb-nav-sub a {
	display: block;
	padding: .18rem .55rem .18rem 1.05rem;
	font-size: .86rem;
	color: var(--eb-muted);
	text-decoration: none;
	border-left: 3px solid transparent;
}

.eb-nav-sub a:hover { color: var(--eb-navy); background: var(--eb-soft); }
.eb-nav-sub a.is-current { color: var(--eb-navy); font-weight: 600; border-left-color: var(--eb-accent); }

.eb-nav-dl { margin-top: 1.4rem; }

/* ---------- glavni stupac ---------- */

.eb-main {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 1.5rem 4rem 2.25rem;
}

.eb-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: transparent;
	z-index: 40;
	pointer-events: none;
}

.eb-progress i {
	display: block;
	height: 100%;
	width: 0;
	background: var(--eb-green);
	transition: width .1s linear;
}

/* ---------- hero ---------- */

.eb-hero {
	display: grid;
	grid-template-columns: minmax(200px, 300px) 1fr;
	gap: 2.5rem;
	align-items: center;
	max-width: 60rem;
	margin: 0 auto;
	padding: 2.5rem 0 2.75rem;
}

.eb-hero-cover img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 10px;
	box-shadow: 0 18px 38px -18px rgba(23, 70, 89, .45);
}

.eb-kicker {
	margin: 0 0 .35rem;
	font-family: Montserrat, sans-serif;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--eb-green);
}

.eb-h1 {
	margin: 0;
	font-family: Montserrat, sans-serif;
	font-size: clamp(2.4rem, 6vw, 3.6rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -.02em;
	color: var(--eb-navy);
}

.eb-sub {
	margin: .5rem 0 1rem;
	font-size: 1.22rem;
	font-weight: 500;
	color: var(--eb-ink);
}

.eb-meta,
.eb-authors {
	margin: 0 0 .35rem;
	font-size: .88rem;
	color: var(--eb-muted);
}

.eb-hero-btns {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	margin-top: 1.35rem;
}

.eb-btn {
	display: inline-block;
	padding: .62rem 1.15rem;
	font-family: Montserrat, sans-serif;
	font-size: .9rem;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	background: var(--eb-navy);
	border: 2px solid var(--eb-navy);
	border-radius: 999px;
	transition: background .15s, color .15s;
}

.eb-btn:hover,
.eb-btn:focus-visible { background: #0f3241; border-color: #0f3241; color: #fff; }

.eb-btn-ghost { color: var(--eb-navy); background: transparent; }
.eb-btn-ghost:hover { background: var(--eb-navy); color: #fff; }
.eb-btn-sm { padding: .45rem .9rem; font-size: .82rem; }

/* ---------- sadržaj ---------- */

.eb-content { max-width: var(--eb-max); margin: 0 auto; }

.eb-chapter {
	padding: 2.5rem 0 1rem;
	border-top: 1px solid var(--eb-line);
	scroll-margin-top: 1rem;
}

.eb-chaphead {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	margin: 0 0 1.5rem;
}

.eb-chapthumb {
	flex: 0 0 5.5rem;
	width: 5.5rem;
	height: 5.5rem;
	overflow: hidden;
	border-radius: 10px;
	background: var(--eb-accent-soft);
}

.eb-chapthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.eb-h2 {
	margin: 0;
	font-family: Montserrat, sans-serif;
	font-size: clamp(1.7rem, 3.4vw, 2.3rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.015em;
	color: var(--eb-navy);
}

.eb-h2::after {
	content: "";
	display: block;
	width: 3rem;
	height: 4px;
	margin-top: .6rem;
	background: var(--eb-accent);
	border-radius: 2px;
}

.eb-h3 {
	margin: 2.4rem 0 .7rem;
	padding-left: .8rem;
	font-family: Montserrat, sans-serif;
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--eb-navy);
	border-left: 4px solid var(--eb-accent);
	scroll-margin-top: 1rem;
}

.eb-h4 {
	margin: 1.7rem 0 .45rem;
	font-family: Montserrat, sans-serif;
	font-size: 1.04rem;
	font-weight: 700;
	color: var(--eb-accent);
}

.eb-p { margin: 0 0 .95rem; }
.eb-p.eb-igre { }

.eb-lead {
	margin: -.3rem 0 1rem;
	font-family: Montserrat, sans-serif;
	font-size: 1.12rem;
	font-weight: 700;
	color: var(--eb-accent);
}

.eb-content ul,
.eb-content ol { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.eb-content li { margin-bottom: .35rem; }

.eb-content ul { list-style: none; padding-left: 1.15rem; }

.eb-content ul li { position: relative; }

.eb-content ul li::before {
	content: "";
	position: absolute;
	left: -.95rem;
	top: .62em;
	width: .42rem;
	height: .42rem;
	background: var(--eb-accent);
	border-radius: 50%;
}

.eb-content ol { list-style: decimal; }
.eb-content ol li::marker { color: var(--eb-accent); font-weight: 700; }

.eb-field {
	margin: 0 0 .6rem;
	padding-left: .85rem;
	border-left: 2px solid var(--eb-accent-soft);
}

.eb-lab {
	display: inline-block;
	margin-right: .35rem;
	font-family: Montserrat, sans-serif;
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--eb-accent);
}

.eb-field-alone { border-left-color: transparent; padding-left: 0; margin-bottom: .2rem; }

.eb-quote {
	margin: 1.8rem 0;
	padding: 1.25rem 1.4rem;
	font-size: 1.06rem;
	font-style: italic;
	background: var(--eb-accent-soft);
	border-radius: 10px;
	border: 0;
}

.eb-quote p { margin: 0 0 .5rem; }
.eb-quote p:last-of-type { margin-bottom: 0; }

.eb-quote cite {
	display: block;
	margin-top: .6rem;
	font-size: .86rem;
	font-style: normal;
	font-weight: 700;
	color: var(--eb-navy);
}

.eb-src {
	margin: -.4rem 0 1.2rem;
	font-size: .78rem;
	color: var(--eb-muted);
	word-break: break-word;
}

/* ---------- istaknute kutije (bočni okviri iz tiskanog izdanja) ---------- */

.eb-box {
	margin: 1.5rem 0;
	padding: 1.15rem 1.3rem .5rem;
	background: var(--eb-accent-soft);
	border-radius: 10px;
}

.eb-box > .eb-h3 {
	margin-top: 0;
	padding-left: 0;
	font-size: 1.12rem;
	border-left: 0;
}

.eb-box > .eb-h4 { margin-top: .6rem; }
.eb-box > .eb-p:last-child,
.eb-box > ul:last-child,
.eb-box > ol:last-child { margin-bottom: .65rem; }

.eb-box .eb-quote { background: rgba(255, 255, 255, .55); }

/* ---------- slike ---------- */

.eb-fig { margin: 1.6rem 0 1.8rem; }

.eb-zoom {
	display: block;
	width: 100%;
	padding: 0;
	background: none;
	border: 0;
	cursor: zoom-in;
}

.eb-fig img {
	display: block;
	width: 100%;
	max-width: 30rem;
	height: auto;
	margin: 0 auto;
	border-radius: 8px;
}

.eb-fig-wide img { max-width: 100%; }

.eb-figcap {
	margin: .55rem auto 0;
	max-width: 30rem;
	font-size: .82rem;
	color: var(--eb-muted);
	text-align: center;
}

.eb-fig-tall img { width: auto; max-width: 100%; max-height: 72vh; }

/* ---------- tablice ---------- */

.eb-tablewrap {
	margin: 1.4rem 0 1.8rem;
	overflow-x: auto;
	border: 1px solid var(--eb-line);
	border-radius: 8px;
}

.eb-table {
	width: 100%;
	min-width: 32rem;
	border-collapse: collapse;
	font-size: .9rem;
	background: #fff;
}

.eb-table th,
.eb-table td {
	padding: .6rem .7rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--eb-line);
	border-right: 1px solid var(--eb-line);
}

.eb-table th:last-child,
.eb-table td:last-child { border-right: 0; }

.eb-table thead th {
	font-family: Montserrat, sans-serif;
	font-size: .8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #fff;
	background: var(--eb-accent);
	border-color: rgba(255, 255, 255, .25);
}

.eb-table tbody tr:nth-child(even) td { background: var(--eb-soft); }

.eb-tablewrap.is-scrollable { position: relative; }

.eb-scrollhint {
	margin: -1.15rem 0 1.5rem;
	font-size: .78rem;
	color: var(--eb-muted);
}

/* ---------- podnožje ---------- */

.eb-foot {
	max-width: var(--eb-max);
	margin: 3rem auto 0;
	padding-top: 1.5rem;
	font-size: .82rem;
	color: var(--eb-muted);
	border-top: 1px solid var(--eb-line);
}

.eb-foot p { margin: 0 0 .4rem; }
.eb-foot a { color: var(--eb-navy); }

/* ---------- lightbox ---------- */

.eb-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: rgba(12, 28, 35, .92);
}

.eb-lightbox[hidden] { display: none; }
.eb-lightbox img { max-width: 100%; max-height: 92vh; border-radius: 6px; }

.eb-lb-close {
	position: absolute;
	top: .75rem;
	right: 1rem;
	width: 2.6rem;
	height: 2.6rem;
	font-size: 2rem;
	line-height: 1;
	color: #fff;
	background: none;
	border: 0;
	cursor: pointer;
}

/* ---------- pretraga ---------- */

.eb mark.eb-hit { background: #ffe9a8; color: inherit; padding: 0 .1em; border-radius: 2px; }
.eb .eb-hidden { display: none !important; }

/* ---------- hamburger ---------- */

.eb-burger { display: none; }

/* ---------- mobilno ---------- */

@media (max-width: 860px) {
	.eb { display: block; font-size: 16.5px; }

	.eb-burger {
		position: sticky;
		top: 0;
		z-index: 30;
		display: flex;
		align-items: center;
		gap: .55rem;
		width: 100%;
		padding: .7rem 1rem;
		background: #fff;
		border: 0;
		border-bottom: 1px solid var(--eb-line);
		cursor: pointer;
	}

	.eb-burger-ico { display: block; width: 20px; }

	.eb-burger-ico span {
		display: block;
		width: 20px;
		height: 2px;
		margin-bottom: 4px;
		background: var(--eb-navy);
	}

	.eb-burger-ico span:last-child { margin-bottom: 0; }

	.eb-burger em {
		font-family: Montserrat, sans-serif;
		font-size: .85rem;
		font-weight: 700;
		font-style: normal;
		color: var(--eb-navy);
	}

	.eb-nav {
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 60;
		width: min(20rem, 88vw);
		max-height: none;
		padding: 1.25rem 1rem 2rem;
		background: #fff;
		border-right: 1px solid var(--eb-line);
		box-shadow: 0 0 40px rgba(0, 0, 0, .25);
		transform: translateX(-102%);
		transition: transform .22s ease;
	}

	.eb-nav.is-open { transform: none; }

	.eb-main { padding: 0 1rem 3rem; }

	.eb-hero {
		grid-template-columns: 1fr;
		gap: 1.25rem;
		padding: 1.5rem 0 2rem;
	}

	.eb-hero-cover img { max-width: 220px; }
	.eb-chapthumb { flex-basis: 3.6rem; width: 3.6rem; height: 3.6rem; }
	.eb-table { min-width: 26rem; font-size: .85rem; }
}

/* ---------- ispis ---------- */

@media print {
	.eb-nav, .eb-burger, .eb-progress, .eb-hero-btns, .eb-lightbox { display: none !important; }
	.eb { display: block; font-size: 11pt; }
	.eb-main { padding: 0; }
	.eb-chapter { page-break-before: always; border: 0; }
	.eb-fig img { max-width: 12cm; }
}

/* ---------- animacije isključene po želji korisnika ---------- */

@media (prefers-reduced-motion: reduce) {
	.eb-nav, .eb-progress i { transition: none; }
}
