/* 基本スタイル */
body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    margin: 0;
}

body.no-scroll {
    overflow: hidden;
}

a {
    color: #004A7F;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid #004A7F;
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 30px;
}
.clear {
	clear:both;
}

/* ヘッダー */
.header {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100; /* 元に戻す */
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
}
.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}
.logo:hover { text-decoration: none; }
.resizeimage img{
	max-width: 100%;
	height: auto;
}
/* ハンバーガーメニューボタン (開く専用) */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: none; /* PCでは非表示 */
    z-index: 101;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.3s;
}

/* Sub Navigation */
.global-nav {
    background-color: #000;
}
.sub-nav {
    background-color: #555;
}
.sub-nav, .global-nav {
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.global-nav {
    padding-top: 0.5rem;
}
.sub-nav {
    padding-top: 0.2rem;
    padding-bottom: 0.1rem;
    border-bottom: 1px solid #CCC;
}
.sub-nav ul, .global-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    width: 100%;
}
.sub-nav li, .global-nav li {
    margin: 0;
    position: relative;
    flex-grow: 1;
    text-align: center;
    display: flex;
}
.sub-nav a, .global-nav a {
    text-decoration: none;
    color: #ccc;
    font-size: 0.9rem;
    display: block;
    padding: 8px 5px;
    line-height: 1.4;
    width: 100%;
}
.sub-nav a:hover, .global-nav a:hover {
    text-decoration: underline;
}

.global-nav li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 100%;
    width: 1px;
    background-color: #555; /*ナビの縦線の色*/
}
.sub-nav li:not(:last-child)::after{
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    height: 80%;
    width: 1px;
    background-color: #777; /*ナビの縦線の色*/
}
/**.sub-nav li:not(:last-child)::after, 
.global-nav li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    height: 80%;
    width: 1px;
}**/

/* メインコンテンツとサイドバー */
.main-content {
    flex: 3;
}
.sidebar {
    flex: 1;
}

.side-nav h3 {
    font-size: 1.2rem;
    margin-top: 0;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav li a {
    display: block;
    padding: 8px 0;
    border-bottom: 1px dotted #ccc;
}
div#head1 li#head1_tab a,
div#head2 li#head2_tab a, 
div#head3 li#head3_tab a, 
div#head4 li#head4_tab a, 
div#head5 li#head5_tab a, 
div#head6 li#head6_tab a, 
div#head7 li#head7_tab a, 
div#head8 li#head8_tab a,
div#head9 li#head9_tab a,
div#head10 li#head10_tab a {
    background-color: #555;
	color: #ffa;
}
div#a1 li#a1_tab a, 
div#a2 li#a2_tab a, 
div#a3 li#a3_tab a, 
div#a4 li#a4_tab a, 
div#a5 li#a5_tab a, 
div#a6 li#a6_tab a, 
div#a7 li#a7_tab a, 
div#a8 li#a8_tab a, 
div#a9 li#a9_tab a, 
div#a10 li#a10_tab a {
	color: #ffa;
}

div#s1 li#s1_tab a, 
div#s2 li#s2_tab a, 
div#s3 li#s3_tab a, 
div#s4 li#s4_tab a, 
div#s5 li#s5_tab a, 
div#s6 li#s6_tab a, 
div#s7 li#s7_tab a, 
div#s8 li#s8_tab a, 
div#s9 li#s9_tab a,
div#s10 li#s10_tab a,
div#s11 li#s11_tab a, 
div#s12 li#s12_tab a, 
div#s13 li#s13_tab a, 
div#s14 li#s14_tab a, 
div#s15 li#s15_tab a, 
div#s16 li#s16_tab a, 
div#s17 li#s17_tab a, 
div#s18 li#s18_tab a, 
div#s19 li#s19_tab a,
div#s20 li#s20_tab a,
div#s21 li#s21_tab a, 
div#s22 li#s22_tab a, 
div#s23 li#s23_tab a, 
div#s24 li#s24_tab a, 
div#s25 li#s25_tab a, 
div#s26 li#s26_tab a, 
div#s27 li#s27_tab a, 
div#s28 li#s28_tab a, 
div#s29 li#s29_tab a,
div#s30 li#s30_tab a,
div#s31 li#s31_tab a {
	background-color: #fdfdfd;
	color: #F40;
	TEXT-DECORATION: none;
}


/* フッター */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: #fff;
    margin-top: 40px;
}

.close-button {
    display: none; /* スマホ表示以外では非表示 */
}
/* 各項目の装飾 */
ul.pagelinks {
	margin:auto
}
ul.pagelinks li {
   width: 30px;
   line-height: 30px;
   list-style-type: none;
   border: 1px solid #ccc;
   float: left;
   margin: 2px;
   padding: 0px;
   font-weight: bold;
   font-size: 15px;
}

/* リンクの装飾 */
ul.pagelinks li a {
   display: block;
   text-decoration: none;
}
/* 未訪問リンクの色 */
ul.pagelinks li a:link {
   background-color: white;
   color: #009;
}
/* 既訪問リンクの色 */
ul.pagelinks li a:visited {
   background-color: white;
   color: #00a;
}
/* マウスが乗ったときの色 */
ul.pagelinks li a:hover {
   background-color: #e6e6e6;
   color: #F60;
}

/* 現在位置項目の装飾 */
ul.pagelinks li.here {
   background-color: #e6e6e6;
   color: #000;
   border-color: #ccc;
}
.pagenavi3 {
	text-align:right; 
	font-size:13px;
	padding: 15px 0 3px 0;
}
.pagenavi3 a { background: url(sign/csg-jqm.png) no-repeat top left; padding:0px 29px; text-decoration:none}
.pagenavi3 a.bt_l{ background-position: 0 0; width: 70px; height: 20px; } 
.pagenavi3 a.bt_r{ background-position: 0 -70px; width: 70px; height: 20px; } 
.pagenavi3 a.bt_u{ background-position: 0 -140px; width: 70px; height: 20px; }
.video { text-align:center}

/* --- レスポンシブ対応 (スマートフォン表示) --- */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 15px;
    }

    .hamburger-menu {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        right: 0; /* 右側に配置 */
        left: auto; /* 左側の配置を解除 */
        width: 80%;
        height: 100%;
        background-color: #f7f7f7; /* ハンバーガーの背景の色 */
        z-index: 1000;
        overflow-y: auto;
        padding: 20px;
        box-sizing: border-box;
        
        transform: translateX(100%); /* 右側画面外に隠す */
        transition: transform 0.3s ease-in-out;
        visibility: hidden;
    }

    .sidebar.active {
        transform: translateX(0);
        visibility: visible;
    }
    
    body.no-scroll::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .side-nav h3,
    .side-nav a {
        color: #333; /* ハンバーガーの文字の色 */
        border-color: #555;
    }

    h2 {
        font-size: 1.3rem;
    }

    /* 閉じるボタンのスタイル */
    .close-button {
        display: block; /* スマホ表示で表示 */
        position: absolute;
        top: 15px;
        right: 20px;
        background: none;
        border: none;
        color: #555;  /* ハンバーガーxボタンの色 */
        font-size: 2.5rem;
        line-height: 1;
        cursor: pointer;
    }
}

/* table.hyo スタイル (PC) */
table.hyo {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table.hyo th, table.hyo td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

table.hyo th {
    background-color: #f2f2f2;
    font-weight: bold;
    width: 25%;
}

table.hyo tr:nth-child(even) {
    background-color: #f9f9f9;
}

.imageboxR { float: right; padding:5px 0px 5px 10px}
.imageboxL { float: left; padding:5px 10px 5px 0px}
.imageboxC { padding:5px 0px; text-align:center;}
.imageboxR img,
.imageboxL img,
.imageboxC img {padding: 2px 0}



/* スマートフォン表示用の調整 (ブロック表示) */
@media (max-width: 768px) {
    /* スクロール関連のスタイルを削除 */
    .column2hosei1 {
        position: static;
        overflow-x: visible;
    }
    .column2hosei1::before,
    .column2hosei1::after {
        display: none;
    }

    /* テーブルのスタイル */
    table.hyo {
        width: 100%;
        box-shadow: none;
        min-width: 0;
    }

    table.hyo tbody,
    table.hyo tr,
    table.hyo th,
    table.hyo td {
        display: block;
        width: 100% !important; /* importantでインラインスタイルを上書き */
        box-sizing: border-box;
    }

    table.hyo thead {
        display: none;
    }

    table.hyo tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    table.hyo tr:last-child {
        margin-bottom: 0;
    }

    table.hyo th {
        background-color: #f2f2f2;
        font-weight: bold;
        text-align: left;
        padding: 10px 15px;
        border: none;
        border-bottom: 1px solid #ddd;
        writing-mode: horizontal-tb; /* 縦書きを解除 */
        white-space: normal; /* 折り返しを許可 */
    }

    table.hyo td {
        text-align: left;
        padding: 12px 15px;
        border: none;
    }

    .imageboxR,
    .imageboxL {
        float: none;
        display: block;
        margin-left: auto;
        margin-right: auto;
        padding: 5px 0;
        text-align: center;
        width: 90%;
    }
    .imageboxR img,
    .imageboxL img,
    .imageboxC img,
    .main-content img {
        max-width: 100%;
        height: auto;
    }
}