/*
Theme Name: nissan-nara-child
Template: nissan-nara
Description: 奈良日産 オリジナルテーマの子テーマ
Author: sugimoto
Version: 1.0
*/

/* 共通レイアウト */
.inventory-archive .container,
.inventory-single .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-title, .inventory-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.8rem;
  font-weight: bold;
  border-bottom: 2px solid #ddd;
  padding-bottom: 15px;
}

/* ----------------
   在庫一覧ページ
   ---------------- */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.inventory-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

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

.inventory-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0f0f0;
}

.inventory-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-info {
  padding: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.inventory-title {
  font-size: 1.2rem;
  margin: 0 0 10px;
  border: none;
  text-align: center;
  padding: 0;
  color: #8F919D;
}

.inventory-highlight {
  color: #c3002c;
  font-size: 1.2rem;
  margin-bottom: 15px;
  background: #fff5f5;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
}

.inventory-highlight strong {
  font-size: 2rem;
}

.tax-note {
  font-size: 1.2rem;
  color: #666;
}

.inventory-detail-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  color: black;
}

.inventory-detail-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #eee;
  padding: 2px 0;
}

.inventory-detail-list li span {
  color: #888;
  font-weight: bold;
}

/* --- 追加スタイル: リースに含まれる項目（一覧） --- */
.lease-included-note {
    background: #eef7ee;
    border: 1px solid #d4e7d4;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.lease-included-note p {
    font-size: 1.2rem;
    font-weight: bold;
    color: #388e3c;
    margin: 0 0 5px 0;
}
.lease-included-note ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1.2rem;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    gap: 0 15px;
}
/* ----------------------------------------------- */

.inventory-buttons {
  margin-top: auto;
}

.btn {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 12px;
  border-radius: 6px;
  transition: opacity 0.3s;
  cursor: pointer;
  border: none;
  font-weight: bold;
}
.btn:hover { opacity: 0.8; }

.btn-detail { background: #333; color: #fff; }
.btn-inquiry { background: #d32f2f; color: #fff; margin-bottom: 10px; }
.btn-tel { background: #0288d1; color: #fff; margin-bottom: 10px; }
.btn-damage { background: #ffa000; color: #fff; width: 100%; }
.btn-pdf-open { /* モーダル内のPDFを開くボタン */
    background: #c3002c; 
    color: #fff; 
    display: inline-block;
    padding: 10px 20px;
}

/* ----------------
   詳細ページ (黒ベース、赤差し色、文字サイズ大)
   ---------------- */

.inventory-single {
    background-color: #1a1a1a; /* Dark base color */
    color: #f0f0f0; /* Light text color */
}

.inventory-single .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  font-size: 1.1rem; /* Increased base font size for detailed content */
}

.single-header {
    /* タイトルブロックを削除または非表示にする場合、このスタイルは不要 */
    padding: 0; 
    margin: 0;
    border-bottom: none;
}

/* メインコンテンツエリアのグリッドレイアウト */
.inventory-main-content {
  display: grid;
  grid-template-columns: 1fr 350px; /* 写真ブロックとサマリーブロックの2カラム */
  gap: 40px;
  align-items: start;
}

.inventory-photo-block {
    grid-column: 1;
}

/* 契約済みステータス表示 */
.main-image-box {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #444; /* Darker border */
  position: relative; /* オーバーレイ用 */
}
.main-image-box img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.3s ease;
}

/* 契約済みの場合のオーバーレイと画像フィルタ */
.main-image-box.sold-out img {
    filter: brightness(50%) grayscale(50%); /* 薄暗くする */
}
.sold-out-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3); /* さらに暗くする */
    z-index: 10;
}
.sold-out-overlay span {
    color: #fff;
    background-color: #c3002c; /* 赤いバッジ */
    padding: 15px 30px;
    font-size: 2.5rem;
    font-weight: bold;
    border-radius: 8px;
    transform: rotate(-10deg); /* 少し傾ける */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.sub-images-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  /* サブ写真の最大10列表示を想定し、コンテナの幅とflex-wrapで調整 */
}

/*.sub-thumb-item {
  width: 80px;
  height: 60px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0; /* 縮まないように */
/*}
.sub-thumb-item:hover { border-color: #c3002c; }
.sub-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
} */

/* 情報サマリーブロック (PC: 右側 / スマホ: 2段目) */
.inventory-info-summary {
  grid-column: 2;
  position: sticky;
  top: 20px;
  background: #F0F0F1; /* Dark background */
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #444;
}

/* 車両名（ページタイトル） */
.inventory-title {
  font-size: 2rem; /* タイトルサイズを調整 */
  font-weight: 900;
  margin: 0 0 10px 0;
  text-align: left;
  color: #1D2327;
  border-bottom: 1px solid #444;
  padding-bottom: 20px;
}

.payment-summary-box {
    margin-bottom: 20px;
}

/* 月々支払額（赤文字で大きく） */
.monthly-payment-highlight {
    text-align: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #FFF5F5;
    border-radius: 6px;
    border: 1px solid #c3002c;
    font-size: 1.3rem;
    color: #c3002c;
}
.monthly-payment-highlight strong {
    font-size: 2.4rem; /* 非常に大きく */
    color: #c3002c; /* 赤色 */
    display: block;
    line-height: 1.2;
}
.tax-note {
    font-size: 0.9rem;
    color: #aaa;
}


/* リースに含まれる内容 */
.lease-included-detail {
    margin-top: 20px;
    margin-bottom: 20px;
}
.sec-title-small {
    font-size: 1.2rem;
    color: #c3002c;
    margin: 10px 0 10px 0;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}
.included-list-box {
    padding: 8px;
    border-radius: 6px;
}

/* タグ全体の行設定 */
.included-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px; /* タグ同士の間隔 */
}

/* タグ（１つ１つの li） */
.included-list li {
    display: inline-flex;
    align-items: center;
    background: #444;           /* タグ背景 */
    color: #fff;
    padding: 5px 5px;          /* タグの内側余白 */
    border-radius: 20px;         /* pill型 */
    font-size: 1.2rem;
    border: 1px solid #555;      /* 少し立体感 */
    white-space: nowrap;         /* 改行しない */
}

/* アクションボタンエリア（サマリーブロック内） */
.action-buttons-area {
  margin-top: 20px;
  padding: 0;
  background: transparent;
  border: none;
}
.btn-inquiry { background: #c3002c; color: #fff; margin-bottom: 10px; }
.btn-tel { background: #555; color: #fff; margin-bottom: 10px; }
.btn-sold-out { 
    background: #666; 
    color: #ccc; 
    cursor: not-allowed; 
    border: 1px solid #444;
}
.btn-text-link { /* 基本情報テーブル内の確認ボタン */
    background: none;
    border: none;
    color: #c3002c;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: 1.1rem;
    font-weight: normal;
}


/* Quick Specs: 写真・サマリーの下に表示 */
.quick-specs-section {
    grid-column: 1 / -1; /* 全幅を使う */
    margin-top: 40px;
}
/* 基本スペックテーブル */
.spec-section {
    grid-column: 1 / -1; /* 全幅を使う */
    margin-top: 40px;
}
/* 装備仕様ラッパー */
.equip-detail-wrapper {
    grid-column: 1 / -1; /* 全幅を使う */
    margin-top: 40px;
}

.sec-title {
  font-size: 1.6rem; 
  border-left: 5px solid #c3002c; 
  padding-left: 15px;
  margin: 30px 0 20px;
  background: transparent;
  padding: 10px 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
}
/* サマリーテーブルとQuick Specsのテーブルのスタイルを統一しつつ調整 */
.spec-table th, .spec-table td {
  border: 1px solid #444; 
  padding: 12px 15px; /* パディングを少し調整 */
  font-size: 1.2rem;
}
.spec-table th {
  background: #2c2c2c; 
  color: #fff; 
  width: 35%; /* 見出し幅を少し広げた */
  text-align: left;
}
.spec-table td {
    background: #1a1a1a; 
    color: #f0f0f0; 
    font-size: 1.1rem; /* データ部分の文字サイズをベースサイズに */
}
.summary-table th { /* サマリーテーブルの見出し幅調整 */
    width: 40%;
}


/* 装備仕様の調整 */
.equip-detail-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 装備を2カラムで表示 */
    gap: 30px;
    margin-top: 20px; /* sec-titleの下に */
}
.equip-detail-wrapper > .sec-title {
    grid-column: 1 / -1;
}

.equip-sub-section {
    padding: 15px;
    background: #2c2c2c;
    border-radius: 8px;
}
.equip-title {
  font-size: 1.4rem; 
  color: #c3002c; 
  border-bottom: 2px solid #444;
  padding-bottom: 5px;
  margin-top: 0;
}
.equip-list {
    list-style: none;
    padding: 10px 0 0 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 20px;
}
.equip-list li {
  font-size: 1.2rem;
  width: calc(50% - 10px); /* 2カラム表示 */
}
.check-icon {
  color: #c3002c; 
  margin-right: 5px;
}

/* レコメンド */
.inventory-recommend {
  grid-column: 1 / -1;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 2px solid #444;
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.rec-card {
  text-decoration: none;
  color: #f0f0f0; 
  display: block;
}
.rec-thumb img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
}
.rec-title { font-weight: bold; margin-top: 5px; font-size: 1.2rem; }
.rec-price { color: #c3002c; font-size: 1.2rem; }


/* モーダル */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff; 
  color: #333;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
}
.close-modal:hover { color: #000; }



/* スマホ対応 */
@media screen and (max-width: 1000px) {
  .inventory-main-content {
    grid-template-columns: 1fr; /* 1カラム表示 */
    gap: 0;
  }
  .inventory-info-summary {
    grid-column: 1;
    position: static; /* sticky解除 */
    margin-top: 20px;
  }
  .inventory-title {
      text-align: center;
  }
  .quick-specs-section,
  .spec-section {
      margin-top: 30px;
  }
  .equip-detail-wrapper {
    grid-template-columns: 1fr; /* 1カラム表示 */
    gap: 20px;
  }
  .equip-list li {
    width: 100%; /* 1カラム表示 */
  }
  .recommend-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/**********************************************
 * 共通：サブギャラリー表示（PC・SP 共通）
 **********************************************/
.sub-gallery-wrapper {
    max-height: 200px;           /* ← PC/SP 共通で縦スクロール */
    overflow-y: auto;
    padding-right: 6px;
}

.sub-gallery-grid {
    display: grid;
    grid-auto-rows: auto;  /* ← これが無いと縦が変わらない */
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* ← 横幅 */
    gap: 4px;}

.sub-thumb-item {
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.2s;
}

.sub-thumb-item:hover {
    border-color: #c3002c;
}

.sub-thumb-item img {
    width: 100%;
    height: 60px;   /* ← ここを変えたらちゃんと縦も変わる */
    object-fit: cover;
    display: block;
}


/**********************************************
 * PC（大画面）
 **********************************************/
@media (min-width: 768px) {
    .sub-gallery-wrapper {
        max-height: 140px;       /* PC はもう少し高さを確保 */
    }

    .sub-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        /* ← サムネイルを大きめに */
    }

    .sub-thumb-item img {
        height: 40px;          /* PC はさらに大きめに */
    }
}


/**********************************************
 * SP（スマホ）
 **********************************************/
@media (max-width: 767px) {

    .sub-gallery-wrapper {
        max-height: 160px;
        overflow-y: auto;      /* ← SP も縦スクロール */
    }

    .sub-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .sub-thumb-item img {
        height: 60px;         /* SP も大きめで見やすく */
    }
}
.lease-notice-box {
    border: 2px dashed #999;    /* 点線ボーダー */
    padding: 15px 18px;
    margin: 35px 0 25px;
    border-radius: 6px;
    background: none;           /* 背景なし */
}

.lease-notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lease-notice-list li {
    font-size: 1.25rem;
    line-height: 1.55;
    margin-bottom: 6px;
}

.lease-notice-list li:last-child {
    margin-bottom: 0;
}

/* ===============================
   4列仕様の車両情報テーブル
   =============================== */
.car-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.car-info-table th,
.car-info-table td {
    border: 1px solid #444;
    padding: 12px 15px;
    font-size: 1.2rem;
    background: #1a1a1a;
    color: #f0f0f0;
}

.car-info-table th {
    background: #2c2c2c;
    font-weight: bold;
    width: 22%;
}

.car-info-table td {
    width: 28%;
}

/* SP：2列構成に変更 */
@media (max-width: 768px) {
    .car-info-table th,
    .car-info-table td {
        font-size: 1rem;
        padding: 10px;
    }

    .car-info-table th {
        width: 35%;
    }
}

.back-to-inventory {
    margin: 20px 0;
    text-align: left;
}

.btn-back {
    display: inline-block;
    padding: 10px 18px;
    background: #333;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: 0.2s;
}

.btn-back:hover {
    opacity: 0.8;
}

/* 下部リンクを中央寄せにしたい場合はこれを追加 */
.bottom-back-link {
    text-align: center;
    margin-top: 40px;
}

.bottom-action-buttons {
    margin: 40px auto 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.bottom-action-buttons .bottom-btn {
    width: 100%;
    font-size: 1.2rem;
    padding: 14px;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}

.back-to-inventory-outside {
    margin-bottom: 10px; /* 写真との間の余白 */
}

.back-to-inventory-outside a {
    display: inline-block;
    font-size: 1.2rem;
    color: #c3002c;
    text-decoration: none;
    font-weight: bold;
}

.back-to-inventory-outside a:hover {
    text-decoration: underline;
}

/* 契約済みオーバーレイ（一覧ページ用） */
.inventory-card .thumb-wrapper {
    position: relative;
}

.sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 2;
}

/* ← ここだけ修正（中央に移動） */
.sold-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 中央に配置 */
    z-index: 3;
    background: #c3002c;
    color: #fff;
    padding: 5px 10px;
    font-size: 2.5rem;
    font-weight: bold;
    border-radius: 4px;
    white-space: nowrap; /* 文字折返し防止 */
}

.inventory-sort {
    margin-bottom: 20px;
    text-align: right;
}

.inventory-sort select {
    padding: 6px 10px;
    font-size: 1.1rem;
}

/* =========================================
   お問い合わせページ用スタイル
   ========================================= */
.page-template-page-contact #primary,
.page-template-page-contact #content,
.page-template-page-contact main,
.page-template-page-contact .site-content,
.page-template-page-contact .content-area,
.page-template-page-contact #content-contact-override {
    padding-top: 0 !important;
    margin-top: 0 !important;
    /* 必要に応じて、メインコンテンツの幅をフルに使う */
    /* width: 100% !important; */
    /* max-width: none !important; */
}

/* 親テーマの汎用的なフォームスタイルによる影響をリセット（**上下の余白もリセット**） */
.contact-form-area form,
.contact-form-area .wpcf7, /* CF7のラッパーも追加 */
.contact-form-area div,
.contact-form-area p {
    box-sizing: border-box !important;
    /* 親テーマの汎用マージンをリセット */
    margin-left: 0 !important;
    margin-right: 0 !important;
    /* 上下マージン・パディングも強制リセット */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}


/* ページ全体のラッパー（フォームデザイン） */
.contact-page-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0px 20px 60px;
    color: #f0f0f0;
}

/* ページタイトル */
.contact-page-title {
    font-size: 2.3rem;
    margin-top: 50px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    font-weight: bold;
    text-align: center;
    border-bottom: 3px solid #c3002c;
    letter-spacing: 0.1em;
}

/* 車両情報表示ボックス */
.contact-car-info-box {
    padding: 20px;
    border: 1px solid #444;
    margin-bottom: 40px;
    background: #333;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.contact-car-label {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #aaa;
    font-weight: normal;
    border: none;
    padding: 0;
    text-align: left;
}

.contact-car-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
    line-height: 1.4;
}

/* フォームエリア全体の調整 */
.contact-form-area {
    margin-top: 20px;
}

/* 各項目のラベル（CF7のpタグ） */
.contact-form-area p {
    margin-bottom: 25px !important; /* 強制的に再設定 */
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.6;
}

/* 入力フィールド共通（テキスト、メール、電話、セレクトボックス、テキストエリア） */
.wpcf7-form-control-wrap {
    display: block;
    margin-top: 8px;
}

.wpcf7-text,
.wpcf7-email,
.wpcf7-tel,
.wpcf7-select,
.wpcf7-textarea {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #555;
    border-radius: 6px;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.wpcf7-text:focus,
.wpcf7-email:focus,
.wpcf7-tel:focus,
.wpcf7-select:focus,
.wpcf7-textarea:focus {
    border-color: #c3002c;
    outline: none;
    box-shadow: 0 0 8px rgba(195, 0, 44, 0.4);
}

/* 自動入力される車両タイトルのフィールド（編集不可っぽくする） */
input.car-display-input {
    background-color: #444;
    color: #eee;
    border: 1px solid #555;
    pointer-events: none;
}

/* 送信ボタン */
.wpcf7-submit {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 40px auto 0;
    background-color: #c3002c;
    color: #fff;
    font-size: 1.4rem;
    font-weight: bold;
    padding: 18px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: 0 5px 15px rgba(195, 0, 44, 0.4);
}

.wpcf7-submit:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* エラーメッセージ */
.wpcf7-not-valid-tip {
    font-size: 0.9rem;
    color: #ff5252;
    margin-top: 5px;
    font-weight: normal;
}

/* Select要素の見た目強制修正（もしドロップダウンに見えない場合） */
.wpcf7-select {
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
    text-indent: 0.01px;
    text-overflow: '';
}

/* ---------------------------------
   修復歴・キズ確認ボタン (追加分)
   --------------------------------- */
.damage-check-button-area {
    margin: 20px 0; /* お問い合わせボタンの前に適切なマージンを設ける */
    text-align: center; /* ボタンを中央寄せにする */
}

.btn-damage-check {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #004d99; /* 青系の色で見積もり・電話と差別化 */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem; /* 少し小さめに */
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-damage-check:hover {
    background: #003366;
}

.btn-damage-check i {
    margin-right: 8px;
}

/* ---------------------------------
   モーダル共通スタイル (既存のものを微調整)
   --------------------------------- */
.modal-overlay {
    /* モーダルを画面全体に覆いかぶせる設定 */
    display: none; /* 初期状態では非表示 */
    position: fixed;
    z-index: 1000; /* 他の要素より手前に表示 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8); /* 半透明の黒い背景 */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    color: #333; /* 文字色を白から黒系に戻す */
    margin: auto; /* display: flex; のため auto は不要だが念のため */
    padding: 20px;
    border-radius: 10px;
    width: 90%; /* スマホ対応 */
    max-width: 800px; /* PCでの最大幅 */
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    max-height: 90vh; /* 縦長コンテンツ対応 */
    overflow-y: auto;
}

.modal-content h3 {
    text-align: center;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #004d99;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.modal-body iframe {
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

.btn-pdf-open {
    display: inline-block;
    padding: 8px 15px;
    background-color: #c3002c;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: normal;
    transition: opacity 0.3s;
}

.btn-pdf-open:hover {
    opacity: 0.8;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .modal-content {
        padding: 15px;
    }
    .btn-damage-check {
        font-size: 1rem;
        padding: 10px 15px;
    }
    .modal-body iframe {
        height: 400px; /* スマホでの高さを調整 */
    }
}