/* ==========================================================================
   Z&Z-Soft - design system
   Barvy vychazi z firemniho loga (cervena #DA251D, tmava #1F1A17).
   ========================================================================== */

:root {
  --color-red: #da251d;
  --color-red-dark: #a91d17;
  --color-ink: #1f1a17;
  --color-text: #26241f;
  --color-text-muted: #5c6472;
  --color-bg: #ffffff;
  --color-bg-alt: #eef1f6;
  --color-border: #dbe1ea;
  --color-white: #ffffff;

  --font-sans: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(31, 26, 23, 0.08);
  --wrap-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  color: var(--color-ink);
  line-height: 1.25;
  margin: 0 0 0.5em 0;
  font-weight: 700;
}

h1 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em 0; }

a {
  color: var(--color-red);
  text-decoration: none;
}
a:hover, a:focus {
  text-decoration: underline;
}

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

ul, ol { padding-left: 1.2em; }

.wrap {
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* -------------------- Tlacitka -------------------- */

.btn,
.btn-outline,
input[type="submit"],
button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 0.65em 1.4em;
  border-radius: var(--radius);
  border: 2px solid var(--color-red);
  background: var(--color-red);
  color: var(--color-white);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover, input[type="submit"]:hover, button:hover {
  background: var(--color-red-dark);
  border-color: var(--color-red-dark);
  text-decoration: none;
  color: var(--color-white);
}
.btn-outline {
  background: transparent;
  color: var(--color-red);
}
.btn-outline:hover {
  background: var(--color-red);
  color: var(--color-white);
  text-decoration: none;
}

/* -------------------- Formulare -------------------- */

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3em;
}
input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  width: 100%;
  font: inherit;
  padding: 0.55em 0.7em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-text);
}
input:focus, textarea:focus {
  outline: 2px solid var(--color-red);
  outline-offset: 1px;
}
.form-row { margin-bottom: 1em; max-width: 420px; }
.form-error {
  color: var(--color-red-dark);
  font-size: 0.9rem;
  margin: 0.3em 0 0 0;
}
.form-success {
  color: #1a7a3c;
  font-weight: 600;
}

/* -------------------- Hlavicka / navigace -------------------- */

.site-header {
  border-bottom: 1px solid var(--color-red);
  background: var(--color-white);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.site-logo img {
  width: 140px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 auto;
  gap: 16px;
  flex-wrap: wrap;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  display: inline-block;
  color: var(--color-ink);
  padding: 0.5em 0.8em;
  border-radius: var(--radius);
  font-weight: 600;
}
.site-nav a:hover {
  background: var(--color-bg-alt);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  color: var(--color-red);
}
.site-nav__zone a.btn-outline {
  padding: 0.5em 1em;
}

.nav-toggle-input { display: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  display: block;
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav ul { flex-direction: column; }
  .nav-toggle-input:checked ~ .site-nav {
    display: flex;
  }
}

/* -------------------- Hlavni obsah -------------------- */

.site-main {
  min-height: 60vh;
  padding: 40px 20px 60px;
}
.site-main > section + section {
  margin-top: 2.5em;
}

.hero {
  padding: 20px 0 10px;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 70ch;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 1.5em 0;
}
.card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-bottom: 0.4em; }

/* -------------------- Novinky / zmeny -------------------- */

.news-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1.2em 0;
}
.news-item:first-child { padding-top: 0; }
.news-item time {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.2em;
}

.table-changes {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}
.table-changes th, .table-changes td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border);
}
.table-changes th { color: var(--color-text-muted); font-weight: 600; font-size: 0.85rem; }

/* Popis zmeny (sloupec zmeny.popis) prichazi jako HTML z externiho
   programu, ktery balicky sestavuje - obsahuje SPAN.nabidka, SPAN.path,
   nadpisy, seznamy a obcas i tabulku. */
.zmeny-popis p {
  margin: 0 0 0.6em 0;
}
.zmeny-popis ul,
.zmeny-popis ol {
  margin: 0.4em 0 0.8em 1.3em;
  padding: 0;
}
.zmeny-popis li {
  margin-bottom: 0.25em;
}
.zmeny-popis h1,
.zmeny-popis h2,
.zmeny-popis h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0.9em 0 0.3em 0;
}
.zmeny-popis .nabidka {
  font-style: italic;
  color: var(--color-text-muted);
}
.zmeny-popis .path {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}
.zmeny-popis table {
  border-collapse: collapse;
  margin: 0.6em 0;
}
.zmeny-popis table th,
.zmeny-popis table td {
  border: 1px solid var(--color-border);
  padding: 4px 8px;
}
.zmeny-popis hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0.6em 0;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 2em 0;
}

/* -------------------- Paticka -------------------- */

.site-footer {
  background: var(--color-ink);
  color: #cfc9c2;
  margin-top: 60px;
}
.site-footer__inner {
  padding: 28px 20px;
  font-size: 0.9rem;
}
.site-footer a { color: #ffffff; }
.site-footer__copy {
  margin-top: 0.5em;
  color: #948c81;
}

/* -------------------- Administrace -------------------- */

.admin-subnav {
  display: flex;
  gap: 8px;
  margin: 0.5em 0 1.5em 0;
}
.admin-subnav a {
  padding: 0.4em 0.9em;
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  color: var(--color-ink);
  font-weight: 600;
}
.admin-subnav a:hover {
  background: var(--color-red);
  color: var(--color-white);
  text-decoration: none;
}
.admin-subnav a[aria-current="page"] {
  background: var(--color-red);
  color: var(--color-white);
}

/* -------------------- Utility -------------------- */

.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2.25em; }
.small { font-size: 0.85rem; }
