/* =========================================
   PTOTST-Next Global Header (Fixed)
   ========================================= */

/* === Cocoon標準ヘッダーを全ページで非表示 === */
#header,
#header-container,
#navi,
.navi,
.mobile-menu-buttons,
#mobile-menu,
.header,
.header-container {
  display: none !important;
}

/* === あなたの共通ヘッダー（固定表示） === */
.site-header{
  background:#111827;
  color:#f9fafb;

  position: fixed !important;
  top:0 !important;
  left:0;
  right:0;

  z-index: 999999 !important; /* かぶり防止で強め */
}

/* iOS等で.site-headerが負ける保険 */
#ptotst-global-header{
  position: fixed !important;
  top:0 !important;
  left:0;
  right:0;
  z-index: 999999 !important;
}

.header-inner{
  max-width:1080px;
  margin:0 auto;
  padding: 0.6rem 1rem;
  display:flex;
  align-items:flex-start; /* ← 2行タイトルが潰れにくい */
  justify-content:space-between;
  gap:1rem;
  min-height:56px;
}

/* ===== タイトル：必ず2行固定 ===== */
.site-title{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  line-height:1.05;
  white-space: normal !important; /* 重要：nowrapを殺す */
}

.site-title a{
  color: inherit;
  text-decoration:none;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
}

.site-title-main{
  font-size:1.05rem;
  font-weight:700;
  letter-spacing:.02em;
  white-space:nowrap; /* 1行目は折り返さない */
  line-height:1.05;
}

.site-title-sub{
  font-size:.78rem;
  font-weight:600;
  opacity:.9;
  letter-spacing:.03em;
  white-space:nowrap; /* 2行目も折り返さない */
  line-height:1.05;
}

/* ===== PCメニュー ===== */
.desktop-nav{
  display:flex;
  align-items:center;
  gap:1.3rem;
  font-size:.9rem;
  margin-top:2px; /* タイトル2行と高さが合いやすい */
}

.desktop-nav > a,
.desktop-nav .has-dropdown > a{
  color:#e5e7eb;
  position:relative;
  padding:.25rem 0;
  line-height:1;
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  white-space:nowrap;
}

.desktop-nav > a::after,
.desktop-nav .has-dropdown > a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-2px;
  width:0;
  height:2px;
  background:#facc15;
  transition:width .18s ease;
}

.desktop-nav > a:hover::after,
.desktop-nav .has-dropdown > a:hover::after{
  width:100%;
}

/* dropdown */
.has-dropdown{ position:relative; }
.has-dropdown::after{
  content:"";
  position:absolute;
  left:-8px;
  right:-8px;
  top:100%;
  height:10px;
}

.dropdown-menu{
  position:absolute;
  top:100%;
  left:0;
  min-width:220px;
  background:#0f172a;
  border:1px solid rgba(255,255,255,.08);
  border-radius:.7rem;
  padding:.4rem .2rem;
  box-shadow:0 10px 24px rgba(0,0,0,.35);
  display:none;
  z-index:999999; /* ヘッダーより上に */
}

.dropdown-menu a{
  display:block;
  padding:.55rem .8rem;
  color:#e5e7eb;
  font-size:.88rem;
  border-radius:.5rem;
  white-space:nowrap;
}

.dropdown-menu a:hover{
  background:rgba(255,255,255,.06);
  text-decoration:none;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu{
  display:block;
}

/* ===== 右側アイコン列（検索＋ハンバーガー） ===== */
.icon-row{
  display:flex;
  align-items:center;
  gap:.6rem;
  margin-top:2px;
}

/* ✅ 検索ボタン：楕円（円ではない） */
.search-btn{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.28);

  border-radius:30px;   /* ←楕円 */
  padding:6px 18px;     /* ←横長 */

  font-size:.78rem;
  color:#e5e7eb;
  cursor:pointer;
  line-height:1;
}

.search-btn:hover{
  background:rgba(255,255,255,.10);
}

/* hamburger */
.hamb{
  width:28px;
  height:22px;
  position:relative;
  cursor:pointer;
  border:none;
  background:transparent;
}

.hamb span,
.hamb::before,
.hamb::after{
  content:"";
  position:absolute;
  left:0;
  width:100%;
  height:3px;
  background:#f9fafb;
  transition:transform .2s ease, top .2s ease, opacity .2s ease;
}

.hamb span{ top:9.5px; }
.hamb::before{ top:3px; }
.hamb::after{ top:16px; }

.hamb.active::before{ top:9.5px; transform:rotate(45deg); }
.hamb.active::after{ top:9.5px; transform:rotate(-45deg); }
.hamb.active span{ opacity:0; }

/* ===== モバイルメニュー（右からスライド） ===== */
.mobile-nav{
  position: fixed;
  top:56px;
  right:0;
  bottom:0;
  width:min(360px, 82vw);
  background:#111827;
  transform:translateX(100%);
  transition:transform .25s ease-out;
  z-index:999999;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

.mobile-nav.open{ transform:translateX(0); }

.mobile-nav ul{
  list-style:none;
  margin:0;
  padding:.8rem 1rem;
}

.mobile-nav li + li{ margin-top:.4rem; }

.mobile-nav a{
  display:block;
  padding:.55rem 0;
  font-size:.95rem;
  color:#e5e7eb;
}

/* ===== Search Modal ===== */
.search-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:none;
}

.search-modal.open{ display:block; }

.search-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
}

.search-modal__panel{
  position:absolute;
  top:72px;
  left:50%;
  transform:translateX(-50%);
  width:min(720px, calc(100% - 1.2rem));
  background:#fff;
  border-radius:16px;
  box-shadow:0 16px 48px rgba(0,0,0,.25);
  padding:14px 14px 16px;
}

.search-modal__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.search-modal__title{
  font-size:.95rem;
  font-weight:700;
  margin:0;
  color:#111827;
}

.search-modal__close{
  border:none;
  background:#f3f4f6;
  color:#111827;
  border-radius:999px;
  padding:6px 12px;
  font-size:.85rem;
  cursor:pointer;
}

.search-modal__form{
  display:flex;
  gap:10px;
  align-items:center;
}

.search-modal__input{
  flex:1;
  width:100%;
  padding:12px 14px;
  border:1px solid #d1d5db;
  border-radius:12px;
  font-size:16px;
  outline:none;
}

.search-modal__submit{
  border:none;
  background:#2563eb;
  color:#fff;
  border-radius:999px;
  padding:10px 16px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}

/* ===== レスポンシブ ===== */
@media (max-width:960px){
  .desktop-nav{ display:none; }
}

@media (min-width:961px){
  .icon-row{ display:none; }
  .mobile-nav{ display:none; }
}

/* ===== 固定ヘッダー分の余白 ===== */
body{
  padding-top:56px;
}