/*
 * フッター（2026-11-21 に作り直し。template-parts/footer-main.php）
 * stylus のビルドとは別に直接書き、main.css のあとに読み込む（functions/css_js.php）。
 * main.css の .main-footer（padding・z-index）はこちらで上書きする。
 */
.kh-footer {
  --kh-footer-gold: #c9a46a;
  --kh-footer-muted: rgba(255, 255, 255, 0.62);
  --kh-footer-line: rgba(255, 255, 255, 0.14);
  position: relative;
  z-index: 3;
  padding: 0 var(--contentOuter-lg) 36px;
  background: #000;
  color: #fff;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.08em;
}

/* 上の区切り：火花のように中央がほのかに光る線 */
.kh-footer::before {
  content: "";
  display: block;
  height: 1px;
  max-width: var(--contentWidth);
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--kh-footer-line) 18%, var(--kh-footer-gold) 50%, var(--kh-footer-line) 82%, transparent);
  opacity: 0.8;
}

.kh-footer a {
  color: inherit;
  text-decoration: none;
}

.kh-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kh-footer p {
  margin: 0;
}

.kh-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: 64px;
  max-width: var(--contentWidth);
  margin: 0 auto;
  padding: 80px 0 64px;
}

/* ------------------------------------------------ 左：ロゴ・紹介・連絡先 */
.kh-footer__logo img {
  display: block;
  width: 164px;
  height: auto;
}

.kh-footer__lead {
  margin-top: 24px !important;
  color: var(--kh-footer-muted);
  font-size: 13px;
  line-height: 2;
}

.kh-footer__address {
  margin-top: 28px;
  font-style: normal;
  font-size: 13px;
  line-height: 1.9;
  color: var(--kh-footer-muted);
}

.kh-footer__name {
  color: #fff;
  font-family: var(--font-sub);
  font-size: 15px;
  letter-spacing: 0.12em;
  margin-bottom: 6px !important;
}

.kh-footer__map {
  display: inline-block;
  margin-left: 0.8em;
  padding: 0 0.7em;
  border: 1px solid var(--kh-footer-line);
  border-radius: 2px;
  font-size: 11px;
  line-height: 1.8;
  color: #fff !important;
  vertical-align: 1px;
  transition: border-color 0.3s, color 0.3s;
}

.kh-footer__tel {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.6em;
  margin-top: 6px !important;
}

.kh-footer__tel a {
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.1em;
}

.kh-footer__sns {
  display: flex;
  gap: 18px;
  margin-top: 28px !important;
}

.kh-footer__sns a {
  display: block;
  width: 26px;
  height: 26px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  filter: brightness(100);
  opacity: 0.85;
  transition: opacity 0.3s;
}

.kh-footer__sns-facebook {
  background-image: url(../assets/dist/img/sns/facebook.svg);
}

.kh-footer__sns-instagram {
  background-image: url(../assets/dist/img/sns/instagram.svg);
}

.kh-footer__sns-twitter {
  background-image: url(../assets/dist/img/sns/twitter.svg);
}

/* ------------------------------------------------ 右：サイトマップ */
.kh-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
}

.kh-footer__heading {
  position: relative;
  margin-bottom: 18px !important;
  padding-bottom: 12px;
  font-family: var(--font-sub);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: #fff;
}

.kh-footer__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 20px;
  height: 1px;
  background: var(--kh-footer-gold);
}

.kh-footer__col li + li {
  margin-top: 8px;
}

.kh-footer__col a,
.kh-footer__sub a {
  color: var(--kh-footer-muted);
  font-size: 13px;
  background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0 1px;
  padding-bottom: 2px;
  transition: color 0.3s, background-size 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------------------------ 下：プライバシーポリシー・著作権 */
.kh-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  max-width: var(--contentWidth);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--kh-footer-line);
}

.kh-footer__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.kh-footer__sub a {
  font-size: 12px;
}

.kh-footer__copyright {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.kh-footer__copyright small {
  font-size: inherit;
}

/* ------------------------------------------------ ホバー */
@media (hover: hover) {
  .kh-footer__col a:hover,
  .kh-footer__sub a:hover {
    color: #fff;
    background-size: 100% 1px;
  }
  .kh-footer__sns a:hover {
    opacity: 1;
  }
  .kh-footer__map:hover {
    border-color: var(--kh-footer-gold);
    color: var(--kh-footer-gold) !important;
  }
  .kh-footer__logo a {
    transition: opacity 0.3s;
  }
  .kh-footer__logo a:hover {
    opacity: 0.7;
  }
}

/* ------------------------------------------------ タブレット */
@media only screen and (max-width: 1024px) {
  .kh-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }
}

/* ------------------------------------------------ スマホ */
@media only screen and (max-width: 599px) {
  .kh-footer {
    padding: 0 var(--contentOuter) 28px;
  }
  .kh-footer__inner {
    padding: 56px 0 44px;
    gap: 44px;
  }
  .kh-footer__logo img {
    width: 140px;
  }
  .kh-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 20px;
  }
  /* 「岸火工について」は項目が多いので、2 列目からはみ出さないよう幅いっぱいに 2 段で */
  .kh-footer__col:nth-child(2) {
    grid-column: 1 / -1;
    order: 3;
  }
  .kh-footer__col:nth-child(2) ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
  }
  .kh-footer__col:nth-child(2) li + li {
    margin-top: 0;
  }
  .kh-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
