*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-text:      #1a1a1a;
  --color-muted:     #6b6b6b;
  --color-subtle:    #9b9b9b;
  --color-border:    #e5e5e5;
  --color-bg:        #ffffff;
  --color-bg-soft:   #f8f8f7;
  --max-width:       700px;
  --font: 'Georgia', 'Times New Roman', serif;
  --font-ui: system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; }

body {
  font-family: var(--font-ui);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.site-header {
  text-align: center;
  padding: 52px 24px 0;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.logo-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 36px;
  text-decoration: none;
  gap: 14px;
}

.logo-link img {
  height: 72px;
  width: auto;
  display: block;
}

.logo-tagline {
  display: block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #2e3e47;
}

/* Jazykový prepínač */
.lang-switch {
  position: absolute;
  top: 56px;
  right: 32px;
  display: flex;
  gap: 10px;
  font-size: 12px;
  font-family: var(--font-ui);
  letter-spacing: 0.05em;
}

.lang-switch a {
  color: var(--color-subtle);
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.lang-switch a:hover {
  color: var(--color-text);
}

.lang-switch a.active {
  color: var(--color-text);
  font-weight: 600;
  border-bottom-color: var(--color-text);
}

/* ── Navigácia ── */
.site-nav {
  display: flex;
  justify-content: center;
}

.nav-root {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

/* Všetky <li> sú position:relative kvôli dropdown-u */
.nav-root li { position: relative; }

/* Všetky nav linky — základný štýl */
.site-nav a {
  display: block;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: color 0.15s, background 0.1s;
}

/* Root-level linky majú spodný border-indikátor */
.nav-root > li > a {
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover,
.site-nav a:focus { color: var(--color-text); }

.nav-root > li > a.active {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
  font-weight: 500;
}

/* ── Dropdown panel (1. a hlbšie úrovne) ── */
.dropdown {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  z-index: 200;
  /* skrytý štandardne */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
}

/* Zobrazenie pri hover alebo focus-within rodiča */
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Dropdown linky */
.dropdown a {
  padding: 10px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border);
}

.dropdown li:last-child > a { border-bottom: none; }

.dropdown a:hover,
.dropdown a:focus {
  background: var(--color-bg-soft);
  color: var(--color-text);
}

/* Aktívny link v dropdown-e */
.dropdown a.active {
  color: var(--color-text);
  font-weight: 500;
  background: var(--color-bg-soft);
}

/* ── Sub-dropdown (2. úroveň a hlbšia) — vpravo od rodiča ── */
.dropdown .dropdown {
  top: -1px;
  left: 100%;
  border-top: 1px solid var(--color-border);
}

/* Malá šípka indikujúca sub-menu */
.has-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  margin-bottom: 2px;
  opacity: 0.5;
  vertical-align: middle;
  flex-shrink: 0;
}

.dropdown .has-dropdown > a::after {
  transform: rotate(-45deg);
  margin-bottom: 0;
  margin-left: 4px;
  margin-right: 2px;
}

/* ── Hlavný obsah ── */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ── Nadpis stránky ── */
.page-title {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 8px;
  font-family: var(--font-ui);
}

.page-date {
  font-size: 13px;
  color: var(--color-subtle);
  margin-bottom: 36px;
}

/* ── Telo stránky / článku ── */
.page-content {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  color: #2a2a2a;
}

.page-content p { margin-bottom: 1.3em; }
.page-content h2 { font-size: 20px; font-weight: 500; margin: 2em 0 0.6em; font-family: var(--font-ui); }
.page-content h3 { font-size: 17px; font-weight: 500; margin: 1.6em 0 0.5em; font-family: var(--font-ui); }
.page-content ul, .page-content ol { padding-left: 1.4em; margin-bottom: 1.2em; }
.page-content li { margin-bottom: 0.4em; }
.page-content blockquote {
  border-left: 2px solid var(--color-border);
  padding: 4px 0 4px 20px;
  margin: 1.5em 0;
  color: var(--color-muted);
  font-style: italic;
}
.page-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em 0;
}

/* Odkazy v obsahu — podčiarknuté (WCAG) */
.page-content a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--color-border);
  transition: text-decoration-color 0.15s;
}

.page-content a:hover {
  text-decoration-color: var(--color-text);
}

/* ── Zoznam článkov (blog) ── */
.article-list { list-style: none; }

.article-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
}

.article-item:first-child { padding-top: 0; }
.article-item:last-child  { border-bottom: none; }

.article-date {
  font-size: 12px;
  color: var(--color-subtle);
  margin-bottom: 8px;
  font-family: var(--font-ui);
  letter-spacing: 0.02em;
}

.article-title {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Nadpis článku v zozname — podčiarknutý (ide o odkaz) */
.article-title a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--color-border);
  transition: text-decoration-color 0.15s;
}

.article-title a:hover {
  text-decoration-color: var(--color-text);
}

.article-perex {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.7;
}

/* ── Stránkovanie ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  font-family: var(--font-ui);
  font-size: 13px;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.pagination a:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}

.pagination .active {
  color: var(--color-text);
  border-color: var(--color-text);
  font-weight: 500;
}

/* ── Video embed (YouTube) ── */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 20px 0 32px;
  background: var(--color-bg-soft);
}

.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Sekčný index (zoznam pod-stránok) ── */
.section-index {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.section-card {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.15s;
}

.section-card:first-child { border-top: 1px solid var(--color-border); }

.section-card:hover { color: var(--color-muted); }

.section-card-title {
  display: block;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-ui);
}

.section-card-sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--color-subtle);
  font-family: var(--font-ui);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 24px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--color-subtle);
  background: var(--color-bg-soft);
}

.site-footer p { margin-bottom: 4px; }
.site-footer p:last-child { margin-bottom: 0; }

.site-footer a {
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--color-border);
  transition: color 0.15s;
}

.site-footer a:hover { color: var(--color-text); }

/* ── Udalosti ── */
.event-date {
  font-size: 13px;
  color: var(--color-subtle);
  font-family: var(--font-ui);
  margin-bottom: 6px;
}

/* ── Hamburger tlačidlo ── */
.nav-toggle {
  display: none;
}

/* ── Submenu toggle (šípka pre mobile) — skrytá na desktop ── */
.submenu-toggle {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .site-header {
    padding-top: 28px;
    padding-bottom: 0;
  }

  .logo-link img { height: 56px; }
  .lang-switch { top: 32px; right: 52px; }
  .site-main { padding: 36px 16px 60px; }
  .page-title { font-size: 22px; }

  /* Hamburger */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: absolute;
    top: 28px;
    left: 16px;
    z-index: 110;
  }

  .nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-text);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
    transform-origin: center;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* Nav: skrytá, zobrazí sa cez .is-open */
  .site-nav {
    display: none;
    width: 100%;
    border-top: 1px solid var(--color-border);
    margin-top: 20px;
    padding-bottom: 8px;
    background: var(--color-bg);
  }

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

  /* Vertikálny zoznam */
  .nav-root {
    flex-direction: column;
    gap: 0;
  }

  .nav-root > li { border-bottom: 1px solid var(--color-border); }
  .nav-root > li:last-child { border-bottom: none; }

  /* Riadok s linkom + toggle tlačidlom */
  .nav-root li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .site-nav a {
    flex: none;
    padding: 13px 16px 13px 16px;
    font-size: 14px;
    border-bottom: none;
  }

  .nav-root > li > a.active {
    border-bottom: none;
    font-weight: 500;
    color: var(--color-text);
  }

  /* Submenu toggle tlačidlo — hneď za textom */
  .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-muted);
    padding: 0;
    margin-left: -8px;
  }

  /* Šípka cez CSS border */
  .submenu-toggle::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform 0.2s;
  }

  .submenu-toggle[aria-expanded="true"]::after {
    transform: rotate(-135deg);
    margin-top: 3px;
  }

  /* Dropdown: skrytý, zobrazí sa po .submenu-open */
  .dropdown {
    position: static;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--color-border);
    width: 100%;
    display: none;
    background: var(--color-bg-soft);
  }

  .has-dropdown.submenu-open > .dropdown { display: block; }

  /* Vnorené dropdown — indent */
  .dropdown li {
    border-bottom: 1px solid var(--color-border);
  }
  .dropdown li:last-child { border-bottom: none; }

  .dropdown a { padding-left: 28px; font-size: 13px; }
  .dropdown .dropdown a { padding-left: 44px; }
  .dropdown .dropdown .dropdown a { padding-left: 60px; }

  /* Desktop dropdown hover efekty na mobile zrušiť */
  .has-dropdown:hover > .dropdown,
  .has-dropdown:focus-within > .dropdown {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    display: none;
  }
  .has-dropdown.submenu-open > .dropdown { display: block; }

  /* Šípky ::after na mobile nechceme (máme submenu-toggle) */
  .has-dropdown > a::after,
  .dropdown .has-dropdown > a::after { display: none; }
}

/* ── Základné pojmy — glosár ── */
.glossary-list {
  margin-top: 1.5rem;
}

.glossary-list dt {
  font-weight: 600;
  font-family: var(--font-ui);
  font-size: .9375rem;
  color: var(--color-text);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.glossary-list dt:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.glossary-list dd {
  margin-left: 0;
  margin-top: .35rem;
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--color-text);
}

/* ── Publikácie — zoznam publikácií ── */
.publication-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.publication-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.publication-item:last-child {
  border-bottom: none;
}

.pub-cover,
.pub-cover-link img {
  width: 90px;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.pub-cover-link {
  flex-shrink: 0;
}

.pub-info {
  flex: 1;
}

.pub-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: .5rem;
  font-family: var(--font);
}

.pub-title a {
  color: inherit;
  text-decoration: none;
}

.pub-title a:hover {
  text-decoration: underline;
}

.pub-meta {
  font-size: .875rem;
  color: var(--color-muted);
  line-height: 1.55;
  margin-bottom: .75rem;
}

.pub-download {
  display: inline-block;
  font-size: .8125rem;
  font-family: var(--font-ui);
  padding: .35em .85em;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  text-decoration: none !important;
  border-radius: 3px;
  transition: background .15s, color .15s;
}

.pub-download:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

@media (max-width: 480px) {
  .publication-item {
    flex-direction: column;
    gap: .75rem;
  }
  .pub-cover,
  .pub-cover-link img {
    width: 70px;
  }
}

/* ── Skip link (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 8px 16px;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 100;
  transition: top 0.1s;
}

.skip-link:focus { top: 0; }

/* ── Download list (Plán rodovej rovnosti a pod.) ── */
.download-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.download-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.download-label {
  flex: 1;
  font-family: var(--font-ui);
  font-size: .9375rem;
}

/* ── Timeline ── */
.timeline-list {
  list-style: none;
  position: relative;
  padding: 0;
  margin: 2rem 0;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 6.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2rem;
  align-items: flex-start;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(6.5rem - 5px);
  top: .45em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-text);
  flex-shrink: 0;
}

.timeline-date {
  flex: 0 0 6.5rem;
  text-align: right;
  font-size: .8125rem;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--color-muted);
  padding-top: .25em;
  padding-right: 1.5rem;
}

.timeline-body {
  flex: 1;
  font-family: var(--font);
  font-size: .9375rem;
  line-height: 1.65;
}

.timeline-body p { margin: 0; }

@media (max-width: 600px) {
  .timeline-list::before { left: 0; }
  .timeline-item { flex-direction: column; gap: .25rem; padding-left: 1.25rem; }
  .timeline-item::before { left: -5px; top: .15em; }
  .timeline-date { flex: none; text-align: left; padding-right: 0; }
}
