/* ===== FONTOVI ===== */
@font-face {
  font-family: 'Merriweather';
  src: url('/fonts/merriweather-v33-latin_latin-ext-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/source-sans-3-v19-latin_latin-ext-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/source-sans-3-v19-latin_latin-ext-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ===== VARIJABLE ===== */
:root {
  --primary: #1B3A5C;
  --primary-dark: #142d47;
  --primary-light: #264d78;
  --secondary: #C8102E;
  --secondary-hover: #a00d24;
  --bg: #F5F6F8;
  --white: #FFFFFF;
  --accent: #D5E8F0;
  --accent-light: #EDF5F9;
  --text: #2D3436;
  --text-light: #636E72;
  --footer-bg: #1B2A3D;
  --meta: #838E91;
  --border: #DFE6E9;
  --heading: 'Merriweather', Georgia, serif;
  --body: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1000px;
  --radius: 5px;
  --shadow: 0 2px 8px rgba(0,0,0,0.07);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--secondary-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--primary); color: white;
  padding: 0.5rem 1rem; border-radius: 0 0 var(--radius) var(--radius);
  z-index: 1000; font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ============================================
   ZAGLAVLJE — dvodijelno po uzoru na FHS
   ============================================ */

/* Gornja bijela traka s logotipom */
.header-top {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header-top-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
}
.header-brand {
  display: inline-block;
  text-decoration: none;
}
.header-brand:hover { text-decoration: none; opacity: 0.85; }
.header-brand img {
  height: 52px;
  width: auto;
}

/* Donja tamna navigacijska traka */
.header-nav {
  background: var(--primary);
}
.header-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  min-height: 48px;
  gap: 1.5rem;
}
.nav-project-title {
  color: white;
  font-family: var(--heading);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  padding-right: 1.5rem;
  border-right: 1px solid rgba(255,255,255,0.2);
}
.nav-project-title:hover { text-decoration: none; opacity: 0.9; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-links a {
  color: rgba(255,255,255,0.82);
  padding: 0.5rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 3px;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover {
  color: white;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}
.nav-links a.active {
  color: white;
  background: rgba(255,255,255,0.15);
}

/* Hamburger */
.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; padding: 0.5rem; z-index: 300;
  margin-left: auto;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: white; margin: 4px 0; border-radius: 2px;
  transition: 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

.nav-overlay {
  display: none; position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4); z-index: 150;
}
.nav-overlay.open { display: block; }

/* ===== CONTAINER ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* ===== NASLOVI ===== */
h1, h2, h3 {
  font-family: var(--heading);
  color: var(--primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 1.9rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--secondary);
}
h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.9rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}
p { margin-bottom: 1rem; }

blockquote {
  border-left: 4px solid var(--secondary);
  padding: 0.7rem 1.2rem;
  margin: 1.5rem 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-light);
  font-style: italic;
}
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 3rem 1.5rem;
  margin: -2rem -1.5rem 2rem;
  text-align: center;
}
.hero h1 {
  color: white;
  border-bottom: none;
  font-size: 2.1rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0;
}
.hero .subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.82);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.65;
}
.hero .institution {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ===== UVODNI TEKST ===== */
.intro-text {
  font-size: 1.02rem;
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

/* ===== KARTICE REZULTATA ===== */
.result-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.result-item:hover {
  box-shadow: var(--shadow-hover);
  border-left-color: var(--secondary);
}
.result-item h2,
.result-item h3 {
  border-bottom: none; margin-top: 0; padding-bottom: 0;
}
.result-item h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.result-item h3 { font-size: 1.08rem; margin-bottom: 0.35rem; }
.result-item h2 a,
.result-item h3 a { color: var(--primary); }
.result-item h2 a:hover,
.result-item h3 a:hover { color: var(--secondary); text-decoration: none; }
.result-item p:last-child { margin-bottom: 0; }

/* ===== METAPODACI ===== */
.meta {
  color: var(--meta);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
}
.meta-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--primary);
  padding: 0.1rem 0.55rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ===== DETALJNI REZULTAT ===== */
.result-meta {
  background: var(--accent-light);
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
  border: 1px solid var(--accent);
}
.result-meta p { margin-bottom: 0.25rem; font-size: 0.93rem; }
.result-meta p:last-child { margin-bottom: 0; }
.result-meta strong { color: var(--primary); }
.back-link { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.back-link a { font-weight: 600; font-size: 0.93rem; }

/* ===== SEKCIJE ===== */
.latest-results { margin-top: 2rem; }
.latest-results > h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent);
}

/* ===== LISTE ===== */
ul, ol { margin: 0.5rem 0 1.1rem 1.5rem; }
li { margin-bottom: 0.35rem; }

/* ===== TABLICE ===== */
table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
th {
  background: var(--primary); color: white; font-weight: 600;
  text-align: left; padding: 0.6rem 0.9rem; font-size: 0.88rem;
}
td {
  padding: 0.55rem 0.9rem; border-bottom: 1px solid #eee; font-size: 0.93rem;
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: var(--accent-light); }

/* ============================================
   PODNOŽJE — po uzoru na FHS
   ============================================ */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.7);
  margin-top: 3rem;
  border-top: 3px solid var(--secondary);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.footer-logo {
  height: 55px;
  width: auto;
  margin-bottom: 1rem;
  opacity: 0.85;
}
.footer-project-name {
  font-family: var(--heading);
  font-weight: 700;
  color: white;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.footer-about p { font-size: 0.85rem; line-height: 1.6; }
.footer-contact h4,
.footer-links h4 {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-contact p { font-size: 0.85rem; line-height: 1.55; margin-bottom: 0.6rem; }
.footer-contact strong { color: rgba(255,255,255,0.85); }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  text-decoration: none;
}
.footer-links a:hover { color: white; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}
.nav-close-bar { display: none; }

/* ===== RESPONZIVNO ===== */
@media (max-width: 767px) {
  .hamburger { display: block; }
  .nav-links {
    display: none; position: fixed; top: 0; right: 0;
    width: 280px; height: 100vh; height: 100dvh;
    background: var(--primary); flex-direction: column;
    padding: 0; box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    z-index: 200; overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-close-bar {
    display: flex; justify-content: flex-end;
    padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-close {
    background: none; border: none; color: white;
    font-size: 2rem; cursor: pointer; padding: 0.25rem 0.5rem; line-height: 1;
  }
  .nav-links a {
    margin: 0; padding: 0.9rem 1.5rem; font-size: 1.05rem;
    border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-project-title { font-size: 0.82rem; border-right: none; padding-right: 0; }
  .header-brand img { height: 38px; }
  .header-top-inner { padding: 0.5rem 1rem; }
  .header-nav-inner { padding: 0 1rem; min-height: 44px; }
  .hero { padding: 2rem 1.25rem; margin: -1.5rem -1.25rem 1.5rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero .subtitle { font-size: 0.93rem; }
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.15rem; }
  body { font-size: 15.5px; }
  .container { padding: 1.5rem 1.25rem 2rem; }
  .intro-text { padding: 1rem 1.15rem; }
  .result-item { padding: 1rem 1.15rem; }
  .footer-main { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-inner { padding: 2rem 1.25rem 1.25rem; }
}

/* ===== PRISTUPAČNOST ===== */
:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; }

/* ===== PRINT ===== */
@media print {
  .site-header, .site-footer, .hamburger, .back-link, .nav-overlay { display: none; }
  body { font-size: 11pt; color: black; background: white; }
  .container { max-width: 100%; padding: 0; }
  a { color: black; text-decoration: underline; }
  .result-item, .intro-text { box-shadow: none; border: 1px solid #ccc; }
  .hero { background: none; color: black; padding: 1rem 0; }
  .hero h1 { color: black; }
}
