:root {
  --ink: #202020;
  --muted: #666;
  --link: #3978aa;
  --nav: #000066;
  --nav-accent: #ff58e3;
  --paper: rgba(255, 255, 255, 0.94);
  --line: #d9d9d9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff url("/media/2011/08/zavesa.jpg") repeat;
  font-family: "Century Gothic", Futura, Arial, Helvetica, sans-serif;
  font-size: 15.96px;
  line-height: 1.5;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 8px 12px;
  color: #fff;
  background: #000;
}

.skip-link:focus {
  top: 8px;
}

.site-shell {
  width: min(1000px, calc(100% - 32px));
  margin: 20px auto 0;
  background: rgba(255, 255, 255, 0.35);
}

.menu-toggle {
  display: none;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  color: #fff;
  background: var(--nav);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.site-nav {
  position: relative;
  z-index: 10;
  min-height: 37px;
  color: #fff;
  background: var(--nav) url("/assets/fade.png") repeat-x;
  background-image: linear-gradient(#6666aa, #000066);
}

.site-nav ul {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0 12px;
  list-style: none;
}

.site-nav li {
  position: relative;
}

.site-nav a {
  display: block;
  padding: 8px 10px;
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--nav-accent);
  text-decoration: none;
}

.site-nav .submenu {
  position: absolute;
  left: 0;
  top: 100%;
  display: none;
  min-width: 235px;
  padding: 4px 0;
  background: #08086e;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.25);
}

.site-nav .submenu a {
  padding: 8px 14px;
}

.site-nav li:hover > .submenu,
.site-nav li:focus-within > .submenu {
  display: block;
}

.hero {
  position: relative;
  height: 100px;
  overflow: hidden;
  background: #536b7d;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.site-name {
  position: absolute;
  left: 20px;
  bottom: 10px;
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-style: italic;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 0;
  padding-top: 5px;
}

.content {
  min-width: 0;
  padding: 5px 18px 24px 20px;
}

.content h1,
.content h2,
.content h3 {
  color: #3f6f9c;
  font-weight: 400;
  line-height: 1.2;
}

.content h1 {
  margin: 0 0 10px;
  padding-bottom: 2px;
  border-bottom: 2px solid #e8e8e8;
  font-size: clamp(26px, 3vw, 29px);
}

.content h2,
.content .naslov {
  margin: 21px 0 7px;
  color: #3f6f9c;
  font-size: 21px;
  font-weight: 400;
}

.content h3 {
  margin: 18px 0 6px;
  font-size: 17px;
}

.content p {
  margin: 0 0 1.15em;
}

.content ul,
.content ol {
  margin: 0 0 1.15em;
  padding-left: 1.6em;
}

.content iframe {
  width: min(100%, 560px);
  border: 0;
}

.aligncenter {
  display: block;
  margin: 12px auto;
}

.alignright {
  float: right;
  margin: 4px 0 12px 18px;
}

.alignleft {
  float: left;
  margin: 4px 18px 12px 0;
}

.sidebar {
  padding: 10px 0 18px 10px;
}

.sidebar-gallery {
  display: grid;
  gap: 6px;
}

.sidebar-gallery a {
  display: block;
  text-align: center;
  background: #eee;
}

.sidebar-gallery img {
  display: block;
  width: 170px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.sidebar h2 {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 400;
}

.table-scroll {
  max-width: 100%;
  margin: 12px 0 20px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.content table td,
.content table th {
  padding: 7px 9px;
  border: 1px solid #d7d7d7;
  vertical-align: top;
}

.content table tr:nth-child(even) {
  background: rgba(232, 238, 244, 0.48);
}

.gallery-index {
  width: min(100%, 640px);
  margin-top: 8px;
}

.album-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  column-gap: 12px;
  min-height: 157px;
  margin-bottom: 8px;
  padding: 7px 7px 8px 6px;
  border: 1px solid #d4d9ff;
  background: rgba(246, 247, 255, 0.78);
}

.album-card h2 {
  margin: 0;
  color: #06c;
  font-size: 14px;
  line-height: 1.35;
}

.album-cover,
.photo-thumb {
  display: block;
  overflow: hidden;
  background: #e8e8e8;
}

.album-cover {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  width: auto;
  height: auto;
  padding: 4px;
  border: 1px solid #d4d9ff;
  background: #fff;
}

.album-cover img {
  width: auto;
  max-width: 150px;
  height: auto;
  max-height: 150px;
  aspect-ratio: auto;
  object-fit: contain;
}

.album-actions {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  display: grid;
  line-height: 1.45;
}

.gallery-breadcrumb {
  width: min(100%, 640px);
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid #d4d9ff;
  background: rgba(246, 247, 255, 0.72);
}

.album-cover img,
.photo-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.album-meta,
.photo-caption,
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.photo-card {
  min-width: 0;
}

.photo-caption {
  display: block;
  padding-top: 5px;
  overflow-wrap: anywhere;
}

.inline-photo {
  display: inline-block;
  margin: 4px;
}

.inline-photo img {
  display: block;
}

.archive-notice,
.form-status {
  margin: 14px 0;
  padding: 11px 13px;
  border-left: 4px solid #000066;
  background: #f1f3fa;
}

.missing-media {
  display: inline-flex;
  min-height: 74px;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  padding: 12px;
  border: 1px dashed #aaa;
  background: #f4f4f4;
  color: #666;
  font-size: 12px;
  text-align: center;
}

.missing-link small {
  color: #777;
}

.static-form {
  max-width: 620px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.form-field {
  display: grid;
  gap: 4px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #aaa;
  border-radius: 2px;
  background: #fff;
  color: #222;
  font: inherit;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.button {
  padding: 8px 15px;
  border: 1px solid #00004e;
  border-radius: 2px;
  color: #fff;
  background: #000066;
  font: inherit;
  cursor: pointer;
}

.button.secondary {
  color: #333;
  background: #eee;
  border-color: #aaa;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 14px;
  border-top: 1px solid rgba(0, 0, 102, 0.35);
  background: rgba(254, 254, 249, 0.9);
  color: #666;
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.lightbox {
  width: min(1040px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 12px;
  border: 0;
  background: #111;
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.lightbox-figure {
  margin: 0;
  text-align: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 130px);
  object-fit: contain;
}

.lightbox-caption {
  padding: 7px 46px 0;
}

.lightbox button {
  position: absolute;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  font-size: 24px;
  cursor: pointer;
}

.lightbox-close {
  right: 10px;
  top: 10px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

.sitemap-tree ul {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  body {
    background: #fff;
    font-size: 15px;
  }

  .site-shell {
    width: 100%;
    margin-top: 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav ul {
    display: none;
    padding: 4px 8px 10px;
  }

  .site-nav.is-open ul {
    display: block;
  }

  .site-nav .submenu,
  .site-nav li:hover > .submenu,
  .site-nav li:focus-within > .submenu {
    position: static;
    display: block;
    padding: 0 0 0 16px;
    background: transparent;
    box-shadow: none;
  }

  .site-nav a {
    padding: 8px;
    white-space: normal;
  }

  .hero {
    height: 96px;
  }

  .page-layout {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 16px;
  }

  .sidebar {
    padding: 8px 16px 20px;
    border-top: 1px solid var(--line);
  }

  .sidebar-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-gallery img {
    width: 100%;
  }

  .gallery-index,
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .alignright,
  .alignleft {
    float: none;
    display: block;
    margin: 12px auto;
  }

  .site-footer {
    display: block;
  }
}

@media (max-width: 440px) {
  .photo-grid,
  .sidebar-gallery {
    grid-template-columns: 1fr;
  }

  .album-card {
    display: block;
    min-height: 0;
    padding: 9px;
  }

  .album-cover {
    width: 100%;
    height: auto;
    margin: 9px 0;
  }

  .album-cover img {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .album-actions {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
