* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
  --vw-base: 390;
}

/* sidemenu */
.side_menu {
    display: none;
}
/* ToDo スマホの画面に対応させたい */


/* ヘッダーのスタイル*/
header {
    width: 100%;
    height: 18vh;
}

header .header_menu {
    position: fixed;
    width: 94%;
    height: 8%;
    top: 5%;
    left: 3%;
    border-radius: 10px;
    z-index: 10;
    display: flex;
    flex-direction: Row;
    justify-content: space-between;
    padding: 5px 2% 5px 2%;
    background-color: white;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1)
}

.logo {
    display:flex;
    height: 100%;
    flex-direction: Row;
    align-items: center;
}
.logo_img{
    height: 100%;
}

.logo_img img {
    height: 100%;
    padding: 0 3px 0 0;
}
.logo_text a{
    text-decoration: none;
    color: black;
}

.nav_menu {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav_menu ul {
    display: flex;
    list-style: none;
}

.nav_menu li {
    position: relative;
}

.sub_menu {
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 18% 0 0 0;
    transition: opacity 0.3s ease
}

.sub_menu_ul {
    border-radius: 5%;
    background-color: white;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    width: 14vw;
    flex-direction: column;
    padding: 5% 3%;
}

.nav_menu a {
    padding: 0 10px;
    text-decoration: none;
    color: black;
    transition: color 0.3s;
}
.nav_menu a:hover {
    color: gray;
}
.nav_menu .has_sub_menu:hover .sub_menu {
    opacity: 1;
}

/* メニューボタン（PC版では非表示） */
.menu-button {
    display: none;
}

/* ヘッダーの背景画像 */
.header_img {
    display: flex;
    height: 100%;
    width: 100%;
    background-image: url("../images/image7.jpeg");
    background-size: cover;
    background-position: center;
}



/* mainセクションのスタイル */
.main_section {
    padding: 10%;
    display: flex;/* 子要素を柔軟に並べるモード */
    flex-direction: column; /* 縦方向に並べる */
    justify-items: center;
    font-family: 'Noto Serif', serif;
}

/* タブの設定
.tab-1 {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.tab1_label{
    height: 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0 3% 0;
}

.tab-1 > label {
    flex: 1 1;
    order: -1;
    min-width: 70px;
    padding: .7em 1em .5em;
    color: #555555;
    font-size: .9em;
    text-align: center;
    cursor: pointer;
    opacity: .5;
}

.tab-1 > label:hover {
    opacity: .9;
    color: #000000;
}

.tab-1 input {
    display: none;
}

.tab-1 > div {
    display: none;
    width: 100%;
    padding: 1.5em 1em;
    background-color: #fff;
}

.tab-1 > label:has(:checked) {
    color: #000000;
    font-size: 1.3em;
    font-weight: bold;
    text-decoration: underline;
    opacity: 1;
}

.tab-1 label:has(:checked) + div {
    display: block;
}
*/
/* タブの設定2 */
.tab-1 {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding: 0 0 5% 0;
}

.tab-1 > label {
    flex: 1 1;
    order: -1;
    min-width: 70px;
    padding: .7em 1em .5em;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
    background-color: #e9f0f6;
    color: #535353;
    font-size: .9em;
    text-align: center;
    cursor: pointer;
}

.tab-1 > label:hover {
    opacity: .8;
}

.tab-1 input {
    display: none;
}

.tab-1 > div {
    display: none;
    width: 100%;
    padding: 1.5em 1em;
    background-color: #fff;
}

.tab-1 > label:has(:checked) {
    background-color: #fff;
    border-color: #222222 #f0f0f0 #fff;
    border-style: solid;
    border-width: 4px 1px 1px;
    border-radius: 5px;
    color: #333333;
}

.tab-1 label:has(:checked) + div {
    display: block;
}


/* ラジオボタン */
.radio-2 {
    display: flex;
    flex-wrap: wrap;
    gap: .3em 2em;
    border: none;
}

.radio-2 div {
    width: 100%;
}

.radio-2 fieldset {
    width: 100%;
    justify-content: center;
}

.radio-2 label {
    display: flex;
    align-items: center;
    gap: 0 .5em;
    position: relative;
    cursor: pointer;
}

/* 元のcontentsスタイルはモバイル最適化セクションに統合 */

#content-1, #content-2, #content-3, #content-4, #content-5 {
    display: none; /* 初期状態は見えない状態にしておく */
}

#radio-button1:checked ~ #content-1,
#radio-button2:checked ~ #content-2,
#radio-button3:checked ~ #content-3,
#radio-button4:checked ~ #content-4,
#radio-button5:checked ~ #content-5 {
    display: block;
}


.radio-2 label::before,
.radio-2 label::after {
    border-radius: 3px;
    content: '';
}

.radio-2 label::before {
    width: 18px;
    height: 18px;
    background-color: #e6edf3;
}


#radio-button1:checked + label::after,
#radio-button2:checked + label::after,
#radio-button3:checked + label::after,
#radio-button4:checked + label::after,
#radio-button5:checked + label::after {
    position: absolute;
    top: 50%;
    left: 9px;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: #333333;
    box-shadow: 0 0 0 1px transparent;
}

.radio-2 input {
    display: none;
}

/* 表のデザイン */
.design02 {
 width: 100%;
 text-align: center;
 border-collapse: collapse;
 border-spacing: 0;
 border: solid 2px #778ca3;
}
.design02 td {
 border: dashed 1px #778ca3;
}
.design02 th {
 padding: 10px;
 background: #e9faf9;
 border: dashed 1px #778ca3;
 border-bottom: solid 1px #778ca3;
}
.design02 td {
 padding: 10px;
}

.design03 {
 width: 100%;
 border-collapse: collapse;
 border-spacing: 0;
 border: solid 2px #778ca3;
}
.design03 td {
 text-align: left;
 border: dashed 1px #778ca3;
}
.design03 th {
 text-align: center;
 padding: 10px;
 background: #e9faf9;
 border: dashed 1px #778ca3;
 border-right: solid 1px #778ca3;
}
.design03 td {
 padding: 10px;
}

.heading-3 {
    padding:0 .4em .2em;
    border-bottom: 3px dotted #000000;
    background-color: #ffffff;
    color: #333333;
}

table.design04 {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-family: 'Segoe UI', sans-serif;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

table.design04 th,
table.design04 td {
  padding: 1rem;
  text-align: left;
  border: 1px solid #ddd;
}

table.design04 th {
  background-color: #333333;
  color: white;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1;
}


.design05 {
 width: 100%;
 border-collapse: collapse;
 border-spacing: 0;
 border: solid 2px #778ca3;
}
.design05 td {
 text-align: left;
 border: dashed 1px #778ca3;
}
.design05 th {
 text-align: center;
 padding: 10px;
 background: #333333;
 border: dashed 1px #778ca3;
 border-right: solid 1px #778ca3;
 color: white;
}
.design03 td {
 padding: 10px;
}

.heading-3 {
    padding:0 .4em .2em;
    border-bottom: 3px dotted #000000;
    background-color: #ffffff;
    color: #333333;
}

.contents p {
    padding: 15px 0 0 0;
}


/* お問い合わせボタン */
#contact_container {
    align-items: center;/* 子要素を中央ぞろえ */
    flex-direction: column;
    display: flex;
    width: 100%;
}

a.btn-border {
  -webkit-box-sizing: inherit;
  box-sizing: inherit;

  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.5;
  position: relative;
  display: inline-block;
  padding: 1rem 4rem;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
  text-align: center;
  vertical-align: middle;
  text-decoration: none;
  letter-spacing: 0.1em;
  color: #212529;

  border-radius: 0;

  width: 45%;
}

a.btn-border:before,
a.btn-border:after {
  -webkit-box-sizing: inherit;
  box-sizing: inherit;

  position: absolute;

  width: 100%;
  height: 2px;

  content: '';
  -webkit-transition: all .3s;
  transition: all .3s;

  background: #000;
}

a.btn-border:before {
  top: 0;
  left: 0;
}

a.btn-border:after {
  right: 0;
  bottom: 0;
}

a.btn-border:hover:before,
a.btn-border:hover:after {
  width: 0;
}


/* フッターのスタイル */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    text-align: center;
}

footer .container {
    width: 80%;
    margin: 0 auto;
}

footer address {
    font-size: 14px;
    margin-top: 10px;
}

/* アニメーションの定義 */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* スクロールして表示された時にアニメーションを適用 */
.fade-in-text-title.visible span {
  opacity: 1;
}


/* スマホ向けスタイル */
@media screen and (max-width: 768px) {
  body {
    font-size: 14px;
  }

/* メニュー表示 */
header .nav_menu{
    display: none;
}
/* モバイル用ヘッダーメニューのスタイル */
header .header_menu_phone {
    display: block; /* 将来の拡張用に保留 */
}
.menu-button {
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  row-gap: 1vh;
  width: 6vh;
  height: 6vh;
  background-color: #ffffff;
  border: 0px;
}

.menu-button__line,
.menu-button::before,
.menu-button::after {
  content: "";
  width: 60%;
  height: 2px;
  background-color: #000000;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-button.is-opened .menu-button__line {
  opacity: 0;
}

.menu-button.is-opened::before {
  transform: translateY(1.4vh) rotate(45deg);
}

.menu-button.is-opened::after {
  transform: translateY(-1.4vh) rotate(-45deg);
}

.side_menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    right: 0;
    z-index: 5;
    width: 100%;
    height: 100vh;
    font-family: 'Montserrat', sans-serif;
    background-color: #555555;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100vh);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    color: #ffffff;
}
.side_menu.is-opened {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.side_menu h2 {
  text-align: center;
  padding: 10% 0 15% 0;
}

.side_menu ul {
  list-style: none;
  width: 90%;
  text-align: center;
}

.side_menu li {
    border-bottom: 1px solid #ffffff;
    padding: 5% 0 ;
    display: flex;
    flex-direction: row;
    width: 100%;
}

.side_menu a {
  text-decoration: none;
  text-align: left;
  color: #ffffff;
  padding: 0 5%;
  width: 100%;
  height: 100%;
}
.space {
    display: inline-block;
    width: 1em;
}
div .space{
    height: 20%;
}

.submenuItems {
  display: none;
  background: #C8E6C9;
  li {
    border-bottom: 1px solid #B6B6B6;
  }
}

.submenuItems a {
  display: block;
  color: #727272;
  padding: 12px 12px 12px 45px;
  transition: all 0.4s ease-out;
  &:hover {
    background-color: #CDDC39;
    color: #fff;
  }
}

/* ==================== モバイル最適化：タブナビゲーション ==================== */

/* mainセクション */
.main_section {
    padding: 5% 3%;
    overflow-x: hidden; /* 横スクロールの影響を防止 */
    max-width: 100vw;
    box-sizing: border-box; /* パディングを含む幅計算 */
}

/* タブラベルのモバイル最適化 */
.tab-1 > label {
    flex: 1;
    width: 25%;
    margin-bottom: 2%;
    padding: 1vw 2vw;
    font-size: clamp(5px, 3vw, 15px);
    font-weight: bold;
    transition: all 0.3s ease;
}

.tab-1 > label:has(:checked) {
    transform: translateY(-2px);
}

/* ==================== モバイル最適化：ラジオボタンナビゲーション ==================== */

/* ラジオボタンのモバイル最適化 */
.radio-2 {
    gap: 3vw 0;
    margin-bottom: 5vw;
    max-width: 100vw;
}

.radio-2 label {
    padding: 3.5vw 4vw;
    font-size: clamp(5px, 3vw, 15px);
    font-weight: 600;
    height: 6vw;
    border-radius: 25px;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    border: 2px solid #dadce0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.radio-2 label::before {
    width: 0;
    height: 0;
    background-color: transparent;
}

.radio-2 label::after {
    display: none;
}

#radio-button1:checked + label,
#radio-button2:checked + label,
#radio-button3:checked + label,
#radio-button4:checked + label,
#radio-button5:checked + label {
    background: linear-gradient(135deg, #000 0%, #222222 100%);
    color: white;
    border-color: #000;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
}

/* ==================== モバイル最適化：テーブルスクロール領域の独立化 ==================== */

/* コンテンツコンテナの設定 */
.contents {
    width: 100vw; /* ビューポート幅に固定 */
    max-width: 100vw;
    margin: 0 calc(-50vw + 50%); /* コンテナからはみ出してフル幅に */
    padding: 0 3vw 0 3vw; /* 右側パディングを除去 */
    box-sizing: border-box;
}

/* テーブルラッパー（新規作成） */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* iOS用滑らかスクロール */
    width: calc(100% - 6vw); /* 左パディング分を差し引く */
    margin: 2vw 0 2vw 0; /* 右マージンで調整 */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* テーブルの基本設定 */
table {
    border-collapse: collapse;
    min-width: 600px; /* 最小幅を維持 */
    width: auto; /* 幅を自動調整 */
    margin: 0; /* 余白をリセット */
}

/* ==================== モバイル最適化：vw単位の適切な制限 ==================== */

/* コンテンツエリアのフォントサイズ調整 */
.contents h2.heading-3 {
    font-size: clamp(16px, 4vw, 24px);
}

.contents h3 {
    font-size: clamp(14px, 3.5vw, 20px);
}

.contents p {
    font-size: clamp(12px, 3vw, 16px);
}

/* お問い合わせボタン */
a.btn-border {
    width: 60%;
    max-width: 400px; /* 最大幅を制限 */
    padding: 3vw 5%;
    font-size: clamp(14px, 3.5vw, 18px); /* サイズを調整 */
    margin: 4vw auto;
}

/* ==================== レスポンシブデザインの追加改善 ==================== */

/* 超小画面用の追加調整 */
@media screen and (max-width: 480px) {
    .tab-1 > label {
        font-size: clamp(10px, 3vw, 12px);
        padding: 2vw 1vw;
    }
    
    .radio-2 label {
        font-size: clamp(12px, 3.2vw, 14px);
        padding: 2vw 2.5vw;
        max-width: 45vw;
    }
    
    .contents {
        padding: 1vw 0; /* 左右パディングを削除 */
    }
}

}