/* ============================================
   BiND依存からの脱却 - カスタム修正CSS
   ============================================ */

/* --- 0. BiND JS依存の opacity:0 を上書き --- */
.a-billboard,
.a-site_contents,
.a-footer,
.a-header,
.a-ghost_header,
[data-page-animation] .a-billboard,
[data-page-animation] .a-site_contents,
[data-page-animation] .a-footer,
[data-page-animation] .a-header {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}
/* BiNDのブロックアニメーション初期化を無効化 */
.init-block_animation,
.init-sp-block_animation {
  opacity: 1 !important;
  animation: none !important;
}

/* --- 1. グリッドレイアウト修正 (b-float / g-column) --- */
.b-float .g-column.-col2 > .column,
.b-float .g-column.-col3 > .column,
.b-float .g-column.-col4 > .column,
.b-float .g-column.-col5 > .column {
  float: left !important;
  box-sizing: border-box;
}
.b-float .g-column.-col2 > .column { width: 50% !important; }
.b-float .g-column.-col3 > .column { width: 33.333% !important; }
.b-float .g-column.-col4 > .column { width: 25% !important; }
.b-float .g-column.-col5 > .column { width: 20% !important; }

.b-float .g-column .c-img img {
  max-width: 100%;
  height: auto;
}

.b-float .g-column::after {
  content: "";
  display: table;
  clear: both;
}

@media only screen and (max-width: 641px) {
  .b-float .g-column.-sp-col1 > .column {
    float: none !important;
    width: 100% !important;
  }
}

/* --- 2. FVスライドショー（ビルボード全体を覆う） --- */
/* ビルボード内のスライドショーブロックを絶対配置で全体に広げる */
#bk85339003 {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  padding: 0 !important;
}
#bk85339003 > .column {
  height: 100%;
  padding: 0 !important;
  max-width: 100% !important;
}
#bk85339003 .c-none {
  height: 100%;
}

.slideshow-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slideshow-container .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: slideshow-fade 54s infinite;
}

.slideshow-container .slide picture,
.slideshow-container .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 各スライドのタイミング（9枚 × 6秒 = 54秒サイクル） */
.slideshow-container .slide:nth-child(1) { animation-delay: 0s; }
.slideshow-container .slide:nth-child(2) { animation-delay: 6s; }
.slideshow-container .slide:nth-child(3) { animation-delay: 12s; }
.slideshow-container .slide:nth-child(4) { animation-delay: 18s; }
.slideshow-container .slide:nth-child(5) { animation-delay: 24s; }
.slideshow-container .slide:nth-child(6) { animation-delay: 30s; }
.slideshow-container .slide:nth-child(7) { animation-delay: 36s; }
.slideshow-container .slide:nth-child(8) { animation-delay: 42s; }
.slideshow-container .slide:nth-child(9) { animation-delay: 48s; }

@keyframes slideshow-fade {
  0%   { opacity: 0; }
  1.5% { opacity: 1; }
  11%  { opacity: 1; }
  12.5%{ opacity: 0; }
  100% { opacity: 0; }
}

.slideshow-container .slide:first-child {
  opacity: 1;
}

/* ロゴ・テキストをスライドショーの上に表示＆垂直中央配置 */
.a-billboard .site_frame {
  position: relative;
  z-index: 1;
  height: 100%;
}
.a-billboard .site_frame > section {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
/* bk85338866 のみ relative（位置決め基準）。984/988 は follow-blocks JS が absolute にするので触らない */
#bk85338866 {
  position: relative;
  z-index: 2;
  width: 100%;
}
#bk85338984,
#bk85338988 {
  z-index: 3;
  width: 100%;
}

/* --- 3. スマホナビゲーション --- */
/* bind.js が .c-sp-navigation_line を3本生成するため ::before/::after は不要 */
#spNavigationTrigger {
  cursor: pointer;
}
.c-sp_navigation_btn .c-sp-navigation_line {
  display: block;
  width: 24px;
  height: 3px;
  background: #fff;
  margin: 5px auto;
}

/* --- 4. ライトボックス（画像拡大表示） --- */
/* BiNDのライトボックスを完全に非表示 */
.w-base {
  display: none !important;
}

/* カスタムライトボックス */
.custom-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 99999;
  cursor: pointer;
  justify-content: center;
  align-items: center;
}
.custom-lightbox.active {
  display: flex;
}
.custom-lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}
.custom-lightbox .lb-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 48px;
  cursor: pointer;
  z-index: 100000;
  line-height: 1;
  font-weight: 300;
}
.custom-lightbox .lb-prev,
.custom-lightbox .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 72px;
  cursor: pointer;
  z-index: 100000;
  line-height: 1;
  font-weight: 300;
  padding: 20px;
  user-select: none;
  transition: opacity 0.2s;
}
.custom-lightbox .lb-prev:hover,
.custom-lightbox .lb-next:hover {
  opacity: 0.7;
}
.custom-lightbox .lb-prev {
  left: 10px;
}
.custom-lightbox .lb-next {
  right: 10px;
}

/* --- 5. お問い合わせフォーム --- */
.custom-contact-wrap {
  max-width: 700px;
  margin: 0 auto;
}

/* 通知バナー */
.contact-notice {
  padding: 18px 24px;
  margin-bottom: 24px;
  border-radius: 4px;
  line-height: 1.7;
}
.contact-notice--success {
  background: #e8f5e9;
  border-left: 4px solid #388e3c;
  color: #1b5e20;
}
.contact-notice--error {
  background: #fbe9e7;
  border-left: 4px solid #c62828;
  color: #7f0000;
}

/* 行レイアウト */
.cf-row {
  margin-bottom: 20px;
}
.cf-row--submit {
  text-align: center;
  margin-top: 32px;
}

/* ラベル */
.cf-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}
.cf-req {
  font-size: 11px;
  color: #fff;
  background: #555;
  padding: 1px 6px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: middle;
}

/* 入力フィールド */
.cf-input,
.cf-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fafafa;
  color: #333;
  font-family: inherit;
  transition: border-color 0.2s;
}
.cf-input:focus,
.cf-textarea:focus {
  outline: none;
  border-color: #4a7c59;
  background: #fff;
}
.cf-textarea {
  resize: vertical;
  min-height: 140px;
}

/* 送信ボタン */
.cf-btn {
  display: inline-block;
  padding: 14px 60px;
  background: #4a7c59;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.2s;
}
.cf-btn:hover {
  background: #3a6247;
}

@media only screen and (max-width: 641px) {
  .cf-btn {
    width: 100%;
    padding: 14px 0;
  }
}

/* --- 6. 会社沿革テーブル（kaishaannnai.html） --- */
.history-table {
  border-collapse: collapse;
  width: 100%;
}
.history-table td {
  border: 1px solid #000;
  line-height: 1.5;
  vertical-align: middle;
  padding: 6px 8px;
}
.history-table .year-cell {
  text-align: center;
  background-color: #fafaf7;
  font-size: large;
  width: 60px;
}
.history-table .month-cell {
  text-align: right;
  background-color: #fafaf7;
  font-size: large;
  width: 60px;
}
.history-table .desc-cell {
  background-color: #f5f5f5;
}

/* --- ヒーロー（ビルボード）高さ修正 ---
   #bk85338866 はトップページ固有ブロック。
   :has() でトップページのみ 100vh を適用し、下層ページは別途設定。 */

/* トップページ：100vh フルスクリーンFV */
body:has(#bk85338866) #a-billboard {
  height: 100vh !important;
  min-height: 100vh;
  overflow: hidden;
}
#bk85338866 {
  height: 100vh;
  overflow: hidden;
}

/* 下層ページ：ページタイトルバナー高さ */
body:not(:has(#bk85338866)) #a-billboard {
  height: 240px !important;
  min-height: 0;
  overflow: hidden;
}
@media only screen and (max-width: 641px) {
  body:not(:has(#bk85338866)) #a-billboard {
    height: 160px !important;
  }
}
/* マップ画像は山の写真スライドに覆われるので非表示 */
#bk85338866 .c-img {
  visibility: hidden;
}
/* bdRotation が inline style で height をセットした後も 100vh に追従させる */
.bd-slide-rotation.area {
  height: 100vh !important;
  width: 100% !important;
}
/* テキストオーバーレイ：本番に合わせてコンテンツを上寄り配置 */
#bk85338984 > .column,
#bk85338988 > .column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 200px;
  width: 100%;
  text-align: center;
}
