body {
    background-image: url("../imgs/bgimg/031a.jpg"); /* 相対パスを修正 */
    background-size: cover;
    background-repeat: no-repeat;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ヘッダー */
header {
    background-color: #f8f8f8;
    padding: 20px 0;
}

header .container {
    max-width: 1200px;
}

header .row {
    align-items: center;
}

header .navbar {
    justify-content: flex-end;
}

header .navbar-nav {
    display: flex;
}

header .navbar-nav .nav-item {
    margin-left: 20px;
}

header .navbar-nav .nav-link {
    color: #333;
    transition: color 0.3s ease;
}

header .navbar-nav .nav-link:hover {
    color: #007bff;
}

header img {
    max-width: 100%; /* 横幅100%に設定 */
    height: auto; /* 高さを自動調整 */
    transition: transform 0.3s ease;
}

header img:hover {
    transform: scale(1.1);
}

header p {
    margin-top: 10px;
    text-align: center;
}

.header-line {
    border-top: 3px solid #ccc;
    margin: 20px 0;
}

/* メインメニュー */
.main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.main-menu ul {
    display: flex;
    padding: 10px;
    background-color: #f0f0f0;
    justify-content: flex-end;
    border-bottom: 2px solid #ccc;
}

.main-menu li {
    margin-left: 20px;
    border-right: 1px solid #ccc;
    padding-right: 20px;
}

.main-menu li:last-child {
    border-right: none;
}

.main-menu a {
    color: #333;
    font-size: 18px;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-menu a:hover {
    background-color: #ddd;
    color: #007bff;
}

/* サブメニュー */
.sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    /*justify-content: flex-end;*/
    /*position: relative;*/
    top: -20px;
}

.sub-menu li {
    margin-left: 10px; /*ここでサブメニューの間隔を調整*/
}

.sub-menu a {
    color: #fff;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sub-menu a:hover {
    background-color: rgba(0, 0, 0, 0.7);
    color: #007bff;
}

/* メインコンテンツ */
main {
    padding: 20px;
    flex: 1;
}

section {
    padding: 50px 0;
    text-align: center;
}

.container {
    max-width: 960px;
}

.section-table {
    width: 65%;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.6);
}

.section-table td {
    padding: 30px;
}

.section-line {
    border-top: 2px solid #fff;
    width: 65%;
    margin: 20px auto;
}

.section-table p {
    font-weight: normal;
}



.target-cell {
  /* background-color: #06C; 背景色をライトグレーに設定 */
  color: #FFFFFF;
  font-size: 24px;
  padding: 5px 10px 5px 25px;
  text-align:left;
}



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

/* ロゴアニメーション */
.logo-animation {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.logo-animation:hover {
    transform: scale(1.1);
}


/*化学物質管理試験 start*/
.business-overview {
  text-align: center;
  margin: 20px auto; /* 上下の余白を狭める */
  padding: 15px; /* 内側の余白を少し狭める */
  background-color: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.business-overview:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.business-overview img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
/*化学物質管理試験 end*/

/*画像試験科目のサンプル start*/
.example-subjects {
  text-align: center; /* 画像を中央揃え */
  margin: 20px auto; /* 上下に余白、左右中央揃え */
}

.example-subjects img {
  max-width: 100%; /* 画像の最大幅を100%に設定 */
  height: auto; /* 画像の高さの自動調整 */
  border-radius: 8px; /* 画像の角を丸くする */
  transition: transform 0.3s ease; /* アニメーション効果 */
}

.example-subjects img:hover {
  transform: scale(1.1); /* ホバー時に画像を1.1倍に拡大 */
}
/*画像試験科目のサンプル end*/

/*<p class="safe-info-subtitle> start*/
.safe-info-subtitle {
  text-align: center;
  margin: 30px auto;
  padding: 15px 20px;
  background-color: #e0f7fa; /* 薄い青色の背景 */
  border-radius: 25px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: #0277bd; /* 青色のテキスト */
  font-weight: bold;
  font-size: 1.2em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block; /* 幅をテキストに合わせて調整 */
}

.safe-info-subtitle:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  background-color: #b2ebf2; /* ホバー時に少し濃い青色の背景 */
}
/*<p class="safe-info-subtitle> end*/

/*業務支援 start*/
.service-support-list {
  margin: 30px auto;
  padding: 20px;
  background-color: #e8f5e9; /* 薄い緑色の背景 */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  font-size: 1.1em;
  line-height: 1.8;
  text-align: left;
  max-width: 600px;
  color: #388e3c; /* 緑色のテキスト */
}
/*業務支援 end*/

/*専門技術分野 start*/
.chemical-management-title {
  text-align: center;
  font-size: 1.8em;
  font-weight: bold;
  color: #2e7d32; /* 緑系の色 */
  margin: 30px auto 20px auto;
  padding: 15px 20px;
  background-color: #e8f5e9; /* 薄い緑色の背景 */
  border-radius: 25px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
}

.chemical-management-title:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  background-color: #c8e6c9; /* ホバー時に少し濃い緑色の背景 */
}

.chemical-management-description {
  margin: 20px auto 30px auto;
  padding: 20px;
  background-color: #f0f8ff; /* 薄い青色の背景 */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  font-size: 1.1em;
  line-height: 1.8;
  text-align: justify;
  max-width: 800px;
  color: #333;
}
/*専門技術分野 end*/

/*具体的活動 start*/
.activity-example-list {
  margin: 20px auto;
  padding: 15px;
  background-color: #f0f0f0;
  border-radius: 5px;
  font-size: 1em;
  line-height: 1.6;
  text-align: left;
  max-width: 600px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* シャドウ効果を追加 */
}
/*具体的活動 start*/

/*化学物質管理試験 start*/
.required-conditions {
  margin: 30px auto;
  padding: 20px;
  background-color: #f0f8ff; /* 薄い青色の背景 */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  font-size: 1.1em;
  line-height: 1.8;
  text-align: left;
  max-width: 600px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.required-conditions:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  background-color: #e1f5fe; /* ホバー時に少し濃い青色の背景 */
}

.required-conditions br:first-child {
  font-weight: bold; /* 「必要条件」を太字にする */
  font-size: 1.2em;
}
/*化学物質管理試験 end*/



/* Media Queries */
@media (max-width: 767px) { /* 767px以下の場合 */
    .container {
        max-width: 100%;
    }

    .section-table {
        width: 100%;
    }

    /* メニューを横並びにする */
    .main-menu { /* 追加 */
        padding: 8px 0; /* 上下のパディングを小さくする */
    }

.main-menu ul {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 350px; /* 例：500px に設定 */
}

    .main-menu li {
        margin: 0 2px;
        border-right: none;
        padding-right: 0;
		width: 20%; 
    }

    .main-menu a {
        font-size: 13px;
		padding: 8px 12px; /* パディングを調整 */
    }
	
	.main-menu li a {
        padding: 8px 16px; /* 例：上下8px、左右16pxに設定 */
    }
	
	    .main-menu li a i { /* 追加 */
       display: none;  /* display: none; */
    }
	
	

    .sub-menu {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
       /* position: relative;*/
        /*top: 20px;*/
		margin-top: 10px; /* 追加 */
		margin-bottom: 20px; /* サブメニューの下に余白を追加 */
    }
	
	    .sub-menu ul {
        display: flex; /* Flexboxレイアウトを適用 */
        flex-wrap: wrap; /* 必要に応じて改行を許可 */
        justify-content: left; /* 要素を中央寄せにする */
        gap: 10px; /* 要素間の間隔を10pxに設定 */
		    }

    .sub-menu li {
        margin: 0 5px; /* 項目間のマージンを設定 */
    }

	.sub-menu a {
		padding: 3px 5px;
		font-size: 11px;
    }
	
	  /* テーブルの余白調整 */
  #works .table {
    margin-top: 20px; /* テーブルの上に余白を追加 */
  }
 
 
 /*携帯用　化学物質管理試験 start*/
  .business-overview {
    margin: 10px auto; /* 携帯用サイトでは余白をさらに狭める */
    padding: 10px;
  }
/*携帯用　化学物質管理試験 end*/ 
 
  
/*携帯用画像試験科目のサンプル start*/
  .example-subjects {
    margin: 10px auto; /* 携帯用サイトでは余白を調整 */
  }
/*携帯用画像試験科目のサンプル start*/

/*携帯用<p class="safe-info-subtitle> start*/
  .safe-info-subtitle {
    margin: 20px auto;
    padding: 10px 15px;
    font-size: 1em;
  }
/*携帯用<p class="safe-info-subtitle> end*/ 


/*業務支援 start*/
  .service-support-list {
    margin: 20px auto;
    padding: 15px;
    font-size: 1em;
    line-height: 1.6;
  }
/*業務支援 end*/

/*携帯用　専門技術分野 start*/
  .chemical-management-title {
    font-size: 1.5em;
    padding: 10px 15px;
    margin: 20px auto 10px auto;
  }

  .chemical-management-description {
    font-size: 1em;
    line-height: 1.6;
    padding: 15px;
    margin: 10px auto 20px auto;
  }
  
  .activity-example-title-simple {
    font-size: 1em;
    padding: 8px 12px;
    margin: 15px auto;
  }
/*携帯用　専門技術分野 end*/

/*携帯用　具体的活動 start*/
  .activity-example-list {
    font-size: 0.9em;
    line-height: 1.4;
    padding: 12px;
  }
/*携帯用　具体的活動 start*/

/*携帯用　化学物質管理試験 start*/
  .required-conditions {
    margin: 20px auto;
    padding: 15px;
    font-size: 1em;
    line-height: 1.6;
  }
/*携帯用　化学物質管理試験 end*/
  
}

/* 768px以上の場合 */
@media (min-width: 768px) {
    .main-menu ul {
        justify-content: flex-end; /* PCでは右寄せ */
    }
}


/* Works ページ用スタイル */
.works-title {
    text-align: left;
    font-weight: bold;
    margin-left: 50px;
}


/* tableのスタイル */
.section-table {
    display: grid; /* gridレイアウトを使用 */
    grid-template-columns: 1fr; /* 1列 */
}

.section-table tr {
    display: contents; /* tr要素をgridアイテムにしない */
}

.section-table td:first-child {
    background-color: navy; /* 背景色を紺色に */
    color: white; /* 文字色を白に */
    padding: 10px; /* パディングを追加 */
    text-align: left; /* 文字を左寄せに */
    font-weight: bold; /* 文字を太字に */
    font-size: 1.2em; /* 文字サイズを少し大きく */
    padding-left: 20px; /* 左側に余白を追加 */
}

.section-table td:not(:first-child) {
    padding: 20px; /* 他のセルにパディングを追加 */
}