/* KOTUR – glavni stilovi
   Paleta iz oznaka u prijavi: EU zastava (plava, žuta) i pečat Sveučilišta u Osijeku (tinta). */

:root {
	--eu: #003399;
	--star: #ffcc00;
	--ink: #1b2f5c;
	--sky: #e9eef8;
	--paper: #ffffff;
	--text: #1a2238;
	--muted: #4e5a73;
	--rule: #c9d3e6;

	--font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

	--step--1: 0.875rem;
	--step-0: 1.0625rem;
	--step-1: 1.3125rem;
	--step-2: 1.625rem;
	--step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
	--step-4: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);

	--gutter: clamp(1.25rem, 4vw, 3rem);
	--section: clamp(4rem, 8vw, 7rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: 1.65;
	text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--eu); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--star); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--star); color: var(--ink); padding: 0.6rem 1rem; font-weight: 700; }
.skip-link:focus { top: 1rem; }

/* ---------- Zaglavlje ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--paper);
	border-bottom: 1px solid var(--rule);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }

.site-header__inner {
	max-width: 1200px; margin-inline: auto; padding: 0.75rem var(--gutter);
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink); }
.brand__seal { width: 52px; height: 52px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.375rem; letter-spacing: 0.02em; color: var(--eu); }
.brand__sub { font-size: 0.75rem; color: var(--muted); }

.nav__list { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 0.25rem 1.5rem; flex-wrap: wrap; }
.nav__list a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9375rem; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.nav__list a:hover,
.nav__list .current-menu-item > a { border-bottom-color: var(--star); }

.site-header__eu { width: 187px; }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
	.site-header__inner { grid-template-columns: 1fr auto; grid-template-areas: "brand toggle" "eu eu" "nav nav"; gap: 0.5rem 1rem; }
	.brand { grid-area: brand; }
	.site-header__eu { grid-area: eu; width: 150px; }
	.nav { grid-area: nav; display: none; }
	.nav-open .nav { display: block; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 0; padding-block: 0.5rem; }
	.nav__list a { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
	.nav-toggle {
		grid-area: toggle; display: inline-flex; align-items: center; gap: 0.5rem;
		background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 0.45rem 0.9rem;
		font: 600 0.875rem var(--font-body); color: var(--ink); cursor: pointer;
	}
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
		display: block; width: 16px; height: 2px; background: currentColor; position: relative;
	}
	.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle__bars::before { top: -5px; }
	.nav-toggle__bars::after { top: 5px; }
	.nav-open .nav-toggle__bars { background: transparent; }
	.nav-open .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
	.nav-open .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }
}

/* ---------- Uvodni dio ---------- */
.hero {
	background: var(--eu);
	color: #fff;
	overflow: hidden;
	padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3.5rem, 7vw, 6rem);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--gutter); align-items: center; }
.hero__acronym {
	font-family: var(--font-display); font-weight: 800; color: var(--star);
	font-size: clamp(4.5rem, 2rem + 13vw, 12.5rem); line-height: 0.82; letter-spacing: -0.035em;
	margin: 0 0 0.25em -0.04em;
}
.hero__title { color: #fff; font-size: var(--step-4); font-weight: 700; max-width: 18ch; margin-bottom: 0.5em; }
.hero__lead { font-size: var(--step-1); line-height: 1.5; color: #dce5f7; max-width: 38ch; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 2rem 0 0; font-size: var(--step--1); color: #c3d0ee; }
.hero__meta span { border-left: 2px solid var(--star); padding-left: 0.6rem; line-height: 1.3; }

.hero__emblem { position: relative; width: min(100%, 440px); aspect-ratio: 1; justify-self: end; }
.hero__ring { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--star); overflow: visible; }
.hero__seal { position: absolute; inset: 24%; width: 52%; height: 52%; object-fit: contain; opacity: 0.95; }

.hero__star {
	transform-box: fill-box; transform-origin: center;
	animation: kotur-star 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.2) both;
	animation-delay: calc(0.15s + var(--i) * 0.07s);
}
@keyframes kotur-star { from { opacity: 0; transform: scale(0.2) rotate(-72deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero__star { animation: none; } }

@media (max-width: 860px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero__emblem { order: -1; width: 168px; justify-self: start; margin-bottom: 0.5rem; }
}

/* ---------- Sekcije ---------- */
.section { padding-block: var(--section); }
.section__title { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.02em; }
.section__intro { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 52ch; margin-bottom: 2.5rem; }

/* O projektu */
.about { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about__text p { max-width: 64ch; }
.about__text p:first-of-type { font-size: var(--step-1); line-height: 1.5; color: var(--ink); }
.facts { margin: 0; border-top: 3px solid var(--eu); }
.facts__row { padding: 0.85rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: var(--step--1); color: var(--muted); }
.facts dd { margin: 0.1rem 0 0; font-weight: 600; color: var(--ink); line-height: 1.45; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* Ciljevi */
.section--goals { background: var(--sky); }
.goal-main {
	font-family: var(--font-display); font-weight: 500; color: var(--ink);
	font-size: var(--step-3); line-height: 1.25; max-width: 30ch;
	margin: 0 0 clamp(2.5rem, 6vw, 4.5rem);
	padding-left: 1.25rem; border-left: 6px solid var(--star);
}
.goals__heading,
.strategic__heading,
.team__heading,
.plan__heading { font-size: var(--step-1); font-weight: 700; margin-bottom: 1.25rem; }
.goals__list {
	list-style: none; margin: 0; padding: 0; counter-reset: cilj;
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4rem);
}
.goals__list li {
	counter-increment: cilj;
	display: grid; grid-template-columns: 3.25rem 1fr; align-items: baseline;
	padding: 1.1rem 0; border-top: 1px solid var(--rule);
}
.goals__list li::before {
	content: counter(cilj);
	font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--eu);
}
.goals__list li:last-child { grid-column: 1 / -1; grid-template-columns: 3.25rem minmax(0, 48rem); }
.goals__list li:last-child::before { color: var(--ink); }
.strategic { margin-top: clamp(2.5rem, 6vw, 4rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); }
.strategic__heading { grid-column: 1 / -1; }
.strategic__item h4 { font-size: var(--step-0); margin-bottom: 0.35em; }
.strategic__item p { color: var(--muted); font-size: 0.975rem; }
@media (max-width: 760px) {
	.goals__list, .strategic { grid-template-columns: 1fr; }
}

/* Radni paketi */
.wps {
	list-style: none; margin: 0 0 clamp(3rem, 7vw, 5rem); padding: 0;
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem;
	position: relative;
}
.wps::before { content: ""; position: absolute; top: 1.2rem; left: 0; right: 0; height: 2px; background: var(--rule); }
.wps__item { position: relative; }
.wps__code {
	display: inline-grid; place-items: center; position: relative;
	min-width: 2.4rem; height: 2.4rem; padding: 0 0.7rem; border-radius: 999px;
	background: var(--eu); color: #fff; font: 700 0.9375rem var(--font-display);
	box-shadow: 0 0 0 6px var(--paper); margin-bottom: 1.1rem;
}
.wps__title { font-size: var(--step-1); }
.wps__item p { color: var(--muted); font-size: 0.975rem; }
@media (max-width: 960px) {
	.wps { grid-template-columns: 1fr 1fr; }
	.wps::before { display: none; }
}
@media (max-width: 560px) { .wps { grid-template-columns: 1fr; } }

.plan { overflow-x: auto; border: 1px solid var(--rule); border-radius: 6px; }
.plan__table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.9375rem; }
.plan__table th, .plan__table td { padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid var(--rule); }
.plan__table tbody tr:last-child > * { border-bottom: 0; }
.plan__table thead th { background: var(--sky); color: var(--ink); font-weight: 700; font-size: var(--step--1); }
.plan__table thead th:not(:first-child) { text-align: center; width: 15%; }
.plan__table tbody th { font-weight: 600; color: var(--ink); }
.plan__cell { position: relative; padding-inline: 0 !important; }
.plan__cell.is-on::after {
	content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 0.75rem; transform: translateY(-50%);
	background: var(--eu);
}
.plan__cell.is-start::after { left: 0.6rem; border-radius: 999px 0 0 999px; }
.plan__cell.is-end::after { right: 0.6rem; border-radius: 0 999px 999px 0; }

/* Tim */
.section--team { background: var(--sky); }
.avatar {
	flex: none; display: grid; place-items: center;
	width: 4rem; height: 4rem; border-radius: 50%; object-fit: cover;
	background: var(--ink); color: #fff; font: 700 1.125rem var(--font-display); letter-spacing: 0.02em;
}
.avatar--lead { width: 9rem; height: 9rem; font-size: 2.75rem; background: var(--star); color: var(--ink); }

.lead {
	display: flex; gap: clamp(1.5rem, 4vw, 3rem); align-items: flex-start;
	background: var(--paper); padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: 6px;
	border-top: 6px solid var(--eu); margin-bottom: clamp(3rem, 7vw, 4.5rem);
}
.lead__role { font-weight: 700; color: var(--eu); margin-bottom: 0.25rem; }
.lead__name { font-size: var(--step-3); margin-bottom: 0.2em; }
.lead__position { color: var(--muted); }
.lead__body p:not(.lead__role):not(.lead__position) { max-width: 66ch; }
@media (max-width: 640px) { .lead { flex-direction: column; } .avatar--lead { width: 6rem; height: 6rem; font-size: 1.875rem; } }

.team {
	list-style: none; margin: 0 0 clamp(3rem, 7vw, 4.5rem); padding: 0;
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4rem);
}
.person { display: flex; gap: 1.25rem; padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.person__name { font-size: var(--step-1); margin-bottom: 0.15em; }
.person__position { color: var(--muted); font-size: 0.9375rem; margin-bottom: 0.5rem; }
.person__focus { margin-bottom: 0.5rem; line-height: 1.5; }
.person__link { font-weight: 600; font-size: 0.9375rem; }
@media (max-width: 760px) { .team { grid-template-columns: 1fr; } }

.support { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem clamp(1.5rem, 4vw, 3rem); }
.support li { display: flex; flex-direction: column; gap: 0.2rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.45; }
.support strong { font-family: var(--font-display); font-size: var(--step-0); color: var(--ink); }
.support span { color: var(--muted); }
.support .support__focus { color: var(--text); }
@media (max-width: 860px) { .support { grid-template-columns: 1fr; } }

/* Rezultati */
.indicators {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 0 clamp(1.5rem, 4vw, 3rem);
}
.indicators li { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem 0 1.5rem; border-top: 1px solid var(--rule); }
.indicators__value { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; line-height: 1; color: var(--eu); letter-spacing: -0.02em; }
.indicators__label { font-size: 0.9375rem; line-height: 1.45; color: var(--text); max-width: 30ch; }

/* Novosti */
.section--news { border-top: 1px solid var(--rule); }
.news { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.news--archive { grid-template-columns: 1fr; max-width: 760px; }
.news__item { border-top: 3px solid var(--star); padding-top: 1rem; }
.news__item time { font-size: var(--step--1); color: var(--muted); }
.news__item h2, .news__item h3 { font-size: var(--step-1); margin: 0.3em 0 0.4em; }
.news__item h2 a, .news__item h3 a { color: var(--ink); text-decoration: none; }
.news__item h2 a:hover, .news__item h3 a:hover { text-decoration: underline; }
.news__item p { color: var(--muted); font-size: 0.975rem; }
.news__empty { color: var(--muted); max-width: 60ch; }
@media (max-width: 860px) { .news { grid-template-columns: 1fr; } }

/* Podstranice */
.page-head { background: var(--eu); color: #fff; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-head__title { color: #fff; font-size: var(--step-4); max-width: 24ch; margin: 0; }
.page-head__date { display: block; color: #c3d0ee; font-size: var(--step--1); margin-bottom: 0.75rem; }
.entry { max-width: 68ch; }
.entry h2 { font-size: var(--step-3); margin-top: 1.5em; }
.entry h3 { font-size: var(--step-2); margin-top: 1.4em; }
.entry blockquote { margin: 1.5em 0; padding-left: 1.25rem; border-left: 4px solid var(--star); color: var(--ink); font-size: var(--step-1); }
.entry img { border-radius: 4px; }
.entry__image { margin: 0 0 2.5rem; }
.entry__image img { width: 100%; border-radius: 6px; }
.nav-links { display: flex; gap: 1rem; margin-top: 2.5rem; font-weight: 600; }
.has-eu-plava-color { color: var(--eu); } .has-eu-plava-background-color { background-color: var(--eu); }
.has-zvijezda-color { color: var(--star); } .has-zvijezda-background-color { background-color: var(--star); }
.has-tinta-color { color: var(--ink); } .has-tinta-background-color { background-color: var(--ink); }
.has-nebo-color { color: var(--sky); } .has-nebo-background-color { background-color: var(--sky); }
.has-bijela-color { color: #fff; } .has-bijela-background-color { background-color: #fff; }

/* ---------- Podnožje ---------- */
.site-footer { background: var(--ink); color: #d5ddef; font-size: 0.9375rem; }
.site-footer__grid {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: clamp(2rem, 5vw, 4rem);
	padding-block: clamp(3rem, 6vw, 4.5rem); align-items: start;
}
.site-footer__name { font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--star); margin-bottom: 0.4em; }
.site-footer__muted { color: #a9b6d3; }
.site-footer__funding img { width: 260px; margin-bottom: 1.25rem; }
.site-footer__disclaimer { font-size: var(--step--1); line-height: 1.6; color: #b9c5e0; max-width: 60ch; }
.site-footer__seal { width: 96px; height: 96px; object-fit: contain; opacity: 0.85; }
.site-footer__base { padding-block: 0 1.5rem; font-size: var(--step--1); color: #a9b6d3; }
.site-footer__base p { margin: 0; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.site-footer a { color: #fff; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr; } }

@media print {
	.site-header, .nav-toggle, .hero__emblem { display: none; }
	.hero, .page-head { background: none; color: var(--text); }
	.hero__title, .page-head__title { color: var(--ink); }
}
