/* ==========================================================================
   Snješko: dodaci izvornom dizajnu (pristupačnost, pretraga, novosti, dokumenti)
   Boje izvornog dizajna: ljubičasta #92278f, tamnoplava #0e2c53, zelena #8dc63f,
   narančasta #ff5200, plava #00bfff, crvena #e11a1f
   ========================================================================== */

:root {
	--snj-purple: #92278f;
	--snj-navy: #0e2c53;
	--snj-green: #8dc63f;
	--snj-orange: #ff5200;
	--snj-blue: #00bfff;
	--snj-text: #4a4a4a;
	--snj-muted: #6b6b6b;
	--snj-line: #e5e5e5;
	--snj-soft: #fff8eb;
}

/* ---------- Pristupačnost ---------- */
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important;
	width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto !important; clip-path: none; height: auto; width: auto; margin: 0;
	left: 12px; top: 12px; z-index: 100000; padding: 12px 20px; background: #fff;
	color: var(--snj-navy); font-weight: 700; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
a:focus-visible, button:focus-visible, input:focus-visible, [role="button"]:focus-visible, .faq-title:focus-visible {
	outline: 3px solid var(--snj-blue);
	outline-offset: 2px;
}
main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Gumbi koji su u izvornom HTML-u bili div/span */
button.scrollToTop, button.header-bar, button.ellepsis-bar, .header-form button.cross, .snj-search-item .search-button {
	border: 0; font: inherit; -webkit-appearance: none; appearance: none;
}
button.header-bar { background: transparent; padding: 0; }
button.ellepsis-bar { background: transparent; padding: 0 0 0 15px; color: var(--snj-navy); font-size: 22px; }
.header-form .bg-lay button.cross { padding: 0; }

/* Izvorni zaglavlje, h1 je skriven na naslovnici */
.header-form { display: flex; }

/* ---------- Pretraga u izborniku ---------- */
.menu > li.snj-search-item { display: flex; align-items: center; }
.snj-search-item .search-button {
	background: var(--snj-purple); color: #fff; width: 40px; height: 40px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center; margin-left: 8px; cursor: pointer;
	transition: background .3s, transform .3s;
}
.snj-search-item .search-button:hover { background: var(--snj-navy); transform: scale(1.05); }
@media (max-width: 991px) {
	.menu > li.snj-search-item { padding: 0; }
	.snj-search-item .search-button {
		width: 100%; height: auto; border-radius: 0; margin: 0; justify-content: flex-start; gap: 10px;
		background: transparent; color: var(--snj-navy); padding: 10px 25px; font-weight: 700; font-size: 15px;
		border-top: 1px solid var(--snj-line);
	}
	.snj-search-item .search-button:hover { background: var(--snj-soft); transform: none; }
}
.header-form .form-container { display: flex; border-radius: 6px; }
.header-form .form-container input { border-radius: 4px 0 0 4px; font-size: 17px; }
.header-form .form-container button { border-radius: 0 4px 4px 0; cursor: pointer; }

/* ---------- Opći sadržaj ---------- */
.snj-entry { color: var(--snj-text); font-size: 17px; line-height: 1.75; }
.snj-entry > * + * { margin-top: 1.1em; }
.snj-entry p { margin-bottom: 0; }
.snj-entry a { color: var(--snj-purple); text-decoration: underline; text-underline-offset: 2px; }
.snj-entry a:hover { color: var(--snj-navy); }
.snj-entry h2, .snj-entry h3 { margin-top: 1.6em; }
.snj-entry ul, .snj-entry ol { padding-left: 1.3em; }
.snj-entry ul li { list-style: disc; }
.snj-entry ol li { list-style: decimal; }
.snj-default-page .snj-entry { max-width: 860px; margin: 0 auto; }

/* Slike, video i datoteke u novostima */
.snj-entry .wp-block-image { margin-left: 0; margin-right: 0; }
.snj-entry .wp-block-image img { border-radius: 10px; height: auto; max-width: 100%; box-shadow: 0 4px 18px rgba(14,44,83,.08); }
.snj-entry .wp-block-image a { display: inline-block; cursor: zoom-in; }
.snj-entry .wp-block-video video { width: 100%; border-radius: 10px; background: #000; }
.snj-entry .wp-block-audio audio { width: 100%; }

.snj-entry .wp-block-file {
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
	background: #fff; border: 1px solid var(--snj-line); border-left: 4px solid var(--snj-purple);
	border-radius: 6px; padding: 14px 18px; margin-top: 12px;
}
.snj-entry .wp-block-file::before {
	content: "\f1c1"; font-family: "Font Awesome 5 Free"; font-weight: 400; font-size: 26px; color: var(--snj-purple);
}
.snj-entry .wp-block-file > a:first-of-type { flex: 1 1 240px; font-weight: 600; text-decoration: none; color: var(--snj-navy); }
.snj-entry .wp-block-file > a:first-of-type:hover { color: var(--snj-purple); text-decoration: underline; }
.snj-entry .wp-block-file .wp-block-file__button {
	background: var(--snj-purple); color: #fff !important; text-decoration: none; border-radius: 30px;
	padding: 8px 20px; font-size: 14px; font-weight: 700; text-transform: uppercase; margin: 0;
}
.snj-entry .wp-block-file .wp-block-file__button:hover { background: var(--snj-navy); }

/* ---------- Novosti ---------- */
.snj-news-grid .snj-card-col { display: flex; }
.snj-news-card { display: flex; flex-direction: column; width: 100%; }
.snj-news-card .post-thumb { aspect-ratio: 37 / 24; background: #f2eefa; }
.snj-news-card .post-thumb a { height: 100%; }
.snj-news-card .post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.snj-news-card .post-content { flex: 1; display: flex; flex-direction: column; }
.snj-news-card .post-top { flex: 1; padding: 24px 24px 20px !important; }
.snj-news-card .title { font-size: 19px; line-height: 1.35; }
.snj-news-card .title a { color: var(--snj-navy); }
.snj-news-card .title a:hover { color: var(--snj-purple); }
.snj-news-card .meta-post { margin-bottom: 8px; color: var(--snj-muted); font-size: 15px; }
.snj-news-card .meta-post i { color: var(--snj-purple); margin-right: 6px; }
.snj-card-excerpt { font-size: 15px; line-height: 1.6; color: var(--snj-muted); margin: 0; }
.snj-news-card .post-bottom { padding: 14px 24px !important; }

.snj-single .post-thumb { border-radius: 10px 10px 0 0; }
.snj-single .post-thumb img { width: 100%; height: auto; }
.snj-single .post-content .post-top { padding: 34px 38px; }
@media (max-width: 575px) { .snj-single .post-content .post-top { padding: 24px 18px; } }
.snj-single .meta-post { margin-bottom: 20px; color: var(--snj-muted); }
.snj-single .meta-post li { margin-right: 18px; }
.snj-single .meta-post i { color: var(--snj-purple); margin-right: 6px; }

.snj-post-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: 30px; }
.snj-post-nav__label { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--snj-muted); }
.snj-post-nav__item a:not(.custom-button) { color: var(--snj-navy); font-weight: 600; line-height: 1.4; }
.snj-post-nav__item a:not(.custom-button):hover { color: var(--snj-purple); }
.snj-post-nav__next { text-align: right; }
@media (max-width: 767px) {
	.snj-post-nav { grid-template-columns: 1fr; text-align: center; }
	.snj-post-nav__next { text-align: center; }
	.snj-post-nav__all { order: 3; }
}

/* Paginacija */
.snj-pagination .default-pagination { display: flex; flex-wrap: wrap; list-style: none; padding: 0; }
.snj-pagination .default-pagination li .dots { display: inline-block; width: 46px; text-align: center; line-height: 46px; color: var(--snj-muted); }
.snj-pagination .default-pagination li a { display: inline-block; font-weight: 700; }

/* ---------- Dokumenti (Pravni kutak, Upisi, Zdravstveni članci) ---------- */
.snj-docs { list-style: none; margin: 0; padding: 0; }
.snj-docs li { padding: 0; }
.snj-doc {
	display: flex; align-items: flex-start; gap: 12px; padding: 9px 10px; border-radius: 6px;
	color: var(--snj-navy); line-height: 1.45; transition: background .2s;
}
.snj-doc:hover, .snj-doc:focus-visible { background: var(--snj-soft); color: var(--snj-purple); }
.snj-doc__icon { flex: 0 0 22px; font-size: 19px; color: var(--snj-purple); margin-top: 1px; text-align: center; }
.snj-doc__title { flex: 1; font-weight: 500; }
.snj-doc__meta { flex: 0 0 auto; font-size: 13px; color: var(--snj-muted); white-space: nowrap; margin-top: 3px; }
@media (max-width: 575px) { .snj-doc { flex-wrap: wrap; } .snj-doc__meta { flex-basis: 100%; padding-left: 34px; margin-top: 0; } }
.snj-docs-group + .snj-docs-group { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--snj-line); }
.snj-docs-loose { margin-bottom: 20px; }
.snj-docs-section .faq-item .faq-item { box-shadow: none; border: 1px solid var(--snj-line); }
.snj-docs-section .faq-content .snj-docs + .faq-item, .snj-docs-section .faq-content .faq-item + .snj-docs { margin-top: 14px; }
.snj-docs-count { font-size: 13px; font-weight: 400; color: var(--snj-muted); margin-left: 6px; }
.snj-docs-tools { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.snj-docs-filter { position: relative; width: 100%; max-width: 420px; }
.snj-docs-filter input { width: 100%; height: 48px; border: 1px solid var(--snj-line); border-radius: 30px; padding: 0 20px 0 46px; background: #fff; }
.snj-docs-filter i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--snj-purple); }
.snj-docs-empty { display: none; padding: 20px; text-align: center; color: var(--snj-muted); }
.snj-articles { background: #fff; border-radius: 10px; padding: 30px; box-shadow: 0 2px 4px rgba(0,0,0,.06); }
.snj-articles h2 { font-size: 20px; margin-bottom: 14px; }

/* ---------- Djelatnice ---------- */
.teacher-item-2 .teacher-thumb .thumb img { aspect-ratio: 1; object-fit: cover; }

/* ---------- Pretraga ---------- */
.snj-search__box { background: #fff; border-radius: 10px; padding: 30px; box-shadow: 0 2px 4px rgba(0,0,0,.06); margin-bottom: 30px; }
.snj-search-form { display: flex; gap: 0; }
.snj-search-form input {
	flex: 1; height: 56px; border: 2px solid var(--snj-line); border-right: 0; border-radius: 30px 0 0 30px;
	padding: 0 24px; font-size: 17px; background: #fff;
}
.snj-search-form input:focus { border-color: var(--snj-purple); outline: none; }
.snj-search-form button {
	height: 56px; border: 0; border-radius: 0 30px 30px 0; background: var(--snj-purple); color: #fff;
	padding: 0 28px; font-weight: 700; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
}
.snj-search-form button:hover { background: var(--snj-navy); }
.snj-search__summary { margin: 16px 0 0; color: var(--snj-muted); }
.snj-results { list-style: none; padding: 0; margin: 0; }
.snj-result {
	display: flex; gap: 18px; background: #fff; border-radius: 10px; padding: 22px 24px; margin-bottom: 14px;
	box-shadow: 0 2px 4px rgba(0,0,0,.06); border-left: 4px solid var(--snj-green);
}
.snj-result--dokument { border-left-color: var(--snj-purple); }
.snj-result--page { border-left-color: var(--snj-blue); }
.snj-result--djelatnica { border-left-color: var(--snj-orange); }
.snj-result__icon { flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--snj-soft); color: var(--snj-purple); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.snj-result__body { flex: 1; min-width: 0; }
.snj-result__type { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--snj-muted); margin-bottom: 4px; }
.snj-result__title { margin: 0 0 6px; font-size: 19px; line-height: 1.35; }
.snj-result__title a { color: var(--snj-navy); }
.snj-result__title a:hover { color: var(--snj-purple); }
.snj-result p { margin: 0; font-size: 15px; color: var(--snj-text); }
.snj-results mark, .snj-result mark { background: #fff1a8; color: inherit; padding: 0 2px; border-radius: 2px; }
.snj-noresults { background: #fff; border-radius: 10px; padding: 26px 30px; }
.snj-noresults ul { padding-left: 1.2em; margin: 8px 0 0; }
.snj-noresults li { list-style: disc; margin-bottom: 4px; }

/* ---------- 404 ---------- */
.snj-404 .error-wrapper { margin-bottom: 60px; }
.snj-404__art { margin: 0 auto 10px; width: 220px; }
.snj-404__art svg { animation: snj-bob 3s ease-in-out infinite; }
@keyframes snj-bob { 50% { transform: translateY(-8px); } }
.snj-404__code { font-size: 90px; line-height: 1; font-weight: 900; margin: 0 0 6px; color: var(--snj-purple); letter-spacing: .04em; }
.snj-404 .error-content { max-width: 620px; }
.snj-404 .error-content .title { color: var(--snj-navy); margin-bottom: 12px; }
.snj-404 .snj-search-form { margin: 24px 0; }
.snj-404__links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.snj-404__news h2 { margin-bottom: 30px; }

/* ---------- Podnožje ---------- */
.snj-footer-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; list-style: none; padding: 0; margin: 6px 0 22px; }
.snj-footer-menu a { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
.snj-footer-menu a:hover { color: var(--snj-purple); }

/* Bolji kontrast teksta u zaglavlju podstranica */
.page-header .breadcrumb li a:hover { text-decoration: underline; }

/* Obrazac pretrage: izvorni stilovi postavljaju button/input na 100% */
.snj-search-form input[type="search"] { flex: 1 1 auto; width: auto !important; min-width: 0; }
.snj-search-form button { flex: 0 0 auto; width: auto !important; }

/* Mobitel: gumbi izbornika kao u izvornom dizajnu */
.header-wrapper .menu-area button.header-bar { display: block; margin: 0; align-self: center; }
.header-wrapper .menu-area button.ellepsis-bar { align-self: center; line-height: 1; height: auto !important; width: auto !important; }
.header-wrapper .menu-area button.header-bar { height: 20px !important; width: 25px !important; }
.header-wrapper .menu-area button:focus:not(:focus-visible) { outline: none; }
@media (max-width: 991px) {
	.menu > li.snj-search-item .search-button { padding: 10px 25px !important; font-size: 15px; width: 100%; }
}

/* Naslovi točno kako su upisani (predložak je svaku riječ pisao velikim slovom) */
.page-header-content .title,
.teacher-single-item .teacher-single-content .title,
.section-header .title,
.section-header .cate { text-transform: none; }

/* Obavijest umjesto karte dok posjetitelj ne prihvati kolačiće */
.maps .snj-map-note { height: 100%; min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #eef3f8; color: var(--snj-navy); padding: 30px; }
.maps .snj-map-note p { margin: 0 0 14px; font-size: 17px; }
.maps .snj-map-note i { color: var(--snj-purple); margin-right: 6px; }

/* ---- 1.3: izbornik, hover i oznaka trenutne stranice ---- */
@media (min-width: 992px) {
	.menu > li > a { position: relative; display: inline-block; }
	.menu > li > a::after {
		content: ""; position: absolute; left: 22px; right: 22px; bottom: 9px; height: 3px;
		border-radius: 3px; background: currentColor; opacity: .85;
		transform: scaleX(0); transform-origin: center; transition: transform .25s ease;
	}
	.menu > li > a:hover::after,
	.menu > li > a:focus-visible::after,
	.menu > li > a.active::after { transform: scaleX(1); }
	.menu > li > a i { display: inline-block; transition: transform .25s ease; }
	.menu > li > a:hover i,
	.menu > li > a:focus-visible i { transform: translateY(-2px) rotate(-10deg); }
}
@media (min-width: 1200px) {
	/* 8 stavki izbornika u istom redu s logotipom */
	.header-wrapper .menu > li > a { padding-left: 14px; padding-right: 14px; }
	.menu > li > a::after { left: 14px; right: 14px; }
}
@media (min-width: 992px) and (max-width: 1199px) {
	/* da izbornik stane u isti red s logotipom: bez ikona, manji razmaci */
	.header-wrapper .menu > li > a { padding: 10px 10px; font-size: 13px; }
	.header-wrapper .menu > li > a i { display: none; }
	.menu > li > a::after { left: 10px; right: 10px; bottom: 4px; }
}
@media (max-width: 991px) {
	.menu li a { text-transform: none; }
	.menu li a { transition: background .2s ease, box-shadow .2s ease, padding-left .2s ease; }
	.menu li a:hover,
	.menu li a:focus-visible,
	.menu li a.active { background: #fff8eb; box-shadow: inset 4px 0 0 var(--snj-purple); padding-left: 29px; }
}
@media (prefers-reduced-motion: reduce) {
	.menu > li > a::after, .menu > li > a i, .menu li a { transition: none; }
}

/* ---- 1.3: slike u sadržaju nikad šire od ekrana ---- */
main img { max-width: 100%; height: auto; }

/* ---- 1.3: osvrti roditelja, jednake kartice i skraćeni dugi tekst ---- */
.client-slider .slick-track { display: flex; }
.client-slider .slick-slide { height: auto; }
.client-slider .slick-slide > div, .client-slider .client-item { height: 100%; }
.client-body p.snj-clamp { max-height: 15em; overflow: hidden; position: relative; margin-bottom: 0; transition: max-height .35s ease; }
.client-body p.snj-clamp::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4.5em;
	background: linear-gradient(rgba(255,255,255,0), #fff); pointer-events: none;
}
.client-body p.snj-clamp.is-open { max-height: none; }
.client-body p.snj-clamp.is-open::after { display: none; }
.client-body .snj-more {
	display: inline-block; width: auto; text-align: left; background: none; border: 0; padding: 6px 0; margin: 4px 0 0;
	color: var(--snj-purple); font-weight: 700; font-size: 15px; cursor: pointer;
	text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.client-body .snj-more:hover { color: var(--snj-navy); }
.client-body .snj-more:focus:not(:focus-visible) { outline: none; }
.client-body .snj-more:focus-visible { outline: 2px solid var(--snj-purple); outline-offset: 2px; }

/* ---- 1.3: obavijest o karti mora biti u vidljivom dijelu iznad kartica s podacima ---- */
.maps .snj-map-note { justify-content: flex-start; padding: 40px 20px 20px; }
.maps .snj-map-note .custom-button { height: auto; padding: 12px 22px; max-width: 100%; }
.maps .snj-map-note .custom-button span { line-height: 1.35; white-space: normal; display: inline-block; }
@media (min-width: 992px) {
	.maps .snj-map-note { padding-top: 60px; }
}

/* Dugi tekst u polju za brzu pretragu dokumenata na uskim ekranima */
.snj-docs-filter__input { text-overflow: ellipsis; }

/* ---- 1.3.1: skupine na stranici O nama (naziv, vrsta skupine, dob) ---- */
.counter-item.round-style { padding-bottom: 75px; }
.counter-item.round-style .counter-content { padding: 0 10px; }
.counter-item.round-style .counter-content .cate { font-size: 15px; line-height: 1.45; display: inline-block; }
.counter-item.round-style .counter-content .cate:first-of-type { font-size: 17px; font-weight: 700; color: var(--snj-navy); margin-bottom: 2px; }
.counter-item.round-style .counter-content .snj-skupina-vrsta { font-weight: 600; }

/* Prazna rubrika dokumenata (npr. Obrasci prije prvog obrasca) */
.snj-docs-none { max-width: 720px; margin: 0 auto; padding: 28px 30px; background: #fff; border-radius: 10px; box-shadow: 0 4px 18px rgba(14,44,83,.06); text-align: center; color: var(--snj-navy); font-size: 17px; }
