@charset "UTF-8";
:root {
  --black: #4c4740;
  --green: #2a7f3c;
  --white:#f0e9d7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*========= 1. ヘッダー（上部固定） ===============*/
.fixbox {
  position: fixed !important; /* 強制 */
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background-color: var(--black) !important; /* 強制的に黒にする */
  z-index: 300;
  display: block !important; /* 万が一消えていた場合のため */
}

/* 1段目：ロゴとLINEボタン */
.header_title_wrapper {
  height: 50px;
  border-bottom: solid 1px rgba(242, 229, 200, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px 0 50px; /* 左側はハンバーガーボタン用に開ける */
}

.page_title {
  font-size: 16.5px;
  color: var(--white);
  text-decoration: none;
}

.header_line_btn {
  position: relative;
  background-color: var(--white);
  color: var(--green);
  border: 4px solid var(--green);
  font-size: 10.5px;
  font-weight: bold;
  padding: 5px 5px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  transition: 0.2s;
}


.header_line_btn:hover {
  box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.2);
transform: translate(2px, 2px);
}

/* 2段目：常設ナビ（スマホでも見える） */
.contents_name_wrapper {
  display: flex;
  height: 40px;
}

.header_contents_name {
  flex: 1;
  color: var(--white);
  text-decoration: none;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.5;
  border-right: 1px solid rgba(242, 229, 200, 0.2);
}

.header_contents_name:last-child { border-right: none; }

/*========= 2. ハンバーガーメニュー本体（g-nav） ===============*/
#g-nav {
  position: fixed;
  top: 0;
  left: -120%; /* 最初は隠す */
  background: var(--black);
  z-index: 500; /* ヘッダーより上に表示 */
  transition: all 1.0s ease;
  padding-top: 60px;
  padding-right: 40px;
  border-bottom-right-radius: 50px;
  overflow: hidden; 
  display: block;  
}

#g-nav.panelactive { 
  transition: all 0.5s ease;
  left: 0; 
}

/* 背景の黒幕 */
#ham-cover.panelactive {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 400; /* ヘッダー(300)とメニュー(500)の間 */
}

/* メニュー内リスト */
#nav_mainmenu { list-style: none; padding-left: 60px; }

#nav_mainmenu > li {
  position: relative;
  margin-bottom: 20px;
}

#nav_mainmenu > li::before {
  content: "";
  background-color: var(--white);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: absolute;
  top: 0.7em;
  left: -1.2em;
}

#nav_mainmenu a {
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
}

/* 子メニュー（アコーディオン用） */
#submenu { list-style: none; padding-left: 15px; margin-top: 10px; }
#submenu li { font-size: 13px; margin-bottom: 8px; opacity: 0.8; }

/*========= 3. 操作ボタン (openbtn) ===============*/
.openbtn {
  position: fixed;
  top: 5px;
  left: 5px;
  width: 40px;
  height: 40px;
  z-index: 9999; /* 常に一番上 */
  cursor: pointer;
  padding: 10px; /* タップできるエリアを実質的に広げる */
  -webkit-tap-highlight-color: transparent; /* タップ時の青い枠を消す */
}

.openbtn span {
  display: block;
  position: absolute;
  left: 10px;
  width: 20px;
  height: 2px;
  background: var(--white);
  transition: all 0.4s;
}

.openbtn span:nth-of-type(1) { top: 13px; }
.openbtn span:nth-of-type(2) { top: 20px; }
.openbtn span:nth-of-type(3) { top: 27px; }

/* ボタンがアクティブ（×印） */
.openbtn.active span:nth-of-type(1) { transform: translateY(7px) rotate(-45deg); }
.openbtn.active span:nth-of-type(2) { opacity: 0; }
.openbtn.active span:nth-of-type(3) { transform: translateY(-7px) rotate(45deg); }

@media screen and (min-width:1024px){

  .responsive{
    display: none;
  }

  .openbtn{
    top: 10px;
    left: 15px;
  }

  .fixbox{
    height: 60px;
  }

  .header_title_wrapper {
    height: 60px;
    border-bottom: solid 1px rgba(242, 229, 200, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 0 65px; /* 左側はハンバーガーボタン用に開ける */
  }

  .page_title{
    font-size: 20px;
    transition: opacity 0.2s ease;
  }

  .page_title:hover{
    opacity: 0.8;
  }

  .contents_name_wrapper {
    position: absolute;
    height: 40px;
    width: 55%;
    right: 15.5%;
    top: 10px;
  }

  .header_contents_name {
    flex: 1;
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid rgba(242, 229, 200, 0.2);
    transition: transform 0.2s ease;
  }

  .header_contents_name:hover{
    transform: scale(1.1);
  }
  
  .header_line_btn {
    background-color: var(--white);
    border: 4px solid var(--green); /* 太さ 種類 色 */
    font-size: 14px;
    font-weight: bold;
    padding: 5px 5px;
    border-radius: 12px;
  }

  #nav_mainmenu a {
    font-size: 20px;
    position: relative;
    display: inline-block;
    text-decoration: none;
  }

  #nav_mainmenu a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: var(--white);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
  }

  #nav_mainmenu a:hover:after{
    transform: scaleX(1);
    transform-origin: left;
  }

    /* 子メニュー（アコーディオン用） */
    #submenu { list-style: none; padding-left: 20px; margin-top: 10px; }
    #submenu li { font-size: 17px; margin-bottom: 8px; opacity: 0.8; }
}

@media screen and (max-width:370px){
  .header_title_wrapper {
    padding: 0 5px 0 45px;
  }

  .page_title{
    font-size: 15px;
  }

  .header_contents_name{
    font-size: 8px;
  }

  .header_line_btn{
    font-size: 8px;
    padding: 5px 2px 5px 2px;
  }
}