/*
Theme Name: Astra Child for Lawyer Site
Theme URI: https://wpastra.com/
Description: Child theme for Astra
Author: Nakahara
Author URI: https://kaiben-mikata.com/
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/

/* =========================
   共通レイアウト
   ========================= */
.site-container { 
  max-width: 1100px; margin: 0 auto; padding: 24px 16px;
}
.sf-form-wrap { margin-bottom: 1.5rem; }

/* =========================
   ターム・ピル共通（一覧＆個別）
   ========================= */
.tax-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid #ccc; border-radius: 5px;
  background: #fff; font-size: .85rem; line-height: 1.2; color: #333;
  text-decoration: none;
}
.term-badge__img {
  width: 20px; height: 20px; object-fit: contain; border-radius: 0; display: block;
}
.tax--prefecture        { border-color:#dcdfe3; }
.tax--specialty         { border-color:#d7e8ff; }
.tax--free-consultation { border-color:#e8e3ff; }
/* 旧レイアウトのラベルが出てしまう場合の保険 */
.single-lawyer__tax .tax > strong { display:none !important; }

/* ============================================
   lawyer 一覧：横並びカード（アーカイブ＆タクソノミー）
   ============================================ */

/* カード一覧コンテナ */
.lawyer-cards {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* 1件分のカード枠 */
.lawyer-card {
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* 画像＋本文を横並びにする本体リンク */
.lawyer-card > a.card-link {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  text-decoration: none;
  color: inherit;
}

/* 左カラム：画像 */
.lawyer-card .thumb {
  flex: 0 0 260px;
  margin: 0;
}
.lawyer-card .thumb img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

/* 右カラム：本文 */
.lawyer-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0; /* はみ出し防止 */
}

/* 見出し・要約 */
.lawyer-name {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
  color: #111;
}
.brief {
  color: #444;
  font-size: .95rem;
  line-height: 1.6;
  margin-top: .25rem;
}

/* カード内のターム群（ピル） */
.lawyer-card__terms {
  display: flex;
  flex-wrap: wrap;              /* 横並び＋折り返し */
  justify-content: flex-start;  /* ← 行頭を左にそろえる */
  align-items: center;
  gap: 8px 12px;                /* ピル同士の余白 */
  margin-top: 8px;
}

/* 念のため、バッジに余計なマージンが付かないようにする */
.lawyer-card__terms .tax-badge {
  margin: 0;
}

.tax-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #ccd5e0;
  border-radius: 5px;
  background: #fff;
  font-size: .85rem;
  line-height: 1.2;
  color: #333;
  text-decoration: none;
}
.tax-badge img.term-badge__img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* 事務所情報（カード内パネル） */
.lawyer-card__facts {
  background: #f1f7ff;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
  border: 1px solid #e5efff;
  border-top: 1px dashed #e5e7eb;
  list-style: none;
  padding-inline-start: 14px;
}
.lawyer-card__facts .fact {
  display: flex;
  gap: 8px;
  font-size: .9rem;
  line-height: 1.5;
  margin: 6px 0;
  color: #333;
}
.lawyer-card__facts .fact__icon-img {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: .8;
  margin-top: 2px;
}
.lawyer-card__facts .fact__label {
  flex: 0 0 88px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}
.lawyer-card__facts .fact__value {
  flex: 1 1 auto;
  color: #333;
  word-break: break-word;
}

/* 事務所情報パネルを右カラム幅ぴったりに */
.card-body .lawyer-card__facts {
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0 0;
  padding: 12px 14px;
}

/* SPで縦並びに戻す */
@media (max-width: 768px) {
  .lawyer-card > a.card-link {
    flex-direction: column;
  }
  .lawyer-card .thumb {
    flex-basis: auto;
    width: 100%;
  }
  .lawyer-card {
    padding: 14px;
  }
}

/* SP（幅480px以下）：事務所情報のアイコン＋項目名は横並び、値はその下に */
@media (max-width: 480px) {
  .lawyer-card__facts .fact {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;  /* ← 縦並びを解除して横方向に */
    gap: 4px 6px;
  }

  /* アイコン：固定幅のまま */
  .lawyer-card__facts .fact__icon-img {
    flex: 0 0 18px;
  }

  /* 項目名：アイコンの右に横並び */
  .lawyer-card__facts .fact__label {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* 値：1行折り返して、下の段で全幅を使う */
  .lawyer-card__facts .fact__value {
    flex-basis: 100%;
    margin-left: 24px; /* お好みで：アイコン＋ラベルより少し右に下げたい場合 */
  }
}

/* =========================
   個別ページ（single-lawyer）
   ========================= */
.single-lawyer__header { margin-bottom: 1rem; }
.single-lawyer__name { font-size: 30px; font-weight: 700; margin: 0 0 .5rem; }

/* タイトル直下：タームのピル */
.single-lawyer__terms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .5rem; }

/* 個別詳細ページ PC版：弁護士名の下のピルを1行（必要なら折り返し）で左寄せ */
@media (min-width: 1024px) {

  /* 親をflex行にする */
  body.single-lawyer .single-lawyer__terms {
    display: flex;
    flex-wrap: wrap;        /* 幅が足りないときだけ2段目へ */
    gap: 8px 12px;
    align-items: center;
    margin-top: .5rem;
  }

  /* 中のラッパーdivを「透明な器」にして、子ピルを同じflex行に参加させる */
  body.single-lawyer .single-lawyer__terms > div {
    display: contents;
  }

  /* ピル自身：必ず横並び＆途中改行なしにする */
  body.single-lawyer .single-lawyer__terms .tax-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }
}

/* メインレイアウト */
.single-lawyer__grid {
  display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; margin-bottom: 1rem;
}

/* 画像の角丸＆影オフ（個別＆汎用ブロック） */
.single-lawyer__photo img,
.entry-content img,
.wp-block-image img {
  border-radius: 12px; box-shadow: none !important;
}

/* 基本情報テーブル */
.lawyer-info-table {
  width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 0.95rem;
}
.lawyer-info-table th,
.lawyer-info-table td { padding: 10px 12px; vertical-align: top; border-bottom: 1px solid #eee; }
.lawyer-info-table th {
  width: 38%; white-space: nowrap; color: #333; font-weight: 600; background: #fafafa; text-align: left;
}
.lawyer-info-table td a { word-break: break-all; }

/* 実績カード */
.lawyer-stats {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 1.5rem;
}
.lawyer-stat {
  flex: 1 1 30%; display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  background: #f1f7ff; border-radius: 8px; border: none; padding: 10px 14px; box-shadow: none;
  transition: all 0.25s ease;
}
.lawyer-stat__icon { font-size: 1.2rem; color: #2a64a3; flex-shrink: 0; line-height: 1; }
.lawyer-stat__title { font-weight: 600; color: #2a64a3; font-size: .95rem; flex: 1; }
.lawyer-stat__body { font-size: .9rem; color: #333; text-align: right; }
.lawyer-stat__num { font-weight: 700; font-size: 1rem; color: #2a64a3; }

/* 実績カード：SP */
@media (max-width: 768px) {
  .lawyer-stats { flex-direction: column; gap: 10px; }
  .lawyer-stat { flex: 1 1 100%; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px 10px; }
  .lawyer-stat__icon { margin-bottom: 4px; }
  .lawyer-stat__title { font-size: .9rem; margin-bottom: 2px; }
  .lawyer-stat__body { font-size: .9rem; text-align: center; }
  .lawyer-stat__num { font-size: .95rem; }
}

/* CTA（2ボタン横並び） */
.single-lawyer__cta-row { grid-column: 1 / -1; margin: .5rem 0 1.5rem; }
.contact-cta { display: flex; gap: 16px; width: 100%; }
.btn-cta {
  flex: 1 1 50%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 0; border-radius: 8px; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; box-sizing: border-box;
}
.btn-cta--phone {
  background: #fff; border: 2px solid #d83e13; color: #d83e13; transition: all 0.25s ease;
}
.btn-cta--phone:hover,
.btn-cta--phone:focus {
  background: #d83e13; border-color: #fff; color: #fff;
}
/* 電話CTAのアイコン色をテキスト色と揃える */
.btn-cta--phone .btn-cta__icon {
  color: #d83e13; /* 通常：赤 */
  display: inline-flex;
  align-items: center;
}
.btn-cta--phone .btn-cta__icon svg {
  width: 1.2em; height: 1.2em; /* お好みで */
}
/* ホバー時に白へ */
.btn-cta--phone:hover .btn-cta__icon {
  color: #fff; /* ホバー：白 */
}

/* ▼ LINE CTAボタン：通常 */
.btn-cta--line {
  background: #06C755;
  border: 2px solid #06C755;
  color: #fff;
  background-image: none;
  box-shadow: none;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* ▼ ホバー時：文字色は白のまま（強制固定） */
.btn-cta--line:hover,
.btn-cta--line:focus {
  background-color: #05B64C;
  border-color: #05B64C;
  color: #fff !important; /* ← 文字色固定 */
}

/* ▼ LINEアイコンの位置をわずかに下げる（1〜2pxで調整） */
.btn-cta--line .btn-cta__icon svg {
  width: 1.5em;
  height: 1.5em;
  position: relative;
  top: 3px;       /* ← 少し下げる */
  vertical-align: middle; /* ← 中央寄せ補正 */
}

/* ラベル（テキスト）の調整 */
.btn-cta__label {
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .contact-cta { flex-direction: column; gap: 12px; }
  .btn-cta { flex: 1 1 auto; width: 100%; }
}

/* 弁護士への相談の流れ（見出し＋画像、影を完全に消す） */
.single-lawyer__flow { grid-column: 1 / -1; margin: 2rem 0 2.5rem; text-align: center; }
.flow-title--plain{ font-size: 24px; font-weight: 700; color: #111; margin: 0 0 1rem; background: transparent !important; padding: 0 !important; }
.flow-image picture,
.flow-image img{
  display: block; margin: 1.25rem auto; max-width: 960px; width: 100%; height: auto;
  border-radius: 8px; box-shadow: none !important; filter: none !important; background: transparent !important;
}
/* Astra等の保険 */
.entry-content img, .wp-block-image img, .ast-single-post-content img{ box-shadow: none !important; filter: none !important; }
/* SP微調整 */
@media (max-width: 767px){
  .single-lawyer__flow{ margin: 2rem 0; }
  .flow-title--plain{ font-size: 18px; margin-bottom: .75rem; }
  .flow-image picture, .flow-image img{ margin: 1rem auto; max-width: 100%; border-radius: 6px; }
}

/* 見出し装飾（左ライン＋淡い青背景）— flow-title--plain は除外 */
.single-lawyer h2:not(.flow-title--plain),
.office-info__title {
  position: relative; font-size: 20px; font-weight: 700;
  margin: 2rem 0 1rem; padding: .75rem 1rem .75rem 1.25rem;
  background: #f1f7ff; border-radius: 6px; color: #333;
}
.single-lawyer h2:not(.flow-title--plain)::before,
.office-info__title::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 6px; background: #2a64a3; border-top-left-radius: 6px; border-bottom-left-radius: 6px;
}

/* セクションの余白 */
.single-lawyer__message,
.lawyer-cases,
.lawyer-reasons,
.office-info { margin-top: 2rem; margin-bottom: 1.5rem; }
.single-lawyer__message .message-body p { margin: .6rem 0; line-height: 1.8; }

/* チェックリスト（相談事例／選ばれる理由） */
.lawyer-cases ul,
.lawyer-reasons ul { list-style: none; padding-left: 0; margin: .8rem 0; }
.lawyer-cases ul li,
.lawyer-reasons ul li {
  position: relative; padding-left: 1.6em; margin-bottom: .6rem; line-height: 1.8; color: #333;
}
.lawyer-cases ul li::before,
.lawyer-reasons ul li::before {
  content: "✔"; position: absolute; left: 0; top: 0.1em; color: #2a64a3; font-weight: bold; font-size: 1rem;
}

/* 弁護士事務所情報（表＋地図2カラム） */
.office-info { margin-top: 2rem; }
.office-info__grid { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.office-info__table {
  width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff;
}
.office-info__table th, .office-info__table td { padding: 10px 12px; border-bottom: 1px solid #eee; vertical-align: top; }
.office-info__table th { width: 32%; white-space: nowrap; font-weight: 600; color: #333; background: #fafafa; text-align: left; }
.office-info__table td { color: #333; }
.office-info__map-address { margin: 0 0 .5rem; color: #444; }
.office-info__map-frame { border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.office-info__map-link { margin: .4rem 0 0; }
.office-info__map-link a { text-decoration: underline; }
/* 地図未設定メッセージ */
.office-info__map-empty {
  background: #f7f7f7; border: 1px solid #e0e0e0; border-radius: 8px; padding: 40px 10px; text-align: center;
  color: #666; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; flex-direction: column;
  min-height: 250px; box-sizing: border-box;
}
.office-info__map-empty::before { content: "🗺️"; display: block; font-size: 1.6rem; margin-bottom: 6px; opacity: 0.6; }

/* レスポンシブ：レイアウト */
@media (max-width: 900px) {
  .office-info__grid { grid-template-columns: 1fr; }
  .office-info__map-frame iframe { height: 260px; }
}
@media (max-width: 768px) {
  .single-lawyer__grid { grid-template-columns: 1fr; }
  .lawyer-info-table th { width: 44%; }
}

/* =========================
   検索結果がない場合の表示デザイン
   ========================= */
.no-results {
  text-align: center; padding: 60px 20px; background: #f5f9ff;
  border: 1px dashed #c5d8f1; border-radius: 12px; margin: 40px auto; max-width: 640px;
}
.no-results__icon { font-size: 3rem; line-height: 1; margin-bottom: 12px; opacity: 0.8; }
.no-results__title { font-size: 1.4rem; font-weight: 700; color: #234b84; margin-bottom: 8px; }
.no-results__desc { font-size: 1rem; color: #555; line-height: 1.6; }

/* =========================
   検索結果ページ見出し＋タグ
   ========================= */
.lawyer-archive__header { text-align: center; margin-bottom: 32px; }
.page-title { font-size: 1.8rem; font-weight: 700; color: #234b84; margin-bottom: 10px; }
.page-title .result-count { font-size: 1rem; color: #666; margin-left: 6px; }
.search-tags {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px;
}
.search-tag {
  display: inline-block; background: #f1f7ff; color: #234b84;
  border: 1px solid #c9d9f5; border-radius: 20px; padding: 6px 12px; font-size: 0.9rem; font-weight: 600; line-height: 1.2;
}

/* アーカイブ2カラム（サイドバー含む） */
.lawyer-archive-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.lawyer-sidebar { background: #f8f9fb; border-radius: 10px; padding: 16px; }
@media (max-width: 900px) {
  .lawyer-archive-layout { grid-template-columns: 1fr; }
  .filter-toggle {
    display: block; background: #0073aa; color: #fff; border: none; padding: 10px 16px;
    border-radius: 6px; font-weight: 600; width: 100%; text-align: center; margin-bottom: 12px;
  }
  .filter-area { display: none; }
  .filter-area.is-open { display: block; margin-top: 8px; }
}
@media (min-width: 901px) { .filter-toggle { display: none; } .filter-area { display: block !important; } }

/* ==============================================
   Elementorのショートコード出力フォーム（TOP含む）
   ==============================================*/
.elementor-shortcode .searchandfilter,
.elementor-shortcode form.searchandfilter {
  display: flex !important; flex-direction: column !important;
  align-items: center !important; justify-content: center;
}
.elementor-shortcode .searchandfilter > div > ul {
  display: flex !important; flex-direction: column !important; gap: 24px !important; margin: 0; padding: 0;
}
.elementor-shortcode .searchandfilter > div > ul > li { list-style: none; }
/* 見出し（青ライン） */
.elementor-shortcode .searchandfilter h4 {
  position: relative; font-size: 20px; font-weight: 700; color: #1a4e8a;
  margin: 0 0 10px; padding-left: 14px; line-height: 1.4;
}
.elementor-shortcode .searchandfilter h4::before {
  content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 100%;
  background: #1a4e8a; border-radius: 2px;
}
/* ターム横並び */
.elementor-shortcode .searchandfilter > div > ul > li > ul {
  display: flex !important; flex-wrap: wrap !important; gap: 8px 16px; margin: 0; padding: 0; list-style: none;
}
/* チェック群 */
.elementor-shortcode .searchandfilter label {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #d3e3f0; border-radius: 6px; padding: 6px 10px; cursor: pointer; transition: .2s ease;
}
.elementor-shortcode .searchandfilter input[type="checkbox"] { margin: 0; transform: translateY(1px); }
.elementor-shortcode .searchandfilter label:has(input:checked) { background: #e4f1fb; border-color: #1a4e8a; }
/* フィールド幅 */
.elementor-shortcode .searchandfilter select,
.elementor-shortcode .searchandfilter input[type="text"] {
  width: 100%; max-width: 320px; padding: 8px 10px; font-size: 15px; border: 1px solid #d3e3f0; border-radius: 6px;
}
/* 送信ボタン（中央寄せ） */
.elementor-shortcode .searchandfilter input[type="submit"] {
  display: inline-block; background: #2a64a3; color: #fff; border: none; border-radius: 6px; font-weight: 700;
  font-size: 1rem; padding: 20px 30px !important; margin-top: 20px; cursor: pointer; transition: background 0.25s ease; text-align: center;
}
.elementor-shortcode .searchandfilter input[type="submit"]:hover {
  background:#fff; border: 1px solid #2a64a3; color: #2a64a3;
}
.elementor-shortcode .searchandfilter > div > ul > li:last-child { text-align: center !important; }

/* ===========================================
   サイドバー版 Search & Filter（/lawyer/ など）
   =========================================== */
.lawyer-sidebar .searchandfilter > div > ul{
  display:flex !important; flex-direction:column !important; gap:20px !important; margin:0; padding:0;
}
.lawyer-sidebar .searchandfilter > div > ul > li{ list-style:none; }
/* 見出し（青ライン） */
.lawyer-sidebar .searchandfilter h4,
.lawyer-sidebar .searchandfilter .sf-label{
  position:relative; font-size:16px; font-weight:700; color:#1a4e8a; margin:0 0 8px; padding-left:12px; line-height:1.4;
}
.lawyer-sidebar .searchandfilter h4::before,
.lawyer-sidebar .searchandfilter .sf-label::before{
  content:""; position:absolute; left:0; top:0; width:4px; height:100%; background:#1a4e8a; border-radius:2px;
}
/* ターム */
.lawyer-sidebar .searchandfilter > div > ul > li > ul{
  display:flex !important; flex-wrap:wrap !important; gap:8px 14px; margin:0; padding:0; list-style:none;
}
.lawyer-sidebar .searchandfilter label{
  display:inline-flex; align-items:center; gap:6px; background:#fff; border:1px solid #d3e3f0; border-radius:6px; padding:6px 10px; cursor:pointer; transition:.2s ease; 
}
.lawyer-sidebar .searchandfilter input[type="checkbox"]{ margin:0; transform:translateY(1px); }
.lawyer-sidebar .searchandfilter label:has(input:checked){ background:#e4f1fb; border-color:#1a4e8a; }
/* フィールド幅 */
.lawyer-sidebar .searchandfilter select,
.lawyer-sidebar .searchandfilter input[type="text"]{
  width:100%; max-width:100%; padding:8px 10px; font-size:18px; border:1px solid #d3e3f0; border-radius:6px;
}
/* 送信ボタン */
.lawyer-sidebar .searchandfilter input[type="submit"]{
  margin-top:14px; width:100%; background:#2a64a3; color:#fff; font-weight:700;
  border:0; border-radius:6px; padding:20px 16px; cursor:pointer;
}
.lawyer-sidebar .searchandfilter input[type="submit"]:hover{
  background:#fff; border: 1px solid #2a64a3; color: #2a64a3;
}
@media (max-width: 900px){
  .lawyer-sidebar{ padding:12px; }
  .lawyer-sidebar .searchandfilter label{ padding:6px 8px; }
}

/* ===========================================
   Search & Filter：ベース（全体共通）
   =========================================== */
/* 分類ブロック（縦積み） */
.sf-form-wrap form.searchandfilter > div > ul {
  display:flex; flex-direction:column; gap:24px; margin:0 0 1.5rem; padding:0; list-style:none;
}
/* 各分類の見出し（青ライン版） */
.sf-form-wrap form.searchandfilter h4{
  font-size:1.15rem; font-weight:700; color:#2a64a3; margin:0 0 8px; position:relative; padding-left:12px;
}
.sf-form-wrap form.searchandfilter h4::before{
  content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:6px; height:1.2em; background:#2a64a3; border-radius:2px;
}
/* ターム横並び */
.sf-form-wrap form.searchandfilter li > ul{
  display:flex; flex-wrap:wrap; gap:10px 16px; margin:0; padding:0; list-style:none;
}
/* チェックボックス＋ラベル */
.sf-form-wrap form.searchandfilter li > ul > li label{
  display:inline-flex; align-items:center; gap:6px; padding:4px 8px;
  border:1px solid #ccd6e3; border-radius:6px; background:#f8faff; color:#333; font-size:1rem; cursor:pointer; transition: all .25s ease;
}
.sf-form-wrap form.searchandfilter input[type="checkbox"]{
  width:16px; height:16px; margin:0; transform:translateY(1px); accent-color:#2a64a3;
}
/* チェックON */
.sf-form-wrap form.searchandfilter input[type="checkbox"]:checked + label{
  background:#e6eefc; border-color:#2a64a3; color:#111;
}
/* セレクト＆フリーワード */
.sf-form-wrap select[name="ofprefecture"]{
  width:240px; max-width:100%; padding:6px 10px; border-radius:6px; border:1px solid #c8d6e8;
  font-size:1rem; background:#fff; transition:border-color .2s;
}
.sf-form-wrap select[name="ofprefecture"]:focus{ border-color:#2a64a3; outline:none; }
.sf-form-wrap input[name="ofsearch"]{
  width:280px; max-width:100%; padding:8px 10px; border:1px solid #c8d6e8; border-radius:6px; font-size:1rem; transition:border-color .2s; box-sizing:border-box;
}
.sf-form-wrap input[name="ofsearch"]:focus{ border-color:#2a64a3; outline:none; }
/* 送信ボタン */
.sf-form-wrap input[type="submit"]{
  background:#2a64a3; color:#fff; font-weight:600; padding:10px 22px; border:none; border-radius:6px;
  font-size:1rem; cursor:pointer; transition: background .3s;
}
.sf-form-wrap input[type="submit"]:hover{ background:#204c7d; }
/* モバイル */
@media (max-width:600px){
  .sf-form-wrap form.searchandfilter li > ul{ gap:8px 12px; }
  .sf-form-wrap form.searchandfilter h4{ font-size:1rem; }
  .sf-form-wrap select[name="ofprefecture"],
  .sf-form-wrap input[name="ofsearch"]{ width:100%; }
}

/* ===============================
   スマホ版：完全縦並び（Elementor/汎用）
   =============================== */
@media (max-width: 768px) {
  .elementor-shortcode .searchandfilter > div > ul,
  .sf-form-wrap .searchandfilter > div > ul {
    flex-direction: column !important; gap: 24px !important;
  }
  .elementor-shortcode .searchandfilter > div > ul > li > ul,
  .sf-form-wrap .searchandfilter > div > ul > li > ul {
    flex-direction: column !important; align-items: flex-start !important; gap: 8px !important;
  }
  .elementor-shortcode .searchandfilter label,
  .sf-form-wrap .searchandfilter label { width: 100%; justify-content: flex-start; }
  .elementor-shortcode .searchandfilter input[type="submit"],
  .sf-form-wrap .searchandfilter input[type="submit"] { width: 100%; margin-top: 16px; }
}

/* ===============================
   TOPページ限定：検索フォームの最小フォントサイズを18pxに
   （Elementorのショートコード版 & 汎用版の両方をケア）
   =============================== */

/* ベース（中の要素も一括で18px以上に） */
body.home .elementor-shortcode .searchandfilter,
body.home .elementor-shortcode .searchandfilter * {
  font-size: 18px !important;
}

/* 見出しだけは少し大きめに（任意） */
body.home .elementor-shortcode .searchandfilter h4 {
  font-size: 20px !important;
}

/* 入力系（iOSのズーム対策も兼ねる） */
body.home .elementor-shortcode .searchandfilter select,
body.home .elementor-shortcode .searchandfilter input[type="text"],
body.home .elementor-shortcode .searchandfilter input[type="search"],
body.home .elementor-shortcode .searchandfilter input[type="submit"] {
  font-size: 18px !important;
  line-height: 1.6;
}

/* チェックボックスのラベル（タームのピル） */
body.home .elementor-shortcode .searchandfilter label {
  font-size: 18px !important;
}

/* 万が一TOPがショートコードではなく汎用ラッパーを使っている場合の保険 */
body.home .sf-form-wrap .searchandfilter,
body.home .sf-form-wrap .searchandfilter * {
  font-size: 18px !important;
}

/* 絞込検索HTMLの装飾 */
.area-cascade select{ min-width: 200px; padding:.5rem .6rem; }
.area-cascade label{ font-weight:600; margin-right:.4rem; }

/* ===== Area（都道府県/市区町村） ===== */
/* 1) Elementor の中央揃えを解除して左揃えに */
.elementor-shortcode .searchandfilter{
  align-items: flex-start !important;
  text-align: left !important;
}
.elementor-shortcode .searchandfilter > div > ul{
  align-items: stretch !important;
}

/* 2) 既存 S&F の「エリア（lawyer-area）」行は非表示（重複防止）
      - oflawyer-area（エリア一覧）を含む <li> を丸ごと非表示にする */
.searchandfilter li:has([data-sf-field="lawyer-area"]),
.searchandfilter li:has(select[name="tax[lawyer-area]"]),
.searchandfilter li:has(select[name="oflawyer-area"]),
.searchandfilter li:has(#oflawyer-area) {
  display: none !important;
}

/* 3) 見出し「エリア」（S&Fと同じ青ライン・20px）
      - .area-cascade__label が「エリア」の見出し要素 */
#area-cascade-box{
  margin: 0 0 16px !important;
}
#area-cascade-box .area-cascade__label{
  grid-column: 1 / -1;          /* 2列ぶち抜きで1行占有 */
  position: relative;
  font-size: 20px;
  font-weight: 700;
  color: #1a4e8a;
  line-height: 1.4;
  margin: 0 0 12px;
  padding-left: 14px;
}
#area-cascade-box .area-cascade__label::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: #1a4e8a;
  border-radius: 2px;
}

/* 4) レイアウト：PC=横2列／SP=縦1列
      - 子要素（見出し + 2つの .field-group）をグリッド配置 */
#area-cascade-box .area-cascade{
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
  row-gap: 12px;
  justify-items: start;
}

/* 5) 各フィールド（都道府県/市区町村）の体裁 */
#area-cascade-box .field-group{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#area-cascade-box .field-group label{
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}
#area-cascade-box .field-group select{
  width: 100%;
  max-width: 320px;
  padding: 6px 12px;
  font-size: 18px;
  line-height: 1.6;
  border: 1px solid #d3e3f0;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}

/* 6) スマホは縦並び＆幅いっぱい */
@media (max-width: 768px){
  #area-cascade-box .area-cascade{
    grid-template-columns: 1fr;   /* 1列 */
    row-gap: 12px;
  }
  #area-cascade-box .field-group select{
    max-width: 100%;
  }
}

/* サイドバーのエリアは縦並びにする */
.lawyer-sidebar #area-cascade-box .area-cascade{
  grid-template-columns: 1fr;   /* 1列に変更 */
  row-gap: 12px;                /* 上下の余白 */
}
.lawyer-sidebar #area-cascade-box select{
  max-width: 100%;              /* はみ出さないように幅を制限 */
}

/* ============================================
   最終版：弁護士カードを2カラムにする
   （article を横並びコンテナに）
   ============================================ */

/* カード枠（article 全体を横並びに） */
.lawyer-card {
  display: flex !important;
  align-items: flex-start;
  gap: 24px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  max-width: 900px;
  margin: 0 auto 32px;
  box-sizing: border-box;
}

/* 左カラム：画像リンク */
.lawyer-card .card-link {
  display: flex !important;          /* ★ 縦並び → 横並びの決め手 */
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  text-decoration: none;
  color: inherit;
}

.lawyer-card .card-link img {
  width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

/* 右カラム：本文 */
.lawyer-card .card-body {
  flex: 1 1 auto !important;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* スマホでは縦並びに戻す */
@media (max-width: 768px) {
  .lawyer-card {
    flex-direction: column !important;
  }
  .lawyer-card .card-link {
    flex-basis: auto !important;
    width: 100% !important;
  }
}

/* =========================
   エリア用ピル（都道府県 & 市区町村）
   ========================= */

/* 都道府県ピル（控えめ・グレー寄り） */
.tax-pill--pref {
  border-color: #ddd;
  background: #f8f8f8;
  color: #555;
}

/* 一覧ページ用（.is-lawyer-archive で上書きされないように保険） */
body.is-lawyer-archive .tax-pill--pref {
  border-color: #ddd;
  background: #f8f8f8;
  color: #555;
}

/* ================================
   ピル行の並びを整える
   ================================ */

/* 右カラム内で、要素を上に詰めて縦並び */
.lawyer-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  /* ← 空白を作らない */
  gap: 8px;
}

/* 都道府県ピルを左寄せに戻す */
.tax-pill--pref {
  margin-left: 0 !important;
}

/* ===== 弁護士カード内のピル配置（1行目＝エリア, 2行目＝専門分野+無料相談） ===== */

/* ピル全体のコンテナ */
.lawyer-card__terms {
  display: flex;
  flex-wrap: wrap;              /* 横並び＋折り返し */
  justify-content: flex-start;  /* 左揃え */
  align-items: flex-start;
  gap: 8px 12px;
  margin: 8px 0;
  padding: 0;
}

/* 1行目：都道府県＋市区町村グループ → 1行まるごと使う */
.lawyer-card__pref {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0 !important;
  width: 100%;                  /* ★ここで「この行はここまで」と区切る */
  margin: 0;
  padding: 0;
}

/* 2行目：専門分野＋無料相談グループ → 横並びで左揃え */
.lawyer-card__specialty,
.lawyer-card__free {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
}

/* ピル自体はインラインっぽく並べる */
.lawyer-card__terms a.tax-badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

/* 都道府県だけ 6px 間をあけたい */
.lawyer-card__pref a.tax-badge {
  margin-right: 6px;
}

/* 一覧・検索結果：弁護士名とピルの間の余白を少し詰める */
.lawyer-name {
  margin-bottom: 0px;   /* 6px → 0px に上書き */
}

.lawyer-card__terms {
  margin-top: 2px;      /* 8px → 2px に上書き */
}

/*「詳しく見る」ボタン */
.btn-cta--detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  padding: 5px 16px;        /* 小さめサイズ */
  font-size: 14px;          /* 控えめな文字サイズ */
  font-weight: 600;

  background: #d83e13;
  border: 2px solid #d83e13;
  color: #fff;

  border-radius: 4px;       /* 角丸を控えめに */
  text-decoration: none;

  transition: all 0.25s ease;
}

/* ▼ ホバー（色反転） */
.btn-cta--detail:hover,
.btn-cta--detail:focus {
  background: #fff;
  border-color: #d83e13;
  color: #d83e13;
}

/* ▼ ボタン横の矢印アイコン */
.btn-cta--detail__icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.9em;
  transition: transform 0.2s ease;
}

/* ▼ ホバーで矢印が右に動く（控えめ） */
.btn-cta--detail:hover .btn-cta--detail__icon,
.btn-cta--detail:focus .btn-cta--detail__icon {
  transform: translateX(2px);
}

/* ▼ カード内でのボタンの余白＋右寄せ */
.lawyer-card__cta {
  margin-top: 16px;
  text-align: right;       /* 右寄せ */
}

/* ▼ スマホでだけ中央寄せにしたい場合 */
@media (max-width: 768px) {
  .lawyer-card__cta {
    text-align: center;
  }
}

/* ▼ Pick Up カード周りの余白調整（SP・タブレット） */
@media (max-width: 1024px) {   /* ← タブレット以下 */
  .lawyer-cards--pickup {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 768px) {    /* ← スマホ */
  .lawyer-cards--pickup {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.lawyer-title-tag {
  font-size: 0.75em;   /* 名前より25%小さく */
  margin-left: 4px;    /* 少しスペースをあける */
  display: inline-block;
  vertical-align: baseline; /* 行の高さを安定させる */
}

/* ▼ ヘッダー全体を画面上部に固定（常時表示） */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ▼ 内側のコンテナは元のレイアウトのまま */
.site-primary-header-wrap {
  position: static;
}

/* ▼ 固定ヘッダー分だけ記事を下げる（数値は調整OK） */
.site-content {
  margin-top: 80px;
}
