/* =========================================================
   header.css — 共通ヘッダー（header.html）の自己完結スタイル
   header.html から spmenu.css と共に読み込む。これ一枚(+spmenu.css)で
   index.css / recruit.css を読まないページでもヘッダーが正しく成立する。
   ・ベアな header/nav/.logo は [data-include="header"] 配下にスコープし、
     ページ本文の <header>（記事の sg-head 等）へ誤爆させない。
   ・.menu-* / .hover-menu / .entry-btn-nav / .sp-header-right / .hamburger-menu
     はヘッダー固有クラスなのでスコープ不要。
   ・ドロワーの見た目は spmenu.css が後から上書きする（ここは機構＝位置/開閉）。
   ========================================================= */

/* ---- ヘッダーバー本体（recruit.css の header{} を include 配下にスコープ）---- */
[data-include="header"] header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 10000;
  background: #fff;
  border-bottom: solid 4px #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

/* 固定ヘッダー分の本文オフセット */
body {
  padding-top: 80px;
}

/* ---- ロゴ ---- */
.logo-top {
  height: 50px;
  display: flex;
  align-items: center;
}
[data-include="header"] .logo a {
  margin-left: 50px;
}
[data-include="header"] .logo img {
  width: 150px;
}

/* ---- PCナビ ---- */
[data-include="header"] nav {
  display: flex;
  height: 100%;
  align-items: center;
  margin-left: auto;
  margin-right: 50px;
}
[data-include="header"] nav li {
  margin-left: 26px;
  list-style: none;
  font-size: 13px;
  white-space: nowrap;
}

/* ---- ドロップダウン（index.css 専有だった .hover-menu 機構）---- */
.menu-list {
  position: relative;
}
.menu-list a {
  cursor: pointer;
}
.menu-list label {
  cursor: pointer;
  margin: 0;
}
.menu-list input {
  display: none;
}
.hover-menu {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 500;
  width: max-content;
  padding-top: 12px;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.hover-menu ul {
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #ffffff;
  border: 1px solid #f0e0da;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(58, 37, 48, 0.16);
  overflow: hidden;
}
.hover-menu ul li {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  border-radius: 9px;
}
.hover-menu ul li a {
  display: block;
  padding: 11px 18px;
  color: #3a2530;
  white-space: nowrap;
  border-radius: 9px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.hover-menu ul li a:hover {
  background: #fff0ea;
  color: #ff5a3c;
}
.menu-list:hover .hover-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#menu_bar1:checked ~ .hover-menu,
#menu_bar2:checked ~ .hover-menu,
#menu_bar3:checked ~ .hover-menu {
  opacity: 1 !important;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---- PC ENTRY ボタン（recruit.css の .entry-btn-nav）---- */
.entry-btn-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff7a33 0%, #ff4f6e 55%, #ff77a0 100%);
  padding: 9px 22px;
  border-radius: 9999px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(255, 79, 110, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.entry-btn-nav a::after {
  content: "→";
  font-size: 14px;
  transition: transform 0.25s ease;
}
.entry-btn-nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(255, 79, 110, 0.45);
  opacity: 1;
}
.entry-btn-nav a:hover::after {
  transform: translateX(3px);
}

/* ---- ハンバーガー/ドロワー機構（index.css 専有だった部分）---- */
#menu-btn-check {
  display: none;
}
.menu-btn span,
.menu-btn span:before,
.menu-btn span:after {
  content: "";
  display: block;
  height: 3px;
  width: 25px;
  border-radius: 3px;
  background-color: #707070;
  position: absolute;
}
.menu-btn span:before { bottom: 8px; }
.menu-btn span:after { top: 8px; }
#menu-btn-check:checked ~ .menu-btn span { background-color: rgba(255, 255, 255, 0); }
#menu-btn-check:checked ~ .menu-btn span::before { bottom: 0; transform: rotate(45deg); }
#menu-btn-check:checked ~ .menu-btn span::after { top: 0; transform: rotate(-45deg); }

/* ドロワー本体：画面右外→右0でスライドイン（見た目は spmenu.css が上書き） */
.menu-content {
  display: block;
  position: fixed;
  top: 0;
  right: -100%;
  left: auto;
  width: 500px;
  max-width: 100%;
  height: 100%;
  z-index: 80;
  background-color: #f1f2ee;
  transition: all 0.5s;
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.532);
}
#menu-btn-check:checked ~ .menu-content {
  right: 0;
  left: auto;
}
.menu-logo {
  display: flex;
  height: 50px;
  align-items: center;
}
.menu-logo img { width: 150px; margin-left: 5%; }
.menu-content .menu-area {
  padding-top: 30px;
  margin-bottom: 50px;
  text-align: center;
  width: 100%;
}
.menu-content .menu-area li {
  display: block;
  list-style: none;
  text-align: left;
  width: 160px;
  font-size: 16px;
  margin: 20px auto;
}
.menu-area input { display: none; }
.menu-area label {
  cursor: pointer;
  display: block;
  text-decoration: none;
  position: relative;
}
.menu-content .menu-area .menu-anime {
  height: 0;
  overflow: hidden;
}
.menu-content .menu-area .menu-anime li {
  font-size: 15px;
  margin: 0;
  height: 0;
  overflow-y: hidden;
  transition: padding-bottom 0.5s, padding-top 0.5s;
}
#menu_bar01:checked ~ #links01,
#menu_bar02:checked ~ #links02,
#menu_bar03:checked ~ #links03 { height: auto; }
#menu_bar01:checked ~ #links01 li,
#menu_bar02:checked ~ #links02 li,
#menu_bar03:checked ~ #links03 li {
  width: 200px;
  height: auto;
  opacity: 1;
  padding: 10px;
}

/* ---- レスポンシブ：PC(≥1025)ではハンバーガー隠す / モバイル(≤1024)で切替 ---- */
@media screen and (min-width: 1025px) {
  /* PCではスマホ用ヘッダー右（ENTRY+ハンバーガー+ドロワー）を隠す */
  .sp-header-right { display: none !important; }
}

@media screen and (max-width: 1024px) {
  [data-include="header"] nav { display: none; }
  [data-include="header"] header {
    height: 80px;
    padding: 0;
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow: visible;
  }
  .logo-top { margin-left: 2%; flex-shrink: 1; }
  .logo-top img.logo { max-height: 40px; width: auto; }

  .sp-header-right {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    margin-right: 2%;
    height: 100%;
    z-index: 10001;
    width: auto;
  }
  .hamburger-menu {
    width: 40px !important;
    height: 40px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 5px !important;
  }
  .hamburger-menu .menu-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    width: 40px !important;
    height: 40px !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 10001;
  }
  .header-entry-btn-sp {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff7a33 0%, #ff4f6e 55%, #ff77a0 100%);
    padding: 8px 20px !important;
    border-radius: 9999px;
    color: #fff !important;
    font-size: 13px !important;
    text-decoration: none;
    line-height: 1;
    font-weight: bold;
    letter-spacing: 0.04em;
    height: 36px;
    white-space: nowrap !important;
    box-shadow: 0 4px 12px rgba(255, 79, 110, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  .header-entry-btn-sp:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(255, 79, 110, 0.45);
    opacity: 1;
  }
}
