/* =================================================
  1. 全体設定
================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* ✅ SEO/CWV: フォントサイズの自動調整を防止（iOS対策） */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  /* ✅ SEO: 日本語Webフォント最適化スタック */
  font-family:
    "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    Meiryo, "Yu Gothic Medium", sans-serif;
  color: #333;
  line-height: 1.7;
  background-color: #fff;
  /* ✅ CWV: テキストレンダリング最適化 */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

h2 {
  font-size: clamp(22px, 4vw, 28px);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  /* ✅ アクセシビリティ: 見出しの行の高さ */
  line-height: 1.4;
}

/* ✅ SEO/アクセシビリティ: フォーカス表示（キーボード操作対応） */
:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 3px;
  border-radius: 3px;
}

/* ✅ アクセシビリティ: スキップリンク */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0066cc;
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  text-decoration: none;
  font-weight: bold;
  border-radius: 0 0 4px 0;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* =================================================
  2. ヘッダー (Header)
================================================= */
.header {
  background: #87ceeb;
  padding: 15px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  /* ✅ CLS対策: Lighthouseの実表示サイズ(200x59)に合わせてwidthを明示 */
  width: 200px;
  height: auto;
  display: block;
}

.btn-line {
  background: #00b900;
  color: #fff;
  padding: 10px 22px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  font-size: 14px;
  /* ✅ アクセシビリティ: 最小タップ領域 */
  min-height: 44px;
  display: flex;
  align-items: center;
}

.btn-line:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* =================================================
  3. ナビゲーション (Navigation)
================================================= */
.nav {
  background: #7cb5da;
  position: sticky;
  top: 0;
  z-index: 1000;
  /* ✅ CWV: スクロール時のちらつき防止 */
  will-change: transform;
}

.menu-btn {
  display: none;
  width: 100%;
  padding: 12px;
  font-size: 24px;
  background: #7cb5da;
  color: #fff;
  border: none;
  cursor: pointer;
  /* ✅ アクセシビリティ: 最小タップ領域 */
  min-height: 44px;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li {
  flex: 1;
}

.nav-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  /* ✅ アクセシビリティ: タップ領域を確保 */
  min-height: 44px;
  padding: 0 5px;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background 0.3s;
  font-size: clamp(12px, 1.5vw, 15px);
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* =================================================
  4. ヒーローセクション (Hero)
================================================= */
.hero {
  padding: 100px 0;
  text-align: center;
  /* ✅ LCP: 画像が読み込まれる前に表示されるフォールバック色 */
  background-color: #1a3a4a;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("heroback.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  /* ✅ LCP: ブラウザに描画タイミングを明示 */
  content-visibility: auto;
  color: #fff;
  /* ✅ CWV: 背景画像の最小高さを確保してCLSを防止 */
  min-height: 400px;
  display: flex;
  align-items: center;
}

.hero-inner {
  width: 100%;
}

.hero h1 {
  font-size: clamp(22px, 4.5vw, 36px);
  margin-bottom: 20px;
  line-height: 1.5;
  /* ✅ SEO: h1のフォントウェイトを強調 */
  font-weight: 900;
}

.hero-sub {
  font-size: clamp(14px, 2.5vw, 18px);
  margin-bottom: 35px;
  /* ✅ アクセシビリティ: テキストシャドウで読みやすさ向上 */
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.btn-primary {
  display: block;
  width: fit-content;
  margin: 0 auto;
  background: #00b900;
  color: #fff;
  padding: 18px 40px;
  border-radius: 35px;
  text-decoration: none;
  font-weight: bold;
  font-size: clamp(15px, 2.5vw, 18px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
  margin-top: 15px;
  /* ✅ アクセシビリティ: 最小タップ領域 */
  min-height: 44px;
}

.btn-primary:hover {
  transform: scale(1.05);
}

.hero-points {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 25px;
  font-weight: bold;
  /* ✅ アクセシビリティ: テキストシャドウで視認性向上 */
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* =================================================
  5. 対応エリアセクション (Area) ← 新規追加
================================================= */
.area {
  padding: 40px 0;
  background: #e8f4fc;
  text-align: center;
  /* ✅ CLS対策: フォント読み込み前後でのレイアウトシフト防止 */
  min-height: 110px;
  contain: layout;
}

.area h2 {
  margin-bottom: 16px;
}

.area p {
  font-size: 15px;
  color: #444;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

.area strong {
  color: #2c7cb0;
}

/* =================================================
  6. 各セクション共通 (Features / Pricing / Troubles)
================================================= */
section {
  padding: 80px 0;
}

.feature-cards,
.trouble-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-card,
.trouble-item {
  background: #fff;
  padding: 40px 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover,
.trouble-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.feature-card h3,
.trouble-item h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.trouble-icon {
  font-size: 40px;
  margin-bottom: 15px;
  /* ✅ CWV: アイコンサイズを固定してCLS防止 */
  line-height: 1;
  display: block;
}

.features {
  background: #f9f9f9;
}

.troubles {
  background: #f4f9fc;
  text-align: center;
}

.trouble-cta {
  margin-top: 50px;
  text-align: center;
}

/* 料金表 */
.pricing-table {
  width: 100%;
  max-width: 800px;
  margin: 30px auto;
  border-collapse: collapse;
  background: #fff;
  /* ✅ アクセシビリティ: テーブルに影でカード感 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

/* ✅ SEO: キャプションスタイル */
.pricing-table caption {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  text-align: left;
  padding: 10px 15px;
  font-weight: bold;
}

.pricing-table th,
.pricing-table td {
  border: 1px solid #ddd;
  padding: 16px 20px;
  text-align: left;
}

.pricing-table th {
  background: #7cb5da;
  color: #fff;
  font-weight: bold;
}

.pricing-table tr:nth-child(even) td {
  background: #f7fbfe;
}

.pricing-note {
  text-align: center;
  color: #888;
  font-size: 14px;
  margin-bottom: 5px;
}

/* =================================================
  7. 最新記事 (Posts)
================================================= */
.post-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

.post-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  /* ✅ CWV/CLS対策: 画像の縦横比を確保 */
  aspect-ratio: 16 / 9;
  display: block;
}

.no-image {
  width: 100%;
  height: 180px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}

.post-card-body {
  padding: 20px;
  text-align: left;
}

.post-category {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  color: #fff;
  margin-bottom: 10px;
}

.post-card-body h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.5;
  /* ✅ SEO: 見出しの視認性を確保 */
  color: #222;
}

.post-date {
  font-size: 13px;
  color: #888;
}

.posts-more {
  margin-top: 40px;
  text-align: center;
}

/* 既読リンク（紫）の防止 */
.post-title-a a,
.post-title-a a:visited,
.post-card-link,
.post-card-link:visited {
  text-decoration: none;
  color: #333;
}

.post-title-a a:hover,
.post-card-link:hover {
  color: #2c7cb0;
}

/* =================================================
  8. 記事詳細ページ (post.html) 用
================================================= */
.page-content {
  padding: 60px 20px;
  background: #fff;
}

#page-title {
  font-size: clamp(20px, 3.5vw, 28px);
  margin-bottom: 30px;
  text-align: left;
  border-bottom: 2px solid #7cb5da;
  padding-bottom: 15px;
  color: #222;
  line-height: 1.4;
}

.post-detail-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 30px;
  /* ✅ CLS対策: アスペクト比確保 */
  aspect-ratio: 16 / 9;
  display: block;
}

.post-detail-content {
  line-height: 1.9;
  font-size: 17px;
  color: #444;
}

.post-detail-content h2 {
  margin-top: 40px;
  padding: 10px 15px;
  background: #f4f9fc;
  border-left: 5px solid #7cb5da;
  font-size: clamp(18px, 3vw, 22px);
  text-align: left;
}

.post-detail-content p {
  margin-bottom: 20px;
}

/* ✅ SEO: 本文内リンクを見やすく */
.post-detail-content a {
  color: #0066cc;
  text-decoration: underline;
}

.post-detail-content a:hover {
  color: #004499;
}

.page-actions {
  margin-top: 50px;
  text-align: center;
}

.mainback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 40px;
  background: #7cb5da;
  color: #fff;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  transition: background 0.3s;
  margin-top: 15px;
  margin-bottom: 15px;
  min-height: 44px;
}

.mainback-btn:hover {
  background: #5a9fc8;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  background: #7cb5da;
  color: #fff;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  transition: background 0.3s;
  min-height: 44px;
}

.btn-secondary:hover {
  background: #5a9fc8;
}

/* =================================================
  9. FAQ
================================================= */
.faq {
  background: #fff;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid #e8e8e8;
  padding: 24px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

/* ✅ SEO/アクセシビリティ: Q&A形式を視覚的に明示 */
.faq-question {
  font-size: 18px;
  color: #222;
  margin-bottom: 12px;
  line-height: 1.5;
  padding-left: 28px;
  position: relative;
  font-weight: bold;
}

.faq-question::before {
  content: "Q";
  position: absolute;
  left: 0;
  top: 0;
  color: #7cb5da;
  font-weight: 900;
  font-size: 18px;
}

.faq-answer {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  padding-left: 28px;
  position: relative;
}

.faq-answer::before {
  content: "A";
  position: absolute;
  left: 0;
  top: 0;
  color: #00b900;
  font-weight: 900;
  font-size: 15px;
}

/* ✅ microdata対応: divのmarginを除去 */
.faq-answer p {
  margin: 0;
}

.faq-cta {
  margin-top: 50px;
  text-align: center;
}

/* =================================================
  10. お問い合わせ (Contact)
================================================= */
.contact {
  padding: 80px 0;
  background-color: #f4f9fc;
  text-align: center;
}

.contact-sub {
  margin-bottom: 40px;
  color: #666;
  font-size: 15px;
}

.contact-wrapper {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: left;
  /* ✅ アクセシビリティ: 最小タップ領域 */
  min-height: 70px;
}

.contact-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  font-size: 32px;
  margin-right: 20px;
  width: 50px;
  text-align: center;
  /* ✅ CLS: アイコンサイズを固定 */
  flex-shrink: 0;
}

.contact-info .label {
  display: block;
  font-size: 12px;
  color: #888;
  font-weight: bold;
  margin-bottom: 4px;
}

.contact-info .value {
  display: block;
  font-size: 15px;
  font-weight: bold;
  word-break: break-all;
  color: #222;
}

.contact-item.line {
  border-left: 5px solid #00b900;
}

.contact-item.tel {
  border-left: 5px solid #7cb5da;
}

/* =================================================
  11. フッター (Footer)
================================================= */
.footer {
  background: #2c3e50;
  color: #ccc;
  padding: 60px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.footer h3,
.footer h4 {
  margin-top: 0;
  color: #87ceeb;
}

.footer p {
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 8px;
}

/* ✅ SEO: フッターの電話番号リンク */
.footer a[href^="tel"] {
  color: #87ceeb;
  text-decoration: none;
  font-weight: bold;
}

.footer a[href^="tel"]:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  margin-top: 40px;
  font-size: 13px;
  color: #aaa;
}

.footer-bottom a {
  color: #87ceeb;
  text-decoration: none;
  margin: 0 8px;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* =================================================
  12. トップへ戻るボタン
================================================= */
.top-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  background: #7cb5da;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.top-btn.show {
  opacity: 1;
  visibility: visible;
}

.top-btn:hover {
  background: #5a9fc8;
}

/* =================================================
  13. レスポンシブ (Responsive)
================================================= */
@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }

  .menu-btn {
    display: block;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    background: #6ea4c8;
  }

  .nav-list.open {
    display: flex;
  }

  .nav-list a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    font-size: 15px;
  }

  .hero {
    padding: 70px 0;
    min-height: 320px;
  }

  .hero-points {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .feature-cards,
  .trouble-list {
    grid-template-columns: 1fr;
  }

  /* スマホでも料金表が壊れないように */
  .pricing-table,
  .pricing-table tr,
  .pricing-table td,
  .pricing-table th {
    display: table-cell;
  }
  .pricing-table {
    display: table;
    font-size: 14px;
  }
  .pricing-table tr {
    display: table-row;
  }

  .pricing-table th,
  .pricing-table td {
    padding: 12px 10px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }

  .contact-item {
    padding: 15px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  h2 {
    margin-bottom: 28px;
  }
}

/* =================================================
  14. 印刷スタイル（✅ SEO補助：印刷時の可読性）
================================================= */
@media print {
  .nav,
  .btn-line,
  .btn-primary,
  .top-btn,
  .contact-wrapper {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .hero {
    background: #f0f8ff;
    color: #000;
    padding: 40px 0;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 12px;
    color: #555;
  }

  .footer {
    background: #fff;
    color: #333;
    padding: 20px 0 0;
  }
}
