/* HEADER / NAV */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}

.navbar.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand .logo {
  height: 56px;
  width: auto;
  display: block;
  color: #ffffff;
}

/* Desktop menu (inline) */
.menu {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  z-index: 10000;
}

.menu .menu-logo{
  color: #ffffff;
}

.menu a:not(.menu-logo) {
  color: var(--white);
  padding: 8px 10px;
  border-radius: 10px;
  transition: background .2s ease;
}
.menu a:not(.menu-logo):hover {
  background: rgba(255,255,255,.12);
}

/* Desktop “logged in” pill */
.user-info {
  margin-left: 8px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
}
.user-info:hover {
  background: rgba(255,255,255,.08);
}

/* Toggle (hamburger) */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: transparent;
  color: #fff;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  margin-left: auto;
}
.menu-toggle:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.28);
}

.bars {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background .2s, transform .25s;
}
.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s, top .25s, bottom .25s;
}
.bars::before { top: -7px; }
.bars::after  { bottom: -7px; }

.menu-toggle.is-active .bars {
  background: transparent;
}
.menu-toggle.is-active .bars::before {
  top: 0;
  transform: rotate(45deg);
}
.menu-toggle.is-active .bars::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* Skryté mobilní prvky v defaultu */
.menu-logo,
.menu-sep,
.user-pill,
.menu-social {
  display: none;
}

/* MOBILE */
@media (max-width: 768px) {
  .brand .logo {
    height: 48px;
  }

  .menu-toggle {
    display: inline-flex;
    position: fixed;
    top: 14px;
    right: 12px;
    z-index: 10001;
  }

  .menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: var(--footer-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 50px 24px 24px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s ease, opacity .3s ease;
    z-index: 10000;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .menu a:not(.menu-logo) {
    display: block;
    width: 100%;
    max-width: 520px;
    text-align: center;
    font-size: .9rem;
    padding: 12px 10px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
  }
  .menu a:not(.menu-logo):hover {
    background: rgba(255,255,255,.08);
  }

  .menu-logo {
    display: block;
    margin-bottom: 10px;
    max-width: 50%;
    padding: 0;
    border: 0;
    background: transparent;
    text-decoration: none;
  }
  .menu-logo img {
    width: 100%;
    height: auto;
    display: block;
  }

  .menu-sep {
    display: block;
    width: 100%;
    max-width: 520px;
    height: 1px;
    background: rgba(255,255,255,.18);
    margin: 5px 0;
  }

  .user-pill {
    display: block;
    width: 100%;
    max-width: 520px;
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
  }

  .user-info {
    display: none;
  }

  .menu-social {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px;
    padding: 5px;
    transition: background .2s, border-color .2s;
  }

  .icon-btn:hover {
    background: #22262d;
    border-color: #404854;
  }

  .icon-btn svg {
    width: 30px;
    height: 30px;
    display: block;
  }

  body.menu-open {
    overflow: hidden;
    height: 100dvh;
  }
}

/* Focus state */
:where(a, button) {
  outline: none;
}
:where(a, button):focus-visible {
  box-shadow: 0 0 0 3px rgba(255,255,255,.35);
  border-radius: 10px;
}
