/*
 * 共通スタイル
 */
* {
  font-family: "Noto Sans JP", sans-serif;
}
:root {
  /* ヘッダ/フッター色 */
  --jforest-color: #007e48 /*#46a244*/ /*#15493d*/;

  /* Google Map ネームカード高さ */
  --google-map-margin: 130px;

  /* Google Map 最大高さ (ネームカードをシンプルにする限界) */
  --google-map-max-height: 280px;
}

/*
 * 背景色
 */
.bg-jforest {
  background-color: var(--jforest-color);
}

/*
 * Disabledされたボタンのスタイル調整
 */
.btn:disabled,
.btn[disabled] {
  pointer-events: auto;
  cursor: not-allowed;
}

/*
 * ロゴ
 */
.logo {
  /* lg,xl,xxl */
  height: 100px;
}
@media (max-width: 991.98px) {
  /* sm, md */
  .logo {
    width: auto;
    height: 80px;
  }
}
@media (max-width: 575.98px) {
  /* xs */
  .logo {
    width: 100%;
    height: auto;
  }
}

/*
 * ヘッダレイアウト
 */
nav.navbar {
  flex-wrap: wrap;
}
.header-brand {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;

  flex: 0 0 auto;
  width: 100%;
}
@media (max-width: 767.98px) {
  .header-brand {
    /* flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start; */

    flex: 0 1 auto;
    width: calc(100% - 5rem);
  }
  .header-brand > h1 {
    flex: 0 1 auto;
    width: auto;
  }
  #navbarNav {
    margin-top: 2rem;
  }
}

/*
 * ヒーローセクション
 */
.hero {
  position: relative;
  background-size: cover;
  overflow: hidden;
  z-index: 1;
}

/* トップページ用 */
.hero-main {
  overflow-x: hidden;
}
.hero-main img {
  width: 100%;
  height: auto;
}

/* トップページアイコン */
.large-icon {
  font-size: 4rem;
}

/*
 * スライドショー
 */
#top-slide-show :is(.carousel-control-next, .carousel-control-prev) {
  width: 5%;
  align-items: end;
}
#top-slide-show .carousel-indicators {
  margin-bottom: 0rem;
}

/*
 *  さらに表示
 */
.show-more {
  position: relative;
}
.show-more > .show-more-content {
  overflow: hidden;
  width: 100%;
  height: auto;
  padding: 0;
}
.show-more.collapsed .show-more-content {
  padding: 0 0 2rem 0;
}
.show-more.collapsed .show-more-content > *:nth-child(n + 13) {
  display: none;
}
.show-more > .btn-show-more {
  position: absolute;
  bottom: 0;
  left: 0;
}
.show-more:not(.collapsed) > .btn-show-more {
  display: none;
}

/*
 *  標準テーブルのBootstrap化
 *  JavaScriptにより最終的にtableクラスが付加されるが、それまでの間のスタイル
 */
.wp-block-table table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  border-collapse: collapse;
}

.wp-block-table table th,
.wp-block-table table td {
  padding: 0.75rem;
  vertical-align: top;
  border: 1px solid #dee2e6;
}
figure.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/*
 *  標準ボタンのBootstrap化
 *  JavaScriptによるクラス組み換えするまで非表示
 */
.wp-block-button.btn {
  display: none;
}

/*
 *  Google Map
 */
.map-container {
  overflow: hidden; /* はみ出した部分を隠す */
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.175);

  max-height: var(--google-map-max-height);
  height: var(--google-map-max-height);
}
.map-container iframe {
  width: 100%;
  max-height: var(--google-map-max-height);
  height: var(--google-map-max-height);
}

/*
 * 画像調整
 */

/* アコーディオン/カード内のfloatを解除 */
.accordion-body::after,
.card-body::after {
  content: "";
  clear: both;
  display: none;
}

/* アコーディオン/カード内のfloat要素の大きさを制限 */
:is(.accordion-body, .card-body) :is(.alignright, .alignleft) {
  max-width: 40%;
}
@media (max-width: 575.98px) {
  :is(.accordion-body, .card-body) :is(.alignright, .alignleft) {
    float: none;
    max-width: none;
    width: 100%;
    margin-left: 0;
  }
  :is(.accordion-body, .card-body) :is(.alignright, .alignleft) img {
    width: 100%;
    height: auto;
  }
}

/* ギャラリー調整 */
.wp-block-gallery {
  clear: both;
}
.wp-block-gallery.is-layout-flex {
  justify-content: flex-start !important;
  align-items: flex-start !important;
  flex-wrap: nowrap !important;
}
.wp-block-gallery.is-layout-flex .wp-block-image {
  display: block !important;
  flex-grow: 0 !important;
  max-width: 100% !important;
  width: auto !important;
}
.wp-block-gallery.is-layout-flex .wp-block-image img {
  object-fit: fill !important;
  flex: none !important;
  width: auto !important;
  max-height: 224px;
}
@media (max-width: 575.98px) {
  .wp-block-gallery.is-layout-flex {
    flex-wrap: wrap !important;
  }
  .wp-block-gallery.is-layout-flex .wp-block-image {
    width: 100% !important;
  }
  .wp-block-gallery.is-layout-flex .wp-block-image img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }
}

/*
 *  TOPに戻るボタン
 */
#return-to-top {
  animation: fadeIn 1s forwards;
  animation-timeline: scroll();
  animation-range-start: 10vh;
  animation-range-end: 50vh;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
/* #return-to-top > a {
  display: inline-block;
  border-radius: 25%;
  width: 32px;
  height: 32px;
  background-color: white;
} */

@keyframes fadeIn {
  to {
    opacity: 1;
    visibility: visible;
  }
}
