/* === MENU === */
.menu-root {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-root > li {
  margin: 0;
}

.menu-root .menu-link {
  display: block;
  text-decoration: none;
  color: black;
  padding: 8px 10px;
  transition: all 0.3s;
  position: relative;
  border-radius: 6px;
  cursor: pointer;
}
.menu-root .menu-link:hover { text-decoration: underline; }
.menu-root .menu-link.active { background: #e8f1fb; font-weight: 600; }

.menu-root .menu-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 8px 10px;
  color: black;
  background: #ffffff;
  transition: all 0.3s;
  position: relative;
  border-radius: 6px;
}
.menu-root .menu-label:hover { text-decoration: underline; }
.menu-root .menu-label::after {
  content: "";
  display: inline-block;
  margin-left: 8px;
  width: 0; height: 0;
  border-left: 6px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transform: rotate(0deg);
  transition: transform .2s;
}

.menu-root .menu-toggle { display: none; }
.menu-root .menu-toggle:checked + .menu-label::after { transform: rotate(90deg); }
.menu-root .menu-toggle:checked + .menu-label { background: #e6f0ff; color: #0a6cd9; }

.menu-root .submenu {
  max-height: 0;
  overflow: hidden;
  transform: scaleY(0);
  transform-origin: top;
  transition: max-height 0.5s ease, transform 0.5s ease;
  padding-left: 15px;
  font-size: 0.95em;
  border-left: 2px solid #e5e7eb;
}
.menu-root .menu-toggle:checked + .menu-label + .submenu {
  max-height: 500px;
  transform: scaleY(1);
}
.menu-root .submenu li a {
  display: block;
  padding: 6px 10px;
  color: black;
  text-decoration: none;
}
.menu-root .submenu li a:hover { text-decoration: underline; background:#f0f6ff; }
.menu-root .submenu li a.active { background:#e8f1fb; font-weight:600; border-radius:4px; }


/* === TIMELINE === */
.timeline-root {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline-root::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}
.timeline-root > li {
  margin: 1rem 0;
  position: relative;
  padding-left: 30px;
}
.timeline-root > li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;                /* stred výšky */
  transform: translateY(-50%); /* posunie guľku do stredu textu */
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0b0c0c;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e5e7eb;
}

.timeline-root > li a {
  display: inline-block;
  vertical-align: middle;
  padding: 4px 8px;
  border-radius: 6px;
  color: #0b0c0c;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.timeline-root > li a:hover { background: #f0f6ff; }
.timeline-root > li a.active {
  background: #e8f1fb;
  font-weight: 600;
  color: #1d70b8;
}
.timeline-root > li.active::before {
  background: #1d70b8;
  box-shadow: 0 0 0 2px #1d70b8;
}


/* === SPOLOČNÉ pre sidebar a mobilný toggle === */
#mobile-toggle { display:none; }
@media (max-width: 768px) {
  .layout-with-menu { grid-template-columns: 1fr; gap:12px; }
  label[for="mobile-toggle"] {
    display:inline-block; margin-bottom:8px; padding:6px 10px;
    background:#f3f2f1; border-radius:6px; cursor:pointer; width:100%;
  }
  #mobile-toggle:not(:checked) ~ aside.sidebar { display:none; }
  .sidebar { min-width:auto; max-width:none; width:100%; white-space:normal; }
}
@media (min-width: 769px) { label[for="mobile-toggle"] { display:none; } }

.sidebar {
  display:inline-block;
  min-width:150px; max-width:220px;
  background:#fff; border:1px solid #ededed;
  border-radius:8px; padding:8px;
}
.govuk-main-wrapper .sidebar { position: sticky; top: 24px; height: fit-content; }

.layout-with-menu {
  display:grid;
  grid-template-columns:auto 1fr;
  gap:24px;
  align-items:start;
}

/* .menu-root .menu-link.active {
  background: #ffdd00;
  color: #0b0c0c;
  font-weight: 700;
  border-bottom: 3px solid #0b0c0c;
  padding-bottom: 6px; 
} */


/* odkazy v bočnej navigácii, ktoré vedú na inú stránku */
/* .layout-menu .menu-link:not([href^="#"]) {
  font-weight: 700;
  text-decoration: underline;
} */

/* .layout-menu .menu-link:not([href^="#"])::before {
  content: " ↗";
  font-size: 0.9em;
} */

.layout-menu .menu-link:not([href^="#"])::after {
  content: " 🔗";
  font-size: 0.9em;
}
