/* =========================================
   1. ヘッダー全体の大枠
========================================= */
.cs-hdr-st1-env {
    width: 100%;
    background-color: #ffffff;
    box-sizing: border-box;
    font-family: sans-serif;
    position: relative;
    z-index: 9999;
}

/* --- JSの代わりにする隠しチェックボックス --- */
.cs-hdr-st1-hidden-check {
    display: none;
}

/* =========================================
   2. インナーコンテナ
========================================= */
.cs-hdr-st1-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1600px;
    height: 50px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 10002; /* ドロワーより上に配置 */
}

/* =========================================
   3. 左側：ロゴエリア
========================================= */
.cs-hdr-st1-logo a {
    display: flex;
    align-items: center;
    color: #000;
    text-decoration: none !important;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* マウスを重ねたとき */
.cs-hdr-st1-logo a:hover {
    color: #000;
    opacity: 0.5;
}
.cs-hdr-st1-logo img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* =========================================
   4. 右側：PC用ナビゲーション
========================================= */
.cs-hdr-st1-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 30px;
}
.cs-hdr-st1-link {
    display: block;
    color: #333333;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
}
.cs-hdr-st1-link:hover {
    color: #2589d0;
}
.cs-hdr-st1-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #2589d0;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.cs-hdr-st1-link:hover::after {
    width: 100%;
}

/* =========================================
   5. スマホ用：ハンバーガーボタン（デフォルト非表示）
========================================= */
.cs-hdr-st1-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
}
.cs-hdr-st1-toggle span {
    width: 100%;
    height: 2px;
    background-color: #333333;
    transition: all 0.3s ease;
    transform-origin: left center;
}

/* ▼ チェックが入った時（開いた時）のボタンアニメーション ▼ */
.cs-hdr-st1-hidden-check:checked ~ .cs-hdr-st1-inner .cs-hdr-st1-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(2px, -2px);
}
.cs-hdr-st1-hidden-check:checked ~ .cs-hdr-st1-inner .cs-hdr-st1-toggle span:nth-child(2) {
    opacity: 0;
}
.cs-hdr-st1-hidden-check:checked ~ .cs-hdr-st1-inner .cs-hdr-st1-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(2px, 2px);
}

/* =========================================
   6. スマホ用：ドロワーメニュー（デフォルト非表示）
========================================= */
.cs-hdr-st1-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    opacity: 0;
    pointer-events: none; /* 閉じている時はクリック無効 */
    transition: opacity 0.3s ease;
}

/* メニューの背景（ここをクリックしても閉じるようにする） */
.cs-hdr-st1-drawer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    cursor: pointer;
}

.cs-hdr-st1-drawer-menu {
    position: relative;
    z-index: 10001;
    list-style: none;
    padding: 100px 0 0 0;
    margin: 0;
    text-align: center;
}
.cs-hdr-st1-drawer-menu li {
    margin-bottom: 30px;
}
.cs-hdr-st1-drawer-menu a {
    display: inline-block;
    color: #333333;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: color 0.3s ease;
}
.cs-hdr-st1-drawer-menu a:hover {
    color: #2589d0;
}

/* ▼ チェックが入った時（開いた時）のドロワー表示 ▼ */
.cs-hdr-st1-hidden-check:checked ~ .cs-hdr-st1-drawer {
    opacity: 1;
    pointer-events: auto; /* 開いた時はクリック有効 */
}

/* =========================================
   7. レスポンシブ対応（画面幅900px以下）
========================================= */
@media screen and (max-width: 900px) {
    .cs-hdr-st1-nav {
        display: none; /* PC用ナビを非表示 */
    }
    .cs-hdr-st1-toggle {
        display: flex; /* ハンバーガーボタンを表示 */
    }
    .cs-hdr-st1-drawer {
        display: block; /* ドロワーの構造を有効化 */
    }
}

 /* グローバルナビ */
    nav ul {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      gap: 20px;
    }

    nav li {
      position: relative; /* サブメニュー配置用 */
    }

    nav > ul > li > a {
      text-decoration: none;
      color: #333;
      font-size: 14px;
      padding: 6px 0;
      display: inline-block;
    }

    nav > ul > li > a:hover {
      color: #0070c9;
    }

 /* サブメニュー */
    .submenu {
      position: absolute;
      top: 100%;
      left: 0;
      min-width: 160px;
      background: #ffffff;
      border: 1px solid #ddd;
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
      padding: 6px 0;
      box-sizing: border-box;
      display: none;
    }

    .submenu li {
      width: 100%;
    }

    .submenu a {
      display: block;
      padding: 8px 12px;
      font-size: 13px;
      color: #333;
      text-decoration: none;
      white-space: nowrap;
    }

    .submenu a:hover {
      background: #f5f5f5;
      color: #0070c9;
    }

    /* ホバーでサブメニュー表示 */
    nav li:hover > .submenu {
      display: block;
    }
