:root {
  --ink: #1c2b38;
  --muted: #647685;
  --paper: #ffffff;
  --canvas: #f7f9fc;
  --brand: #146b87;
  --brand-strong: #0d4d68;
  --accent: #dc8c2f;
  --line: #e1e8ed;
  --danger: #a53b35;
  --important: #b3261e;
  --radius: 14px;
  --shadow: 0 12px 34px rgba(24, 61, 82, .08);
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-strong); }
button, input, select, textarea { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  padding: .65rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { color: #fff; background: var(--brand-strong); }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: .65rem .75rem;
  border: 1px solid #bac8c2;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(220, 140, 47, .34);
  outline-offset: 2px;
}
.container { width: min(calc(100% - 2rem), var(--content)); margin-inline: auto; }
.sr-only { position: absolute; 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: -9999px; top: .5rem; z-index: 999; }
.skip-link:focus { left: .5rem; }

.staging-bar {
  padding: .35rem 1rem;
  color: #fff;
  background: #7d5a16;
  text-align: center;
  font-size: .86rem;
  font-weight: 700;
}
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 4px 20px rgba(24, 61, 82, .05); }
.header-main, .header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: min(calc(100% - 2rem), var(--content)); min-height: 94px; margin-inline: auto; }
.brand { display: flex; align-items: center; gap: .9rem; color: var(--ink); text-decoration: none; }
.brand-logo { flex: none; }
.brand img { width: 66px; height: 66px; object-fit: contain; }
.brand-name { color: var(--ink); text-decoration: none; }
.brand-name:hover { color: var(--brand); }
.brand-editor { display: block; margin-top: .1rem; color: var(--muted); font-size: .82rem; }
.brand-editor a { color: var(--brand); text-decoration: none; }
.brand-editor a:hover, .brand-editor a:focus-visible { text-decoration: underline; }
.header-thinker { flex: none; width: 58px; height: 74px; border-radius: 10px; object-fit: cover; box-shadow: 0 5px 18px rgba(18,59,90,.12); }
.brand-name, .brand strong { display: block; font-family: Georgia, serif; font-size: clamp(1.15rem, 2vw, 1.55rem); font-weight: 700; line-height: 1.15; }
.brand-subtitle, .brand small { display: block; color: var(--muted); font-size: .82rem; }
.nav-toggle { display: none; }
.site-nav, .main-nav { border-top: 1px solid var(--line); background: #fbfdff; }
.site-nav .container, .main-nav { display: flex; align-items: center; gap: .15rem; width: min(calc(100% - 2rem), var(--content)); margin-inline: auto; padding: .35rem 0; }
.main-nav > a, .nav-group > summary { padding: .65rem .8rem; border-radius: 8px; color: var(--brand); font-weight: 650; text-decoration: none; cursor: pointer; }
.main-nav > a:hover, .nav-group > summary:hover, .nav-group[open] > summary { background: #eaf1ee; }
.main-nav > a[aria-current="page"], .nav-group > summary.is-active { color: var(--brand-strong); background: #e3eff4; box-shadow: inset 0 -3px 0 var(--brand); }
.nav-group { position: relative; }
.nav-group > summary { display: flex; align-items: center; gap: .45rem; list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: ""; width: .45rem; height: .45rem; margin-top: -.2rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s ease; }
.nav-group[open] > summary::after { margin-top: .2rem; transform: rotate(-135deg); }
.nav-menu { position: absolute; top: calc(100% + .35rem); left: 0; z-index: 50; display: grid; min-width: 290px; padding: .45rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 18px 40px rgba(24, 61, 82, .16); }
.nav-menu a { padding: .55rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav-menu a:hover { color: var(--brand-strong); background: #eef5f8; }
.nav-menu a[aria-current="page"] { color: var(--brand-strong); background: #e3eff4; font-weight: 700; }
.nav-menu-note { margin: .1rem .75rem .35rem; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: .15rem; padding: .35rem 0; }
.nav-links a { padding: .65rem .75rem; border-radius: 8px; font-weight: 650; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: #eaf1ee; }
.header-search { display: flex; align-items: stretch; gap: .45rem; width: min(390px, 42vw); margin: 0; }
.header-search input { min-width: 0; height: 44px; margin: 0; border-color: #b8c8d2; background: #fafdff; }
.header-search button { min-width: auto; height: 44px; min-height: 44px; padding: .45rem .85rem; font-size: .88rem; line-height: 1; white-space: nowrap; }

main { min-height: 60vh; padding: clamp(1.5rem, 4vw, 3.5rem) 0 4rem; }
.site-main { width: min(calc(100% - 2rem), var(--content)); margin-inline: auto; }
.hero {
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(125deg, var(--brand-strong), var(--brand) 62%, #2996a3);
  box-shadow: var(--shadow);
}
.hero h1 { max-width: 800px; margin: 0 0 .75rem; font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.08; }
.hero p { max-width: 760px; margin: 0; color: #e5f0ec; font-size: 1.08rem; }
.section { margin-top: clamp(2rem, 5vw, 4rem); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h1, .section-heading h2, .page-title { margin: 0; font-family: Georgia, serif; line-height: 1.18; }
.section-heading h1, .section-heading h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
.section-heading .eyebrow { margin: 0 0 .2rem; }
.site-main > .section:first-of-type, .site-main > h1.sr-only + .section { margin-top: 0; }
.page-title { font-size: clamp(2rem, 5vw, 3.25rem); }
.muted, .post-meta { color: var(--muted); }
.post-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .45rem 1rem; margin-bottom: .35rem; font-size: .82rem; }
.post-meta span { display: inline-flex; align-items: center; min-height: 27px; padding: .18rem .55rem; border-radius: 999px; color: var(--brand-strong); background: #e8f4f8; font-weight: 800; }
.post-meta time { white-space: nowrap; }

.post-grid, .news-grid, .featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 5px 20px rgba(24, 61, 82, .055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover { transform: translateY(-2px); border-color: #bfd6e0; box-shadow: 0 12px 28px rgba(24, 61, 82, .1); }
/* Slika ima stalnu visinu; kada vest nema izvod, slika zauzima sav prostor do dna kartice. */
.post-card-image { position: relative; display: block; flex: 0 0 220px; margin: 0 0 1rem; border-radius: 10px; background: #f0f5f8; overflow: hidden; }
.post-card-image img { position: absolute; inset: .6rem; width: calc(100% - 1.2rem); height: calc(100% - 1.2rem); object-fit: contain; }
.post-card.has-image.no-excerpt .post-card-image { flex: 1 0 300px; }
.post-card h2, .post-card h3 { margin: .35rem 0 .6rem; font-family: Georgia, serif; line-height: 1.25; overflow-wrap: anywhere; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--brand); text-decoration: underline; }
.post-excerpt { display: -webkit-box; margin: 0 0 1rem; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; }
.post-card-image.is-placeholder { flex-basis: 150px; background: linear-gradient(135deg, #e8f2f6, #f6f9fb 60%, #eef4ef); }
.post-card-image.is-placeholder img { inset: 50% auto auto 50%; width: 76px; height: 96px; opacity: .45; transform: translate(-50%, -50%); mix-blend-mode: multiply; }
.post-card.no-image .post-excerpt { -webkit-line-clamp: 7; line-clamp: 7; }
.post-card .read-more { display: inline-flex; align-items: center; gap: .35rem; margin-top: auto; padding-top: .35rem; font-weight: 750; text-decoration: none; }
.post-card .read-more:hover { text-decoration: underline; }
.post-card .read-more span { transition: transform .15s ease; }
.post-card:hover .read-more span { transform: translateX(3px); }
.post-meta .badge-important, .badge-important { display: inline-flex; align-items: center; min-height: 27px; padding: .18rem .6rem; border-radius: 999px; color: #fff; background: var(--important); font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.post-meta .badge-important { margin-right: auto; }
.post-card.is-important { border-color: #f0b9b4; border-top: 4px solid var(--important); box-shadow: 0 5px 20px rgba(179, 38, 30, .1); }
.post-card.is-important h3 a { color: var(--important); }
.eyebrow { color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 2rem; align-items: start; }
.article, .panel {
  min-width: 0;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.article-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; padding-bottom: 1.35rem; border-bottom: 1px solid var(--line); }
.article-heading-copy { min-width: 0; }
.article-heading-copy h1 { margin: .55rem 0 0; font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.12; }
/* Naslov sa vrlo dugom reči (npr. ЕНИГМОИНФОРМАТОР) dobija --title-word (širina reči u em, title_fit_style()):
   font se smanjuje samo koliko treba da reč stane u karticu; ostali naslovi ostaju u punoj veličini. */
.article-header { container-type: inline-size; }
.article-heading-copy h1 { overflow-wrap: break-word; }
.article-heading-copy h1[style] { font-size: min(clamp(2rem, 5vw, 3.35rem), calc((100cqi - 100px - 2rem) / var(--title-word))); }
.article-category { display: inline-flex; align-items: center; min-height: 28px; padding: .2rem .65rem; border-radius: 999px; color: var(--brand-strong); background: #e8f4f8; font-size: .8rem; font-weight: 800; }
.article-heading-aside { display: flex; flex: 0 0 100px; align-items: flex-end; flex-direction: column; gap: .65rem; color: var(--muted); font-size: .86rem; text-align: right; }
.article-heading-aside time { white-space: nowrap; }
.article-heading-aside img { width: 62px; height: 78px; object-fit: contain; }
.article-body { overflow-wrap: anywhere; }
.article-body [id], .article-body h2, .article-body h3 { scroll-margin-top: 1.5rem; }
.article.is-important .article-heading-copy h1 { color: var(--important); }
.article-heading-copy .badge-important { vertical-align: middle; }
.article-body { padding-top: 1.25rem; }
.article-body .table-scroll { max-width: 100%; margin: 1rem 0 1.5rem; overflow-x: auto; }
.article-body table { border-collapse: collapse; }
/* Tabele sa zaglavljem su podaci (rezultati, spiskovi), a ne raspored starog sajta. */
.article-body table:has(> thead) { min-width: min(100%, 30rem); font-size: .95rem; font-variant-numeric: tabular-nums; overflow-wrap: normal; }
.article-body table:has(th[colspan]) { width: 100%; }
.article-body table:has(> thead) caption { padding: 0 0 .5rem; font-weight: 800; text-align: left; }
.article-body table:has(> thead) th { color: #fff; background: var(--brand-strong); border-color: rgba(255,255,255,.35); font-size: .8rem; letter-spacing: .02em; text-transform: uppercase; }
.article-body table:has(> thead) td, .article-body table:has(> thead) th { padding: .4rem .55rem; white-space: nowrap; }
.article-body table:has(> thead) td { border-color: #d5dfdb; }
.article-body table:has(> thead) tbody tr:nth-child(even) { background: #f3f7f5; }
.article-body table:has(> thead) tbody tr:hover { background: #e6f1ec; }
.article-body h4 { margin: 1.6rem 0 .4rem; font-size: 1.05rem; }
.article-body h4 + p em:only-child { color: var(--muted); }
.article-body td, .article-body th { padding: .55rem; border: 1px solid #aebdb7; }
.article-body blockquote { margin-inline: 0; padding: .6rem 1rem; border-left: 4px solid var(--accent); background: #f7f3e9; }
.article-body img { border-radius: 8px; }
/* Slike iz jednog skeniranog dokumenta (npr. tabela u dva dela) prikazuju se kao jedna celina. */
.article-body p > img[style*="width"] { display: block; margin: 0; border-radius: 0; }
.article-body p:has(> img[style*="width"]) { overflow: hidden; border-radius: 8px; }
.sidebar { position: sticky; top: 1rem; }
.attachment-list { margin: 0; padding: 0; list-style: none; }
.attachment-list li + li { margin-top: .65rem; }
.attachments { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.attachments h2 { margin: 0 0 .8rem; font-family: Georgia, serif; font-size: 1.35rem; }
.attachments ul { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.attachment-link { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #f9fcfd; text-decoration: none; }
.attachment-link:hover { border-color: #a9cad7; background: #f1f8fa; }
.attachment-type { display: grid; place-items: center; min-height: 42px; border-radius: 8px; color: #fff; background: var(--brand); font-size: .72rem; font-weight: 900; letter-spacing: .04em; }
.attachment-copy { display: grid; min-width: 0; }
.attachment-copy strong { overflow-wrap: anywhere; }
.attachment-copy small { color: var(--muted); }
.attachment-download { color: var(--brand); font-size: .86rem; font-weight: 800; white-space: nowrap; }
.print-action { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.print-button { min-height: 38px; padding: .45rem .75rem; border-color: #b7cbd4; color: var(--brand-strong); background: #fff; font-size: .86rem; }
.print-button:hover { color: #fff; background: var(--brand); }

.filters { display: grid; grid-template-columns: 1fr 1fr auto; gap: .75rem; margin: 1.3rem 0; padding: 1rem; border-radius: var(--radius); background: #fff; }
.results-list { display: grid; gap: .8rem; }
.result-item { padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.result-item h2 { margin: 0 0 .3rem; font-family: Georgia, serif; font-size: 1.35rem; }
.result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 0 0 1rem; }
.result-bar p { margin: 0; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.chip { padding: .2rem .7rem; border-radius: 999px; color: var(--brand-strong); background: #e3eff4; font-size: .88rem; font-weight: 700; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin-top: 2rem; }
.page-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.pagination a, .pagination .page-step { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 44px; min-height: 44px; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; text-decoration: none; }
.pagination a:hover { border-color: var(--brand); background: #eef5f8; }
.pagination [aria-current="page"] { color: #fff; border-color: var(--brand); background: var(--brand); }
.pagination .page-step { padding-inline: 1rem; }
.pagination .is-disabled { color: #a8b5be; background: transparent; }
.page-gap { display: inline-flex; align-items: flex-end; justify-content: center; min-width: 1.5rem; color: var(--muted); }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.article-nav a { display: grid; gap: .2rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--paper); text-decoration: none; }
.article-nav a:hover { border-color: #a9cad7; background: #f6fafc; }
.article-nav small { color: var(--brand); font-weight: 800; }
.article-nav span { font-family: Georgia, serif; font-weight: 700; line-height: 1.3; }
.article-nav-newer { grid-column: 2; text-align: right; }
.page-header .eyebrow { margin: 0 0 .2rem; }
.page-header h1 { margin: 0 0 .5rem; font-family: Georgia, serif; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.12; }
.legacy-notice { margin: .75rem 0 0; padding: .8rem 1rem; border: 1px solid #ecd9a9; border-left: 4px solid var(--accent); border-radius: 10px; color: #5f4712; background: #fdf7e8; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; margin-top: 1.25rem; }
.contact-card { display: flex; gap: 1.25rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 5px 20px rgba(24, 61, 82, .055); }
.contact-card h2 { margin: 0 0 .6rem; color: var(--brand-strong); font-family: Georgia, serif; font-size: 1.3rem; }
.contact-card p { margin: 0 0 .5rem; }
.contact-card ul { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.contact-card li { padding: .6rem .8rem; border-radius: 10px; background: var(--canvas); }
.contact-card.is-featured { grid-column: 1 / -1; align-items: center; padding: clamp(1.5rem, 4vw, 2.5rem); border: 0; color: #fff; background: linear-gradient(125deg, var(--brand-strong), var(--brand) 65%, #2996a3); box-shadow: var(--shadow); }
.contact-card.is-featured h2 { margin-bottom: .2rem; color: #d9eef5; font-family: inherit; font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contact-card.is-featured strong { display: block; font-family: Georgia, serif; font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.15; }
.contact-card.is-featured p { color: #e7f3f7; }
.contact-card.is-featured a[href^="mailto:"] { display: inline-flex; align-items: center; gap: .5rem; margin-top: .5rem; padding: .7rem 1.2rem; border-radius: 999px; color: var(--brand-strong); background: #fff; font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }
.contact-card.is-featured a[href^="mailto:"]::before { content: "\2709"; }
.contact-card.is-featured a[href^="mailto:"]:hover { background: #fdf3e4; }
.contact-avatar { display: grid; flex: 0 0 auto; place-items: center; width: clamp(72px, 12vw, 104px); aspect-ratio: 1; border: 3px solid rgba(255, 255, 255, .55); border-radius: 50%; color: var(--brand-strong); background: #fff; font-family: Georgia, serif; font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; }
.back-to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; display: inline-flex; align-items: center; gap: .35rem; padding: .7rem 1rem; border-radius: 999px; color: #fff; background: var(--brand-strong); box-shadow: 0 8px 24px rgba(13, 77, 104, .3); font-weight: 800; text-decoration: none; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { color: #fff; background: var(--brand); }

.notice, .flash { padding: .85rem 1rem; border: 1px solid #c8d7d1; border-radius: 10px; background: #edf5f1; }
.notice.error, .flash.error { color: #762d29; border-color: #e2bbb8; background: #fff0ef; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 2.5rem max(1rem, calc((100% - var(--content)) / 2)); color: #dceaf0; background: #17384a; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer a { color: #fff; }
.footer-title { margin: 0 0 .5rem; color: #fff; font-family: Georgia, serif; font-size: 1.2rem; }
.footer-bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .88rem; }
dialog { width: min(620px, calc(100% - 2rem)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 24px 80px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(8, 20, 17, .66); }
.dialog-content { padding: 1.25rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
#feedback-dialog form { display: grid; gap: 1rem; padding: clamp(1.25rem, 4vw, 1.75rem); }
#feedback-dialog h2 { margin: 0; font-family: Georgia, serif; font-size: 1.45rem; color: var(--brand-strong); }
#feedback-dialog label { display: grid; gap: .45rem; font-weight: 700; }
#feedback-dialog textarea { min-height: 150px; resize: vertical; font-weight: 400; }
#feedback-dialog .dialog-actions { gap: .75rem; margin-top: .25rem; }
#feedback-dialog [data-close-dialog] { color: var(--brand-strong); background: #fff; border-color: #bfd6e0; }
#feedback-dialog [data-close-dialog]:hover { background: #eef5f8; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) {
  .post-grid, .news-grid, .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .header-main, .header-inner { flex-wrap: wrap; min-height: 78px; padding: .65rem 0; }
  .brand { flex: 1; }
  .brand img { width: 52px; height: 52px; }
  .brand-subtitle, .brand small { display: none; }
  .brand-editor { font-size: .76rem; }
  /* Mislilac na telefonu stoji desno od pretrage (logo i mislilac u dijagonalnim uglovima, kao na desktopu). */
  .header-thinker { order: 4; width: 44px; height: 54px; border-radius: 9px; }
  .nav-toggle { order: 2; display: inline-flex; min-width: 46px; padding: .5rem; }
  .site-nav, .main-nav { display: none; }
  .site-nav.is-open, .main-nav.open { display: flex; }
  .nav-menu { position: static; min-width: 0; margin: .2rem 0 .4rem .75rem; box-shadow: none; }
  .contact-grid, .article-nav { grid-template-columns: 1fr; }
  .article-nav-newer { grid-column: auto; }
  .contact-card.is-featured { flex-direction: column; align-items: flex-start; }
  .pagination .page-step > span { display: none; }
  .back-to-top span { display: none; }
  .site-nav .container, .nav-links { align-items: stretch; flex-direction: column; }
  .nav-links { width: 100%; }
  .header-search { order: 3; width: 100%; padding: 0; }
  .post-grid, .news-grid, .featured-grid, .post-list { grid-template-columns: 1fr; }
  .main-nav { align-items: stretch; flex-direction: column; width: 100%; padding: .5rem 1rem; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .filters { grid-template-columns: 1fr; }
  .filters button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .article, .panel { padding: 1.1rem; }
  .article-header { gap: 1rem; }
  .article-heading-aside { flex-basis: 76px; }
  .article-heading-aside img { width: 52px; height: 66px; }
  .attachment-link { grid-template-columns: 46px minmax(0, 1fr); }
  .attachment-download { grid-column: 2; }
}

@media print {
  .staging-bar, .site-header, .site-footer, .sidebar, .feedback-button, dialog, .no-print,
  .print-action, .article-nav, .back-to-top, .legacy-notice, .attachment-download { display: none !important; }
  .article-heading-copy h1 { font-size: 24pt; }
  .article-body a[href^="http"]::after { content: " (" attr(href) ")"; color: #555; font-size: 9pt; }
  .article-body img { max-height: 60vh; break-inside: avoid; }
  body, main { color: #000; background: #fff; }
  main { padding: 0; }
  .container { width: 100%; }
  .content-layout { display: block; }
  .article { padding: 0; border: 0; box-shadow: none; }
}

/* Prepisani dopisi (Енигмоинформатор, подсетници, програми): izgledaju kao list papira. */
.article-body div[id^="dokument-"] {
  margin: 1.75rem 0;
  padding: clamp(1.1rem, 4vw, 2.4rem) clamp(1rem, 4.5vw, 2.8rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
.article-body div[id^="dokument-"] > :first-child { margin-top: 0; }
.article-body div[id^="dokument-"] > :last-child { margin-bottom: 0; }
/* Zaglavlje Saveza */
.article-body div[id^="dokument-"] > p:first-child:has(> strong:first-child) {
  margin: 0 0 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.55;
  text-align: center;
}
.article-body div[id^="dokument-"] > p:first-child > strong:first-child {
  display: block;
  margin-bottom: .35rem;
  color: var(--brand-strong);
  font-size: 1.05rem;
  letter-spacing: .14em;
}
.article-body div[id^="dokument-"] h2,
.article-body div[id^="dokument-"] h3 {
  margin: 1.6rem 0 .7rem;
  color: var(--brand-strong);
  font-size: 1.12rem;
  line-height: 1.35;
}
.article-body div[id^="dokument-"] h2 { font-size: 1.3rem; }
.article-body div[id^="dokument-"] ol,
.article-body div[id^="dokument-"] ul { padding-left: 1.4rem; }
.article-body div[id^="dokument-"] li { margin: .25rem 0; }
.article-body div[id^="dokument-"] hr { margin: 1.5rem 0; border: 0; border-top: 1px solid var(--line); }
/* Link na skenirani original */
.article-body div[id^="dokument-"] > p:last-child {
  margin-top: 1.6rem;
  padding-top: .8rem;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: .85rem;
}
.footer-editor { color: #dceaf0; font-size: .92rem; }
.article-body table:has(> thead) td:nth-child(2) { min-width: 14rem; white-space: normal; }

/* Završno UI poliranje: svetla, savremena i mirna vizuelna tema. */
:root {
  --ink: #17283b;
  --muted: #647486;
  --paper: #ffffff;
  --canvas: #f7f6f2;
  --brand: #176b8f;
  --brand-strong: #123b5a;
  --accent: #e79b35;
  --line: #dfe7ec;
  --radius: 18px;
  --shadow: 0 16px 44px rgba(28, 55, 78, .09);
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(23,107,143,.06), transparent 26rem),
    radial-gradient(circle at 92% 26%, rgba(231,155,53,.065), transparent 24rem),
    var(--canvas);
}

button, .button { border-radius: 12px; box-shadow: 0 4px 12px rgba(18,59,90,.12); transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease; }
button:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(18,59,90,.18); }
input, select, textarea { border-color: #bdcbd5; border-radius: 12px; box-shadow: 0 1px 2px rgba(18,59,90,.04); }
input:hover, select:hover, textarea:hover { border-color: #8eabbc; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(23,107,143,.1); outline: 0; }

.site-header { position: sticky; top: 0; z-index: 60; border-bottom: 0; box-shadow: 0 8px 32px rgba(23,40,59,.08); }
.header-inner { min-height: 88px; }
.brand img { width: 58px; height: 68px; padding: .25rem; border-radius: 14px; background: linear-gradient(145deg, #fff, #f5f9fb); box-shadow: 0 5px 18px rgba(18,59,90,.12); }
.brand strong, .brand-name { color: var(--brand-strong); font-size: clamp(1.15rem, 2vw, 1.48rem); }
.brand small { margin-top: .2rem; letter-spacing: .045em; }
.header-search { width: min(420px, 43vw); padding: .28rem; border: 1px solid var(--line); border-radius: 15px; background: #f5f8fa; }
.header-search input { border: 0; background: transparent; box-shadow: none; }
.header-search input:focus { box-shadow: none; }
.header-search button { border-radius: 10px; box-shadow: none; }
.main-nav { justify-content: center; gap: .25rem; border-top: 1px solid #edf1f4; background: rgba(255,255,255,.97); }
.main-nav > a, .nav-group > summary { color: #294f69; border-radius: 10px; }
.main-nav > a:hover, .nav-group > summary:hover, .nav-group[open] > summary { background: #edf6fa; }
.main-nav > a[aria-current="page"], .nav-group > summary.is-active { background: #e7f3f8; box-shadow: inset 0 -3px 0 var(--accent); }
.nav-menu { border-top: 3px solid var(--accent); box-shadow: 0 22px 50px rgba(18,59,90,.18); }

.site-main { padding-top: clamp(1.25rem, 3.5vw, 2.75rem); }
.home-intro {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 280px);
  align-items: center;
  width: min(100%, 980px);
  min-height: 310px;
  margin-inline: auto;
  padding: clamp(1.6rem, 4.5vw, 3.4rem);
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(125deg, #123b5a 0%, #176b8f 62%, #3b98ac 100%);
  box-shadow: 0 24px 60px rgba(18,59,90,.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
}
.home-intro[hidden] { display: none; }
.home-intro[hidden] + .section { margin-top: 0; }
.home-intro.is-visible { opacity: 1; transform: none; }
.home-intro::before, .home-intro::after { content: ""; position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; }
.home-intro::before { right: -5rem; top: -9rem; width: 31rem; height: 31rem; }
.home-intro::after { right: 8rem; bottom: -15rem; width: 28rem; height: 28rem; }
.home-intro-copy { max-width: 760px; }
.home-intro .eyebrow { margin: 0 0 .7rem; color: #ffd18a; }
.home-intro h1 { max-width: 700px; margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 4.5vw, 3.6rem); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
.home-intro-copy > p:not(.eyebrow) { max-width: 700px; margin: 1.25rem 0 0; color: #e7f4f8; font-size: clamp(1.05rem, 2vw, 1.22rem); line-height: 1.65; }
.home-intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.15rem; margin-top: 1.7rem; }
.home-intro .button { color: var(--brand-strong); background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.home-intro .button:hover { color: var(--brand-strong); background: #fff7e9; }
.home-intro .text-link { color: #fff; font-weight: 800; text-decoration: none; }
.home-intro .text-link span { display: inline-block; transition: transform .15s ease; }
.home-intro .text-link:hover span { transform: translateX(4px); }
.home-intro-mark { justify-self: center; display: grid; place-items: center; width: min(100%, 176px); aspect-ratio: 1; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 12px rgba(255,255,255,.055), 0 20px 45px rgba(0,0,0,.12); backdrop-filter: blur(6px); }
.home-intro-mark img { width: 42%; max-height: 68%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.18)); mix-blend-mode: multiply; }
.home-intro-x { position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 44px; min-height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; color: #fff; background: rgba(7,39,58,.28); box-shadow: none; font-size: 1.7rem; font-weight: 400; line-height: 1; }
.home-intro-x:hover { color: var(--brand-strong); background: #fff; }
.home-intro-dismiss { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.35rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.2); }
.home-intro-dismiss button { min-height: 40px; padding: .45rem .75rem; border-color: rgba(255,255,255,.38); color: #fff; background: rgba(7,39,58,.22); box-shadow: none; font-size: .84rem; }
.home-intro-dismiss button:hover { color: var(--brand-strong); background: #fff; }

.section { margin-top: clamp(2.5rem, 6vw, 5rem); }
.section-heading { padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.section-heading h1, .section-heading h2, .page-title { color: var(--brand-strong); letter-spacing: -.015em; }
.section-heading > a { padding: .4rem .7rem; border-radius: 9px; font-weight: 750; text-decoration: none; }
.section-heading > a:hover { background: #eaf4f8; }
.eyebrow { color: #b76b10; }

.post-grid, .news-grid, .featured-grid { gap: 1.35rem; }
.post-list { gap: 1.15rem; }
.post-card { padding: 1.35rem; border-color: #e3e9ed; border-radius: 20px; box-shadow: 0 8px 25px rgba(25,50,72,.065); }
.post-card:hover { transform: translateY(-4px); border-color: #b8d2de; box-shadow: 0 18px 42px rgba(25,50,72,.13); }
.post-card-image { margin: -.45rem -.45rem 1.1rem; border-radius: 15px; background: linear-gradient(145deg, #f0f5f7, #fbfcfd); }
.post-card-image img { inset: .75rem; width: calc(100% - 1.5rem); height: calc(100% - 1.5rem); }
.post-card h2, .post-card h3 { color: var(--brand-strong); font-size: 1.27rem; }
.post-excerpt { color: #43576a; }
.post-card .read-more { color: var(--brand); }
.post-card-image.is-placeholder { background: linear-gradient(145deg, #edf5f8, #fffaf0); }
.post-card.is-important { border-color: #efc4bc; border-top: 0; box-shadow: inset 0 4px 0 var(--important), 0 8px 25px rgba(127,44,35,.07); }
.competition-section { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid #f0dfc0; border-radius: 22px; background: linear-gradient(140deg, #fffaf0, #fff); }

.article, .panel { border-color: #e1e8ec; border-radius: 22px; box-shadow: 0 18px 46px rgba(25,50,72,.085); }
.article { background: linear-gradient(180deg, #fff 0, #fff 96%, #fbfcfd 100%); }
.article-header { border-bottom-color: #e7ecef; }
.article-heading-copy h1 { color: var(--brand-strong); letter-spacing: -.025em; text-wrap: balance; }
.article-heading-aside img { padding: .25rem; border-radius: 12px; background: #f5f8fa; }
.article-body { color: #263b4e; font-size: 1.04rem; line-height: 1.75; }
.article-body > p { max-width: 78ch; }
.article-body h2, .article-body h3 { color: var(--brand-strong); line-height: 1.25; }
.article-body a { font-weight: 600; }
.article-body img { box-shadow: 0 8px 25px rgba(25,50,72,.1); }
.article-body .table-scroll { border: 1px solid #d7e2e8; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(25,50,72,.05); }
.article-body table:has(> thead) th { background: #176b8f; }
.article-body table:has(> thead) tbody tr:nth-child(even) { background: #f5f9fb; }
.article-body table:has(> thead) tbody tr:hover { background: #eaf4f8; }
.attachment-link { border-radius: 14px; background: #fbfdfe; }
.attachment-link:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(25,50,72,.08); }
.article-nav a { border-radius: 16px; box-shadow: 0 5px 16px rgba(25,50,72,.04); }

.filters, .result-item, .contact-card { border: 1px solid #e1e8ec; border-radius: 18px; box-shadow: 0 8px 24px rgba(25,50,72,.055); }
.search-large { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .65rem; padding: .5rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.search-large input { border: 0; box-shadow: none; }
.contact-card.is-featured { background: linear-gradient(125deg, #123b5a, #176b8f 65%, #3b98ac); }
.notice, .flash { border-left: 4px solid var(--brand); }

.site-footer { margin-top: 1rem; padding-block: 3rem; color: #dceaf0; background: linear-gradient(120deg, #102f48, #164c69); }
.feedback-open { color: var(--brand-strong); background: #fff; }
.feedback-open:hover { color: var(--brand-strong); background: #fff7e9; }
.back-to-top { background: var(--brand); box-shadow: 0 10px 30px rgba(18,59,90,.3); }

@media (min-width: 901px) {
  .featured-grid .post-card:first-child { grid-column: span 2; }
  .featured-grid .post-card:first-child.has-image { display: grid; grid-template-columns: minmax(250px, .9fr) minmax(0, 1.1fr); column-gap: 1.5rem; }
  .featured-grid .post-card:first-child.has-image .post-card-image { grid-row: 1 / span 5; height: 100%; min-height: 330px; margin-bottom: -.45rem; }
}

@media (max-width: 720px) {
  body.nav-open { overflow: hidden; }
  .site-header { position: relative; }
  .header-inner { min-height: 72px; }
  .brand { min-width: 0; }
  .brand span { min-width: 0; }
  .brand strong, .brand-name { font-size: 1.02rem; overflow-wrap: anywhere; }
  .brand img { flex: 0 0 auto; width: 48px; height: 54px; }
  .nav-toggle { color: var(--brand-strong); border-color: #c6d7e0; background: #edf6fa; box-shadow: none; }
  .header-search { order: 3; flex: 1 1 calc(100% - 44px - 1.6rem); width: auto; }
  .main-nav.open { max-height: calc(100vh - 72px); overflow-y: auto; border-top: 1px solid var(--line); box-shadow: 0 20px 35px rgba(18,59,90,.14); }
  /* Bez fiksne visine: panel raste sa sadržajem, pa dugmad nikad ne ispadaju niti se panel skroluje iznutra. */
  .home-intro { grid-template-columns: 1fr; max-width: 100%; min-height: 0; max-height: none; padding: 1.1rem 1.1rem 1rem; overflow: hidden; border-radius: 18px; }
  .home-intro > *, .home-intro-copy { min-width: 0; }
  .home-intro .eyebrow { margin-bottom: .35rem; }
  .article-heading-copy { align-self: stretch; }
  .article-heading-copy h1[style] { font-size: min(2rem, calc(100cqi / var(--title-word))); }
  .home-intro h1 { padding-right: 2.2rem; font-size: clamp(1.7rem, 8vw, 2.3rem); line-height: 1.06; overflow-wrap: anywhere; }
  .home-intro-copy > p:not(.eyebrow) { margin-top: .6rem; font-size: .96rem; line-height: 1.45; overflow-wrap: anywhere; }
  .home-intro-mark { display: none; }
  .home-intro-actions { align-items: flex-start; gap: .65rem 1rem; margin-top: .9rem; }
  .home-intro-actions .button { width: auto; min-height: 42px; padding: .5rem .8rem; }
  .home-intro-dismiss { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: stretch; margin-top: .75rem; padding-top: .65rem; }
  .home-intro-dismiss button { width: 100%; min-height: 44px; padding-inline: .55rem; font-size: .78rem; }
  .home-intro-x { top: .7rem; right: .7rem; }
  .post-card-image { flex-basis: 190px; }
  .post-card.has-image.no-excerpt .post-card-image { flex-basis: 230px; }
  .article-header { align-items: flex-start; flex-direction: column-reverse; }
  .article-heading-aside { width: 100%; flex-basis: auto; align-items: center; flex-direction: row; justify-content: space-between; text-align: left; }
  .article-heading-aside img { width: 42px; height: 52px; }
  .search-large { grid-template-columns: 1fr; }
  .search-large button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Uski telefoni: dugmad poruke dobrodošlice jedno ispod drugog. */
@media (max-width: 420px) {
  .home-intro-dismiss { grid-template-columns: 1fr; }
  .home-intro-actions .button { flex: 1 1 100%; justify-content: center; text-align: center; }
}

/* Pregled nacrta ili zakazanog članka (vidi samo prijavljeni urednik). */
.preview-banner { margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid #e3b25c; border-left: 5px solid #d08a1c; border-radius: 12px; color: #5b3b06; background: #fff6e2; font-size: .95rem; line-height: 1.5; }
.preview-banner a { font-weight: 700; white-space: nowrap; }

/* Zaštićena adresa e-pošte bez JavaScripta: „@“ crta CSS, pa ga nema u HTML-u. */
.mail-at::before { content: "@"; }

/* Najava (/najava): video preko cele širine sadržaja, 16:9 i na telefonu. */
.trailer-video { display: block; width: min(100%, calc(72vh * 16 / 9)); height: auto; aspect-ratio: 16 / 9; margin: 1.25rem auto 1rem; background: #0f2c44; border-radius: 12px; }
.trailer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
