header {
  max-width: 1120px;
  margin: 0 auto;
  position: fixed;
  top: 0;
  width: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.top-text {
  font-size: calc(var(--s-val) * 1.2);
  display: flex;
  justify-content: space-between;
  margin: 1rem 0;
}

.top-text p {
  color: #fff;
  font-weight: 500;
}

.top-text a {
  color: #fff;
  position: relative;
  padding-right: calc(var(--s-val) * 2.2);
  font-weight: 500;
}

.top-text a::before {
  content: "";
  background-color: currentColor;
  -webkit-mask-image: url(../img/header-icon.svg);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: url(../img/header-icon.svg);
  mask-repeat: no-repeat;
  mask-size: contain;
  width: calc(var(--s-val) * 1.3);
  height: calc(var(--s-val) * 1.3);
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.g-container {
  display: flex;
  align-items: center;
  background-color: #fff;
  padding: 1.5rem 2rem;
  box-shadow: 0px 6px 6px 0px rgb(0 0 0 / 10%);
  border-radius: 10px;
  gap: calc(var(--s-val) * 2);
  position: relative;
}

.g-logo {
  width: 150px;
  max-width: 180px;
}

.g-menu-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(var(--s-val) * 5);
  flex: 1;
}

.g-nav {
  font-size: calc(var(--s-val) * 1.4);
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  align-items: center;
}

.g-nav a {
  color: #000;
  font-weight: bold;
}

.g-btn {
  display: flex;
  min-width: 130px;
  text-align: center;
  gap: calc(var(--s-val) * 1);
  justify-content: flex-end;
  width: 30%;
}

.g-btn a {
  font-size: calc(var(--s-val) * 1.2);
  color: #fff;
  display: block;
  width: 100%;
  padding: 0.7rem 0;
  border-radius: 100px;
}

.g-btn a:first-child {
  background-color: var(--color-red);
}

.g-btn a:last-child {
  background-color: var(--color-orange);
}

.menu-toggle {
  display: none;
  background-color: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  width: 48px;
  height: 48px;
  padding: 0.9rem;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 0.8rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.menu-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #111;
  transform-origin: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle:hover {
  box-shadow: 0 4px 10px rgb(0 0 0 / 8%);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--color-orange_2);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.menu-toggle.is-open .menu-toggle__bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open .menu-toggle__bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

@media screen and (max-width: 768px) {
  .top-text {
    font-size: calc(var(--s-val) * 1.1);
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0.8rem auto;
    width: 95%;
  }

  .g-container {
    padding: 1.2rem 1.6rem;
  }

  .g-logo {
    width: 140px;
  }

  .g-menu-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0px 10px 20px 0px rgb(0 0 0 / 12%);
    border-radius: 12px;
    padding: 1.6rem;
    flex-direction: column;
    gap: 3rem;
  }

  header.is-open .g-menu-panel {
    display: flex;
    padding: 4rem 0;
  }

  .g-nav {
    font-size: calc(var(--s-val) * 1.8);
  }

  .g-btn a {
    font-size: calc(var(--s-val) * 1.5);
    padding: 1.5rem 0;
  }

  .g-nav {
    flex-direction: column;
    gap: 3rem;
  }

  .g-btn {
    width: 70%;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
  }

  .g-btn a {
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .g-container {
    align-items: center;
  }
}

@media screen and (max-width: 640px) {
  header {
    max-width: none;
    transform: none;
    left: 0;
  }

  .g-container {
    border-radius: 0;
  }
}
