/* ============================================
   WordPress 固有の調整
   ============================================ */

/* ============================================
   リスティングカード — アイコン廃止後の調整
   都道府県名を大きめに見せる
   ============================================ */
.listing-card .visual-inner { padding: 16px 0; }
.listing-card .visual-inner .pref {
  font-size: 28px;
  letter-spacing: 0.18em;
  line-height: 1.2;
}
.listing-card .visual-inner .entity-label {
  margin-top: 6px;
}

/* ============================================
   フッター — コーポレートサイト (fp-cp.jp) と統一
   元: themes/fpc/style.css L348〜504 を移植
   ============================================ */
.gotop {
  width: 55px;
  height: 55px;
  position: fixed;
  bottom: 50px;
  right: 20px;
  text-align: center;
  padding-top: 15px;
  background-color: #575859;
  border-radius: 50%;
  color: #FFFFFF;
  z-index: 1000;
  cursor: pointer;
  user-select: none;
}
.gotop p { color: #fff; font-size: 12px; letter-spacing: 0.1em; margin: 0; }

#footer {
  padding-bottom: 10px;
  padding-top: 30px;
  background-image: url("../img/footer-bg.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  /* dental-ma の前セクションとの間隔調整 */
  margin-top: 0;
  /* コーポレートサイトに合わせた本文フォント（YuMincho） */
  font-family: YuMincho, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: bold;
  line-height: 1.6em;
  color: #FFFFFF;
}
#footer article {
  width: 96%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 20px;
}
#footer article .footer-logo {
  width: 50%;
}
#footer article nav {
  width: 50%;
}
#footer article .footer-logo a {
  display: block;
  width: 50%;
  margin-left: auto;
  margin-right: auto;
}
#footer article .footer-logo a img {
  width: 100%;
  height: auto;
}
#footer nav ul {
  margin: 0 0 10px;       /* ul 間も 10px に統一 */
  padding: 0;
  list-style: none;
}
#footer nav ul:last-child { margin-bottom: 0; }
#footer nav ul.flex {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
#footer nav ul li {
  padding-left: 10px;
  padding-right: 10px;
  line-height: 1.2em;
  margin: 0;
  list-style: none;
}
/* 縦並び（flexなし）の ul は li ごとに 10px 間隔を確保 */
#footer nav ul:not(.flex) li {
  margin-bottom: 10px;
}
#footer nav ul:not(.flex) li:last-child {
  margin-bottom: 0;
}
#footer nav ul.flex li {
  border-right: 1px solid #FFFFFF;
}
#footer nav ul.flex li:last-child {
  border-right-style: none;
}
#footer nav ul li a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: small;
  font-family: YuMincho, "Yu Mincho", "Hiragino Mincho ProN", serif;
}
#footer nav ul.sub li a {
  font-size: x-small;
  display: inline-block;
}
#footer nav ul li a:hover { text-decoration: underline; }

#footer .info {
  text-align: center;
  width: 100%;
  padding-bottom: 0;
  padding-top: 30px;
}
#footer .info p {
  font-size: 9pt;
  color: #FFFFFF;
  line-height: 1.4em;
  margin-bottom: 5px;
}
#footer .info p br { display: none; }
#footer .copyright {
  text-align: center;
  font-size: small;
  color: #FFFFFF;
  width: 100%;
}

@media screen and (max-width: 480px) {
  #footer article .footer-logo { width: 100%; margin-bottom: 30px; }
  #footer article nav { width: 100%; margin-bottom: 50px; }
  #footer .info p br { display: inline-block; }
}

/* 元テーマの .site-footer に当たっていたスタイルは無効化 */
.site-footer { display: none !important; }

/* ============================================
   拠点表記（東京本社／大阪支店）— 住所の縦並び表示
   ============================================ */
.branch-line {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  line-height: 1.8;
}
.branch-line .branch-name {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: inherit;
  opacity: .85;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
}
@media (max-width: 600px) {
  .branch-line {
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
  }
}

/* admin bar 分のオフセット */
html[lang].admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  html[lang].admin-bar .site-header { top: 46px; }
}

/* リンクはすべて継承色（tokens.css defaults 補完） */
.site-footer a,
.nav a,
.breadcrumb a,
.listing-card a {
  color: inherit;
  text-decoration: none;
}

/* ページネーション（WordPress paginate_links を CSS クラス .pagination でラップ） */
.pagination a,
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  margin: 0 4px;
  border: 1px solid var(--ink-200);
  color: var(--ink-700);
  font-family: var(--font-en);
  font-size: var(--fs-13);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all .2s;
}
.pagination a:hover,
.pagination .page-numbers:hover { border-color: var(--navy-700); color: var(--navy-700); }
.pagination .current,
.pagination a.current {
  background: var(--navy-700);
  color: #fff;
  border-color: var(--navy-700);
}
.pagination a.disabled { opacity: .3; cursor: default; }

/* Contact Form 7 を .contact-card の見た目に寄せる */
.wpcf7-form p { margin: 0 0 var(--space-4); }
.wpcf7-form label {
  display: block;
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--navy-700);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ink-200);
  background: #fff;
  font: inherit;
  color: var(--ink-700);
  transition: border-color .2s;
}
.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  border-color: var(--navy-700);
  outline: 0;
}
.wpcf7-form textarea { min-height: 120px; resize: vertical; }
.wpcf7-form .wpcf7-not-valid { border-color: var(--danger); }
.wpcf7-form .wpcf7-not-valid-tip { color: var(--danger); font-size: var(--fs-12); margin-top: 4px; }
.wpcf7-form .wpcf7-list-item { display: inline-block; margin: 0 var(--space-4) 0 0; }
.wpcf7-form input[type="submit"] {
  --btn-h: 56px;
  width: 100%;
  height: var(--btn-h);
  background: var(--gold-600);
  color: #fff;
  border: 0;
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background .2s;
}
.wpcf7-form input[type="submit"]:hover { background: var(--gold-700); }
.wpcf7-response-output {
  border: 1px solid var(--ink-200) !important;
  margin-top: var(--space-4) !important;
  padding: var(--space-4) !important;
  font-size: var(--fs-13) !important;
}
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--navy-700) !important; color: var(--navy-700); }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output { border-color: var(--danger) !important; color: var(--danger); }

/* [listing-number] ショートコード表示用 */
.wpcf7-listing-number {
  display: inline-block;
  font-family: var(--font-en);
  font-weight: 600;
  color: var(--navy-700);
  letter-spacing: 0.14em;
}

/* WordPress 固定ページのエディタ内容 */
.page-content {
  max-width: 880px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-5);
  font-size: var(--fs-15);
  line-height: 1.9;
  color: var(--ink-700);
}
.page-content h2, .page-content h3 {
  margin: var(--space-7) 0 var(--space-4);
}
.page-content p { margin: 0 0 var(--space-4); }
.page-content ul, .page-content ol { padding-left: 1.5em; margin: 0 0 var(--space-4); }

/* ブラウザ/WordPress のデフォルトな余白を解消 */
body.wp-admin-bar { margin-top: 32px !important; }

/* ============================================
   調整 — クライアント要望（v1.1）
   ============================================ */

/* 1. Big CTA: ボタンを縦並び・横幅を広げる */
.big-cta .cta-row.cta-row--stack {
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.big-cta .cta-row.cta-row--stack .btn {
  width: 100%;
  justify-content: center;
}

/* 2. 一覧ページのカード内、項目ラベル幅を縮めて値（金額）の改行を防止 */
.listings-main .listing-card dl > div {
  grid-template-columns: 72px 1fr;
  gap: var(--space-2);
}
.listings-main .listing-card dl dd {
  font-size: var(--fs-16);          /* 18 → 16 で1行に収まりやすく */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listings-main .listing-card .body { padding: var(--space-4); }

/* 3. トップページの新着案件カードも、念のため余裕を確保（不要な改行防止） */
.listings-section .listing-card dl > div {
  grid-template-columns: 80px 1fr;
}

/* 4. 特徴セクション: 内側余白を抑え、テキストの自然改行を確保 */
.features .feature {
  padding: var(--space-7) var(--space-5);
}
.features .feature p {
  text-align: center;
  max-width: 100%;
  word-break: auto-phrase;          /* 日本語の単語境界で改行（対応ブラウザのみ） */
}

/* タブレット〜ノートPC幅でカードが3列だと窮屈な場合、2列に寄せる */
@media (min-width: 1024px) and (max-width: 1199px) {
  .listings-main .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 5. ステータスバッジを撤去したため、案件番号を右寄せに */
.listing-card .top-row.top-row--no-status {
  justify-content: flex-end;
}
/* 詳細ページのno-line もバッジが無くなったのでleft寄せ */
.detail-header .no-line {
  justify-content: flex-start;
}
