@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    url('../fonts/NotoSansJP-Regular.woff') format('woff2'),
    url('../fonts/NotoSansJP-Regular.woff2') format('woff');
}

@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src:
    url('../fonts/NotoSansJP-Bold.woff2') format('woff2'),
    url('../fonts/NotoSansJP-Bold.woff') format('woff');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    url('../fonts/Roboto-Regular.woff2') format('woff2'),
    url('../fonts/Roboto-Regular.woff2') format('woff');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src:
    url('../fonts/Roboto-Bold.woff2') format('woff2'),
    url('../fonts/Roboto-Bold.woff2') format('woff');
}

/* デフォルトのフォント設定 */
:root {
  --primary-font: 'Roboto', sans-serif; /* 初期値、テンプレートで上書き */
}

/*
#####################################################################  
 common
#####################################################################
*/
html {
  height: 100%;
}

:lang(ja) body {
  font-family: 'Noto Sans JP';
}
:lang(en) body {
  font-family: 'Roboto';
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--primary-font);
}
.flash-message {
  background-color: #000000;
  color: white;
  padding: 12px;
  text-align: center;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 999;
  font-size: 1.1em;
}
h2 {
  border-left: solid 6px navy;
  padding-left: 10px;
}
i {
  margin-right: 5px;
}
a.profile-img-header {
  text-decoration: none;
}

.msg-info {
  color: #4a6c8a;
  padding: 10px;
}
.msg-notice {
  color: blue;
  padding: 10px;
}
.msg-warn {
  color: blue;
  font-weight: bold;
  padding: 10px;
}
.h2-img {
  width: 620px;
  max-width: 920px;
}

/* definition list table */
.myForm,
#myForm {
  margin-bottom: 20px;
}
.def {
  width: 100%;
  margin-bottom: 20px;
  border-collapse: collapse;
}
.def th {
  width: 25%;
  border: 1px solid #ccc;
  padding: 0.5rem;
  background-color: #eee;
}
.def td {
  width: 75%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  text-align: center;
}
.def td input[type='text'],
input[type='email'],
input[type='number'],
input[type='password'],
select,
textarea {
  background: #f8f8f8;
  display: block;
  font-size: 16px;
  padding: 12px 15px;
  width: 90%;
  transition: 0.8s;
  border-radius: 0;
}
.def td input[type='text'],
input[type='number']:focus,
textarea:focus {
  background: #e9f5fb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
form button {
  display: inline-block;
  padding: 10px 10px;
  font-size: 1em;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
form button:hover {
  background-color: #0056b3;
}

/*
#####################################################################  
 header
#####################################################################
*/
.site-header {
  background: #fff;
  border-bottom: 1px solid #ccc;
  padding: 10px 15px;
}

.header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  text-align: center;
}
.logo {
  width: 100%;
  text-align: center;
}
.logo a {
  font-weight: bold;
  font-size: 1.8rem;
  color: #333;
  text-decoration: none;
}
.logo img {
  width: 100%; /* 画面幅に応じてスケール */
  height: auto; /* アスペクト比を維持 */
  display: block; /* 余白防止 */
}

ul.main-nav,
ul.sub-nav {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

ul.main-nav li,
ul.sub-nav li {
  margin-right: 20px;
  font-size: 0.9em;
}

ul.main-nav a,
ul.sub-nav a {
  display: block;
  text-align: center;
  min-width: 120px;
  padding: 5px;
  text-decoration: none;
  color: #007bff;
  transition:
    color 0.3s,
    background-color 0.3s;
}
ul.main-nav a:hover,
ul.sub-nav a:hover {
  color: #fff;
  background-color: #007bff;
  border-radius: 4px;
}
ul.sub-nav {
  font-size: 1em;
  opacity: 0.8;
  border-top: 1px solid #eee;
  padding-top: 5px;
}
/* 言語切替 */
div.header-langs {
  text-align: right;
}
div.header-langs a {
  text-decoration: none;
  color: blue;
}
div.header-langs a.active {
  font-weight: bold;
  color: #28a745;
  text-decoration: underline;
}
/* ハンバーガーメニュー（PCでは非表示） */
.hamburger {
  display: none; /* PCでは非表示 */
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background: #333;
}

/* オーバーレイ初期状態は非表示 */
.nav-overlay {
  display: none;
  position: fixed;
  z-index: 998;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

/* メニュー表示時にオーバーレイも表示 */
.nav-overlay.active {
  display: block;
}

/* メニューを一番上に */
#mobile-nav {
  z-index: 9999;
  position: relative;
  transition: top 0.3s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
#mobile-nav.active {
  top: 0;
}
/*
#####################################################################  
 content
#####################################################################
*/
.content {
  width: 760px;
}
.content .section {
}
.content .section .part {
  margin-bottom: 10px;
}
.content .section .part h3 {
  border-left: solid 5px blue;
  padding-left: 10px;
}
.content .section .part img {
  max-width: 50%;
  height: auto;
}
.content .section .description {
  line-height: 1em;
}
.md-body {
  font-size: 1em;
}

/*
#####################################################################  
 footer
#####################################################################
*/
footer.footer {
  width: 100%;
  margin-top: auto;
  background-color: lightgrey;
  padding: 10px;
  align-self: stretch;
  max-width: none;
}

/* スマートフォン向け（縦向き） */
@media screen and (max-width: 767px) {
  /* #####################################################################  
     header
  ##################################################################### */
  .site-header {
    width: 100%;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hamburger {
    display: flex;
    z-index: 999;
  }

  #mobile-nav {
    display: none;
  }

  #mobile-nav.active {
    display: block;
  }
  ul.main-nav,
  ul.sub-nav {
    flex-direction: column;
    padding: 10px;
    background-color: white;
  }

  ul.main-nav li,
  ul.sub-nav li {
    margin: 10px 0;
  }

  /* #####################################################################  
     common
  ##################################################################### */
  .content .section img {
    width: 100%; /* モバイルで全幅 */
    margin-bottom: 10px; /* ロゴとの間隔 */
  }

  .def {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: none;
  }
  .def th,
  .def td {
    display: block;
    width: 100%;
    border: none;
    box-sizing: border-box;
  }
  .def td input[type='text'],
  input[type='number'],
  textarea {
    background: #f8f8f8;
    display: block;
    font-size: 16px;
    padding: 12px 15px;
    width: 90%;
    transition: 0.8s;
    border-radius: 0;
  }
  .def td input[type='text'],
  input[type='number']:focus,
  textarea:focus {
    background: #e9f5fb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .content {
    width: 100%;
  }

  .content .section .part img {
    max-width: 100%;
    height: auto;
  }
}
