/* ============================================
   変数・全体設定
============================================ */

:root {
  --main-color: #6d4c41; /* どんぐりブラウン */
  --accent-color: #d9a441;
  --bg-white: #ffffff;
  --text-color: #333;
  --border-light: #eeeeee;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  width: 100%;
  overflow-x: hidden;
  position: relative; /* 子要素の基準をbody内に留める */
  margin: 0;
  padding: 0;
  /* 本文(pタグなど)はプロフェッショナルな標準ゴシックに固定 */
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  color: var(--text-color);
  background-color: #f7f7f7;
  line-height: 1.7; /* 文章の読みやすさを重視して少し広めに */
}

h1, h2, h3, h4, .logo, .g-nav a, .btn-primary, .service-label h3 {
  /* 目に付く「見出し」や「ボタン」にだけ温かみのあるZen丸ゴシックを適用 */
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  margin: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ============================================
   ヘッダー・ナビゲーション
============================================ */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  color: var(--main-color);
  line-height: 1.2;
  text-decoration: none; /* リンクの場合の保険 */
}

.logo-sub {
  display: block;
  font-size: 1.7rem; /* 少し抑えてプロ感を出す */
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: 0.15em; /* 文字間を広げて洗練させる */
}

.logo-main {
  display: block;
  font-size: 2.2rem; 
  letter-spacing: 0.1em;
}

/* 以下、header-info 以降のコードは元の通りで大丈夫です */

.header-info {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* style.css 104行目付近 */
/* 電話ボタンとオンライン問い合わせボタンの共通設定 */
.btn-tel,
.btn-primary {
  display: flex;             /* flexに変更して中身を中央に寄せる */
  flex-direction: column;    /* 上下の2行構成に対応 */
  justify-content: center;
  align-items: center;
  width: 200px;              /* 幅を固定して完全に一致させる */
  height: 60px;              /* 高さを固定して完全に一致させる */
  padding: 0;                /* サイズ固定なので余白は0でOK */
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  box-sizing: border-box;    /* 枠線を含めたサイズ計算にする */
  transition: all 0.3s;
  cursor: pointer;
}

/* 電話ボタン固有のデザイン */
.btn-tel {
  background-color: #fff;
  color: var(--main-color);
  border: 1px solid var(--main-color);
  line-height: 1.2;
}

/* オンライン問い合わせボタン固有のデザイン */
.btn-primary {
  background-color: var(--main-color);
  color: #fff;
  border: 1px solid var(--main-color); /* border: none を削除 */
  line-height: 1.2;
}

/* ホバー時の演出（お好みで） */
.btn-tel:hover { background-color: #fdf5f2; }
.btn-primary:hover { opacity: 0.8; }

.tel-text {
  display: block;
  font-size: 0.85rem;
}

.tel-number strong {
  font-size: 1.4rem;
  color: var(--main-color);
}

/* グローバルナビ */

.g-nav {
  background: var(--main-color);
}

.g-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.g-nav li {
  border-right: none;
}

.g-nav li:last-child {
  border-right: none;
}

.g-nav a {
  color: #fff;
  text-decoration: none;
  padding: 10px 25px;
  display: block;
  font-weight: bold;
  font-size: 100px;
}

/* ============================================
   メインビジュアル
============================================ */

.main-visual {
  width: 100%;
  background-color: #ffffff;
  padding: 20px 0;
}

.mv-inner {
  max-width: 1100px;
  height: 550px;
  margin: 0 auto;
  position: relative;
  background-image: url("main-bg.jpg");
  background-size: cover;
  background-position: center 0%;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.mv-content {
  width: 100%;
  padding-left: 30px;
  box-sizing: border-box;
  z-index: 2;
  margin-top: -200; /* -200px から 0 に戻します */
}

/* ついでに、中身の白いボックスも少し調整 */
.mv-text { display: inline-block; max-width: 550px; padding: 20px 25px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px); border-radius: 4px; text-align: left; }


.mv-text h2 {
  font-size: 2.5rem;
  color: var(--main-color);
  line-height: 1.4;
  margin-bottom: 10px;
  font-weight: 700;
}

.mv-text p {
  font-size: 1.3rem;
  color: #333;
  line-height: 1.8;
  margin: 0;
  font-weight: 500;
}

/* ============================================
   共通セクション
============================================ */

.section {
  padding: 50px 0;
  background-color: #fff;
  border-bottom: 1px solid #f7f7f7;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 0;
}

/* タイトル下の線を消去 */
.section-title::after {
  display: none;
}

/* ボックス内見出し（補助金申請など） */
.about-box h4,
.service-item h3 {
  color: var(--main-color);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 15px;
  padding-left: 0;
  border-left: none;
  line-height: 1.4;
  text-align: center;
}

/* ============================================
   主要業務（タブスイッチング）
============================================ */

.service-tabs {
  display: flex;
  flex-wrap: wrap; /* コンテンツを下の行に送るために必要 */
  justify-content: space-between;
  gap: 15px;
}

.service-input {
  display: none;
}

/* ラベル（ボタン）の設定 */
.service-label {
  flex: 1;
  min-width: 280px;
  padding: 15px 20px;
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 10px;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.3s ease;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  column-gap: 15px;
  text-align: left;
  min-height: 85px;
  order: 1; 
}

/* 詳細コンテンツの設定 */
.service-content {
  display: none; /* 初期状態は非表示 */
  width: 100%;
  background: #fff;
  border: 2px solid var(--main-color);
  border-radius: 12px;
  padding: 35px;
  margin-top: 20px;
  box-sizing: border-box;
  animation: fadeIn 0.4s ease;
  /* 【重要】PCでは全コンテンツをボタンの下に配置 */
  order: 2; 
}

/* PC：ラジオとIDで紐付けたコンテンツ表示 */
/* ~ (間接セレクタ) を使い、ボタンが押されたら下のコンテンツを表示 */
#tab1:checked ~ #content1,
#tab2:checked ~ #content2,
#tab3:checked ~ #content3 {
  display: block;
}

/* アイコンや見出しなどの装飾（既存のものを維持） */
.service-icon img { width: 100%; height: auto; object-fit: contain; transition: transform 0.3s ease; }
.service-label h3 {
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.3;
  grid-column: 2; /* 常に2列目（アイコンの右）に配置 */
}

.service-target-label {
  font-size: 0.85rem;
  color: #666;
  margin: 2px 0 0 0; /* 上に少しだけ隙間を作る */
  line-height: 1.4;
  grid-column: 2; /* ★ここが重要：pタグも2列目（h3の真下）から開始させる */
}

/* アイコン自体の位置固定 */
.service-icon {
  grid-column: 1; /* 1列目に配置 */
  grid-row: 1 / 3; /* h3とpの2行分をまたいで中央に配置 */
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 選択・ホバー時の挙動（既存デザイン） */
.service-label:hover { background: #f0f4f8; }
.service-input:checked + .service-label {
  background: var(--main-color);
  color: #fff;
  border-color: var(--main-color);
}
.service-input:checked + .service-label .service-target-label { color: rgba(255, 255, 255, 0.8); }
.service-input:checked + .service-label .service-icon img { filter: brightness(0) invert(1); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ============================================
   事務所案内：外観写真
============================================ */

/* 外観写真コンテナ */
#office-photo-container {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
}

#office-photo-container img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: block;
}

/* ============================================
   料金表セクション
============================================ */

.price-wrapper {
  margin: 30px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: 1px solid #eee;
  max-width: 1100px;
}

.design-table {
  width: 100%;
  border-collapse: collapse;
}

.design-table th {
  background-color: var(--main-color) !important;
  color: #ffffff !important;
  padding: 18px 15px;
  text-align: left;
}

.design-table td {
  padding: 16px 15px;
  border-bottom: 1px solid #eee;
  background-color: #ffffff !important;
}

.design-table td:nth-child(2) {
  font-weight: bold;
  color: #d32f2f;
}

.design-table tbody tr:nth-child(even) td {
  background-color: #fafafa !important;
}

/* ============================================
   事務所案内・略歴
============================================ */

.about-grid {
  display: flex;
  gap: 30px;
}

.about-box {
  flex: 1;
  padding: 30px;
  border: 1px solid #eee;
  border-radius: 10px;
}

.staff-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  overflow-x: hidden;
}

.staff-image {
  flex: 0 0 350px;
}

.staff-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

.staff-details {
  flex: 1;
}

/* 事務所情報テーブル風レイアウト */
.office-info dl {
  border-top: 1px solid #eee;
  margin: 0;
}

.office-info div {
  display: flex;
  border-bottom: 1px solid #eee;
  padding: 5px 0;
  align-items: baseline;
}

.office-info dt {
  width: 120px;
  font-weight: bold;
  color: var(--main-color);
  flex-shrink: 0;
}

.office-info dd {
  margin: 0;
  flex: 1;
}

/* アコーディオン（略歴） */
.history-accordion summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-right: 30px;
}

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

.history-accordion summary::after {
  content: "＋";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: var(--main-color);
  transition: transform 0.3s;
}

.history-accordion[open] summary::after {
  content: "ー";
}

.history-item {
  display: flex;
  border-bottom: 1px solid #eee;
  padding: 10px 0;
  align-items: baseline;
}

.history-item dt {
  width: 100px;
  font-weight: bold;
  color: var(--main-color);
  flex-shrink: 0;
}

.history-item dd {
  margin: 0;
  flex: 1;
}

/* フッター */
.site-footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 30px 0;
}

/* ============================================
   Googleマップ アコーディオン
============================================ */

.map-accordion {
  margin-top: 8px;
}

/* 「マップを表示」のボタン部分 */
.map-summary {
  display: inline-block;
  cursor: pointer;
  color: var(--main-color);
  font-size: 0.9rem;
  font-weight: bold;
  list-style: none;
  border: 1px solid var(--main-color);
  padding: 2px 12px;
  border-radius: 4px;
  transition: all 0.3s;
}

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

.map-summary:hover {
  background-color: var(--main-color);
  color: #fff;
}

/* 地図の枠 */
.map-content {
  margin-top: 15px;
  border: 2px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}

/* 開いている時のボタン色変更 */
.map-accordion[open] .map-summary {
  background-color: #eee;
  color: #333;
  border-color: #ccc;
}

.map-accordion[open] .map-summary span {
  display: inline-block;
}

.map-accordion[open] .map-summary span::after {
  content: "を閉じる";
}

/* ============================================
   お問い合わせフォーム
============================================ */

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

/* ============================================
   モーダル（お問い合わせポップアップ）
============================================ */

/* モーダル背景 */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* モーダルの中身 */
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  border-radius: 10px;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

/* 表示状態 */
.modal.is-show {
  display: block;
  opacity: 1;
}

.modal.is-show .modal-content {
  transform: translateY(0);
}

/* 閉じるボタン */
.close-button {
  position: absolute;
  right: 10px;
  top: 5px;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  color: #999;
  padding: 10px;
  z-index: 10001;
  line-height: 1;
}

.close-button:hover {
  color: #333;
}

/* ページ下部のお問い合わせセクションを非表示（モーダル専用にする場合） */
section#contact {
  display: none;
}

/* ============================================
   送信完了メッセージ（モーダル内）
============================================ */

#completionMessage {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 350px;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

/* display: block にされたときだけフレックス適用 */
#contactModal .modal-content #completionMessage[style*="display: block"] {
  display: flex !important;
}

#completionMessage p {
  margin: 10px 0 !important;
}

/* 完了メッセージ内ボタン */
#completionMessage .btn-primary {
  margin: 30px auto 0 !important;
  width: 160px;
  height: 45px;
  display: flex !important;
  justify-content: center;
  align-items: center;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  float: none;
}

/* ============================================
   レスポンシブ：768px以下（スマホ）
============================================ */

@media screen and (max-width: 768px) {
  /* モーダルの位置微調整（スマホ） */
  .modal-content {
    margin: 20% auto;
    padding: 20px;
  }

  /* ヘッダー */
  .header-top .container {
    flex-direction: column;
    gap: 15px;
  }

  .logo {
    width: 100%;
    text-align: center;
  }

  .logo-main {
    font-size: 2.0rem !important; /* スマホでは小さく */
  }
  .logo-sub {
    font-size: 1.5rem !important;
  }

  .header-info {
  display: flex;
  gap: 8px; /* ボタン同士の隙間を少し詰める（10px → 8px） */
  width: 100%;
  padding: 0 8px; /* 左右に5pxの安全地帯を作る */
  box-sizing: border-box; /* paddingを幅に含める */
  }

  /* 両ボタン共通 */
  .btn-tel,
  .header-info a.btn-primary {
    flex: 0 1 150px;
    height: 35px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.1;
    box-sizing: border-box;
    text-decoration: none;
    margin: 0;
    padding: 0;
  }

  /* 電話ボタン */
  .btn-tel {
    background: #ffffff !important;
    border: 1px solid var(--main-color) !important;
    color: var(--main-color) !important;
  }

  /* お問い合わせボタン */
  .btn-tel,
  .header-info a.btn-primary {
    flex: 1 1 auto; /* 固定幅 150px をやめて、中身に合わせて広がるように */
    min-width: 140px;
    height: auto;    /* 固定高さ 35px を解除 */
    padding: 6px 4px; /* 上下に少し余白を作る */
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.2;
    box-sizing: border-box;
    text-decoration: none;
  }

  /* 電話ボタン内のテキスト：1行に収まるようサイズを微調整 */
  .tel-text {
    display: block;
    font-size: 0.8rem !important; /* 非常に小さい文字 */
    white-space: nowrap;         /* 絶対に改行させない */
  }

  .tel-number,
  .tel-number strong {
    display: block;
    font-size: 1rem !important; /* 電話番号のサイズを少し下げる */
    font-weight: bold;
    white-space: nowrap;         /* 絶対に改行させない */
  }
}
  /* ナビゲーション */
  .g-nav ul {
    flex-wrap: nowrap !important;
  }

  .g-nav li {
    flex: 1;
    border-right: none;
    padding: 0; /* ← ここを 0 に変更 */
  }

  .g-nav a {
    font-size: 15px;
    letter-spacing: -0.7px;
    transform: scaleX(0.95);
    padding: 6px 0;
    text-align: center;
    white-space: nowrap; /* ★これが重要：絶対に改行させない命令 */
  }

  .section p {
    margin-top: 0.4em;
    margin-bottom: 0.4em;
    line-height: 1.6;  /* 行間も少し詰めたい場合 */
  }

  /* 主要業務：アコーディオン */
 /* 主要業務：アコーディオン（スマホ時） */
@media screen and (max-width: 768px) {
  .service-label {
    width: 100%;
    order: initial; /* 並び順を元に戻す */
    margin-bottom: 10px;
    flex: none;
  }

  .service-content {
    order: initial; /* 並び順を元に戻す */
    margin-top: 5px;
    margin-bottom: 20px;
    padding: 20px;
  }

  /* 【ここが重要】スマホではボタンのすぐ後ろのコンテンツを表示する */
  .service-input:checked + .service-label + .service-content {
    display: block !important;
  }
}

  /* 料金表スマホ */
  .design-table,
  .design-table thead,
  .design-table tbody,
  .design-table tr,
  .design-table td {
    display: block;
    width: 100% !important;
  }

  .design-table thead {
    display: none;
  }

  .design-table tr {
    border-bottom: 3px solid #eee;
    padding: 15px 0;
  }

  .design-table td {
    border: none !important;
    padding: 5px 15px;
  }

  .design-table td:nth-child(1) {
    background-color: #f0f4f7 !important;
    font-weight: bold;
    color: var(--main-color);
    margin-bottom: 5px;
  }

  /* レイアウト解除（縦並び） */
  .about-grid,
  .staff-container,
  .office-info div {
    display: block;
  }

  .office-info dt {
    width: 90px;
    margin-bottom: 5px;
  }

  .staff-image {
    width: 100%;
    flex: none;
    margin-bottom: 20px;
  }

  .staff-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* 外観写真余白調整 */
  #office-photo-container {
    margin-bottom: 25px;
    padding: 0 10px;
  }

  /* MVテキストの縮小 */
  .mv-text h2 {
    font-size: 2rem;
  }


/* ============================================
   レスポンシブ：1100px以下（タブレットなど）
============================================ */

@media screen and (max-width: 1100px) {
  body {
    min-width: 320px;
  }

  .mv-inner {
    height: 400px;
  }

  .mv-text h2 {
    font-size: 1.8rem;
    text-align: center;
    white-space: nowrap;
  }

  .mv-text p {
    font-size: 1rem;
    color: #000;
    font-weight: 600;
    text-align: center;
  }
}

/* ============================================
   レスポンシブ：769px以上（PC専用調整）
============================================ */

@media screen and (min-width: 769px) {
  /* 代表挨拶を必ず横並び */
  .staff-container {
    display: flex !important;
    gap: 40px;
    align-items: flex-start;
  }

  .staff-image {
    flex: 0 0 350px;
  }

  .staff-details {
    flex: 1;
  }
  .g-nav a {
    font-size: 18px !important; /* !important をつけると最優先になります */
    padding: 10px 30px;        /* 文字を大きくした分、余白も調整すると綺麗です */
  }
  .office-info div {
    display: flex;         /* 横並びにする */
    align-items: center;   /* 上下の中央を揃える */
    padding: 12px 0;       /* 上下の余白 */
    border-bottom: 1px solid #eee; /* 境界線 */
  }

  .office-info dt {
    width: 140px;          /* 項目名の幅を固定して揃える */
    font-weight: bold;
    color: var(--main-color);
    flex-shrink: 0;        /* 項目名が潰れないように固定 */
  }

  .office-info dd {
    margin: 0;             /* 余計な余白を消去 */
    flex: 1;               /* 残りの幅をすべて使う */
  }
}


/* スマホ・タブレット表示時に枠を完全中央配置にする */
@media screen and (max-width: 1100px) {
  .mv-content {
    margin-top: 80px !important; /* 上下の位置はお好みで調整 */
    display: flex !important;
    justify-content: center !important; /* 横方向の中央揃え */
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important; /* 幅の計算を正確にする */
  }

  .mv-text {
    width: 80% !important; /* 画面幅の90%を使い、残り10%（左右5%ずつ）を余白にする */
    max-width: 500px !important; /* 広がりすぎないよう制限 */
    margin: 0 auto !important; /* 自身を中央に置く */
    float: none !important;
    left: auto !important;
    position: relative !important;
    box-sizing: border-box !important; /* 枠線や余白を幅に含める */

    
    /* 見栄えの調整（既存デザインを維持） */
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    text-align: center !important; /* テキストも中央揃えにする場合 */
  }

  .mv-text h2 {
    text-align: left !important;
    font-size: 1.5rem; 

  }
  .mv-text p {
    text-align: left !important;
    font-size: 0.9rem; 
    font-weight: thin;
  }
}

