/*
 * Header Styles (for header.php)
 */

/* ▼▼▼ 追加：固定ヘッダーのための余白設定 ▼▼▼ */
body {
  /* PC用のヘッダーの高さ分の余白を確保します。 */
  /* ヘッダーのデザイン（padding等）を変更した場合は、この値を再調整してください。 */
  padding-top: 80px; 
}
/* ▲▲▲ 追加ここまで ▲▲▲ */


/* ===============================================
 * PC用ヘッダースタイル
 * =============================================== */
.site-header {
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  /* ▼▼▼ 変更：ヘッダーを画面に固定 ▼▼▼ */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%; /* 横幅全体に広げる */
  /* ▲▲▲ 変更ここまで ▲▲▲ */
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  padding: 15px 10px;
}

.header-logo {
  /* ロゴとタグラインを配置 */
}

.header-logo a {
  display: block;
}

.header-logo img {
  height: 28px;
  vertical-align: middle;
}

.header-tagline {
  display: block;
  font-size: 12px;
  color: #555;
  margin-top: 5px;
  font-weight: 500;
}

.header-right-col {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav li a {
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.3s;
}

.header-nav li a:hover {
  color: #007bff;
}

.header-cta-button a {
  display: inline-block;
  background-color: #007bff;
  color: #fff;
  padding: 12px 28px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 15px;
  transition: background-color 0.3s, transform 0.2s;
}

.header-cta-button a:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

/* ===============================================
 * ハンバーガーメニュー
 * =============================================== */

/* --- 変数定義 --- */
:root {
  --hamburger-icon-width: 24px;
  --hamburger-icon-height: 16px;
  --hamburger-bar-height: 2px;
  --hamburger-color: #333;
  --menu-bg-color: rgba(29, 29, 31, 0.95);
  --menu-transition-speed: 0.4s;
}

/* --- ハンバーガーボタン全体 --- */
.hamburger-menu {
  display: none;
  cursor: pointer;
  background: transparent;
  border: none;
  border-left: 1px solid #e0e0e0;
  padding: 0 0 0 20px;
  z-index: 1010;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: stretch;
}

/* --- アイコン部分のラッパー --- */
.hamburger-menu__icon {
  position: relative;
  width: var(--hamburger-icon-width);
  height: var(--hamburger-icon-height);
}

/* --- アイコンのバー --- */
.hamburger-menu__bar {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--hamburger-bar-height);
  background-color: var(--hamburger-color);
  transition: transform var(--menu-transition-speed) ease,
              top var(--menu-transition-speed) ease,
              opacity var(--menu-transition-speed) ease;
}

.hamburger-menu__bar:nth-of-type(1) { top: 0; }
.hamburger-menu__bar:nth-of-type(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu__bar:nth-of-type(3) { top: 100%; transform: translateY(-100%); }

/* --- テキスト部分 --- */
.hamburger-menu__text {
  font-size: 10px;
  color: #555;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.5px;
}
.hamburger-menu__text--close { display: none; }


/* --- body.is-menu-open のスタイル --- */
body.is-menu-open { overflow: hidden; }

/* テキストの切り替え */
body.is-menu-open .hamburger-menu__text--open { display: none; }
body.is-menu-open .hamburger-menu__text--close { display: block; }

/* ×印へのアニメーション */
body.is-menu-open .hamburger-menu__bar:nth-of-type(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
body.is-menu-open .hamburger-menu__bar:nth-of-type(2) { opacity: 0; }
body.is-menu-open .hamburger-menu__bar:nth-of-type(3) { top: 50%; transform: translateY(-50%) rotate(-45deg); }


/* ===============================================
 * ブレークポイント：768px以下（タブレット・スマートフォン）
 * =============================================== */
@media screen and (max-width: 768px) {
  /* ▼▼▼ 追加：SP用の固定ヘッダーの余白設定 ▼▼▼ */
  body {
    /* SP用のヘッダーの高さに合わせて余白を再調整します。 */
    padding-top: 75px; 
  }
  /* ▲▲▲ 追加ここまで ▲▲▲ */

  .header-container {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* スマホ表示用にタグラインのスタイルを調整 */
  .header-tagline {
    display: block;
    font-size: 10px;
    line-height: 1.3;
    margin-top: 4px;
    font-weight: 400;
  }

  /* SP表示の時だけハンバーガーメニューを表示 */
  .hamburger-menu {
    display: flex;
  }

  /* PCでは表示されているナビとボタンを非表示にする */
  .header-right-col {
    display: none;
  }

  /* メニューを開いたときだけ、メニューパネルとして表示する */
  body.is-menu-open .header-right-col {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    padding: 120px 40px 40px;
    background-color: var(--menu-bg-color);
    z-index: 1000;
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    transition: transform var(--menu-transition-speed) cubic-bezier(0.22, 1, 0.36, 1),
                opacity var(--menu-transition-speed) ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  
  /* --- メニュー内のナビゲーション --- */
  body.is-menu-open .header-nav ul {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }
  
  body.is-menu-open .header-nav ul li {
    list-style: none;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
  }

  body.is-menu-open .header-nav ul li a {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
  }
  
  /* --- メニュー内のお問い合わせボタン --- */
  body.is-menu-open .header-cta-button {
      opacity: 1;
      transform: translateY(0);
      transition: opacity 0.4s ease 0.5s, transform 0.4s ease 0.5s;
  }

  body.is-menu-open .header-cta-button a {
    background-color: transparent;
    border: 1px solid #fff;
    color: #fff;
  }
  body.is-menu-open .header-cta-button a:hover {
    background-color: #fff;
    color: var(--menu-bg-color);
    transform: none;
  }
}