/* Čistá, jednořádková navigace úvodní stránky. */
html { scroll-padding-top: 104px; }

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid #e7ebf1;
  background: #fff;
}

.nav-shell {
  display: flex;
  width: min(93%, 1760px);
  min-height: 108px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}

.brand img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-copy strong {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.035em;
}

.brand-copy span {
  margin-top: 6px;
  color: #50647f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}

.desktop-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(26px, 3.25vw, 56px);
}

.header-link,
.nav-more > summary {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .16s ease;
}

.header-link:hover,
.nav-more > summary:hover,
.nav-more[open] > summary {
  color: var(--blue);
}

.nav-more {
  position: relative;
}

.nav-more > summary,
.mobile-more > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.nav-more > summary::-webkit-details-marker,
.mobile-more > summary::-webkit-details-marker,
.mobile-menu > summary::-webkit-details-marker {
  display: none;
}

.nav-more > summary .bi,
.mobile-more > summary .bi {
  color: #71829a;
  font-size: 13px;
  transition: transform .16s ease;
}

.nav-more[open] > summary .bi,
.mobile-more[open] > summary .bi {
  transform: rotate(180deg);
}

.nav-more-panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 16px);
  right: -18px;
  display: grid;
  min-width: 196px;
  gap: 2px;
  padding: 7px;
  border: 1px solid #e4e9ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(12, 35, 69, .12);
}

.nav-more-panel a,
.mobile-more-panel a {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  color: #344c6b;
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
}

.nav-more-panel a:hover,
.mobile-more-panel a:hover {
  background: #f3f7fc;
  color: var(--blue-dark);
}

.nav-cta.desktop-cta,
.nav-cta.mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: none;
  transition: color .16s ease;
}

.desktop-cta .bi,
.mobile-cta .bi {
  font-size: 19px;
  transition: transform .16s ease;
}

.nav-cta.desktop-cta:hover,
.nav-cta.mobile-cta:hover {
  color: var(--blue-dark);
  background: transparent;
}

.nav-cta.desktop-cta:hover .bi,
.nav-cta.mobile-cta:hover .bi {
  transform: translateX(3px);
}

.mobile-menu {
  display: none;
  position: relative;
}

.mobile-menu > summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 3px 0 10px;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  list-style: none;
}

.mobile-menu .menu-icon-open { font-size: 19px; }
.mobile-menu .menu-icon-close { display: none; font-size: 17px; }
.mobile-menu[open] .menu-icon-open { display: none; }
.mobile-menu[open] .menu-icon-close { display: inline-block; }

.mobile-panel {
  position: absolute;
  z-index: 6;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(340px, calc(100vw - 24px));
  gap: 0;
  padding: 8px 14px;
  border: 1px solid #e4e9ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(12, 35, 69, .12);
}

.mobile-course-group {
  padding: 2px 0 7px;
  border-bottom: 1px solid #edf0f4;
}

.mobile-nav-link,
.mobile-more > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.mobile-nav-link:hover,
.mobile-more > summary:hover {
  color: var(--blue);
}

.mobile-nav-link.materials-mobile-link {
  justify-content: flex-start;
  gap: 10px;
}

.mobile-nav-link.materials-mobile-link .materials-toplink-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  font-size: 14px;
}

.mobile-level-links {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 0 2px 10px;
}

.mobile-level-links a {
  color: #536782;
  font-size: 13px;
  font-weight: 600;
}

.mobile-level-links a:hover { color: var(--blue); }

.mobile-more {
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
}

.mobile-more > summary {
  min-height: 44px;
  justify-content: space-between;
  padding-inline: 8px;
    list-style: none;
}

.mobile-more-panel {
  display: grid;
  gap: 1px;
  padding: 0 8px 8px;
}

.mobile-more-panel a { min-height: 36px; }

.nav-cta.mobile-cta {
  min-height: 48px;
  justify-content: space-between;
  padding: 4px 0;
}

/* Underline navigation labels only while they are hovered or keyboard-focused. */
:is(
  .desktop-nav .header-link,
  .desktop-nav .nav-more > summary,
  .desktop-nav .nav-cta,
  .mobile-panel .mobile-nav-link,
  .mobile-panel .mobile-level-links a,
  .mobile-panel .mobile-more > summary,
  .mobile-panel .mobile-more-panel a,
  .mobile-panel .nav-cta
):is(:hover, :focus-visible) > span {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: .24em;
  text-decoration-skip-ink: auto;
}

.header-link:focus-visible,
.nav-more > summary:focus-visible,
.nav-more-panel a:focus-visible,
.mobile-menu > summary:focus-visible,
.mobile-panel a:focus-visible,
.mobile-more > summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

@media (max-width: 1100px) {
  .nav-shell { gap: 24px; }
  .brand { gap: 10px; }
  .brand img { width: 68px; height: 68px; }
  .brand-copy strong { font-size: 20px; }
  .brand-copy span { font-size: 11px; }
  .desktop-nav { gap: clamp(20px, 2.4vw, 30px); }
  .header-link,
  .nav-more > summary,
  .nav-cta.desktop-cta { font-size: 16px; }
  .nav-cta.desktop-cta { gap: 8px; }
}

@media (max-width: 880px) {
  html { scroll-padding-top: 78px; }
  .nav-shell {
    width: calc(100% - 40px);
    min-height: 78px;
    gap: 18px;
  }
  .brand img { width: 56px; height: 56px; }
  .brand-copy strong { font-size: 18px; }
  .brand-copy span { margin-top: 5px; font-size: 11px; }
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
}

@media (max-width: 520px) {
  .nav-shell { width: calc(100% - 32px); min-height: 70px; }
  .brand { gap: 8px; }
  .brand img { width: 47px; height: 47px; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy span { margin-top: 4px; font-size: 11px; letter-spacing: .08em; }
}

@media (max-width: 360px) {
  .nav-shell { width: calc(100% - 24px); }
  .brand img { width: 42px; height: 42px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy span { font-size: 11px; }
}

.site-header { box-shadow: none; }

.nav-more > summary {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav-more > summary:hover,
.nav-more[open] > summary {
  border-color: transparent;
  background: transparent;
}

.mobile-menu > summary {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: color .16s ease;
}

.mobile-menu > summary:hover,
.mobile-menu[open] > summary {
  border-color: transparent;
  background: transparent;
}

.mobile-more > summary { padding-inline: 8px; }
.mobile-more-panel { padding: 0 8px 8px; }
.mobile-more-panel a { min-height: 40px; }

.mobile-level-links a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
}
@media (prefers-reduced-motion: reduce) {
  .nav-more > summary .bi,
  .mobile-more > summary .bi,
  .nav-cta .bi {
    transition-duration: .01ms !important;
  }
}


/* Compact Materials shortcut, matching the live site's person icon and uppercase label. */
.desktop-nav .materials-toplink {
  display: grid;
  min-width: 64px;
  justify-items: center;
  gap: 4px;
  padding: 0 3px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}
.materials-toplink-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #dbe4ef;
  border-radius: 50%;
  background: #f5f8fc;
  color: #64748b;
  font-size: 16px;
  text-decoration: none !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.desktop-nav .materials-toplink:hover .materials-toplink-icon {
  transform: translateY(-1px);
  border-color: #c7dafb;
  background: #eaf2ff;
  color: var(--blue);
}

/* A single quiet entrance; navigation feedback follows the cursor or focus. */
.site-header .desktop-nav .header-link {
  position: relative;
  padding-block: 10px;
  text-decoration: none;
}
.site-header .desktop-nav .header-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .38s cubic-bezier(.16,1,.3,1);
}
.site-header .desktop-nav .header-link:hover,
.site-header .desktop-nav .header-link:focus-visible { text-decoration: none; }
.site-header .desktop-nav .header-link:hover::after,
.site-header .desktop-nav .header-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
.site-header .desktop-cta .bi { transition: transform .38s cubic-bezier(.16,1,.3,1); }
.site-header .desktop-cta:hover .bi,
.site-header .desktop-cta:focus-visible .bi { transform: translateX(7px); }
.site-header .materials-toplink-icon { transition: background-color .3s, color .3s, border-color .3s, transform .38s cubic-bezier(.16,1,.3,1); }
.site-header .materials-toplink:hover .materials-toplink-icon,
.site-header .materials-toplink:focus-visible .materials-toplink-icon { transform: translateY(-2px); border-color: #c7dafb; background: #eaf2ff; color: var(--blue); }
@media(prefers-reduced-motion:no-preference) {
  .site-header .nav-shell { animation: navigation-arrive .8s cubic-bezier(.16,1,.3,1) backwards; }
  @keyframes navigation-arrive { from { opacity: .3; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
}
@media(prefers-reduced-motion:reduce) {
  .site-header .desktop-nav .header-link::after,
  .site-header .desktop-cta .bi,
  .site-header .materials-toplink-icon { transition: none; }
}
