/* =======================
   Base / Global
======================= */
:root {
  --main: #000;
}

html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: #000;
  background: #fff;
  font-family: YakuHanJP, "Noto Sans JP", sans-serif;
  font-weight: 500; /* 本文は軽めに */
  letter-spacing: 0.05em;
  line-height: 1.8;
}
@media (max-width: 640px) {
  body {
    font-size: 0.8rem;
  }
}

/* セクション見出しが固定ヘッダーに隠れない */
section {
  scroll-margin-top: 100px;
}

/* 1280px センター寄せ（パディングは各所で個別管理） */
:where(.container, .site-header .container, .section-info .section-inner, .section-access .section-inner, .footer-inner) {
  max-width: 1280px;
  margin: 0 auto;
}

/* ナビ系ULのリセット */
:where(.main-nav ul, .footer-nav ul) {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 汎用アイコンボタン（サイズは各所で上書き可） */
.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #efefef;
  display: inline-block;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.icon-btn img {
  width: 100%;
}
.icon-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* 共通見出しスタイル */
.section-info h2,
.section-access h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 30px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}
.section-info h2::after,
.section-access h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: #000;
  margin: 8px auto 0;
}
@media (max-width: 640px) {
  .section-info h2,
  .section-access h2 {
    font-size: 1.6rem;
  }
}

/* 2カラムの共通化（info + img / info + map） */
.section-info .columns,
.section-access .columns {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.section-info .info,
.section-info .img,
.section-access .info,
.section-access .map {
  flex: 1;
}

/* PCではonly-mobileは非表示 */
.only-mobile {
  display: none;
}

/* =======================
   Header
======================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border-bottom-color: #eee;
}
.site-header a {
  color: #fff;
}
.site-header.scrolled a {
  color: #000;
}
.site-header .container {
  padding: 12px 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

/* 並び順：1) logo → 2) nav → 3) actions */
.logo {
  order: 1;
  flex: 0 0 auto;
}
.logo a {
  text-decoration: none;
  font-weight: 700;
  font-size: 1.6rem;
  transition: opacity 0.2s;
}
.logo a:hover {
  opacity: 0.6;
}

.main-nav {
  order: 2;
  flex: 1 1 auto;
}
.main-nav ul {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  padding-right: 24px;
}
.main-nav a {
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.3s;
}
.main-nav a:hover {
  background: #f0f0f0;
}

.header-actions {
  order: 3;
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.header-actions .phone {
  font-weight: 700;
  text-decoration: none;
}
.header-actions .icons {
  display: flex;
  gap: 8px;
}

/* ハンバーガー */
.menu-toggle {
  display: none;
  position: absolute;
  right: 24px;
  top: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}
.scrolled .menu-toggle {
  color: #000;
}
@media (max-width: 640px) {
  .menu-toggle {
    top: 12px;
  }
}

/* 991px以下：ナビをハンバーガー化 */
@media (max-width: 991px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    background: #001f3f;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  .main-nav.open {
    display: block;
  }
  /* open時のリンク色を白に */
  .main-nav.open a {
    color: #fff;
  }
  /* hoverしたときに少し透過で変化 */
  .main-nav.open a:hover {
    opacity: 0.7;
  }
  .main-nav ul {
    flex-direction: column;
    padding: 12px;
    gap: 0;
  }
  .main-nav li {
    margin: 6px 0;
  }
  .header-actions {
    padding-right: 56px;
  }
  .menu-toggle {
    display: block;
  }
}

/* 640px以下：電話+アイコンもハンバーガー内へ */
@media (max-width: 640px) {
  .header-actions {
    display: none;
  }
  .only-mobile {
    display: block;
  }
  .only-mobile.sep {
    border-top: 1px solid #eee;
    margin: 8px 0;
  }
  .only-mobile.icons {
    display: flex;
    gap: 16px;
    margin: auto;
    padding: 16px 0;
  }
  .only-mobile .icon-btn {
    padding: 0;
  }
}

/* =======================
   Hero（スライダー）
======================= */
.hero {
  position: relative;
  height: 80vh;
  overflow: hidden;
  text-align: center;
}
.hero-slider {
  position: absolute;
  inset: 0;
}
.hero-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-slider img.active {
  opacity: 1;
}

.hero-text {
  position: relative;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  color: #000;
  display: none;
}
.hero-lead {
  font-size: 2rem;
  margin: 0 0 10px;
  font-weight: 500;
}
.hero-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #555;
}

/* =======================
   Sections (共通)
======================= */
.container {
  padding: 8px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-info .section-inner,
.section-access .section-inner {
  padding: 60px 24px;
}

/* 2カラム → 991px以下で縦並び */
@media (max-width: 991px) {
  .section-info .columns,
  .section-access .columns {
    flex-direction: column;
  }
}

/* 事務所概要：表風dl */
.section-info dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  margin: 0;
}
@media (max-width: 640px) {
  .section-info dl {
    grid-template-columns: 100px 1fr;
  }
}
.section-info dt {
  font-weight: 700;
  text-align: center;
  padding: 16px 12px;
  border-bottom: 1px solid #ddd;
}
.section-info dd {
  margin: 0;
  padding: 16px 12px;
  border-bottom: 1px solid #ddd;
}
.section-info dd a {
  color: var(--main);
  text-decoration: none;
}
.section-info dd a:hover {
  text-decoration: underline;
}

.section-info .img img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
}

/* 強み */
.strength-list {
  list-style: none;
  margin: 20px auto 0;
  padding: 40px;
  max-width: 880px;
  border: 1px solid #ddd;
  border-radius: 12px;
}
@media (max-width: 640px) {
  .strength-list {
    padding: 24px;
  }
}
.strength-list li {
  position: relative;
  margin: 12px 0;
  padding-left: 28px;
  line-height: 1.7;
}
.strength-list li::before {
  content: "●";
  position: absolute;
  left: 0;
  top: 0.35em;
  font-size: 0.8rem;
}

/* アクセスリスト */
.access-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.access-list li {
  margin: 8px 0;
  padding-left: 1.2em;
  position: relative;
}
.access-list li::before {
  content: "■";
  position: absolute;
  left: 0;
  font-size: 0.8rem;
}

/* Map */
.section-access .map {
  width: 100%;
}
.section-access .map iframe {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 12px;
}
@media (max-width: 991px) {
  .section-access .map {
    width: 100%;
    min-width: auto;
  }
  .section-access .map iframe {
    width: 100%;
  } /* 高さはそのまま固定 */
}

/* =======================
   Scroll Reveal
======================= */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-slider img {
    transition: none !important;
  }
}

/* =======================
   Footer
======================= */
.site-footer {
  background: #f9f9f9;
  border-top: 1px solid #eee;
  margin-top: 40px;
  padding: 40px 24px 20px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer-logo a {
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  color: #000;
}
.footer-nav ul {
  display: flex;
  gap: 20px;
}
.footer-nav a {
  text-decoration: none;
  color: #000;
  transition: opacity 0.2s ease;
}
.footer-nav a:hover {
  opacity: 0.7;
}
.footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-actions .phone {
  font-weight: 700;
  text-decoration: none;
  color: #000;
}
/* フッターのアイコンは少し大きめ */
.footer-actions .icon-btn {
  width: 32px;
  height: 32px;
}

.footer-copy {
  text-align: center;
  margin-top: 20px;
  font-size: 0.8rem;
  color: #666;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
  }
  .footer-nav ul {
    flex-direction: column;
    gap: 10px;
  }
  .footer-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* 上部へ戻るボタン */
/* 上部へ戻るボタン */
#back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: #333;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0; /* 最初は透明 */
  visibility: hidden; /* 非表示扱い */
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease;
  z-index: 9999;
}

#back-to-top:hover {
  background: #555;
  transform: translateY(-2px);
}

/* 表示時の状態 */
#back-to-top.show {
  opacity: 1;
  visibility: visible;
}
