/* ==========================================
   PC版（画面幅 769px 以上）
   ========================================== */

.header-wrapper {
  position: fixed;
  top: 0;           /* PCは上 */
  left: 0;
  width: 100%;
  height: 80px;
  background: #4CAF50;
  z-index: 10;
  display: flex;
  align-items: center;
}

.navbar{
  display: flex;
  justify-content: space-between; /* ロゴを左、メニューを右へ */
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  background: transparent; /* wrapperの色を活かす */
  position: relative;
}
.navbar::after
 {
    background-position: left bottom;
    background-repeat: repeat-x;
    background-image: url(../images/header_bg_half.svg);
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: -24px;
    width: 100%;
    height: 6px;
    z-index: 1;
 }

/* ロゴのサイズ調整 */
.logo img {
  height: 33px;
  width: 250px;
  vertical-align: middle;
}

/* PC用ナビゲーション */
.nav-links-bar {
  display: flex;
  list-style: none;
  gap: 10px;
}

.nav-links-bar > li > a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
}

/* PCではスマホ用要素を隠す */
.hamburger, .sp-menu-panel {
  display: none;
}







.header-sublist {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 45px;
    list-style: none;
    width: 260px;
    background: #fff;
    padding: 10px;
    transition: all 0.3s;
    z-index: 10;
}
 .sublist-r{
  right: 0;
 }

.nav-links-bar > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}


.nav-links-bar > li > a
 {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  position: relative;
  padding: 10px 10px 10px 50px;
}
.nav-links-bar > li:nth-child(1) > a::before,
.nav-links-bar > li:nth-child(2) > a::before
{
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  display: block;
}

.nav-links-bar > li:nth-child(1) > a::before{
  background: url(../images/header-icon01.png) no-repeat center center / contain;
}
.nav-links-bar > li:nth-child(2) > a::before{
  background: url(../images/header-icon02.png) no-repeat center center / contain;
}
@keyframes floating-y {
  0% {
    transform: translateY(-50%); /* 元の位置（中央） */
  }
  50% {
    transform: translateY(-65%); /* 少し上に浮く */
  }
  100% {
    transform: translateY(-50%); /* 元の位置に戻る */
  }
}

.nav-links-bar > li:hover::before {
  animation: floating-y 1.2s ease-in-out infinite;
}



.nav-links-bar > li:hover .header-sublist {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-links-bar > li:hover .nav-links-bar > li:nth-child(1) > a::before,
.nav-links-bar > li:hover .nav-links-bar > li:nth-child(2) > a::before {
  animation: floating-y 1.2s ease-in-out infinite;
}


.header-sublist li a {
  display: block;
  padding: 8px;
  /* border-bottom: 1px solid #eee; */
  white-space: nowrap;
  color: #333;
  transition: all 0.3s;
  text-decoration: none;
}

.header-sublist li:last-child a {
  border-bottom: none;
}

.header-sublist li a:hover {
  background: #99e59d;
}






@media screen and (max-width: 768px) {
  /* 1. 下部バー：常に最前面に固定 */
  .header-wrapper {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: #4CAF50;
  }

  /* 2. メニューパネル：中央からじんわり表示の設定 */
  .sp-menu-panel {
    display: flex;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(76, 175, 80, 0.98); 

    opacity: 0;
  visibility: hidden;
  transform: translateY(-100%); 
  transition: transform 0.5s ease-out, opacity 0.3s;
    
    overflow-y: auto;
            padding: 20px;

    height: calc(100vh - 100px); 
  }

  /* 3. 表示時：ふわっと浮き出る */
  .sp-menu-panel.active {
    opacity: 1;
  visibility: visible;
  transform: translateY(0);
  }

  /* パネル内のリスト調整 */
  .sp-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    width: 100%;
  }

  .sp-header-sublist li a {
    display: block;
    padding: 10px;
    width: 100%;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    /* border-bottom: 1px solid rgba(255,255,255,0.2); */
    font-size: 20px;
  }
   .sp-header-sublist{
    /* display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 10px; */
    list-style: none;
    margin-top: 10px;
 }

 .sp-header-sublist li{
    margin-bottom: 5px;
 }
 .sp-header-sublist li:last-child{
    margin-bottom: 0;
 }

 .sp-header-sublist li a{
    display: block;
    padding: 5px 5px 8px;
    width: 100%;
    color: #fff;
    text-decoration: none;
    font-weight: normal;
    font-size: 16px;
    border-bottom: 1px dotted #fff;
 }

.parent-link {
  position: relative;
  list-style: none;
  padding-left: 0; /* 親の余白を解除！ */
  margin-bottom: 30px; /* 項目間の余白 */
  display: block;
  width: 100%;
}
  .parent-link:last-child{
  margin-bottom: 0;
 }

/* --- 親のテキスト（aタグ）だけを右に寄せる --- */
.parent-link > a {
  display: inline-block;
  margin-left: 60px; /* アイコンの幅 + 余白分 */
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 20px;
  line-height: 45px; /* アイコンの高さと合わせると綺麗です */
}

/* --- アイコンを absolute で配置 --- */
.parent-link::before {
  content: "";
  position: absolute;
  top: 0;   /* aタグの1行目横に固定 */
  left: 0;
  width: 45px;
  height: 45px;
  display: block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* 1つ目のアイコン */
.parent-link:nth-child(1)::before {
  background-image: url(../images/header-icon01.png);
}
/* 2つ目のアイコン */
.parent-link:nth-child(2)::before {
  background-image: url(../images/header-icon02.png);
}

/* --- パネルがアクティブな時だけ動かすアニメーション --- */
/* .sp-menu-panel.active .parent-link::before {
  animation: floating-y-sp 1.2s ease-in-out infinite;
}

@keyframes floating-y-sp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
} */
 .nav-links-bar > li:hover::before {
  animation: none;
}





/* --- サブリスト：親のpaddingに縛られない自由な位置 --- */
.sp-header-sublist {
  list-style: none;
  margin-top: 15px;
  padding-left: 10px; /* アイコンの真下あたり、または 0 でもOK */
}

.sp-header-sublist li {
  margin-bottom: 5px;
}

.sp-header-sublist li a {
  display: block;
  padding: 8px 5px;
  width: 100%;
  color: #fff;
  text-decoration: none;
  font-weight: normal;
  font-size: 16px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
}




  /* --- 以下、バー内部のレイアウト（維持） --- */
.navbar {
    display: flex;
    width: 100%;
    height: 100%; /* これで80pxになります */
    padding: 0;
    align-items: stretch; /* 子要素の高さを揃える設定に変更 */
            align-items: center;
  }

  .hamburger {
    display: flex;
    flex: 0 0 65px;
    height: 60px;
    position: relative;
    justify-content: center;
    align-items: center;
  }

  /* 三本線のアニメーションはそのまま維持 */
  .hamburger span {
    display: block;
    position: absolute;
    width: 25px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
  }
  .hamburger span:nth-child(1) { top: 22px; }
  .hamburger span:nth-child(2) { top: 29px; }
  .hamburger span:nth-child(3) { top: 36px; }

  .hamburger.active span:nth-child(1) { top: 29px; transform: rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { top: 29px; transform: rotate(-45deg); }

.nav-links-bar {
    display: flex;
    flex: 1;
    height: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: stretch;
  }
  .nav-links-bar ,
  .hamburger{
    z-index: 999;
  }
  
  .nav-links-bar ul { display: none; } /* バー内のサブメニューは隠す */

.nav-links-bar > li {
    flex: 1;
    height: 100%;
    display: block;
    position: relative;
  }

  /* .nav-links-bar > li > a {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
      padding: 50px 10px 15px 10px;
} */

/* .nav-links-bar > li:nth-child(1) > a, .nav-links-bar > li:nth-child(2) > a */
 .nav-links-bar > li > a
 {
    padding: 50px 10px 15px 10px;

    display: flex !important;
    flex-direction: column;
    /* justify-content: flex-end; */
    justify-content: normal;
    align-items: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    color: #fff;
    text-align: center;
    text-decoration: none;
    line-height: 1.2;
}

 /* .nav-links-bar > li > a::before */
 .nav-links-bar > li:nth-child(1) > a::before,
.nav-links-bar > li:nth-child(2) > a::before
 {
  left: 50%;
    top: 5px;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    position: absolute;
}
  .logo, .navbar::after {
    display: none;
  }

  
 

}