.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 1em 2em;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
  color: var(--color-white);
  transition: top 0.5s ease, background-color 0.3s ease;
}

.header--hidden {
  transform: translateY(-100%);
}

.header--scrolled {
  background-color: #ffffff;
  color: #000000;
}

.header__logo img {
  height: 5rem;
  width: auto;
  display: block;
}

.header a {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
}

.header__toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
}

.header--scrolled .header__toggle {
  color: #333;
}


.header__search {
  position: relative;
}

.header__search-input {
  background-color: rgba(0, 0, 0, 0.0);
  border: none;
  border-bottom: 2px solid #fff;
  color: #fff;
  padding: 0.5rem 2.5rem 0.5rem 0.8rem;
  font-size: 1rem;
  width: 100px;
  transition: all 0.3s ease;
}

.header__search-input::placeholder {
  color: rgba(255, 255, 255, 0.9);
}

.header__search-input:focus {
  outline: none;
  background-color: rgba(0, 0, 0, 0);
  border-bottom-color: #fff;
}

.header__search-btn {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.header__search-btn .search-icon {
  width: 25px;
  height: 25px;
  stroke: #fff;
  transition: stroke 0.3s ease;
}

.header__search-btn:hover .search-icon {
  stroke: var(--color-primary, #5c5c5c);
}
.search-form {
  display: flex;
  align-items: center;
  border-bottom: 2px solid white;
  background-color: #00000000;
}

.search-field {
  flex: 1;
  border: none;
  background: transparent;
  color: white;
  font-size: 1rem;
  padding: 0.4rem;
  outline: none;
  width: 100px;
}

.search-submit {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.search-icon {
  width: 24px;
  height: 24px;
  fill: white;
  transition: color 0.3s ease;
}
.search-field::placeholder {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  opacity: 1; /* pro Firefox */
}

/* Pro Safari */
.search-field::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}

/* Pro Edge */
.search-field:-ms-input-placeholder {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}
.header--scrolled .search-form {
  border-bottom: 2px solid #000;
}

.header--scrolled .search-field {
  color: #000;
}

.header--scrolled .search-field::placeholder {
  color: rgba(0, 0, 0, 0.7);
}

.header--scrolled .search-submit .search-icon {
  fill: #000;
}
.sekce-navigace.sticky {
  position: fixed;
  top: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sekce-navigace.under-header {
  top: var(--header-height, 0px);
}

@media (max-width: 768px) {
  .header {
    flex-direction: row;
    align-items: center;
    padding: 1rem;
    height: auto;
  }

  .header__logo img {
    height: 3.5rem;
  }

  .header__toggle {
    font-size: 1.5rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.5rem 1rem;
  }

  .header--hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
  }

  .header--scrolled {
    background: #fff;
    color: #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }

  .btn-light {
    color: #fff;
  }

  .btn-dark {
    color: #000;
  }
  .header__search-input {
    width: 0;
    opacity: 0;
    padding: 0;
    border: none;
  }
  .header__search-input:focus {
    width: 70px;
    opacity: 1;
    padding: 0.5rem 2.5rem 0.5rem 0.8rem;
    border-bottom: 2px solid #fff;
  }
  .search-field {
    width: 75px;
  }
}
