/* ===== 全体共通 ===== */
body {
  font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  line-height: 1.8;
  color: #333;
  margin: 0;
  padding: 0;
  background: #fff;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
@media (max-width: 576px) {
  .container {
    padding-left: 25px;
    padding-right: 25px;
  }
}
.main-container {
  padding:0;
}
/* ===== ヘッダー ===== */
header {
  background: #fff;
  border-bottom: 1px solid #ddd;
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}
.header-container .logo img {
  max-height: 60px;
}
header nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
header nav a {
  color: #333;
  font-weight: bold;
}
header nav a.active, header nav a:hover {
  color: #005BAC;
}
/* ========== Header / Nav (Bootstrap) ========== */
.site-header {
  z-index: 1030;
} /* 固定時に手前に出す */
.navbar-brand .brand-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}
@media (min-width: 992px) {
  .navbar-brand .brand-logo {
    height: 36px;
  }
}
.navbar-nav .nav-link {
  font-weight: 600;
  padding: .5rem .75rem;
}
.navbar-nav .nav-link.active {
  color: #0d6efd;
} /* 現在ページ色 */
.navbar-nav .btn {
  border-radius: .5rem;
  font-weight: 700;
}
.navbar-toggler {
  border: 0;
}
.navbar-toggler .navbar-toggler-icon {
  /* やや濃いめの三本線 */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,.7)' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
/* === ヒーローセクション === */
.hero {
  position: relative;
  background: url('../img/hero-carfilm.jpg') center center / cover no-repeat; /* 施工イメージ写真 */
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* 半透明オーバーレイ */
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-text {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.4;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
/* === ヒーロー背景（画像） === */
/* 画像は擬似要素で敷き、既存の .hero-overlay が上に重なる構造 */
.hero.has-bg {
  position: relative;
  min-height: 520px; /* 必要に応じて高さ調整 */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden; /* 角丸等の見切れ対策 */
  text-align: center;
}
.hero.has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/hero-carfilm.jpg") center center / cover no-repeat;
  z-index: 0; /* 画像レイヤー */
  transform: translateZ(0); /* モバイルでの描画最適化 */
}
/* 既存の半透明オーバーレイ（読みやすさ確保） */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42); /* 文字が読みやすい濃さに調整 */
  z-index: 1; /* 画像より上、テキストより下 */
  display: flex;
  align-items: center;
  justify-content: center;
}
/* テキストは最前面 */
.hero-text {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
}
.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 18px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.hero p {
  font-size: 1.1rem;
  margin-bottom: 26px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
/* CTAボタン並び */
.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
/* スマホ最適化（画像切り替え・高さ縮小） */
@media (max-width: 768px) {
  .hero.has-bg {
    min-height: 380px;
  }
  .hero.has-bg::before {
    background-image: url("/images/hero-carfilm_sp.jpg"); /* 任意。無ければ削除可 */
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
}
.cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-cta-main, .btn-cta-sub {
  padding: 12px 25px;
  font-size: 1.1rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.btn-cta-main {
  background-color: #005BAC;
  color: #fff;
  border: none;
  transition: background 0.3s;
}
.btn-cta-main:hover {
  background-color: #004080;
  color: #fff;
}
.btn-cta-sub {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid #fff;
  transition: background 0.3s;
}
.btn-cta-sub:hover {
  background-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.cta-buttons {
  justify-content: center;
}
/* レスポンシブ対応 */
@media (max-width: 768px) {
  .hero {
    height: 350px;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .btn-cta-main, .btn-cta-sub {
    font-size: 1rem;
    padding: 10px 20px;
  }
}
/* ===== 共通セクション見出し ===== */
section {
  padding-top: 80px;
  padding-bottom: 80px;
}
section h2 {
  font-size: 2rem;
  color: #005BAC;
  margin-bottom: 40px;
  text-align: center;
  font-weight: 700;
  padding-left: 15px;
  border-left: 5px solid #005BAC;
  background: #f8f9fa;
  padding: 10px 15px;
  border-radius: 5px;
}
section + section {
  margin-top: 80px;
}
/* ===== カードレイアウト（メリット・お客様の声） ===== */
.film-benefits {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.benefit-card, .voice-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  flex: 1 1 calc(33% - 20px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}
.benefit-card:hover, .voice-card:hover {
  transform: translateY(-3px);
}
.benefit-icon {
  font-size: 2rem;
  color: #005BAC;
  margin-bottom: 10px;
}
.benefit-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.benefit-card .benefit-image {
  width: 100%;
  max-width: 0.95; /* 必要に応じて調整 */
  margin: 10px auto 15px;
  display: block;
  border-radius: 8px;
}
/* ===========================
   3枚の画像を同じ比率に・右2枚は下寄せ表示
   =========================== */
/* 画像比率は左画像と同じ 4:3 を仮設定。
   左画像の実寸が別比率なら var(--benefit-ratio) を変更してください（例: 3/2, 16/9 など） */ :root {
  --benefit-ratio: 4/3;
}
/* 画像ラッパー：比率固定＆オーバーフロー隠し */
.benefit-thumb {
  width: 100%;
  aspect-ratio: var(--benefit-ratio); /* 全カードで同じ比率に */
  overflow: hidden;
  border-radius: 10px;
  background: #f2f4f7; /* 読み込み前のプレースホルダー */
  margin: 10px 0 14px;
}
/* 画像自体は枠いっぱいに“トリミングしてフィット” */
.benefit-thumb .benefit-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* 枠いっぱいにトリミング */
  object-position: 50% 50%; /* 基本は中央 */
}
/* 右側2枚だけ、下を優先表示（＝上を多めにトリミング） */
.film-benefits .benefit-card:nth-child(2) .benefit-thumb .benefit-image, .film-benefits .benefit-card:nth-child(3) .benefit-thumb .benefit-image {
  object-position: 50% 100%; /* 中央下寄せ */
}
/* スマホ時も比率維持で縮むだけなので追加指定は不要 */
/* ===== 比較表 ===== */
.comparison-table-wrapper {
  overflow-x: auto;
}
.film-comparison {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.film-comparison th, .film-comparison td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
  font-size: 0.95rem;
}
.film-comparison thead th {
  background: #005BAC;
  color: #fff;
  font-weight: bold;
}
.film-comparison tbody tr:nth-child(odd) {
  background: #f9f9f9;
}
/* スクロールヒント：PCは非表示、スマホのみ表示 */
.scroll-hint {
  display: none !important; /* ← 初期状態は非表示（PC向け） */
  margin-top: 8px;
  font-size: .85rem;
  color: #6b7280;
  text-align: center;
}
/* === スマホのみ 横スクロール対応（メーカー比較表） === */
@media (max-width: 768px) {
  .film-comparison-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    background: #fff;
  }
  /* 横スクロールが効くように“表の最小幅”を確保 */
  .film-comparison-scroll .film-comparison {
    min-width: 720px; /* 列数に合わせて調整可 */
  }
  /* 折返しで縦長に崩れないように */
  .film-comparison th, .film-comparison td {
    white-space: nowrap;
  }
  /* スクロールヒント（スマホのみ表示） */
  .scroll-hint {
    margin-top: 8px;
    font-size: .85rem;
    color: #6b7280;
    text-align: center;
    display: block !important; /* ← スマホだけ表示 */
  }
}
/* （任意）スクロールバーの見た目を少しスッキリ */
.film-comparison-scroll::-webkit-scrollbar {
  height: 8px;
}
.film-comparison-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.film-comparison-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
/* ===== 図・キャプション ===== */
.caption {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  margin-top: 5px;
}
/* ===== グラフエリア ===== */
.graph-box {
  margin: 30px 0;
}
.graph-box canvas {
  max-width: 100%;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
/* ===== お客様の声 ===== */
.voices {
  padding: 40px 20px;
}
.voice-card {
  margin-bottom: 20px;
}
.voice-card strong {
  display: block;
  color: #005BAC;
  font-size: 1rem;
  margin-bottom: 10px;
}
/* ===== FAQアコーディオン ===== */
.faq {
  padding: 40px 20px;
}
.faq h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: #005BAC;
}
.faq-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.faq-item.active {
  border-color: #005BAC;
  box-shadow: 0 0 5px rgba(0, 91, 172, 0.2);
}
.faq-question {
  font-size: 1.1rem;
  font-weight: bold;
  padding: 15px;
  margin: 0;
  background: #f8f9fa;
  cursor: pointer;
  position: relative;
}
.faq-question::after {
  content: '＋';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #666;
}
.faq-item.active .faq-question::after {
  content: '－';
  color: #005BAC;
}
.faq-answer {
  display: none;
  padding: 15px;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
}
.faq-item.active .faq-answer {
  display: block;
}
/* FAQ専用：コンパクトなまとまり感 */
.faq .faq-item {
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}
.faq .faq-question {
  font-size: 1.1rem;
  cursor: pointer;
}
.faq .faq-answer {
  font-size: 0.95rem;
  margin-top: 10px;
}
/* === TSER情報ボックス === */
.tser-info {
  background: #f9f9f9;
  border-left: 5px solid #005BAC;
  padding: 20px 25px;
  margin: 40px auto;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 900px;
}
.tser-info p {
  margin: 0;
  color: #333;
}
.tser-info a {
  color: #005BAC;
  font-weight: 600;
  text-decoration: underline;
}
.tser-info a:hover {
  text-decoration: none;
}
/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, #005BAC, #0070D1);
  padding: 40px 20px;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  margin-top: 50px;
}
.cta h2 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 20px;
  border-left: none;
  background: none;
  padding: 0;
}
.cta .btn-cta-main {
  background: #fff;
  color: #005BAC;
  font-weight: bold;
  font-size: 1.2rem;
}
.cta .btn-cta-main:hover {
  background: #f1f3f5;
}
/* ===== フッター ===== */
footer {
  background: #333;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}
.footer-container ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.footer-container a {
  color: #fff;
  font-size: 0.95rem;
}
.footer-container a:hover {
  text-decoration: underline;
}
/* ===== スマホ対応 ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .film-benefits {
    flex-direction: column;
  }
  .benefit-card {
    flex: 1 1 100%;
  }
  section h2 {
    font-size: 1.5rem;
  }
  .film-comparison {
    font-size: 0.85rem;
  }
  .faq-question {
    font-size: 1rem;
  }
  .faq-answer {
    font-size: 0.9rem;
  }
}
/* === search.php専用のsection余白調整 === */
body.page-search {
  padding-top: 80px;
}
body.page-search section {
  padding-top: 40px;
  padding-bottom: 40px;
}
body.page-search section + section {
  margin-top: 40px;
}
/* === 固定ヘッダー === */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
/* ナビリンク強調 */
.navbar .nav-link {
  font-weight: 600;
  padding: 10px 15px;
}
.navbar .nav-link:hover {
  color: #005BAC;
}