/* css/style.css */

/* ── リセット & 基本 ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Helvetica Neue', sans-serif;
  color: #333;
  background-color: #fafafa;
  line-height: 1.6;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── Responsive Header ── */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;      /* 狭くなったら折返しOK */
  width: 100%;
  max-width: none;      /* ヘッダーだけ全幅に */
  padding: 0.75rem 2rem;
}

/* ナビゲーションが折返してもレイアウト崩れ防止 */
.main-nav ul {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

/* スマホなど狭い画面では縦並びに */
@media (max-width: 600px) {
  .site-header .container {
    flex-direction: column;
    align-items: center;
  }
  .main-nav ul {
    justify-content: center;
    margin-top: 0.5rem;
  }
}

.site-title a {
  color: #000;
  text-decoration: none;
  font-size: 1.25rem;
}
.main-nav ul {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  list-style: none;
}
.main-nav a {
  color: #555;
  text-decoration: none;
  padding: 0.5rem;
  transition: color 0.2s;
}
.main-nav a.active,
.main-nav a:hover {
  color: #000;
  font-weight: 600;
  border-bottom: 2px solid #007bff;
}

/* ── ヒーロー共通 & 各ページ ── */
.hero,
.hero-about,
.hero-contact,
.hero-services,
.hero-policy {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* index.html ヒーロー */
.hero {
  height: 600px;
  background: url('../images/hero-main.jpg') center/cover no-repeat;
  filter: brightness(1.3) contrast(1.2);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
}
.hero .hero-inner {
  position: relative;
  z-index: 1;
  color: #000;
}
.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #000;
}
.hero p {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: #000;
}
.hero .btn {
  background: #007bff;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
}

/* about.html ヒーロー */
.hero-about {
  height: 300px;
  background: url('../images/about-us.jpg') center/cover no-repeat;
}
.hero-about::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}
.hero-about .hero-inner {
  position: relative;
  z-index: 1;
}
.hero-about h2 {
  font-size: 2rem;
  color: #fff;
  font-weight: 700;
}
.hero-about p {
  font-size: 1rem;
  color: #fff;
}

/* contact.html ヒーロー */
.hero-contact {
  height: 300px;
  background: url('../images/contact-bg.jpg') center/cover no-repeat;
}
.hero-contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}
/* 修正：お問い合わせ上の文字を白強制＋影で読みやすく */
.hero-contact .hero-inner h2,
.hero-contact .hero-inner p {
  position: relative;
  z-index: 1;
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.hero-contact h2 {
  font-size: 2rem;
}
.hero-contact p {
  font-size: 1rem;
}

/* services.html ヒーロー */
.hero-services {
  height: 300px;
  background: url('../images/services.jpg') center/cover no-repeat;
  color: #fff;
}
.hero-services::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}
.hero-services h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.hero-services p {
  font-size: 1rem;
}
/* services.html ヒーロー文字色の強制上書き */
.hero-services {
  position: relative;   /* 擬似要素より前面にテキストを表示するため */
}

.hero-services .hero-inner {
  position: relative;
  z-index: 1;           /* ::before の背面に */
  color: #fff;          /* テキストを白に */
}

/* 見出しと本文を個別に上書き */
.hero-services .hero-inner h2,
.hero-services .hero-inner p {
  color: #fff !important;
}

/* privacy-policy.html ヒーロー */
.hero-policy {
  background-color: #f0f4f8;
  padding: 2rem 0;
}
.hero-policy h2 {
  font-size: 2.5rem;
  color: #333;
}

/* ── セクション共通 ── */
.section {
  background: #fff;
  margin: 2rem 0;
  padding: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  text-align: center;
}
.section h3 {
  color: #222;
  font-weight: 600;
  margin-bottom: 1rem;
}
.section p,
.section ul,
.section li {
  color: #333;
}

/* ── プロファイルテーブル ── */
.profile-table {
  width: auto;
  max-width: 600px;
  margin: 1.5rem auto;
  border-collapse: collapse;
}
.profile-table th,
.profile-table td {
  padding: 0.5rem 0.75rem;
  border: 0.5px solid #ccc;
  text-align: left;
}
.profile-table th {
  background: #f7f7f8;
  color: #222;
}

/* ── サービスグリッド ── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 300px));
  gap: 2rem;
  max-width: 960px;
  margin: 2rem auto 0;
  padding: 0 1rem;
  justify-content: center;
}
.service-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 4px;
  width: 40px;
  background: currentColor;
}
.service-card:nth-child(1) { color: #1e88e5; }
.service-card:nth-child(2) { color: #43a047; }
.service-card:nth-child(3) { color: #fb8c00; }
.service-card:nth-child(4) { color: #f4511e; }
.service-card:nth-child(5) { color: #8e24aa; }
.service-card h4 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
}
.service-card p {
  color: #333;
  line-height: 1.6;
}

/* ── セクション＋コンテナを中央寄せ ── */
.section.container {
  /* 上下に2remの余白、左右を自動マージンで中央寄せ */
  margin: 2rem auto;
}

/* ── 事例紹介セクション ── */
.cases-section {
  background: url('../images/case.jpg') center/cover no-repeat;
  filter: brightness(1.2);
  padding: 4rem 0;
  position: relative;
  color: #1a73e8;
}
.cases-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
}
.cases-section .container {
  position: relative;
  z-index: 1;
}
.cases-section h2 {
  text-align: center;
  color: #1a73e8;
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}
.cases-section .intro {
  text-align: center;
  font-weight: 700;
  color: #1a73e8;
  margin-bottom: 2rem;
  font-size: 1rem;
}
.cases-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.case-card {
  flex: 0 0 350px;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  color: #333;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s;
}
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.case-card h3 {
  color: #1a73e8;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.case-card p {
  color: #444;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* ── フォーム ── */
.contact-form-wrapper {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin: 2rem auto;
  max-width: 600px;
}
.contact-form-wrapper label,
.contact-form-wrapper p {
  color: #000;
}
.form-group {
  margin-bottom: 1rem;
}
.form-control {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #000;
}
.btn-submit {
  width: 100%;
  padding: 0.75rem;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-submit:hover {
  opacity: 0.9;
}
.required {
  color: red;
}

/* ── 画像サイズ調整 ── */
.section-image {
  max-height: 400px;
  object-fit: cover;
}

/* ── フッター ── */
.site-footer {
  background: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 1rem 0;
  text-align: center;
}
.site-footer p,
.site-footer a {
  color: #777;
  font-size: 0.875rem;
  text-decoration: none;
}

/* ── レスポンシブ ── */
@media (max-width: 600px) {
  .hero {
    height: 400px;
  }
  .service-card,
  .case-card {
    padding: 1rem;
    flex: 0 1 100%;
  }
}

/* ── プライバシーポリシーページ最適化 ── */
/* ── プライバシーポリシーヒーロー背景を生成画像に切替 ── */
.hero-policy {
  position: relative;
  padding: 4rem 0;
  color: #fff;
  /* filter は削除 */
}

.hero-policy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../images/privacy-hero.jpg') center/cover no-repeat;
  background-size: cover;
  filter: brightness(0.7);  /* ここだけにフィルターをかける */
  z-index: 0;
}

.hero-policy .hero-inner {
  position: relative;
  z-index: 1;    /* テキストを前面に */
}
.hero-policy .hero-inner h2 {
  color: #fff;   /* テキストは確実に白 */
}

.policy-content {
  background: #fff;
  max-width: 800px;
  margin: 2rem auto;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.policy-content h3 {
  font-size: 1.25rem;
  color: #1a73e8;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.policy-content p,
.policy-content ul,
.policy-content ol,
.policy-content li {
  text-align: left;
  color: #555;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.policy-content ul,
.policy-content ol {
  padding-left: 1.5rem;
}

@media (max-width: 600px) {
  .hero-policy { padding: 2rem 0; }
  .policy-content { padding: 1.5rem; }
}

/* ハンバーガーメニュー */
.menu-toggle {
  display: none;
  background: none;
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
  color: #333;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    text-align: center;
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav ul li {
    margin: 0.5rem 0;
  }
}