/* --- Base --- */
body,
html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: sans-serif;
  color: #6a5a50;
}

body {
  padding-top: 130px;
}

@media (max-width: 1024px) {
  body {
    padding-top: 60px;
  }
}

@media (max-width: 830px) {
  body {
    padding-top: 40px;
  }
}

@media (max-width: 640px) {
  body {
    padding-top: 25px;
  }
}

.pc-only {
  display: block;
}

.sp-only {
  display: none !important;
}

section[id] {
  scroll-margin-top: 200px;
}

/* --- Site Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* 1段目：PC電話バー */
.header-top-bar {
  background: #fff;
  padding: 8px 0;
}

.top-contact {
  display: flex;
  justify-content: flex-end;
}

.btn-phone {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f08a1c;
  color: #fff;
  text-decoration: none;
  padding: 10px 30px;
  border-radius: 999px;
  box-shadow:
    0 8px 20px rgba(240, 138, 28, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  animation: phoneFloat 2.8s ease-in-out infinite;
}

.btn-phone:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 24px rgba(240, 138, 28, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* アイコン */
.phone-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phone-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

/* テキスト */
.phone-text {
  display: flex;
  flex-direction: column;
}

.btn-sub {
  font-size: 10px;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}

.btn-main {
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.04em;
}

@keyframes phoneFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

.btn-sub {
  font-size: 10px;
  display: block;
  line-height: 1;
  margin-bottom: 2px;
}

.btn-main {
  font-size: 15px;
  font-weight: bold;
}

/* 2段目：メインバー */
.header-main-bar {
  background: #fff;
  padding: 15px 0;
}

.main-flex {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ロゴの間隔（PC用） */
.header-logo {
  margin: 0 100px;
  flex: 0 0 auto;
}

.header-logo img {
  height: 80px;
  width: auto;
  vertical-align: middle;
}

/* PCメニュー & 仕切り線 */
.nav-left ul,
.nav-right ul {
  display: flex;
  list-style: none;
  gap: 60px;
  margin: 0;
  padding: 0;
}

.nav-left ul li,
.nav-right ul li {
  position: relative;
}

.nav-left ul li::after,
.nav-right ul li::before {
  content: "";
  display: block;
  width: 1px;
  height: 30px;
  background: #e0e0e0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* 左メニューは各項目の右に線 */
.nav-left ul li::after {
  right: -30px;
}

/* 右メニューは各項目の左に線 */
.nav-right ul li::before {
  left: -30px;
}

.nav-left a,
.nav-right a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  font-weight: bold;
  font-size: 14px;
}

.nav-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 8px;
}

.nav-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cloud-bottom {
  position: relative;
  line-height: 0;
  margin-top: -1px;
  margin-bottom: -24px;
  z-index: 10;
}

.cloud-bottom svg {
  display: block;
  width: 100%;
  height: 58px;
}

.cloud-bottom path {
  fill: #ffffff;
}

@media (max-width: 1024px) {
  .cloud-bottom {
    margin-bottom: -20px;
  }

  .cloud-bottom svg {
    height: 48px;
  }
}

@media (max-width: 640px) {
  .cloud-bottom {
    margin-bottom: -14px;
  }

  .cloud-bottom svg {
    height: 34px;
  }
}

/* PC追従ボタン */
.side-floating-buttons {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
}

.side-btn {
  writing-mode: vertical-rl;
  padding: 25px 12px;
  background: #fff;
  display: block;
  border-radius: 20px 0 0 20px;
  margin-bottom: 12px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: -2px 2px 15px rgba(0, 0, 0, 0.1);
  font-size: 17px;
}

.side-btn.side-line {
  border-right: 6px solid #06c755;
  color: #06c755;
}

.side-btn.side-contact {
  border-right: 6px solid #1696e7;
  color: #1696e7;
}

/* 初期状態では非表示 */
.sp-nav {
  display: none;
}

@media (max-width: 1024px) {
  .pc-only {
    display: none !important;
  }

  .sp-only {
    display: block !important;
  }

  .header-inner {
    padding: 0 10px;
  }

  .main-flex {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
  }

  .sp-menu-wrap {
    flex: 0 0 56px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 2;
  }

  .header-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
    text-align: center;
    z-index: 3;
    width: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
  }

  .header-logo a {
    display: block;
    width: 100%;
  }

  .header-logo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 45px;
    margin: 0 auto;
  }

  .sp-action-wrap {
    margin-left: auto;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    z-index: 2;
  }

  /* SP 電話・LINE アイコンボタン */
  .sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 8px;
    text-decoration: none;
    box-sizing: border-box;
  }

  .sp-btn.phone {
    background: #f08a1c;
  }

  .sp-btn.line {
    background: #06c755;
  }

  .sp-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
  }

  /* ハンバーガー少し大きく */
  .menu-trigger span {
    display: block;
    width: 32px;
    height: 3px;
    background: #6a5a50;
    margin: 6px 0;
    border-radius: 999px;
  }

  .menu-trigger small {
    font-size: 9px;
    font-weight: bold;
    color: #000;
  }

  /* SPメニュー閉じるボタン */
  .sp-nav-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #f5f5f5;
    color: #555;
    font-size: 30px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  /* ハンバーガー */
  .menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .menu-trigger span {
    display: block;
    width: 25px;
    height: 2px;
    background: #6a5a50;
    margin: 4px 0;
  }

  .menu-trigger small {
    font-size: 8px;
    font-weight: bold;
  }

  /* ドロワー */
  .sp-nav {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: #fff;
    z-index: 99999;
    transition: right 0.4s ease;
    padding-top: 80px;
  }

  .sp-nav.is-active {
    right: 0;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  .sp-nav a {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    text-decoration: none;
    color: #6a5a50;
    font-weight: bold;
    border-bottom: 1px solid #f5f5f5;
  }

  .sp-nav a img {
    width: 28px;
    height: 28px;
    margin-right: 15px;
  }

  .sp-action-wrap {
    margin-left: auto;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    z-index: 2;
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
  }

  body.is-scrolled .sp-action-wrap {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .sp-fixed-contact {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 3000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
  }

  body.is-scrolled .sp-fixed-contact {
    transform: translateY(0);
  }

  /* 上メッセージ */
  .sp-fixed-contact-message {
    background: #e7dfbf;
    color: #2d8c8c;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    padding: 8px 10px;
  }

  .sp-fixed-contact-buttons {
    display: flex;
    width: 100%;
    align-items: stretch;
  }

  .fixed-contact-btn {
    flex: 1;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    padding: 6px 4px;
    box-sizing: border-box;
    text-align: center;
  }

  /* 左画像 */
  .fixed-contact-btn img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .fixed-contact-btn.phone {
    background: #f08a1c;
  }

  .fixed-contact-btn.contact {
    background: #1696e7;
  }

  .fixed-contact-btn.line {
    background: #06c755;
  }

  .sp-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
}

@media (max-width: 1024px) {
  body.is-menu-open .sp-nav {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 80% !important;
    height: 100vh !important;
    background: #fff !important;
    z-index: 999999 !important;
    padding-top: 80px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}

@media (max-width: 640px) {
  :root {
    --header-wave-h: 46px;
  }
}

@media (max-width: 390px) {
  .fixed-contact-btn {
    font-size: 14px;
    gap: 4px;
    min-height: 54px;
    padding: 4px 2px;
  }

  .fixed-contact-btn img {
    width: 20px;
    height: 20px;
  }
}
