.header {
  position: relative;
  background: #ffffff;
  overflow: hidden;
}
.header__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.7) 100%), url("/img/default_img/home/header-bg.png") center 33%/cover no-repeat;
  pointer-events: none;
}
.header__inner {
  position: relative;
  padding-top: 16px;
  padding-bottom: 0;
}
.header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 90px;
}

@media (max-width: 1280px) {
  .header .nav {
    gap: 1%;
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 620px;
  text-decoration: none;
}
.brand__logo {
  width: 78px;
  height: auto;
  flex: none;
}
.brand__name {
  font-weight: 700;
  font-size: 19px;
  line-height: 1.45;
  color: rgb(1, 116, 53);
}

.search {
  position: relative;
  width: 320px;
  flex: none;
}
.search__input {
  width: 100%;
  height: 40px;
  border: 1px solid #ececec;
  border-radius: 36px;
  padding: 0 50px 0 18px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  color: rgb(13, 13, 13);
  background: #ffffff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
}
.search__input::-moz-placeholder {
  color: #757575;
}
.search__input::placeholder {
  color: #757575;
}
.search__input:focus {
  outline: none;
  border-color: rgb(1, 116, 53);
}
.search__btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgb(1, 116, 53);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.search__btn:hover {
  background: rgb(3, 115, 56);
}

.nav {
  display: flex;
  align-items: stretch;
  border-top: 1px solid #ffffff;
  padding: 13px 0;
}
.nav__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  flex-shrink: 0;
  color: rgb(1, 116, 53);
  transition: color 0.15s;
}
.nav__home:hover {
  color: rgb(3, 115, 56);
}
.nav__home svg {
  display: block;
}
.nav__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  height: 44px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgb(13, 13, 13);
  white-space: nowrap;
  transition: color 0.15s;
}
.nav__item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: rgb(1, 116, 53);
  transform: scaleX(0);
  transition: transform 0.18s ease;
}
.nav__item:hover {
  color: rgb(1, 116, 53);
}
.nav__item:hover::after {
  transform: scaleX(1);
}
.nav__item--active {
  color: rgb(1, 116, 53);
}
.nav__item--active::after {
  transform: scaleX(1);
}

.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(1, 116, 53, 0.3);
  border-radius: 6px;
  padding: 8px 9px;
  cursor: pointer;
  flex: none;
}
.header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgb(1, 116, 53);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.header__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.header__toggle.active span:nth-child(2) {
  opacity: 0;
}
.header__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.header--scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .header {
    position: sticky;
    top: 0;
    z-index: 9;
  }
  .header__top {
    min-height: 64px;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    flex-direction: row;
  }
  .header__toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }
  .header__inner {
    padding: 16px;
  }
  .brand {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    gap: 10px;
    width: 70%;
  }
  .brand__logo {
    width: 44px;
    flex: 0 0 44px;
  }
  .brand__name {
    font-size: 13px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-width: 0;
  }
  .search {
    display: none;
  }
  .nav {
    display: none;
  }
}
