@import url("./font.css");

/*デフォルトではライトテーマで定義*/
:root {
  --page-background: #f4f7fc;
  --page-headerFooter-background: white;
  --menu-background: #edf3fb;
  --border-color: black;
  --button-background: #e9f0fb;
  --button-hover: #d8e4fa;
  --text-color: black;
  --text-gray-color: #64748b;
  --url-text-color: #2f4fb6;
  --url-text-hover-color: #1f3da1;
  --theme-switcher-inactive: #506077;
  --theme-switcher-active-text: white;
  --theme-switcher-hover-text: black;
  --theme-switcher-active-background: #5060bc;
  --focus-border-color: #2f5dd8;
  --accordion-title-background: #ebf1ff;
  --accordion-content-background: #dae6ff;
  --accordion-border-color: #5060bc;
  --card-background: white;
  --card-border: rgba(31, 41, 55, 0.12);
  --contact-icon-color-changer: 100%;
  color-scheme: light;
}

/*OSのテーマがダークテーマの場合はダークテーマで設定*/
@media (prefers-color-scheme: dark) {
  :root {
    --page-background: #2c2f33;
    --page-headerFooter-background: #23272a;
    --menu-background: #3e4847;
    --border-color: white;
    --button-background: #30363b;
    --button-hover: #53575a;
    --text-color: white;
    --text-gray-color: #d1d5db;
    --url-text-color: white;
    --url-text-hover-color: #7792f3;
    --theme-switcher-inactive: #cbd5e1;
    --theme-switcher-active-text: white;
    --theme-switcher-hover-text: white;
    --theme-switcher-active-background: #5060bc;
    --focus-border-color: #7792f3;
    --accordion-title-background: #30363b;
    --accordion-content-background: #30409c;
    --accordion-border-color: #5060bc;
    --card-background: #23272a;
    --card-border: rgba(255, 255, 255, 0.2);
    --contact-icon-color-changer: 0%;
    color-scheme: dark;
  }
}

/*テーマの定義（ユーザーがサイト内でライトテーマを選択した場合）*/
html[data-theme="light"] {
  --page-background: #f4f7fc;
  --page-headerFooter-background: white;
  --menu-background: #edf3fb;
  --border-color: black;
  --button-background: #e9f0fb;
  --button-hover: #d8e4fa;
  --text-color: black;
  --text-gray-color: #64748b;
  --url-text-color: #2f4fb6;
  --url-text-hover-color: #1f3da1;
  --theme-switcher-inactive: #506077;
  --theme-switcher-active-text: white;
  --theme-switcher-hover-text: black;
  --theme-switcher-active-background: #5060bc;
  --focus-border-color: #2f5dd8;
  --accordion-title-background: #ebf1ff;
  --accordion-content-background: #dae6ff;
  --accordion-border-color: #5060bc;
  --card-background: white;
  --card-border: rgba(31, 41, 55, 0.12);
  --contact-icon-color-changer: 100%;
  color-scheme: light;
}

/*テーマの定義（ユーザーがサイト内でダークテーマを選択した場合）*/
html[data-theme="dark"] {
  --page-background: #2c2f33;
  --page-headerFooter-background: #23272a;
  --menu-background: #3e4847;
  --border-color: white;
  --button-background: #30363b;
  --button-hover: #53575a;
  --text-color: white;
  --text-gray-color: #d1d5db;
  --url-text-color: white;
  --url-text-hover-color: #7792f3;
  --theme-switcher-inactive: #cbd5e1;
  --theme-switcher-active-text: white;
  --theme-switcher-hover-text: white;
  --theme-switcher-active-background: #5060bc;
  --focus-border-color: #7792f3;
  --accordion-title-background: #30363b;
  --accordion-content-background: #30409c;
  --accordion-border-color: #5060bc;
  --card-background: #23272a;
  --card-border: rgba(255, 255, 255, 0.2);
  --contact-icon-color-changer: 0%;
  color-scheme: dark;
}

/*その他とPC等用*/
html {
  height: 100%;
}

body {
  position: relative;
  background: var(--page-background);
  margin: 0 0;
  padding: 0 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-color);
}

.page-content h1 {
  font-weight: bold;
  font-size: 300%;
  text-align: center;
  margin: 10px 0px;
}

/* メインコンテンツエリアを拡張してフッターを下部に固定 */
.page-content {
  flex: 1;
}

/* 一般的なコンテナに対する対応 */
body>*:not(.footer):not(.navbar) {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  color: var(--text-color);
}

p,
a {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  color: var(--url-text-color);
}

p {
  color: var(--text-color);
}

.no_list_icon {
  list-style: none;
  padding: 0px;
}

.navbar {
  background: var(--page-headerFooter-background);
  padding: 20px 35px;
}

.navbar a {
  transition: 0.25s ease;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 10px;
}

.navbar a:hover {
  color: var(--url-text-hover-color);
}

.navbar a:not(:last-child) {
  margin-right: 12px;
}

.navbar .nav_table {
  display: table;
}

.navbar a.logo {
  display: table-cell;
  padding: 0;
  width: 325px;
}

.navbar a.logo div {
  display: table;
}

.navbar a.logo img {
  margin-right: 10px;
  display: table-cell;
  width: 38px;
}

.navbar a.logo h1 {
  display: table-cell;
  vertical-align: middle;
  font-size: 175%;
  margin: 0px 10px 0px;
}

.navbar .nav_table a.menu-button_short {
  display: table-cell;
  padding: 0;
  width: 79px;
  text-align: center;
  vertical-align: middle;
}

.navbar .nav_table a.menu-button_medium {
  display: table-cell;
  padding: 0;
  width: 130px;
  text-align: center;
  vertical-align: middle;
}

.navbar .nav_table a.menu-button_long {
  display: table-cell;
  padding: 0;
  width: 225px;
  text-align: center;
  vertical-align: middle;
}

.body-text {
  margin: auto 0px;
}

.body-text h2,
.body-text p,
.body-text ol,
.body-text ul {
  width: 75%;
  margin: 30px auto;
}

.menu {
  display: none;
}

.btn {
  text-align: center;
}

.btn a {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--button-background);
  font-size: large;
  text-decoration: none;
  color: var(--text-color);
}

/* 汎用アコーディオン */
.accordionMenu summary {
  display: block;
}

.accordionMenu summary::-webkit-details-marker {
  display: none;
}

.accordionMenu .summary {
  cursor: pointer;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border: 1px solid var(--accordion-border-color);
  border-radius: 10px;
  font-weight: bold;
  color: var(--text-color);
  background-color: var(--accordion-title-background);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.accordionMenu details {
  margin-bottom: 10px;
}

.accordionMenu details[open] .summary {
  border-radius: 0px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.accordionMenu .summary .icon {
  display: block;
  position: relative;
  width: 24px;
  margin-left: 6px;
  flex-shrink: 0;
  transform-origin: center 43%;
  transition: transform 0.4s;
}

.accordionMenu details[open] .summary .icon {
  transform: rotate(180deg);
}

.accordionMenu .summary .icon::before,
.accordionMenu .summary .icon::after {
  content: "";
  position: absolute;
  display: block;
  width: 15px;
  height: 3px;
  background-color: var(--text-color);
}

.accordionMenu .summary .icon::before {
  left: 0;
  transform: rotate(45deg);
}

.accordionMenu .summary .icon::after {
  right: 0;
  transform: rotate(-45deg);
}

.accordionMenu p {
  background-color: var(--accordion-content-background);
  margin-top: 0px;
  padding: 16px 24px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  border: 1px solid var(--accordion-border-color);
  border-top: none;
}

a.button_arrow {
  display: inline-block;
  position: relative;
  padding: 10px 20px 10px 50px;
  background: var(--button-background);
  color: var(--text-color);
  border-radius: 10px;
}

a.button_arrow:hover {
  /* マウスオーバー時のスタイル */
  background: var(--button-hover);
}

a.button_arrow::before {
  /* 矢印の表示設定 */
  content: "";
  position: absolute;
  margin: auto;
  top: 0;
  bottom: 0;
  left: 15px;
  width: 13px;
  height: 13px;
  border-top: 2px solid var(--text-color);
  border-right: 2px solid var(--text-color);
  transform: rotate(45deg);
  animation: slideBlink 1s linear infinite;
  /* アニメーションの初期設定 */
}

@keyframes slideBlink {

  /* アニメーションの内容 */
  from {
    /* アニメーション開始時のスタイル */
    opacity: 0;
    left: 5px;
  }

  to {
    /* アニメーション終了時のスタイル */
    opacity: 1;
    left: 20px;
  }
}

.footer {
  background-color: var(--page-headerFooter-background);
  color: var(--text-color);
  text-align: center;
  flex-shrink: 0;
}

.footer div {
  display: inline-block;
  padding: 0px 25px;
  margin: 15px 0px;
}

.footer div h2 {
  font-weight: bold;
  margin: 0px;
  margin-bottom: 10px;
  color: var(--text-color);
}

.footer div img {
  height: 25px;
  margin: 0px 5px;
  filter: invert(var(--contact-icon-color-changer));
}

.footer div ul {
  display: inline-block;
  margin: 0px;
  padding: 0px;
}

.footer div li {
  display: inline-block;
}

.footer a {
  text-decoration: none;
  color: var(--url-text-color);
}

.footer .theme-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0px;
}

.footer .theme-switcher * {
  margin: 0px;
}

.footer .theme-switcher__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(320px, 100%);
  padding: 4px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--button-background);
  overflow: hidden;
}

.footer .theme-switcher__track button {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 5px 14px;
  background: transparent;
  color: var(--theme-switcher-inactive);
  cursor: pointer;
  font: inherit;
  transition: color 0.25s ease;
}

.footer .theme-switcher__track button:hover {
  color: var(--theme-switcher-hover-text);
}

.footer .theme-switcher__track button.is-active {
  background: var(--theme-switcher-active-background);
  color: var(--theme-switcher-active-text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-weight: 700;
}

.footer .theme-switcher__track button:focus-visible {
  outline: 2px solid var(--focus-border-color);
  outline-offset: -2px;
}


/*スマホ表示用*/
input[type='checkbox'] {
  display: none;
}

@media screen and (max-width: 955px) {
  .navbar {
    background: var(--page-headerFooter-background);
    padding: 15px 15px;
  }

  .navbar .nav_table a.menu-button_short {
    display: none;
  }

  .navbar .nav_table a.menu-button_medium {
    display: none;
  }

  .navbar .nav_table a.menu-button_long {
    display: none;
  }

  /*------ハンバーガーメニューの見た目用------*/
  .menu_btn {
    display: table-cell;
    position: relative;
    width: 26px;
    /*ボタン全体の幅を変えたいならここを調整*/
    height: 100%;
    /*ボタン全体の高さを変えたいならここを調整*/
    cursor: pointer;
  }

  .menu_btn span {
    display: inline-block;
    width: 100%;
    height: 3px;
    /*ボタン内の三本線の太さを変えたいならここを調整*/
    background-color: var(--text-color);
    /*ボタン内の三本線の色を変えたいならここを調整*/
    transition: 0.4s;
    /*アニメーション時間*/
    box-sizing: border-box;
    position: absolute;
    left: 0;
  }

  /*ボタン全体の高さか線の太さを調整したらここも調整しないときれいに表示されませぬ*/
  .menu_btn span:nth-of-type(1) {
    top: -30px;
  }

  .menu_btn span:nth-of-type(2) {
    top: -20px;
  }

  .menu_btn span:nth-of-type(3) {
    top: -10px;
  }

  #menu-checkbox:checked~#menu_label .menu_btn span:nth-of-type(1) {
    transform: translateY(10px) rotate(-45deg);
  }

  #menu-checkbox:checked~#menu_label .menu_btn span:nth-of-type(2) {
    opacity: 0;
  }

  #menu-checkbox:checked~#menu_label .menu_btn span:nth-of-type(3) {
    transform: translateY(-10px) rotate(45deg);
  }

  #menu_label {
    display: table-cell;
    width: 45px;
  }

  .menu {
    display: block;
    position: absolute;
    box-sizing: border-box;
    width: 100%;
    background: var(--menu-background);
    color: var(--text-color);
    padding: 20px;
    top: 69px;
    left: -100%;
    transition: left 0.7s;
    z-index: 10000;
  }

  .menu>li {
    border-bottom: 1px solid #fff;
    padding: 10px 0;
  }

  .menu_style {
    color: var(--text-color);
    text-decoration: none;
    margin-top: 10px;
    font-size: 20px;
    cursor: pointer;
  }
}