.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #fbf6ed;
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1920px;
  margin-inline: auto;
  min-height: 80px;
  padding: 13px 20px 13px 40px;
}

.header__brand {
  flex-shrink: 1;
  margin-right: auto;
}

.header-brand-inner {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.header__logo {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #371f0c;
  white-space: nowrap;
}

.header__logo-image {
  max-width: 150px;
}

html.is-menu-open {
  overflow-y: scroll;
  height: 100%;
  overscroll-behavior: none;
}

.header__menu-button {
  position: relative;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  order: 2;
  width: 40px;
  height: 45px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.header__menu-icon {
  display: block;
  width: 120px;
  height: auto;
}

.header__menu-line {
  display: none;
  width: 24px;
  height: 2px;
  background-color: #dd480e;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.header__menu-caption {
  color: #dd480e;
  font-weight: 600;
  font-size: 12px;
}

.header.is-open .header__menu-icon {
  display: none;
}

.header.is-open .header__menu-button .header__menu-line {
  display: block;
}

.header.is-open .header__menu-button .header__menu-line:nth-of-type(1) {
  transform: translateY(8px) rotate(45deg);
}

.header.is-open .header__menu-button .header__menu-line:nth-of-type(2) {
  opacity: 0;
}

.header.is-open .header__menu-button .header__menu-line:nth-of-type(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* 768px以上：ナビのみハンバーガー、actionsはヘッダー外 */
.header__panel {
  display: contents;
}

.header__nav {
  position: fixed;
  top: 80px;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  padding: 32px 24px 40px;
  background-color: #fbf6ed;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.header.is-open .header__nav {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.header__nav-link {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #4e4330;
  white-space: nowrap;
}

.header__actions {
  position: relative;
  z-index: 120;
  display: flex;
  flex-shrink: 0;
  flex-direction: row;
  flex-wrap: wrap;
  order: 1;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  width: auto;
}

.header__tel {
  display: flex;
  gap: 0;
  align-items: center;
  flex-direction: column;
}

.header__tel-icon {
  flex-shrink: 0;
  display: block;
}

.header__tel-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  color: #dd480e;
}

.header__tel-number::before {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: url("https://go-to-estate.com/system_panel/uploads/images/20260722114316712019.svg") center / contain no-repeat;
}

.header__tel-hours {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #5e584c;
}

.header__button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 200px;
  min-height: 54px;
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.header__button img {
  flex-shrink: 0;
  display: block;
}

.header__button--mail {
  background-color: #dd480e;
  color: #fff;
  border: 1px solid #c6b3a3;
}

.header__button--mail::before {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: url("https://go-to-estate.com/system_panel/uploads/images/20260722114316206200.svg") center / contain no-repeat;
}

.header__button--mail:hover {
  color: #fff;
}

.header__button--line {
  border: 1px solid #371f0c;
  background-color: #fff;
  color: #371f0c;
}

.header__button--line::before {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: url("https://go-to-estate.com/system_panel/uploads/images/20260722114316534849.svg") center / contain no-repeat;
}

.gjs-dashed .header__nav {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media screen and (max-width: 1200px) {
  .header-brand-inner {
    flex-direction: column;
    align-items: start;
  }
}

@media screen and (max-width: 991px) {
  .header__inner {
    padding: 12px 16px;
  }

  .header-brand-inner {
    flex-direction: row;
    align-items: center;
  }

  .header__logo {
    font-size: 14px;
    white-space: normal;
    max-width: 100%;
  }

  .header__nav {
    top: 68px;
  }

  .header__actions {
    gap: 8px;
  }

  .header__button {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .header__tel-number {
    font-size: 16px;
  }
}

/* 767px以下：actionsも含めてハンバーガー内 */
@media screen and (max-width: 767px) {
  .header__panel {
    position: fixed;
    top: 68px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 110;
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: stretch;
    padding: 32px 24px 40px;
    background-color: #fbf6ed;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  }

  .header.is-open .header__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .header__nav {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: auto;
    padding: 0;
    background-color: transparent;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  .header__actions {
    flex-direction: column;
    flex-wrap: nowrap;
    order: 0;
    gap: 12px;
    width: 100%;
    justify-content: flex-start;
  }

  .header__button {
    width: 100%;
    min-height: 54px;
    padding: 12px 20px;
    font-size: 14px;
  }

  .header__tel-number {
    font-size: 20px;
  }

  .gjs-dashed .header__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
