/* Cjenik – public price list.
   Palette: Zagreb enamel street-sign blue on white paper, blue-black ink.
   The base-price column runs as a pale blue band so the two prices never get confused. */

.cjenik {
	--cj-ink: #18202e;
	--cj-blue: #1d4a92;
	--cj-blue-ink: #163a74;
	--cj-muted: #5a6476;
	--cj-line: #dde2ea;
	--cj-band: #eef3fa;
	--cj-band-ink: #2c3b55;
	--cj-paper: #ffffff;

	color: var(--cj-ink);
	font-family: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
	font-size: 17px;
	line-height: 1.45;
	font-variant-numeric: tabular-nums;
	-webkit-text-size-adjust: 100%;
}

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

.cjenik :where(p) { margin: 0; }

/* ---------- Header: enamel plate + title ---------- */

.cjenik-head {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 24px 32px;
	margin-bottom: 28px;
}

.cjenik-titles { grid-column: 1; grid-row: 1; }

.cjenik-title {
	margin: 0;
	font-family: "Barlow Semi Condensed", "Barlow", sans-serif;
	font-weight: 600;
	font-size: clamp(44px, 8vw, 68px);
	line-height: .95;
	letter-spacing: -0.01em;
	color: var(--cj-ink);
}

.cjenik-venue {
	margin-top: 8px;
	font-size: 19px;
	font-weight: 500;
	color: var(--cj-muted);
}

.cjenik-plate {
	grid-column: 2;
	grid-row: 1;
	background: var(--cj-blue);
	color: #fff;
	border-radius: 12px;
	padding: 16px 24px 17px;
	box-shadow: inset 0 0 0 6px var(--cj-blue), inset 0 0 0 8px #fff;
	min-width: 290px;
}

.cjenik-plate__name {
	font-family: "Barlow Semi Condensed", "Barlow", sans-serif;
	font-weight: 600;
	font-size: 23px;
	line-height: 1.15;
	letter-spacing: .015em;
	margin-bottom: 4px;
}

.cjenik-plate__line {
	font-size: 15.5px;
	line-height: 1.4;
	font-weight: 500;
	color: #e6edf8;
}

/* ---------- Category links ---------- */

.cjenik-nav {
	position: sticky;
	top: 0;
	z-index: 5;
	background: var(--cj-paper);
	border-bottom: 1px solid var(--cj-line);
	margin: 0 0 8px;
}

.admin-bar .cjenik-nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .cjenik-nav { top: 46px; } }

.cjenik-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0 2px;
}
.cjenik-nav ul::-webkit-scrollbar { display: none; }

.cjenik-nav a {
	display: block;
	white-space: nowrap;
	padding: 11px 12px 9px;
	font-family: "Barlow Semi Condensed", "Barlow", sans-serif;
	font-weight: 500;
	font-size: 16px;
	color: var(--cj-ink);
	text-decoration: none;
	border-bottom: 3px solid transparent;
}

.cjenik-nav a:hover { color: var(--cj-blue); }
.cjenik-nav a.is-active { color: var(--cj-blue); border-bottom-color: var(--cj-blue); }

.cjenik a:focus-visible {
	outline: 2px solid var(--cj-blue);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------- Table ---------- */

.cjenik-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: fixed;
}

.cjenik-table .col-name { width: 33%; }
.cjenik-table .col-norm { width: 35%; }
.cjenik-table .col-price { width: 14%; }
.cjenik-table .col-base { width: 18%; }

.cjenik-table th,
.cjenik-table td {
	padding: 9px 12px;
	text-align: left;
	vertical-align: baseline;
	border-bottom: 1px solid var(--cj-line);
	font-weight: 400;
}

.cjenik-table thead th {
	font-size: 13.5px;
	line-height: 1.25;
	font-weight: 500;
	color: var(--cj-muted);
	vertical-align: bottom;
	padding-top: 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--cj-ink);
}

.cjenik-table .c-price,
.cjenik-table .c-base { text-align: right; white-space: nowrap; }
.cjenik-table thead .c-price,
.cjenik-table thead .c-base { white-space: normal; }

.cjenik-table .c-base { background: var(--cj-band); }
.cjenik-table thead .c-base { color: var(--cj-blue-ink); }

.cjenik-table tbody th.c-name { font-weight: 500; }
.cjenik-table .c-norm { color: var(--cj-muted); font-size: 15px; }
.cjenik-table td.c-price { font-weight: 600; }
.cjenik-table td.c-base { font-weight: 500; color: var(--cj-band-ink); }
.cjenik-table td.c-base.is-empty { color: #8a93a3; font-weight: 400; }

.cjenik-table .cjenik-cat th {
	padding: 30px 12px 8px;
	font-family: "Barlow Semi Condensed", "Barlow", sans-serif;
	font-weight: 600;
	font-size: 22px;
	line-height: 1.2;
	color: var(--cj-blue);
	border-bottom: 2px solid var(--cj-blue);
}

.cjenik-table tbody { scroll-margin-top: calc(var(--cj-nav-h, 48px) - 18px); }

.c-norm-inline { display: none; }

/* ---------- Footer notes ---------- */

.cjenik-foot {
	margin-top: 28px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--cj-muted);
	max-width: 72ch;
}
.cjenik-foot p + p,
.cjenik-foot div + p,
.cjenik-foot p + div { margin-top: 10px; }
.cjenik-foot__note { color: var(--cj-band-ink); }
.cjenik-foot__updated { font-weight: 500; color: var(--cj-ink); }

/* ---------- Phones ---------- */

@media screen and (max-width: 680px) {
	.cjenik { font-size: 16px; }

	.cjenik-head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 18px; }

	/* Categories scroll sideways on phones; the fade shows there is more. */
	.cjenik-nav ul {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		-webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
		mask-image: linear-gradient(90deg, #000 85%, transparent);
		padding-right: 40px;
	}
	.cjenik-nav a { padding: 11px 10px 9px; }
	.cjenik-plate { grid-column: 1; grid-row: 1; min-width: 0; padding: 14px 20px 15px; }
	.cjenik-titles { grid-row: 2; }
	.cjenik-plate__name { font-size: 21px; }

	/* Normativ moves under the name; the table drops to three columns. */
	.cjenik-table { table-layout: auto; }
	.cjenik-table colgroup { display: none; }
	.cjenik-table .c-norm { display: none; }
	.cjenik-table .c-price { width: 74px; }
	.cjenik-table .c-base { width: 90px; }

	.cjenik-table th,
	.cjenik-table td { padding: 9px 8px; }
	.cjenik-table thead th { font-size: 12.5px; }

	.c-norm-inline {
		display: block;
		margin-top: 2px;
		font-size: 13.5px;
		line-height: 1.3;
		font-weight: 400;
		color: var(--cj-muted);
	}

	.cjenik-table .cjenik-cat th { font-size: 20px; padding-top: 24px; }
}

@media (prefers-reduced-motion: no-preference) {
	html:has(.cjenik-nav) { scroll-behavior: smooth; }
}
