/*
 * Dokumenti – prikaz na webu (izgled usklađen s ninturizam.hr)
 *
 * Boje i oblici su CSS varijable na .edm-wrap. Promijenite ih u Elementoru
 * (Stil kartica widgeta) ili u Izgled → Prilagodi → Dodatni CSS, npr.:
 *   .edm-wrap { --edm-button: #0c6ea3; --edm-radius: 8px; }
 * Font se nasljeđuje od teme (na ninturizam.hr je to DM Sans).
 * Veličine su u px jer Elementor na stranici smanjuje osnovni font.
 */

.edm-wrap {
	--edm-primary: #084da5;      /* naslovi, kao "Dokumenti" na stranici */
	--edm-button: #2c97d1;       /* gumbi, kao Elementor gumbi stranice */
	--edm-button-hover: #0c6ea3; /* gornja traka stranice */
	--edm-accent: #f5b400;       /* sunce iz logotipa */
	--edm-ink: #1a1a1a;
	--edm-text: #46525e;
	--edm-muted: #6b7785;
	--edm-line: #e2e8ef;
	--edm-soft: #f3f8fc;
	--edm-radius: 12px;
	--edm-radius-btn: 6px;
	--edm-shadow: 0 1px 2px rgba(8, 77, 165, .05), 0 10px 24px -14px rgba(8, 77, 165, .35);

	width: 100%;
	color: var(--edm-text);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.edm-wrap *, .edm-wrap *::before, .edm-wrap *::after { box-sizing: border-box; }

/* ---------- Naslov grupe: tanka siva crta + kratki akcent ---------- */
.edm-wrap .edm-group-title {
	--edm-base-color: var(--edm-line);
	--edm-base-h: 1px;
	--edm-line-color: var(--edm-accent);
	--edm-line-h: 4px;
	--edm-line-w: 56px;
	position: relative;
	margin: 0 0 20px;
	padding: 0 0 14px;
	border: 0;
	border-bottom: var(--edm-base-h) solid var(--edm-base-color);
	color: var(--edm-primary);
	font-family: inherit;
	font-size: clamp(22px, 18px + 1vw, 28px);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
}
.edm-wrap .edm-group-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: calc(var(--edm-base-h) * -1);
	width: var(--edm-line-w);
	height: var(--edm-line-h);
	background: var(--edm-line-color);
	border-radius: 4px 4px 0 0;
}
.edm-line-full .edm-wrap .edm-group-title::after,
.edm-wrap.edm-line-full .edm-group-title::after { width: 100%; border-radius: 0; }
.edm-line-none .edm-wrap .edm-group-title { border-bottom: 0; padding-bottom: 0; }
.edm-line-none .edm-wrap .edm-group-title::after { display: none; }
.edm-wrap .edm-group + .edm-group { margin-top: 44px; }

/* ---------- Ikona dokumenta s oznakom vrste ---------- */
.edm-wrap .edm-icon {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	width: 1em;
	height: 1.2em;
	font-size: 40px;
	line-height: 1;
	color: var(--edm-primary);
}
.edm-wrap .edm-icon--pdf { color: #d0382b; }
.edm-wrap .edm-icon--doc { color: #2b6cc4; }
.edm-wrap .edm-icon--xls { color: #1d7a4c; }
.edm-wrap .edm-icon--ppt { color: #cf5a16; }
.edm-wrap .edm-icon--zip { color: #6a5aa6; }
.edm-wrap .edm-icon--img { color: #0c8a8a; }
.edm-wrap .edm-icon__doc { display: block; width: 100%; height: 100%; overflow: visible; }
.edm-wrap .edm-icon__sheet { fill: currentColor; opacity: .12; }
.edm-wrap .edm-icon__fold { fill: currentColor; opacity: .45; }
.edm-wrap .edm-icon__ext {
	position: absolute;
	left: 0; right: 0; bottom: 16%;
	text-align: center;
	font-family: inherit;
	font-size: .25em;
	font-weight: 800;
	letter-spacing: .04em;
	line-height: 1;
	color: currentColor;
}

/* ---------- Naziv, opis, podaci ---------- */
.edm-wrap .edm-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.edm-wrap .edm-title { color: var(--edm-ink); font-size: 17px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.edm-wrap .edm-title a { color: var(--edm-ink); text-decoration: none; box-shadow: none; transition: color .15s; }
.edm-wrap .edm-title a:hover,
.edm-wrap .edm-title a:focus-visible { color: var(--edm-primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.edm-wrap .edm-desc { color: var(--edm-text); font-size: 15px; line-height: 1.5; }
.edm-wrap .edm-meta { color: var(--edm-muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* ---------- Gumb ---------- */
.edm-wrap .edm-button {
	flex: 0 0 auto;
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 20px;
	border: 0;
	border-radius: var(--edm-radius-btn);
	background: var(--edm-button);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none;
	transition: background-color .2s, color .2s, transform .15s;
}
.edm-wrap .edm-button:hover,
.edm-wrap .edm-button:focus-visible { background: var(--edm-button-hover); color: #fff; text-decoration: none; }
.edm-wrap .edm-button:active { transform: translateY(1px); }
.edm-wrap .edm-button__icon { flex: none; width: 18px; height: 18px; }
.edm-wrap a:focus-visible { outline: 3px solid var(--edm-accent); outline-offset: 2px; }

/* ---------- Popis ---------- */
.edm-wrap .edm-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.edm-wrap .edm-items > li { margin: 0; list-style: none; }
.edm-wrap .edm-items > li::before { content: none; }
.edm-wrap li.edm-item { display: flex; align-items: center; gap: 16px; }
.edm-layout-list .edm-item,
.edm-layout-cards .edm-item {
	position: relative;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--edm-line);
	border-radius: var(--edm-radius);
	transition: border-color .2s, box-shadow .2s, background-color .2s, transform .2s;
}
.edm-layout-list .edm-item:hover,
.edm-layout-cards .edm-item:hover { border-color: color-mix(in srgb, var(--edm-button) 55%, #fff); box-shadow: var(--edm-shadow); }
.edm-layout-list .edm-item:focus-within,
.edm-layout-cards .edm-item:focus-within { border-color: var(--edm-button); }

/* Cijeli redak / kartica otvara dokument; gumb ostaje iznad. */
.edm-layout-list .edm-title a::after,
.edm-layout-cards .edm-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.edm-layout-list .edm-title a:focus-visible,
.edm-layout-cards .edm-title a:focus-visible { outline: 0; }
.edm-layout-list .edm-item:has(.edm-title a:focus-visible),
.edm-layout-cards .edm-item:has(.edm-title a:focus-visible) { outline: 3px solid var(--edm-accent); outline-offset: 2px; }

/* ---------- Kartice ---------- */
.edm-layout-cards .edm-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.edm-layout-cards .edm-item { flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px; }
.edm-layout-cards .edm-item:hover { transform: translateY(-2px); }
.edm-layout-cards .edm-icon { font-size: 46px; }
.edm-layout-cards .edm-body { width: 100%; flex: 1 1 auto; gap: 6px; }
.edm-layout-cards .edm-button { width: 100%; margin-top: auto; }
@media (max-width: 1024px) { .edm-layout-cards .edm-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .edm-layout-cards .edm-items { grid-template-columns: 1fr; } }

/* ---------- Tablica ---------- */
.edm-wrap .edm-table-wrap { border: 1px solid var(--edm-line); border-radius: var(--edm-radius); overflow: hidden; background: #fff; }
.edm-wrap .edm-table { width: 100%; margin: 0; border: 0; border-collapse: collapse; background: none; font-size: 15px; }
.edm-wrap .edm-table th,
.edm-wrap .edm-table td { padding: 14px 18px; border: 0; border-bottom: 1px solid var(--edm-line); background: none; text-align: left; vertical-align: middle; }
.edm-wrap .edm-table tbody tr:last-child > * { border-bottom: 0; }
.edm-wrap .edm-table thead th {
	padding-top: 12px; padding-bottom: 12px;
	background: var(--edm-soft);
	color: var(--edm-primary);
	font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.edm-wrap .edm-table tbody tr { transition: background-color .15s; }
.edm-wrap .edm-table tbody tr:hover { background: var(--edm-soft); }
.edm-wrap .edm-cell-inner { display: flex; align-items: center; gap: 14px; }
.edm-wrap .edm-table .edm-icon { font-size: 32px; }
.edm-wrap .edm-table .edm-title { font-size: 16px; }
.edm-wrap .edm-table td.edm-meta { font-size: 14px; white-space: nowrap; }
.edm-wrap .edm-table .edm-col-action { text-align: right; white-space: nowrap; width: 1%; }
.edm-wrap .edm-table .edm-button { min-height: 40px; padding: 8px 16px; font-size: 14.5px; }

@media (max-width: 640px) {
	.edm-wrap .edm-table, .edm-wrap .edm-table tbody { display: block; width: 100%; }
	.edm-wrap .edm-table thead { display: none; }
	.edm-wrap .edm-table tr {
		display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
		padding: 16px; border-bottom: 1px solid var(--edm-line);
	}
	.edm-wrap .edm-table tbody tr:last-child { border-bottom: 0; }
	.edm-wrap .edm-table td { display: block; padding: 0; border: 0; }
	.edm-wrap .edm-table td.edm-cell-title { flex: 1 1 100%; margin-bottom: 6px; }
	.edm-wrap .edm-table td.edm-meta { font-size: 13.5px; }
	.edm-wrap .edm-table td.edm-meta + td.edm-meta::before { content: "·"; margin-right: 12px; }
	.edm-wrap .edm-table .edm-col-action { flex: 1 1 100%; width: auto; margin-top: 8px; text-align: left; }
	.edm-wrap .edm-table .edm-button { width: 100%; min-height: 44px; }
}

/* ---------- Mobitel: popis ---------- */
@media (max-width: 560px) {
	.edm-layout-list .edm-item { flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; padding: 16px; }
	.edm-layout-list .edm-icon { font-size: 36px; }
	.edm-layout-list .edm-body { flex-basis: calc(100% - 52px); }
	.edm-layout-list .edm-button { width: 100%; }
	.edm-wrap .edm-title { font-size: 16.5px; }
}

/* ---------- Ostalo ---------- */
.edm-empty {
	margin: 0; padding: 18px 20px;
	border: 1px dashed #cfd8e3; border-radius: 12px;
	background: #f3f8fc; color: #6b7785; font-size: 15px;
}
.edm-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
	.edm-wrap *, .edm-wrap *::before, .edm-wrap *::after { transition: none !important; }
	.edm-layout-cards .edm-item:hover { transform: none; }
}

/* ---------- Podgrupe (npr. Financijski izvještaji → 2025) ---------- */
.edm-wrap .edm-group + .edm-group--sub { margin-top: 28px; }
.edm-wrap .edm-group-title--sub {
	--edm-line-w: 0px;
	margin: 0 0 14px;
	padding: 0 0 0 14px;
	border-bottom: 0;
	border-left: 4px solid var(--edm-accent);
	color: var(--edm-ink);
	font-size: 20px;
	line-height: 1.3;
}
.edm-wrap .edm-group-title--sub::after { display: none; }
.edm-wrap .edm-group--level-2 .edm-group-title--sub { font-size: 17px; border-left-color: var(--edm-line); }

/* ---------- Poveznice (stavka bez datoteke) ---------- */
.edm-wrap .edm-icon--link { color: var(--edm-primary); }
