/* ============================================
   header-nav.css
   「事業内容」の下にプルダウン（子メニュー）を追加するための
   追加スタイルです。既存の sass/css ビルドには手を加えず、
   このファイル単体を header.php から読み込んでいます。
   今後、事業内容の子ページが増えた場合は、
   header.php 内の <ul class="p-header__submenu"> / <ul class="drawer-submenu">
   の中に <li> を追加するだけで項目を増やせます。
============================================ */

/* ---- PC: ホバーで開くプルダウン ---- */
.p-header__nav-item--has-submenu {
  position: relative;
}

.p-header__nav-item--has-submenu > a {
  position: relative;
  padding-right: 16px;
}

.p-header__nav-item--has-submenu > a::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -4px;
  border-right: 1.5px solid #535353;
  border-bottom: 1.5px solid #535353;
  transform: rotate(45deg);
}

.p-header__submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 200px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  border-radius: 0 0 8px 8px;
  padding: 6px 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  z-index: 1001;
}

.p-header__nav-item--has-submenu:hover .p-header__submenu,
.p-header__nav-item--has-submenu:focus-within .p-header__submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.p-header__submenu-item a {
  display: block;
  line-height: 1.4 !important;
  padding: 10px 24px;
  font-size: 15px;
  color: #535353;
  white-space: nowrap;
}

.p-header__submenu-item a:hover {
  color: #0E2B6E;
  opacity: 1 !important;
}

/* ---- ドロワー（スマホ・タブレット）: 常時展開の子メニュー ---- */
.drawer-content-item--has-submenu {
  line-height: 1.6;
}

.drawer-submenu {
  margin: 2px 0 8px;
  padding: 0;
  list-style: none;
}

.drawer-submenu-item a {
  padding: 6px 15% 6px 24%;
  font-size: 13.5px;
  font-weight: normal;
  opacity: 0.85;
}

.drawer-submenu-item a::before {
  content: '— ';
}
