/**
 * S-CONNECT Layout Fixes v6.2
 * 2026-04-09
 * 全体の体裁調整：改行、余白、行間、重複削除
 */

/* ========================================
   グローバル設定：行間・余白の統一
   ======================================== */
body {
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
}

p {
  line-height: 1.8;
}

/* セクション間余白の統一 */
.section {
  padding: 100px 0;
}
@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
}

/* ========================================
   Hero セクション改善
   ======================================== */
.hero-sub {
  max-width: 580px;
  line-height: 1.9;
}
.hero-sub br {
  display: none;
}
@media (min-width: 769px) {
  .hero-sub br:first-of-type {
    display: block;
  }
}

/* Hero CTA Note の改行防止 */
.cta-note {
  max-width: 500px;
  line-height: 1.7;
}

/* Hero Trust の改善 */
.hero-trust {
  margin-top: 40px;
}

/* ========================================
   PROBLEM セクション改善
   ======================================== */
.problem-section {
  width: 100%;
  padding-left: 80px;
  padding-right: 80px;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .problem-section {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.stat-97-oneliner {
  margin: 0 0 48px 0;
  box-sizing: border-box;
}

.sol-desc {
  text-align: center;
  max-width: 900px;
  margin: 48px auto;
}

.problem-section .section-header {
  padding: 0 80px;
}

.section-title {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

.section-sub {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

/* Big Warning の余白調整 */
.big-warning {
  margin: 48px 0;
}
.big-warning p {
  line-height: 1.9;
}

/* 97% セクションの余白 */
.stat-97-oneliner {
  margin: 40px auto 28px !important;
  max-width: 900px !important;
}

/* Problem Cards の余白統一 */
.problem-cards {
  margin-top: 64px;
  gap: 24px;
}

/* ========================================
   Comparison セクション改善
   ======================================== */
.comparison-section {
  margin: 80px 0;
}
.comparison-title {
  margin-bottom: 48px;
  line-height: 1.3;
}
.comp-col ul li {
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ========================================
   SOLUTION セクション改善
   ======================================== */
/* .solution-formula-item は現在未使用（旧バージョン用・削除対象） */

/* Solution Result の改善 */
.solution-result h3 {
  line-height: 1.3;
  margin-bottom: 12px;
}
.solution-result p {
  line-height: 1.8;
}

/* First Mover Advantage バナー */
.first-mover-banner {
  margin: 48px 0;
  padding: 32px 48px;
}
.first-mover-banner p {
  line-height: 1.7;
}

/* ========================================
   CITY BREAK セクション改善
   ======================================== */
.city-break-section {
  padding: 80px 0;
}
.cb-headline {
  line-height: 1.4;
  margin-bottom: 32px;
}
.cb-sub {
  line-height: 1.9;
  max-width: 800px;
  margin: 0 auto 48px;
}

/* ========================================
   FEATURES セクション改善
   ======================================== */
.bento-card h3 {
  line-height: 1.3;
  margin-bottom: 16px;
}
.bento-card p {
  line-height: 1.8;
}

/* Features Grid の余白 */
.features-grid {
  margin-top: 64px;
}

/* ========================================
   VOICE セクション改善
   ======================================== */
.vc-text {
  line-height: 1.9;
  margin-bottom: 24px;
}
.vc-text.large {
  line-height: 2;
}

/* Results Stats の余白 */
.results-stats {
  margin: 80px 0;
  padding: 48px 0;
}
.rs-item p {
  line-height: 1.6;
}

/* ========================================
   FLOW セクション改善
   ======================================== */

/* 5列レイアウト: カード・矢印・カード・矢印・カード */
.flow-grid.three-step {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0 16px;
}

/* 矢印 */
.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8B5CF6;
  font-size: 1.4rem;
  opacity: 0.5;
  flex-shrink: 0;
  align-self: center;
}

/* カード縦方向を揃える */
.flow-grid.three-step .flow-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-card-body h3 {
  line-height: 1.3;
  margin-bottom: 12px;
}
.flow-card-body p {
  line-height: 1.8;
}

/* モバイルでは矢印を下向きに */
@media (max-width: 768px) {
  .flow-grid.three-step {
    grid-template-columns: 1fr;
    gap: 8px 0;
  }
  .flow-arrow {
    transform: rotate(90deg);
    font-size: 1.1rem;
    padding: 4px 0;
  }
}

/* ========================================
   FAQ セクション改善
   ======================================== */
.faq-a p {
  line-height: 1.9;
  margin-bottom: 12px;
}
.faq-a p:last-child {
  margin-bottom: 0;
}

/* FAQ CTA Panel */
.faq-cta-panel {
  margin-top: 64px;
  padding: 48px;
}
.faq-cta-panel p {
  line-height: 1.8;
}

/* ========================================
   CONTACT セクション改善
   ======================================== */
.fct-title {
  line-height: 1.4;
  margin-bottom: 24px;
  max-width: 600px;
}
.fct-title br {
  display: none;
}
.fct-sub {
  line-height: 1.9;
  margin-bottom: 32px;
  max-width: 580px;
}
.fct-check-item {
  line-height: 1.7;
  margin-bottom: 14px;
}
.fct-checklist {
  margin: 32px 0;
}

/* ========================================
   改行の最適化（1文字残り防止）
   ======================================== */
/* 自動で適切な改行位置を調整 */
.auto-break {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 特定の要素で改行を制御 */
.hero-title,
.section-title,
.comparison-title,
.cb-headline {
  word-break: keep-all;
  overflow-wrap: normal;
}

/* PC表示での改行調整 */
@media (min-width: 769px) {
  .hero-title br {
    display: block;
  }
  .section-title br {
    display: block;
  }
  
  /* 長い文章の改行防止 */
  .no-orphan {
    text-wrap: balance;
  }
}

/* ========================================
   余白の統一（マージン・パディング）
   ======================================== */
/* セクションヘッダーの統一 */
.section-header {
  margin-bottom: 64px;
  text-align: center;
}
.section-header.light {
  margin-bottom: 64px;
}

/* セクション内の要素間余白 */
.section > .container > *:not(:last-child) {
  margin-bottom: 48px;
}

/* カード間の余白統一 */
.problem-cards,
.features-grid,
.voice-grid,
.flow-grid {
  gap: 24px;
}

/* ========================================
   レスポンシブ調整
   ======================================== */

/* タブレット */
@media (max-width: 1200px) {
  #problem {
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}

/* モバイル */
@media (max-width: 768px) {
  /* モバイルでの行間・余白 */
  .hero-sub,
  .section-sub,
  .cb-sub {
    line-height: 1.9;
    font-size: 1rem;
  }
  
  #problem {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  
  /* セクション間余白の縮小 */
  .stat-97-oneliner {
    margin: 32px auto 24px !important;
  }
  .comparison-section {
    margin: 60px 0;
  }
  .results-stats {
    margin: 60px 0;
  }
  
  /* カード余白の調整 */
  .problem-cards,
  .features-grid,
  .voice-grid {
    gap: 20px;
  }
}

/* 小さいモバイル */
@media (max-width: 480px) {
  #problem {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .stat-97-oneliner {
    margin: 40px 0 !important;
  }
}

/* ========================================
   重複コンテンツの非表示
   ======================================== */
/* 重複するCTAの整理は別途HTMLで対応 */

/* ========================================
   微調整：見出しと本文のバランス
   ======================================== */
h2.section-title {
  margin-bottom: 20px;
}
.section-sub {
  margin-bottom: 0;
}

/* 見出し後の要素との余白 */
h3 + p,
h4 + p {
  margin-top: 12px;
}

/* リストの余白 */
ul, ol {
  margin: 20px 0;
  padding-left: 24px;
}
li {
  margin-bottom: 8px;
  line-height: 1.8;
}

/* ========================================
   テキストの可読性向上
   ======================================== */
/* 最大幅の設定 */
.section p {
  max-width: 800px;
}
.section-header p {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* 強調テキストの間隔 */
strong, em {
  padding: 0 2px;
}

/* ========================================
   アニメーションの統一
   ======================================== */
/* スクロール時の余白を考慮 */
section {
  scroll-margin-top: 80px;
}

@media (max-width: 768px) {
  section {
    scroll-margin-top: 60px;
  }
}
