/* ==========================================================
   header.css — sjednocená hlavička pro pralesy.cz
   ----------------------------------------------------------
   Ostré hrany, čistý kontrast, přehledná navigace
   ========================================================== */

/* === HLAVIČKA === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: saturate(140%) blur(6px);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  padding-inline: 1rem;
}

/* === LOGO / BRAND === */
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--fg);
  font-size: 1.75rem;
}
.brand img {
  height: 38px;
  width: auto;
}

/* === NAVIGACE === */
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
}

.menu a,
.menu button {
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}
.menu a:hover,
.menu button:hover,
.menu button:focus-visible,
.menu .current-menu-item > a {
  color: var(--acc);
  background: rgba(46, 125, 50, 0.08);
}

/* === DROPDOWN === */
.menu li {
  position: relative;
}
.sub-menu {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  min-width: 220px;
}
.menu li:hover > .sub-menu {
  display: block;
}
.menu li.open > .sub-menu {
  display: block;
}
.sub-menu li a,
.sub-menu li button {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
}
.sub-menu li a:hover,
.sub-menu li button:hover,
.sub-menu li button:focus-visible {
  background: rgba(46, 125, 50, 0.08);
  color: var(--acc);
}

/* === TOGGLE (MOBIL) === */
.nav__toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  position: relative;
}
.nav__toggle-bar,
.nav__toggle-bar::before,
.nav__toggle-bar::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: #222;
  transition: 0.2s;
}
.nav__toggle-bar {
  top: 19px;
}
.nav__toggle-bar::before {
  top: -8px;
}
.nav__toggle-bar::after {
  top: 8px;
}


/* === JAZYKOVÝ PŘEPÍNAČ / DOPLŇKY (volitelně) === */
.lang-switch {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.75rem;
}
.lang-switch a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch a:hover {
  color: var(--acc);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__logo {
  display: flex;
  align-items: center;
}

.brand__text {
  font-size: 1.8rem;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--fg);
  text-decoration: none;
}

.brand__text:hover {
  color: var(--acc);
}
/* === HEADER ALIGN FIX === */

.site-header__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px; /* jasná výška pro vertikální centrování */
}

.nav {
  display: flex;
  align-items: center;
}

.menu {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu > li > .menu__link {
  display: inline-block;
  padding: 0.25rem 0;
  line-height: 1.4;
  text-decoration: none;
  color: var(--fg);
  font-weight: 500;
  font-size: 1.4rem;
}

.menu button.menu__link {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  margin: 0;
  appearance: none;
  text-align: left;
}

.menu > li > .menu__link:hover {
  color: var(--acc);
}

/* jazykové ikony */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1.5rem;
}

.lang-switch img {
  display: block;
  height: 20px;
  width: auto;
  border-radius: 0; /* ostré hrany */
  vertical-align: middle;
}

/* tlačítko menu */
.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  margin-left: 1rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__toggle-bar {
  width: 22px;
  height: 2px;
  background: var(--fg);
}
/* === Chevron pro submenu === */

.menu > li.menu-item-has-children > .submenu-toggle {
  position: relative;
  padding-right: 1rem; /* prostor pro šipku */
}

.menu > li.menu-item-has-children > .submenu-toggle::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--fg);
  border-bottom: 2px solid var(--fg);
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.2s ease;
}

/* při otevření submenu */
.menu > li.menu-item-has-children.open > .submenu-toggle::after {
  transform: translateY(-25%) rotate(225deg);
}

.submenu-toggle__icon {
  display: none;
}

/* === MOBILNÍ VERZE === */
@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: 64px 0 0 0;
    background: #fff;
    flex-direction: column;
    display: none;
    border-top: 1px solid #e5e7eb;
    padding: 0px;
  }
  .nav.is-open {
    display: flex;
  }
  .menu {
    width: 100%;
    background: #fff;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 15px;
    padding-right: 15px;
  }
  .menu a,
  .menu button {
    padding: 0.6rem 0.75rem;
    width: 100%;
  }
  .nav__toggle {
    display: block;
  }

  /* dropdown v mobilu */
  .sub-menu {
    position: static;
    border: 0;
    background: transparent;
    padding-left: 1rem;
    display: none;
  }
  .menu li.open > .sub-menu {
    display: block;
  }
}

/* === DESKTOP VERZE (záplata) === */
@media (min-width: 901px) {
  .nav__toggle {
    display: none !important;
  }
  .nav {
    display: flex !important;
    position: static;
    background: none;
  }
}
