* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
}

/* ヘッダー */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

/* ナビゲーション全体のコンテナ */
.global-nav {
  margin-left: auto;
  /* 右寄せにする場合 */
}

/* リスト（ul）のスタイル */
.nav-list {
  display: flex;
  /* 横並びにする */
  list-style: none;
  /* ・を消す */
  margin: 0;
  padding: 0;
  gap: 20px;
  /* メニュー同士の間隔 */
}

/* リンク（a）のスタイル */
.nav-list li a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  display: block;
  /* クリック範囲を広げる */
}

.nav-list li a:hover {
  color: #0073aa;
  /* ホバー時の色 */
}

/* 現在表示しているページのメニューを目立たせる（WordPressが自動で current-menu-item クラスを付けてくれます） */
.nav-list .current-menu-item a {
  color: #0073aa;
  border-bottom: 2px solid #0073aa;
}

/* ベースレイアウト */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヒーローセクション */
.hero-section {
  background-color: #f0f4f8;
  /* 薄い青グレー */
  padding: 80px 0;
  text-align: center;
  margin-bottom: 60px;
}

.hero-desc {
  margin-bottom: 30px;
  font-size: 1.2rem;
}

.hero-cta .btn {
  margin: 0 10px;
}

/* ボタン共通 */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.3s;
}

.btn:hover {
  opacity: 0.8;
}

.btn-primary {
  background: #0073aa;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: #0073aa;
  border: 1px solid #0073aa;
}

.btn-outline {
  border: 1px solid #333;
  color: #333;
  padding: 10px 40px;
}

/* 案件グリッド（カード型レイアウト） */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  /* レスポンシブ対応 */
  gap: 30px;
  margin-bottom: 40px;
}

/* 案件カード */
.project-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* カード画像エリア */
.card-image {
  height: 180px;
  background-color: #eee;
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ステータスバッジ */
.status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  font-size: 12px;
  color: #fff;
  border-radius: 4px;
  z-index: 10;
}

.status-badge.new {
  background-color: #28a745;
}

.status-badge.contracted {
  background-color: #dc3545;
}

/* 赤色 */

.type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  font-size: 12px;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  z-index: 10;
}

/* カード情報エリア */
.card-body {
  padding: 15px;
}

.card-title {
  font-size: 18px;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.card-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: #666;
}

.card-meta li {
  margin-bottom: 5px;
}

.card-meta .price {
  font-weight: bold;
  color: #0073aa;
  font-size: 16px;
  margin-top: 10px;
}

/* もっと見るボタン */
.view-more {
  text-align: center;
  margin-bottom: 60px;
}





/* リセット・共通 */
.project-item {
  display: flex;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.project-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 左側：画像 */
.project-image {
  width: 35%;
  position: relative;
  background: #eee;
  min-height: 250px;
  /* 画像がない場合の高さ確保 */
}

.project-image a {
  display: block;
  height: 100%;
  width: 100%;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.type-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
}

/* 右側：コンテンツ */
.project-content {
  width: 65%;
  padding: 20px 25px;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 20px;
  margin: 0 0 15px 0;
  line-height: 1.4;
}

.project-title a {
  color: #333;
  text-decoration: none;
}

/* 基本情報リスト */
.info-section {
  margin-bottom: 15px;
}

.info-label {
  font-size: 14px;
  color: #888;
  margin: 0 0 8px 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 4px;
}

.spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* 2列表示 */
  gap: 8px 20px;
  margin: 0;
}

.spec-row {
  display: flex;
  align-items: baseline;
  font-size: 14px;
}

.spec-row dt {
  color: #666;
  width: 5em;
  /* ラベル幅固定 */
  flex-shrink: 0;
}

.spec-row dd {
  margin: 0;
  font-weight: 500;
}

.spec-row dd.price {
  color: #d32f2f;
  font-weight: bold;
}

/* 事業者情報（下部グレーエリア） */
.provider-info {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 6px;
  margin-top: auto;
  /* 下寄せ */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.provider-info .info-label {
  display: none;
  /* デザイン上ラベルが不要なら消す */
}

.provider-details {
  flex: 1;
}

.provider-name {
  margin: 0;
  font-weight: bold;
  font-size: 15px;
}

.provider-meta {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: #666;
}

/* 詳細ボタン */
.btn-detail {
  background: #fff;
  border: 1px solid #0073aa;
  color: #0073aa;
  padding: 8px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-detail:hover {
  background: #0073aa;
  color: #fff;
}

/* レスポンシブ対応（スマホ） */
@media (max-width: 768px) {
  .project-item {
    flex-direction: column;
  }

  .project-image,
  .project-content {
    width: 100%;
  }

  .project-image {
    height: 200px;
  }

  .spec-list {
    grid-template-columns: 1fr;
    /* 1列にする */
  }

  .provider-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .action-area {
    width: 100%;
    text-align: right;
  }
}

/* マイページ用レイアウト */
.mypage-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 0 20px;
}

/* 通知メッセージ */
.mypage-notice {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}

/* ACFフォームの調整 */
.acf-form-submit {
    text-align: center;
    margin-top: 40px;
}

/* ボタンのデザイン（テーマに合わせて調整してください） */
.acf-form-submit button {
    background-color: #333; /* メインカラー */
    color: #fff;
    padding: 12px 40px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
}
.acf-form-submit button:hover {
    opacity: 0.8;
}

/* タイトル入力欄（会社名）のデザイン調整 */
.acf-field-post-title input {
    width: 100%;
    padding: 10px;
    font-size: 1.2em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ACFのタブをフロントエンドで綺麗に見せる */
.acf-tab-wrap {
    background: #f1f1f1;
    border-radius: 5px 5px 0 0;
    margin-bottom: 20px;
}
.acf-tab-group {
    border-bottom: 1px solid #ccc;
    margin: 0 0 20px;
    padding: 10px 10px 0;
}
.acf-tab-group li a {
    background: #e0e0e0;
    padding: 10px 15px;
    border-radius: 5px 5px 0 0;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    border: 1px solid transparent;
}
.acf-tab-group li.active a {
    background: #fff;
    border: 1px solid #ccc;
    border-bottom-color: #fff;
    color: #000;
}



/* 問い合わせ */
.scroll-contents {
  margin: 1em auto;
  padding: 10px;
  height: 250px;
  width: 90%;
  border: 1px solid #CCC;
  overflow: auto;
  text-align: center;
  background: #ffffff;
}

[data-name="agreement"] {
  margin: 1em auto;
  text-align: center;
}




/* =========================================
   案件詳細ページ (single-projects.php) 用CSS
   ========================================= */

/* ヘッダー周り */
.project-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}
.header-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap; /* スマホで崩れないように折り返し */
}
.label-type {
    background: #0073aa;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}
.label-area {
    background: #eee;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}
.project-title {
    font-size: 28px;
    margin: 10px 0 0;
    font-weight: bold;
    line-height: 1.4;
}

/* 画像ギャラリー */
.project-gallery {
    margin-bottom: 40px;
}
.main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 500px;
    object-fit: cover;
    display: block; /* 画像下の余白消し */
}
.main-image.no-image {
    background: #f0f0f0;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.sub-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}
.sub-images img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* ハイライトスペック（3列レイアウト） */
.highlight-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}
.spec-box {
    text-align: center;
}
.spec-box .label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    font-weight: bold;
}
.spec-box .value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}
.spec-box .value.price {
    color: #d32f2f;
}
.spec-box .unit {
    font-size: 14px;
    font-weight: normal;
}

/* 詳細セクション共通 */
.detail-section {
    margin-bottom: 50px;
}
.section-head {
    font-size: 20px;
    border-left: 5px solid #0073aa;
    padding-left: 15px;
    margin-bottom: 20px;
    background: #fff;
    font-weight: bold;
}

/* テーブルスタイル */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid #ddd;
}
.spec-table th, .spec-table td {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    vertical-align: top; /* 長文時のズレ防止 */
}
.spec-table th {
    width: 30%;
    background: #f5f5f5;
    font-weight: normal;
    color: #555;
    min-width: 120px; /* スマホで見やすく */
}
.spec-table td {
    font-weight: 500;
}

/* チェックリスト */
.checklist-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.check-item {
    background: #f0fcf4;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.check-icon {
    color: #27ae60;
    font-weight: bold;
}

/* 事業者・問い合わせエリア */
.provider-contact-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 60px;
    border-top: 2px solid #0073aa;
    padding-top: 40px;
}
.provider-box, .contact-box {
    padding: 25px;
    border-radius: 8px;
}

/* 事業者ボックス */
.provider-box {
    background: #f9f9f9;
    border: 1px solid #eee;
}
.box-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
.provider-inner {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.p-logo img {
    max-width: 150px;
    height: auto;
    border: 1px solid #ddd;
    background: #fff;
    padding: 5px;
}
.p-name {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 10px;
}
.p-name a {
    color: #333;
    text-decoration: none;
}
.p-name a:hover {
    text-decoration: underline;
}
.p-meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: #555;
}
.p-meta-list li {
    margin-bottom: 5px;
}
.p-divider {
    border: 0;
    border-top: 1px dashed #ccc;
    margin: 15px 0;
}
.p-contact-person {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #eee;
}
.p-contact-person .sub-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 5px;
    font-weight: bold;
    display: block;
}
.p-contact-person .person-name {
    font-weight: bold;
    font-size: 16px;
    margin: 0 0 5px;
}
.p-contact-person .person-tel {
    font-size: 15px;
    color: #0073aa;
    font-weight: bold;
    margin: 0;
}
.p-more-link {
    margin-top: 10px;
    font-size: 13px;
    text-align: right;
}
.p-more-link a {
    color: #0073aa;
}

/* 問い合わせボックス */
.contact-box {
    background: #fffbf0;
    border: 1px solid #faeacc;
    text-align: center;
}
.contact-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}
.btn-contact {
    display: block;
    width: 100%;
    background: #d32f2f;
    color: #fff;
    padding: 15px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    transition: opacity 0.2s;
}
.btn-contact:hover {
    opacity: 0.8;
}
.contact-note {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* レスポンシブ対応（スマホ） */
@media (max-width: 768px) {
    .highlight-specs {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .checklist-grid {
        grid-template-columns: 1fr;
    }
    .provider-contact-area {
        grid-template-columns: 1fr;
    }
    .spec-table th, .spec-table td {
        display: block;
        width: 100%;
    }
    .spec-table th {
        background: #f0f0f0;
        padding: 10px 15px;
        margin-top: -1px; /* 線の重複防止 */
    }
    .spec-table td {
        padding: 10px 15px 15px;
    }
}



.provider-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.pagination-wrapper ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    gap: 10px;
}
.pagination-wrapper a, .pagination-wrapper span {
    display: block;
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    border-radius: 4px;
    color: #333;
}
.pagination-wrapper span.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}








/* ヘッダーエリア */
.provider-header-area {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}
.ph-logo {
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 10px;
}
.ph-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.ph-info { flex: 1; }
.ph-title { font-size: 28px; font-weight: bold; margin: 0 0 15px; }
.ph-meta { list-style: none; padding: 0; margin: 0; color: #666; }
.ph-meta li { margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }

/* テーブルスタイル */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    border-top: 2px solid #0073aa;
}
.detail-table th, .detail-table td {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}
.detail-table th {
    width: 25%;
    background: #f9f9f9;
    font-weight: bold;
    color: #444;
}
.tag-label {
    display: inline-block;
    background: #eef4f9;
    color: #0073aa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    margin-right: 5px;
    margin-bottom: 5px;
}
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}
.check-list li { font-size: 14px; }

/* 連絡先ブロック */
.contact-info-block {
    background: #fffbf0;
    border: 1px solid #faeacc;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 40px;
}
.contact-info-block h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 10px;
}
.contact-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
}
.contact-dl dt { font-weight: bold; color: #666; }
.contact-dl dd { margin: 0; font-weight: bold; }

/* 編集ボタンエリア */
.owner-actions {
    margin: 30px 0; padding: 20px;
    background: #f0f8ff; border: 1px dashed #0073aa;
    text-align: center; border-radius: 5px;
}
.btn-edit {
    display: inline-block; background: #0073aa; color: #fff;
    padding: 10px 20px; text-decoration: none; border-radius: 4px;
}

/* 案件リスト（簡易） */
.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px;
}
.rel-project-card {
    display: block; text-decoration: none; color: #333;
    background: #fff; border: 1px solid #eee; border-radius: 5px;
    overflow: hidden; transition: transform 0.2s;
}
.rel-project-card:hover { transform: translateY(-3px); box-shadow: 0 3px 10px rgba(0,0,0,0.1); }
.rel-img { height: 140px; background: #f0f0f0; position: relative; }
.rel-img img { width: 100%; height: 100%; object-fit: cover; }
.rel-label { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.7); color: #fff; padding: 2px 6px; font-size: 11px; border-radius: 2px; }
.rel-body { padding: 15px; }
.rel-title { font-size: 14px; font-weight: bold; margin: 0 0 5px; }
.rel-spec { font-size: 12px; color: #666; margin: 0; }
.no-data { color: #999; }

@media (max-width: 768px) {
    .provider-header-area { flex-direction: column; align-items: center; text-align: center; }
    .detail-table th, .detail-table td { display: block; width: 100%; }
    .detail-table th { background: #eee; }
    .check-list { grid-template-columns: 1fr; }
    .contact-dl { grid-template-columns: 1fr; }
    .contact-dl dt { margin-top: 10px; }
}




#provider-alert-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-width: 90vw;
    z-index: 99999;
    font-family: sans-serif;
    animation: slideInUp 0.5s ease;
}
.toast-content {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border-left: 5px solid #ff4444; /* 基本エラー色 */
}
.toast-item {
    padding: 15px;
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
}
.toast-item:last-child {
    border-bottom: none;
}
.toast-item.error-onsite {
    background-color: #fff8e1; /* オンサイトは注意喚起色（薄い黄色） */
    border-left: 5px solid #ffbb33; /* オンサイト用のアクセント上書き */
    margin-left: -5px; /* 親のborderを隠すため */
    padding-left: 20px;
}
.toast-item .icon {
    font-size: 20px;
    margin-right: 10px;
    padding-top: 2px;
}
.toast-item .text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}
.toast-item .text p {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}
.toast-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
}
@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}