/* Base: reset, typography, layout, shared components (buttons, eyebrow, section heading, split, note). */
*, *::before, *::after { box-sizing: border-box; }

/* #anchor links land below the sticky header (84 px desktop, ~70 px mobile) */
html { scroll-padding-top: 100px; }
@media (max-width: 1050px) { html { scroll-padding-top: 84px; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;

  /* footer stays at the bottom on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  & > main { flex: 1; }
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
button, input, textarea, select { font: inherit; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.045em; }
h2 { font-size: var(--h2); }
:is(h1, h2, h3) em { font-style: normal; color: var(--teal); }

:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section { padding-block: var(--section-pad); }
.section--soft { background: var(--soft); }
.section--ice { background: #eef7f9; }

/* Small uppercase label above headings */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 11px;
  letter-spacing: .17em;
  text-transform: uppercase;
  font-weight: 850;
  color: var(--teal);

  &::before {
    content: '';
    flex: none;
    width: 23px;
    height: 2px;
    background: currentColor;
  }
}

/* Heading left, intro text right */
.section-heading {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: end;
  gap: 60px;
  margin-bottom: 38px;

  & h2 { margin: 0; }
  & > p { max-width: 430px; margin: 0 0 3px; font-size: 16px; color: var(--muted); }

  @media (max-width: 800px) { grid-template-columns: 1fr; gap: 25px; margin-bottom: 28px; }
}

.section-heading--single { grid-template-columns: 1fr; }

/* Two columns: text left, visual/list right (V6 .split). Shared by text-steps, biofilm-slider, contact-form */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;

  & h2 { margin: 0 0 25px; }

  @media (max-width: 800px) { grid-template-columns: 1fr; gap: 25px; }
}

/* Running text next to a heading (rich text from the block's "Sadržaj" tab) */
.text-muted {
  & p { margin: 0 0 24px; font-size: 15px; line-height: 1.85; color: var(--muted); }
  & :is(ul, ol) { margin: 0 0 24px; padding-left: 1.2em; color: var(--muted); line-height: 1.8; }
  & strong { color: var(--ink); }
}

/* Highlighted note under grids (V6 .note) */
.note {
  margin-top: 35px;
  padding: 20px 23px;
  border-left: 3px solid var(--teal);
  border-radius: 4px;
  background: var(--ice);
  font-size: 13px;
  line-height: 1.8;
  color: #4e6c78;

  & p { margin: 0; }
  & strong { color: var(--ink); }
}

/* Small print under grids (V6 .reg-note) */
.note--small {
  margin-top: 22px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 15px 21px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 750;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;

  &:hover { transform: translateY(-2px); }

  & .button__arrow { font-size: 18px; line-height: 1; }
}

/* .primary / .secondary: class names used by Grav plugin markup (login, forms) */
.button--primary, .button.primary {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
  &:hover { background: var(--teal); border-color: var(--teal); }
}

.button--secondary, .button.secondary {
  color: var(--navy);
  background: var(--white);
  border-color: #c7d9df;
  &:hover { color: var(--teal); border-color: var(--teal); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Plain text pages (default template): guide, privacy policy */
.prose {
  max-width: 820px;
  padding-block: var(--space-6);
  font-size: 16px;

  & h1 { font-size: clamp(32px, 4vw, 46px); margin-bottom: var(--space-3); }
  & h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 2.2em 0 .6em; }
  & h3 { font-size: 20px; margin: 1.6em 0 .5em; }
  & li + li { margin-top: .3em; }
  & code { padding: 1px 5px; border-radius: 4px; background: var(--ice); font-size: .92em; }

  & table { width: 100%; margin: 1em 0 1.5em; border-collapse: collapse; font-size: 15px; }
  & :is(th, td) { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
  & th { background: var(--soft); font-weight: 700; }
}

/* Print / "Save as PDF": content only */
@media print {
  .topline, .site-header, .site-footer, .skip-link { display: none; }
  .prose { max-width: none; padding: 0; font-size: 11pt; }
  .prose :is(h2, h3) { break-after: avoid; }
  .prose :is(table, li) { break-inside: avoid; }
  a { color: inherit; }
}
