@charset "utf-8";

.hamburger-wrapper {
  position: relative;
}

.hamburger-icon {
  width: 25px;
  height: 25px;
  position: fixed; /* ← fixedにして常に左上固定 */
  top: 10px;
  right: 10px;
  cursor: pointer;
  /*z-index: 3;*/
  z-index: 2000;
  display: inline-block;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  margin: 8px 0;
  background: #333;
  border-radius: 2px;
  transition: 0.4s;
}

/* ハンバーガーがXに変形 */
#hamburger-toggle:checked + .hamburger-icon span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
#hamburger-toggle:checked + .hamburger-icon span:nth-child(2) {
  opacity: 0;
}
#hamburger-toggle:checked + .hamburger-icon span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* オーバーレイ背景 */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: 0.4s;
  /*z-index: 1;*/
  z-index: 1500;
}

#hamburger-toggle:checked ~ .overlay {
  opacity: 1;
  pointer-events: auto;
}

/* メニュー本体（右から出す） */
.hamburger {
	position: fixed;
  display: flex;
	top: 0;
	right: -340px;
  width: 340px;
	height: 100vh;
	flex-direction: column;
	align-items: flex-end;
	gap: 16px;
	background: var(--white, #FFF);

	box-shadow: 2px 0 8px rgba(0,0,0,0.2);
  	transition: right 0.4s ease;
  	/*z-index: 2;*/
    z-index: 1600;
}

#hamburger-toggle:checked ~ .hamburger {
  right: 0; /* ← 開いたときは右0へ */
}

.hamburger ul {
  list-style: none;
  padding: 60px 20px;
}

.hamburger li {
  margin: 20px 0;
}

.hamburger a {
  text-decoration: none;
  color: #333;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.hamburger a:hover {
  color: #007bff;
}

.hamburger_header{
	display: flex;
	width: 60px;
	height: 60px;
	justify-content: center;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	aspect-ratio: 1/1;
}

.hamburger_block {
	display: flex;
	padding: 0 24px 40px 24px;
	flex-direction: column;
	align-items: flex-start;
	gap: 32px;
	align-self: stretch;
}

.hamburger_title {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	align-self: stretch;

}

.hamburger_title_button {
	display: flex;
	padding: 16px 48px 16px 16px;
	justify-content: center;
	align-items: center;
	gap: 8px;
	align-self: stretch;
	background: var(--ryukoku-red, #F50000);
}

.hamburger_title_button svg {
	width: 24px;
	height: 24px;
}

.hamburger_title_button_label {
	color: var(--white, #FFF);
	text-align: center;

	/* button */
	font-family: "Noto Sans CJK JP";
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: 120%; /* 19.2px */
	flex: 1 0 0;
}

.hamburger_menu_block {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	align-self: stretch;
}

.hamburger_menu_list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-self: stretch;
}

.hamburger_menu_line {
	display: flex;
	height: 60px;
	padding: 24px 8px 24px 24px;
	align-items: center;
	gap: 8px;
	align-self: stretch;

	border-top: 1px solid var(--gray-blue-gray-3, #CBD5DC);
	border-bottom: 1px solid var(--gray-blue-gray-3, #CBD5DC);
	background: var(--white, #FFF);
	box-sizing: border-box;
	margin-bottom: -1px;
}

.hamburger_menu_line_label {
	color: var(--text, #000);
	font-feature-settings: 'pwid' on, 'palt' on;

	/* navi-burger */
	font-family: "Noto Sans CJK JP";
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: 120%; /* 19.2px */
	flex: 1 0 0;
}

.hamburger_menu_line_arrow {
	width: 24px;
	height: 24px;
}

.hamburger_menu_line_arrow svg {
	width: 10px;
	height: 5px;
	stroke-width: 2px;
	stroke: var(--ryukoku-red, #F50000);
}

.hamburger_fixed_menu {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
}

.hamburger_fixed_menu_line {
	color: var(--gray-blue-gray-1, #627A86);
	font-feature-settings: 'pwid' on, 'palt' on;

	/* navi-burger-small */
	font-family: "Noto Sans CJK JP";
	font-size: 14px;
	font-style: normal;
	font-weight: 400;
	line-height: 120%; /* 16.8px */
}

.hamburger_fixed_menu_line a {
	font-size: 14px;
}


/* =====================================================
   Tablet / Smartphone（768px 以下）
   ===================================================== */
@media screen and (max-width: 768px) {

  .hamburger-wrapper {
    position: relative;
    display: block;
  }

  /* ハンバーガーアイコン */
  .hamburger-icon {
    width: 25px;
    height: 25px;
    position: fixed;
    top: 10px;
    right: 10px;
    cursor: pointer;
    z-index: 3;
    display: inline-block;
  }

  .hamburger-icon span {
    display: block;
    height: 2px;
    margin: 8px 0;
    background: #333;
    border-radius: 2px;
    transition: 0.4s;
  }

  /* ハンバーガー → X */
  #hamburger-toggle:checked + .hamburger-icon span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }
  #hamburger-toggle:checked + .hamburger-icon span:nth-child(2) {
    opacity: 0;
  }
  #hamburger-toggle:checked + .hamburger-icon span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  /* オーバーレイ */
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: 0.4s;
    z-index: 1;
    display: block;
  }

  #hamburger-toggle:checked ~ .overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* メニュー本体 */
  .hamburger {
    position: fixed;
    top: 0;
    right: -100%;
    width: 340px;
    max-width: 90%;
    height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;

    background: #FFF;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);

    /* NG: left を指定しているが right で制御している
       transition: left 0.4s ease;
    */
    transition: right 0.4s ease;

    z-index: 2;
  }

  #hamburger-toggle:checked ~ .hamburger {
    right: 0;
  }

  .hamburger ul {
    list-style: none;
    padding: 60px 20px;
  }

  .hamburger li {
    margin: 20px 0;
  }

  .hamburger a {
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
  }

  .hamburger_header {
    display: flex;
    width: 60px;
    height: 60px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
  }

  .hamburger_block {
    display: flex;
    padding: 0 24px 40px;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    box-sizing: border-box;
  }

  .hamburger_title {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hamburger_title_button {
    display: flex;
    padding: 16px 48px 16px 16px;
    align-items: center;
    gap: 8px;
    background: #F50000;
  }

  .hamburger_title_button_label {
    color: #FFF;
    font-size: 16px;
    font-weight: 700;
    line-height: 120%;
    flex: 1;
  }

  .hamburger_menu_block,
  .hamburger_menu_list {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .hamburger_menu_line {
    display: flex;
    height: 60px;
    padding: 24px 8px 24px 24px;
    align-items: center;
    gap: 8px;

    border-top: 1px solid #CBD5DC;
    border-bottom: 1px solid #CBD5DC;
    background: #FFF;
    box-sizing: border-box;
    margin-bottom: -1px;
  }

  .hamburger_menu_line_label {
    font-size: 16px;
    font-weight: 700;
    flex: 1;
  }

  .hamburger_fixed_menu {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .hamburger_fixed_menu_line,
  .hamburger_fixed_menu_line a {
    font-size: 14px;
    color: #627A86;
  }
}


