@charset "utf-8";

/* ==========================================
   ▼ 基本・レイアウトのスタイル
========================================== */

.site-header {
    margin-bottom:0; 
}

.header-nav {
    display: flex;
    justify-content: space-between;
}

    .header-nav > a {
        text-decoration: none;
    }

    .header-nav > a > .rogo {
        display: block;
        width: 90%;
        max-width: 200px;
        height: auto;
        margin-top: .5em;
    }

    /* PCでは開閉ボタンを非表示 */
.menu-toggle {
  display: none;
}

/* キーボード操作でもサブメニューを表示 */
ul.ddmenu li:focus-within > ul {
  display: block;
}

.headerline {
    margin: 0;
    border: none;
    border-top: 3px solid #ff6633;
}

/* ==========================================
   ▼ ヘッダーメニュー（個別項目）のスタイル
========================================== */

.headerMenu .baseorange {
    background-color: #333;
}

.headerMenu span {
    color: #ff6633;
    font-size: .9em;
}

#toiawase {
    background-color: #ff6633;
    color: #fff;
    padding: 1.5em 2em;
    /* 上下1.5em、左右2emに集約 */
}

/* ==========================================
   ▼ ドロップダウンメニュー（1階層目）
========================================== */
ul.ddmenu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

ul.ddmenu>li {
    position: relative;
    margin-left: 2em;
    background-color: #ffffff;
}

ul.ddmenu>li:hover {
    /*opacity: .9;*/
    opacity: 1.0;
}

ul.ddmenu a {
    display: block;
    color: #333;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
}

/* ==========================================
   ▼ サブメニュー（2階層目）
========================================== */
/* ホバー時にサブメニューを表示 */
ul.ddmenu li:hover>ul {
    display: block;
}

ul.ddmenu ul {
    display: none;
    /* 初期状態は非表示 */
    position: absolute;
    /* 絶対配置 */
    top: 100%;
    /* 親メニューの真下に配置 */
    left: -1em;
    z-index: 100;
    margin: 0;
    padding: .5em;
    list-style: none;
}

ul.ddmenu ul>li {
    width: 130px;
    /* サブメニューの横幅 */
    background-color: #ffffff;
    border: 1px solid #cccccc;
}

ul.ddmenu ul a {
    padding-left: 10px;
    font-weight: normal;
    text-align: left;
    line-height: 35px;
}

ul.ddmenu ul a:hover {
    color: #333;
    background-color: #dfdfdf;
}

/* ==========================================
   ▼ メディアクエリ（レスポンシブ対応）
========================================== */

@media screen and (max-width: 800px) {
    .body {
        font-size: .9em;
    }

    .header-nav {
        display: block;
        width: 100%;
    }

    ul.ddmenu {
        justify-content: space-between;
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    body {
        font-size: .9em;
    }

    .header-nav {
        width: 100%;
    }

    #toiawase {
        background-color: #ff6633;
        color: #fff;
        padding: 1.5em 1.2em;
    }

}

@media screen and (max-width: 600px) {
  .header-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .header-nav > div {
    flex: 1;
    min-width: 0;
  }

  /* ハンバーガーボタン */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin: 8px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
  }

  .menu-toggle > span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
  }

  /* 開いているときは「×」にする */
  .menu-toggle[aria-expanded="true"] > span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] > span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] > span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .menu-toggle:focus-visible {
    outline: 2px solid #ff6633;
    outline-offset: 3px;
  }

  /* スマホではメニューを初期状態で非表示 */
  .header-nav > ul.ddmenu {
    display: none;
    flex-basis: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* ボタンを押すと表示 */
  .header-nav > ul.ddmenu.is-open {
    display: block;
  }

  .header-nav > ul.ddmenu > li {
    margin: 0;
    font-size: 1em;
    border-top: 1px solid #eee;
  }

  .header-nav > ul.ddmenu > li > a {
    padding: 16px 20px;
    text-align: left;
  }

  /*
   * スマホではデータ検索の下にサブメニューを常時表示。
   * タップだけで各リンクにアクセスできます。
   */
  .header-nav > ul.ddmenu ul {
    display: block;
    position: static;
    margin: 0;
    padding: 0 0 10px 20px;
  }

  .header-nav > ul.ddmenu ul > li {
    width: auto;
    border: none;
  }

  .header-nav > ul.ddmenu ul a {
    padding: 12px 20px;
    line-height: 1.5;
  }

  .header-nav > ul.ddmenu .headerMenu > a > span {
    display: none;
  }

  .header-nav #toiawase {
    padding: 16px 20px;
    color: #fff;
    background-color: #ff6633;
    text-align: center;
  }
}