/* motivation_app/static/css/style.css */
/* リセットCSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  color: #333;
  line-height: 1.6;
}

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

/* アイコン画像のサイズを統一 */
.icon {
  width: 128px;  
  height: 128px;
  object-fit: contain;
}

/* ヘッダー */
header {
  padding: 20px 0;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #0ea5e9; /* プライマリ500 */
}

.logo a {
  text-decoration: none !important;
  color: #0ea5e9 !important; /* プライマリ500 */
  font-weight: bold !important;
  display: flex !important;
  align-items: center !important;
}

.logo a:hover {
  color: #0284c7 !important; /* プライマリ600 */
  text-decoration: none !important;
}

.logo a:visited {
  color: #0ea5e9 !important;
  text-decoration: none !important;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #0ea5e9; /* プライマリ500 */
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #0ea5e9; /* プライマリ500 */
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #0284c7; /* プライマリ600 */
}

/* ヒーローセクションボタン動的グラディエーション効果（shimmer効果） */
.hero .btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: white !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
  border: 2px solid rgba(255,255,255,0.3) !important;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
  position: relative !important;
  overflow: hidden !important;
}

.hero .btn::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%) !important;
  animation: shimmer 3s ease-in-out infinite !important;
}

.hero .btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4) !important;
  border-color: rgba(255,255,255,0.6) !important;
}

.hero .btn:hover::before {
  animation-duration: 1.5s !important;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.btn-secondary {
  background-color: white;
  color: #0ea5e9; /* プライマリ500 */
  border: 1px solid #0ea5e9; /* プライマリ500 */
}

.btn-secondary:hover {
  background-color: #f0f7fa;
}

/* ヒーローセクション */
.hero {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%); /* プライマリ400→500 */
  color: white;
  padding: 160px 0 80px;
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero p {
  font-size: 20px;
  max-width: 700px;
  margin: 0 auto 40px;
}

/* 価値提案セクション */
.value-proposition {
  padding: 80px 0;
  background-color: #f0f7fa; /* 薄いブルーグレー */
}

.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 50px;
  color: #333;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.feature {
  flex-basis: calc(25% - 30px);
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  text-align: center;
}

.feature img {
  margin-bottom: 20px;
}

.feature h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #0ea5e9; /* プライマリ500 */
}

/* 理論説明セクション */
.theory {
  padding: 80px 0;
}

.theory-content {
  max-width: 800px;
  margin: 0 auto;
}

.theory h2 {
  margin-bottom: 30px;
  text-align: center;
}

.theory p {
  margin-bottom: 20px;
  font-size: 18px;
}

/* 動機タイプセクション */
.motive-types {
  padding: 80px 0;
  background-color: #f0f7fa; /* 薄いブルーグレー */
}

.types {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.type {
  flex-basis: calc(33.33% - 30px);
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* 動機タイプ別の色分け */
.type:nth-child(1) .type-icon {
  background-color: #f59e0b; /* 達成動機 - オレンジ/アンバー */
}

.type:nth-child(2) .type-icon {
  background-color: #10b981; /* 親和動機 - グリーン */
}

.type:nth-child(3) .type-icon {
  background-color: #ef4444; /* 権力動機 - レッド */
}
.type:nth-child(4) .type-icon {
  background-color: #3b82f6; /* 協調性 - ブルー */
}
.type:nth-child(5) .type-icon {
  background-color: #8b5cf6; /* 神経症傾向 - パープル */
}
.type:nth-child(6) .type-icon {
  background-color: #f97316; /* タイプ6 忠実な人 - オレンジ */
}
.type:nth-child(7) .type-icon {
  background-color: #eab308; /* タイプ7 熱中する人 - イエロー */
}
.type:nth-child(8) .type-icon {
  background-color: #dc2626; /* タイプ8 挑戦者 - ダークレッド */
}
.type:nth-child(9) .type-icon {
  background-color: #6b7280; /* タイプ9 平和主義者 - グレー */
}
.type-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 36px;
}

.type h3 {
  font-size: 24px;
  margin-bottom: 15px;
}

/* 動機タイプ別の見出し色 */
.type:nth-child(1) h3 {
  color: #f59e0b; /* 達成動機 - オレンジ/アンバー */
}

.type:nth-child(2) h3 {
  color: #10b981; /* 親和動機 - グリーン */
}

.type:nth-child(3) h3 {
  color: #ef4444; /* 権力動機 - レッド */
}

.type-features {
  margin-top: 20px;
}

.type-features li {
  margin-bottom: 10px;
  list-style-type: none;
  position: relative;
  padding-left: 25px;
}

/* 動機タイプ別のチェックマーク色 */
.type:nth-child(1) .type-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #f59e0b; /* 達成動機 - オレンジ/アンバー */
}

.type:nth-child(2) .type-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981; /* 親和動機 - グリーン */
}

.type:nth-child(3) .type-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #ef4444; /* 権力動機 - レッド */
}

/* 診断メリットセクション */
.benefits {
  padding: 80px 0;
}

.benefit-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.benefit-item {
  flex-basis: calc(50% - 30px);
  display: flex;
  margin-bottom: 40px;
}

.benefit-icon {
  flex: 0 0 60px;
  height: 60px;
  background-color: #e0f2fe; /* 非常に薄いブルー */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
}

.benefit-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #0ea5e9; /* プライマリ500 */
}

/* 比較表セクション */
.comparison {
  padding: 80px 0;
  background-color: #f0f7fa; /* 薄いブルーグレー */
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
  background-color: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  border-radius: 8px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.comparison-table th {
  background-color: #0ea5e9; /* プライマリ500 */
  color: white;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.check {
  color: #0ea5e9; /* プライマリ500 */
  font-size: 18px;
}

.cross {
  color: #ccc;
  font-size: 18px;
}

.comparison-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* ユーザーペルソナセクション */
.personas {
  padding: 80px 0;
}

.persona-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.persona {
  flex-basis: calc(50% - 30px);
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 30px;
  display: flex;
}

.persona-icon {
  flex: 0 0 80px;
  height: 80px;
  background-color: #e0f2fe; /* 非常に薄いブルー */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
}

.persona-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #0ea5e9; /* プライマリ500 */
}

/* FAQセクション */
.faq {
  padding: 80px 0;
  background-color: #f0f7fa; /* 薄いブルーグレー */
}

.faq-items {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: white;
  border-radius: 8px;
  padding: 20px 30px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.faq-item h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #0ea5e9; /* プライマリ500 */
}

/* CTAセクション */
.cta {
  padding: 100px 0;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%); /* プライマリ400→500 */
  color: white;
  text-align: center;
}

.cta h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.cta p {
  font-size: 20px;
  max-width: 600px;
  margin: 0 auto 40px;
}

.cta .btn {
  background-color: white;
  color: #0ea5e9; /* プライマリ500 */
  font-size: 18px;
  padding: 15px 40px;
}

.cta .btn:hover {
  background-color: #f5f5f5;
}

.cta-note {
  font-size: 14px;
  margin-top: 20px;
  opacity: 0.9;
}

/* フッター */
footer {
  background-color: #0c4a6e; /* 深いブルー */
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 40px;
}

.footer-logo {
  flex-basis: 30%;
}

.footer-logo h3 {
  font-size: 24px;
  margin-bottom: 15px;
}

.footer-logo p {
  opacity: 0.7;
}

.footer-links {
  flex-basis: 20%;
}

.footer-links h4 {
  font-size: 18px;
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  color: white;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer-links ul li a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  opacity: 0.7;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background-color 0.3s ease;
}

.social-links a:hover {
  background-color: rgba(255,255,255,0.2);
}

/* セカンダリーカラー活用（特別強調要素） */
.premium-feature {
  color: #8b5cf6; /* セカンダリ500 - パープル */
  font-weight: bold;
}

/* アイコンの余白調整 */
.feature img, .benefit-icon img, .persona-icon img {
  margin: 0 auto; /* 中央配置 */
  display: block;  /* 画像をブロック要素に */
}

/* ハンバーガーメニュー */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 1010;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #0ea5e9;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* オーバーレイ */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 995;
}

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

/* ボディのスクロール禁止 */
body.no-scroll {
  overflow: hidden;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
  .feature {
    flex-basis: calc(50% - 30px);
  }
  
  .type {
    flex-basis: calc(50% - 30px);
  }
  
  .benefit-item {
    flex-basis: 100%;
  }
  
  .persona {
    flex-basis: 100%;
  }
  
  .footer-logo, .footer-links {
    flex-basis: 100%;
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  /* アイコンのサイズ縮小 */
  .icon {
    width: 80px;
    height: 80px;
  }
  
  .hamburger-menu {
    display: flex;
  }
  
  /* ヘッダーの調整 */
  header {
    padding: 15px 0;
  }
  
  .header-content {
    flex-direction: row;
    align-items: center;
  }
  
  /* ナビゲーションメニューをモバイル用に調整 */
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    padding-top: 70px;
    overflow-y: auto;
  }
  
  nav.active {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    width: 100%;
    padding: 0 20px;
  }
  
  nav ul li {
    margin: 0;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    width: 100%;
  }
  
  nav ul li:last-child {
    border-bottom: none;
  }
  
  nav ul li a.btn {
    display: block;
    text-align: center;
    margin-top: 10px;
  }
  
  .hero {
    padding: 130px 0 60px;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .feature {
    flex-basis: 100%;
  }
  
  .type {
    flex-basis: 100%;
  }
  
  .comparison-table {
    font-size: 14px;
  }
  
  .comparison-cta {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .header-content {
    padding: 0 10px;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .section-title {
    font-size: 26px;
  }
  
  .feature, .type, .persona {
    padding: 20px;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 10px;
  }
  
  .cta h2 {
    font-size: 28px;
  }
  
  .cta p {
    font-size: 16px;
  }
  
  .cta .btn {
    width: 100%;
    padding: 12px 20px;
  }
}

/* ---- 診断テストページのスタイル ---- */
.test-section {
  padding: 160px 0 80px;
}

.test-intro {
  text-align: center;
  margin-bottom: 50px;
}

.question {
  background-color: white;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.question h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #3f51b5;
}

.options {
  margin-top: 20px;
}

.option {
  background-color: #f5f5f5;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.option:hover {
  background-color: #e0e0e0;
}

.option input[type="radio"] {
  margin-right: 10px;
}


/* プログレスバーの固定表示 - ここが修正ポイント */
.test-intro {
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 4px;
  margin-bottom: 40px;
  overflow: hidden;
  position: fixed;
  top: 80px; /* ヘッダーの下に表示 */
  left: 0;
  z-index: 999;
  padding: 0 10%;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.progress {
  height: 100%;
  background-color: #3f51b5;
  width: 0%;
  transition: width 0.3s ease;
  margin: 20px auto;
  max-width: 80%;
  border-radius: 4px;
}

.questions-container {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 30px; /* プログレスバーの下に余白を追加 */
}

@media (max-width: 768px) {
  .progress-bar {
    top: 60px; /* モバイルのヘッダー高さに合わせて調整 */
  }
  
  .test-section {
    padding-top: 120px; /* モバイル用に上部パディングを調整 */
  }
}

/* ---- 診断結果ページのスタイル ---- */
.results-section {
  padding: 160px 0 80px;
}

.results {
  background-color: white;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 50px;
}

.results h2 {
  color: #3f51b5;
  margin-bottom: 30px;
  text-align: center;
}

.profile {
  margin: 30px 0;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  border-left: 5px solid #3f51b5;
}

.scores {
  margin: 40px 0;
}

.score-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.label {
  width: 150px;
  font-weight: bold;
}

.bar {
  flex: 1;
  height: 24px;
  background-color: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 15px;
}

.achievement-fill {
  height: 100%;
  background-color: #f59e0b; /* 達成動機 - オレンジ */
}

.affiliation-fill {
  height: 100%;
  background-color: #10b981; /* 親和動機 - グリーン */
}

.power-fill {
  height: 100%;
  background-color: #ef4444; /* 権力動機 - レッド */
}

.value {
  width: 50px;
  font-weight: bold;
  text-align: right;
}

.upgrade-section {
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 30px;
  margin-top: 40px;
  text-align: center;
  position: relative;
  clear: both;
}

.upgrade-section h3 {
  color: #3f51b5;
  margin-bottom: 15px;
}

.upgrade-section p {
  margin-bottom: 20px;
}

.subscribe-section {
  margin-top: 30px;
  padding: 30px;
  background-color: #f5f5f5;
  border-radius: 8px;
  text-align: center;
}

.subscribe-section h3 {
  color: #3f51b5;
  margin-bottom: 15px;
}

.subscribe-section p {
  margin-bottom: 20px;
}

#email-input {
  padding: 12px;
  width: 100%;
  max-width: 300px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
}

#subscribe-button {
  padding: 12px 24px;
  background-color: #3f51b5;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#subscribe-button:hover {
  background-color: #303f9f;
}

.loading {
  text-align: center;
  padding: 50px 0;
  color: #666;
}

/* モバイル向けの円グラフ表示 */
.pie-chart-container {
  display: none; /* デフォルトでは非表示 */
  margin: 30px auto;
  width: 200px;
  height: 200px;
  position: relative;
}

/* 円グラフのCSS */
.pie-chart {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pie-legend {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 以下を追加して凡例とその下のコンテンツの間隔を確保 */
.results .upgrade-section {
  margin-top: 90px; /* 上部マージンを増やす */
}

/* モバイル向け結果ページスタイル */
/* モバイル向け結果ページスタイル */
@media (max-width: 768px) {
  /* 既存のスタイルはそのまま */
  
  /* 円グラフと次のセクションの間隔をさらに広げる */
  /* 結果ページの円グラフとセクション間の余白を確保するための追加スタイル */
  .pie-chart-container {
    margin-bottom: 150px !important; /* 優先度高く設定 */
    padding-bottom: 70px !important;
    position: relative;
  }
}

.pie-legend {
  margin-bottom: 80px !important;
  padding-bottom: 40px !important;
}

.upgrade-section {
  position: relative;
  z-index: 5;
  margin-top: 150px !important; /* 上部マージンを大きく取る */
  padding-top: 40px !important;
  clear: both;
  border-top: 1px solid #eee; /* 区切り線を追加 */
}

/* 円グラフの後に配置される要素は確実に下に表示されるようにする */
.results .scores + * {
  margin-top: 200px;
}

@media (max-width: 768px) {
  .pie-chart-container {
    margin-bottom: 180px !important; /* モバイルではさらに余白を増やす */
  }
  
  .upgrade-section {
    margin-top: 180px !important;
  }
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-color.achievement {
  background-color: #f59e0b;
}

.legend-color.affiliation {
  background-color: #10b981;
}

.legend-color.power {
  background-color: #ef4444;
}

/* モバイル向け結果ページスタイル */
@media (max-width: 768px) {
  .results {
    padding: 25px;
  }
  
  .score-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .bar {
    width: 100%;
    margin: 10px 0;
  }
  
  .label, .value {
    width: auto;
  }
  
  /* モバイルでは円グラフを表示 */
  .pie-chart-container {
    display: block;
    margin-bottom: 100px;
  }
  
  .upgrade-section {
    margin-top: 120px;
    padding-top: 40px;
    clear: both;
  }
  
  .pie-legend {
    margin-bottom: 50px;
    padding-bottom: 20px;
  }
  
  .score-bars {
    display: none;
  }
}

/* ---- 詳細診断結果ページのスタイル ---- */
/* ここから詳細診断結果ページのスタイルを修正 */
.detailed-results-section {
  padding: 180px 0 100px; /* ヘッダーに隠れないように上部パディングを増加、下部も余白を確保 */
}

.detailed-results-container {
  background-color: white;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 60px; /* フッター方向の余白を増加 */
}

.detailed-results-header {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px; /* タイトル上部にも余白を追加 */
}
  
.detailed-results-header h2 {
  color: #3f51b5;
  margin-bottom: 15px; /* タイトル下の余白を増加 */
  font-size: 28px; /* タイトルのフォントサイズを大きくして視認性向上 */
}
  
.subtitle {
  color: #666;
  font-size: 18px;
  margin-bottom: 15px; /* サブタイトル下にも余白を追加 */
}

/* セクション間の余白を調整 */
.summary-section {
  margin-bottom: 50px; /* 下部余白を増加 */
}
  
.primary-type {
  display: flex;
  background-color: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 40px; /* 下部余白を増加 */
}
  
.type-icon {
  flex: 0 0 60px;
  height: 60px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 20px;
}
  
.type-icon.achievement {
  background-image: url('../img/icons/presentation.png');
}
  
.type-icon.affiliation {
  background-image: url('../img/icons/team.png');
}
  
.type-icon.power {
  background-image: url('../img/icons/manager.png');
}
  
.type-info {
  flex: 1;
}
  
.type-info h4 {
  color: #3f51b5;
  margin-bottom: 15px; /* 下部余白を増加 */
}
  
.scores-visualization {
  margin-top: 40px; /* 上部余白を増加 */
  margin-bottom: 40px; /* 下部余白を追加 */
}
  
.score-bars {
  margin-top: 25px;
  margin-bottom: 25px; /* 下部余白を追加 */
}
  
.detailed-analysis, .action-plan {
  margin-bottom: 50px; /* 下部余白を増加 */
  padding: 35px; /* 内部余白を増加 */
  background-color: #f9f9f9;
  border-radius: 8px;
}
  
.detailed-analysis h3, .action-plan h3 {
  color: #3f51b5;
  margin-bottom: 25px; /* 下部余白を増加 */
}
  
.analysis-content, .plan-content {
  line-height: 1.8;
  margin-bottom: 20px; /* コンテンツの下部に余白を追加 */
}
  
.action-items {
  list-style-type: none;
  padding: 0;
  margin: 30px 0; /* 上下の余白を増加 */
}
  
.action-item {
  padding: 25px; /* 内部余白を増加 */
  background-color: white;
  border-radius: 8px;
  margin-bottom: 20px; /* 項目間の余白を増加 */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
  
.action-item h4 {
  color: #3f51b5;
  margin-bottom: 15px;
}

/* 次のステップセクションの調整 */
.next-steps {
  margin-top: 60px; /* 上部余白を大きく取る */
  margin-bottom: 60px; /* 下部余白を大きく取る */
  padding: 20px 0; /* 上下余白を追加 */
}

/* PDFダウンロードセクション */
.download-section {
  text-align: center;
  margin-top: 50px; /* 上部余白を増加 */
  margin-bottom: 50px; /* 下部余白を追加 */
  padding: 35px; /* 内部余白を増加 */
  background-color: #e8f5e9;
  border-radius: 12px;
  border: 2px dashed #3f51b5;
  position: relative;
  overflow: hidden;
}
  
.download-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(63, 81, 181, 0.1) 25%, transparent 25%, transparent 50%, rgba(63, 81, 181, 0.1) 50%, rgba(63, 81, 181, 0.1) 75%, transparent 75%, transparent);
  background-size: 20px 20px;
  opacity: 0.5;
  z-index: 0;
}
  
.download-section > * {
  position: relative;
  z-index: 1;
}
  
.download-section h3 {
  color: #2e7d32;
  margin-bottom: 20px; /* 下部余白を増加 */
  font-size: 1.6rem;
}
  
.download-icon {
  font-size: 48px;
  color: #3f51b5;
  margin-bottom: 20px; /* 下部余白を増加 */
  display: inline-block;
  animation: bounce 2s infinite;
}
  
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-20px);}
  60% {transform: translateY(-10px);}
}
  
.btn-download {
  display: inline-block;
  background-color: #2e7d32;
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 20px; /* 上部余白を増加 */
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border: none;
  position: relative;
}
  
.btn-download:hover {
  background-color: #1b5e20;
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}
  
.btn-download:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
  
.btn-download::after {
  content: "↓";
  margin-left: 8px;
  font-weight: bold;
}

/* PDFダウンロードボタンのローディング表示 */
.loading-dot-container {
  display: inline-block;
}
  
.loading-dots .dot {
  opacity: 0;
  animation: dot-animation 1.4s infinite;
  display: inline-block;
}
  
.loading-dots .dot:nth-child(2) {
  animation-delay: 0.2s;
}
  
.loading-dots .dot:nth-child(3) {
  animation-delay: 0.4s;
}
  
@keyframes dot-animation {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}
  
.loading-container {
  text-align: center;
  padding: 80px 0; /* 読み込み中の表示エリアの余白を増加 */
}
  
.loading-spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3f51b5;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 25px; /* 下部余白を増加 */
}
  
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
  
.small {
  font-size: 14px;
  color: #666;
  margin-top: 15px; /* 上部余白を増加 */
}
  
.analysis-in-progress {
  text-align: center;
  padding: 70px 0; /* 上下余白を増加 */
}
  
.progress-bar-animated {
  height: 6px;
  background: linear-gradient(90deg, #3f51b5 0%, #3f51b5 50%, transparent 50%, transparent 100%);
  background-size: 200% 100%;
  animation: progress-animation 1.5s linear infinite;
  margin: 35px 0; /* 上下余白を増加 */
  border-radius: 3px;
}
  
@keyframes progress-animation {
  0% { background-position: 200% 0; }
  100% { background-position: 0 0; }
}
  
.error-message {
  text-align: center;
  padding: 50px 0; /* 上下余白を増加 */
}
  
.error-message h2 {
  color: #ef4444;
  margin-bottom: 20px; /* 下部余白を増加 */
}
  
.error-message .btn {
  margin-top: 25px; /* 上部余白を増加 */
}
  
/* モバイル向け詳細結果ページスタイル */
@media (max-width: 768px) {
  .detailed-results-section {
    padding: 140px 0 80px; /* モバイル用にパディングを調整 */
  }
  
  .detailed-results-container {
    padding: 30px 25px; /* モバイル用に内部パディングを調整 */
  }
  
  .primary-type {
    flex-direction: column;
    padding: 20px;
  }
  
  .type-icon {
    margin: 0 auto 15px;
  }
  
  .score-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .bar {
    width: 100%;
    margin: 10px 0;
  }
  
  .label, .value {
    width: auto;
  }
  
  .detailed-analysis, .action-plan {
    padding: 25px; /* モバイル用に内部パディングを調整 */
  }
  
  /* スマートフォン表示でのPDFダウンロードボタン調整 */
  .btn-download {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
  }
  
  .next-steps {
    margin-top: 40px; /* モバイル用に余白を調整 */
    margin-bottom: 40px;
  }
}
  
/* 詳細診断テストページ向けスタイル */
.detailed-test-section {
  padding: 160px 0 80px;
}
  
.detailed-test-intro {
  text-align: center;
  margin-bottom: 50px;
}
  
.question-container {
  background-color: white;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
  
.question-container h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #3f51b5;
}
  
.hint {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
  line-style: italic;
}
  
textarea {
  width: 100%;
  min-height: 150px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  font-size: 16px;
  margin-bottom: 10px;
}
  
.character-count {
  text-align: right;
  font-size: 14px;
  color: #666;
}
  
.character-count.limit {
  color: #ef4444;
}
  
.ai-thinking-animation {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}
  
.thinking-circle {
  width: 20px;
  height: 20px;
  background-color: #3f51b5;
  border-radius: 50%;
  animation: thinking-animation 1.4s infinite ease-in-out both;
}
  
.thinking-circle:nth-child(1) {
  animation-delay: -0.32s;
}
  
.thinking-circle:nth-child(2) {
  animation-delay: -0.16s;
}
  
@keyframes thinking-animation {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}
  
.countdown-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}
  
.countdown-ring {
  position: relative;
  width: 60px;
  height: 60px;
  margin-top: 10px;
}
  
.countdown-ring-bg {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 3;
}
  
.countdown-ring-progress {
  fill: none;
  stroke: #3f51b5;
  stroke-width: 3;
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(-90deg);
  stroke-dasharray: 157;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
  
/* メールモーダル */
.email-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
  
.email-modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  text-align: center;
}
  
.email-modal h3 {
  color: #3f51b5;
  margin-bottom: 15px;
}
  
.email-modal p {
  margin-bottom: 20px;
}
  
#modal-email-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 16px;
}
  
.modal-buttons {
  display: flex;
  justify-content: center;
}
  
#modal-submit-button {
  padding: 12px 30px;
  background-color: #3f51b5;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}
  
#modal-submit-button:hover {
  background-color: #303f9f;
}
  
/* ボタン間の間隔を改善するためのスタイル */
.action-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 40px 0; /* 上下の余白を増加 */
}
  
.action-buttons a.btn,
.action-buttons button.btn {
  min-width: 180px;
  margin: 0; /* 既存のマージンを削除 */
  text-align: center;
}
  
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .action-buttons a.btn,
  .action-buttons button.btn {
    width: 100%;
    max-width: 300px;
  }
}

/* フィードバックセクションのスタイル */
.feedback-section {
  background-color: #f0f7fa;
  border-radius: 8px;
  padding: 30px;
  margin-top: 50px; /* 上部余白を増加 */
  margin-bottom: 50px; /* 下部余白を増加 */
}

.feedback-form {
  margin-top: 25px; /* 上部余白を増加 */
}

.rating-group {
  margin-bottom: 25px; /* 下部余白を増加 */
}

.rating-group label {
  display: block;
  margin-bottom: 10px; /* 下部余白を増加 */
  font-weight: bold;
}

.rating-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.star-rating {
  display: inline-flex;
  direction: rtl;
  padding: 0 10px;
}

.star {
  color: #ddd;
  font-size: 24px;
  padding: 0 5px;
  cursor: pointer;
}

.star:hover,
.star:hover ~ .star,
.star.selected,
.star.selected ~ .star {
  color: #ffb400;
}

.comment-group {
  margin-bottom: 25px; /* 下部余白を増加 */
}

.comment-group label {
  display: block;
  margin-bottom: 10px; /* 下部余白を増加 */
  font-weight: bold;
}

.comment-group textarea {
  width: 100%;
  min-height: 100px;
  padding: 15px; /* 内部パディングを増加 */
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
}

#submit-feedback {
  background-color: #3f51b5;
  padding: 12px 24px;
  margin-top: 10px; /* 上部余白を追加 */
}

#feedback-success {
  text-align: center;
  padding: 30px; /* 内部パディングを増加 */
  background-color: #e8f5e9;
  border-radius: 8px;
  margin-top: 30px; /* 上部余白を追加 */
}

#feedback-success h3 {
  color: #2e7d32;
  margin-bottom: 15px; /* 下部余白を増加 */
}

@media (max-width: 768px) {
  .feedback-section {
    padding: 25px; /* モバイル用にパディングを調整 */
  }
  
  .star {
    font-size: 20px;
    padding: 0 3px;
  }
  
  .rating-labels span {
    font-size: 14px;
  }
}

/* ページコンテンツの共通スタイル */
.page-content {
  padding: 60px 20px;
  max-width: 900px;
  margin: 0 auto;
}

/* スマホ・タブレット向けページコンテンツ上部余白調整 */
@media (max-width: 1024px) {
  .page-content {
    padding-top: 140px !important; /* タブレット用に上部パディング増加 */
  }
}

@media (max-width: 768px) {
  .page-content {
    padding-top: 150px !important; /* スマホ用に上部パディング増加 */
  }
}

@media (max-width: 479px) {
  .page-content {
    padding-top: 90px !important; /* 小画面スマホ用調整 */
  }
}

.page-content h1 {
  font-size: 28px;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.content-box {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  padding: 30px;
  margin-bottom: 30px;
}

.content-box h2 {
  font-size: 22px;
  color: #2c3e50;
  margin: 30px 0 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.content-box p {
  line-height: 1.7;
  margin-bottom: 15px;
  color: #555;
}

.content-box ul, .content-box ol {
  margin: 15px 0;
  padding-left: 20px;
}

.content-box li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.update-date {
  margin-top: 40px;
  color: #888;
  font-style: italic;
  text-align: right;
}

/* テーブルスタイル */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.info-table th, .info-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}

.info-table th {
  width: 30%;
  text-align: left;
  color: #333;
  background-color: #f8f9fa;
}

/* お問い合わせフォーム */
.contact-form {
  margin: 20px 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.form-group textarea {
  resize: vertical;
}

.required {
  color: #e74c3c;
}

.privacy-policy {
  display: flex;
  align-items: flex-start;
  margin-top: 30px;
}

.privacy-policy input {
  width: auto;
  margin-right: 10px;
  margin-top: 5px;
}

.privacy-policy label {
  display: inline;
}

.privacy-policy p {
  margin-top: 5px;
  margin-left: 25px;
}

.form-actions {
  text-align: center;
  margin-top: 30px;
}

.contact-email {
  font-weight: bold;
  color: #3498db;
  font-size: 18px;
}

/* レスポンシブ対応 */

  
  .content-box {
      padding: 20px;
  
  .info-table th, .info-table td {
      display: block;
      width: 100%;
  }
  
  .info-table th {
      padding-bottom: 5px;
      border-bottom: none;
  }
  
  .info-table td {
      padding-top: 5px;
  }
}

/* ページコンテンツの共通スタイル - ヘッダー高さ分のパディングを追加 */
.container.page-content {
  padding: 180px 20px 60px !important; /* 適切な上部余白に調整 */
  max-width: 900px;
  margin: 0 auto;
}

/* デバイス別上部余白最適化 */
@media (max-width: 479px) {
  .container.page-content {
    padding-top: 100px !important; /* スマホ最適化 */
  }
}

@media (min-width: 480px) and (max-width: 1024px) {
  .container.page-content {
    padding-top: 120px !important; /* タブレット最適化 */
  }
}

@media (min-width: 1025px) {
  .container.page-content {
    padding-top: 100px !important; /* PC最適化 */
  }
}

/* 送信ボタンのスタイル修正 */
.btn-primary {
  background-color: #3498db;
  color: white;
  border: none; /* 黒枠線を削除 */
  padding: 12px 30px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: #2980b9;
}

/* PCでの「トップページ」非表示 */
@media (min-width: 768px) {
  #nav-menu ul li:first-child {
      display: none;
  }
}

/* ロゴのリンクスタイル */
.logo a {
  text-decoration: none;
  color: inherit; /* 元々のロゴの色を維持 */
}

/* ページコンテンツの共通スタイル - ヘッダー高さ分のパディングを追加 */
.admin-content {
  padding-top: 20px; /* ヘッダーの下に表示されるようにする */
}


/* 特徴セクション説明文の表示設定 */
.feature-card p {
    line-height: 1.6;
    opacity: 0.9;
    color: #2d3748 !important;
    display: block !important;
    visibility: visible !important;
}



}

/* FAQセクション回答表示 - 最高優先度 */
section.faq .faq-items .faq-item p,
.faq .faq-items .faq-item p,
div.faq-item p {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #2d3748 !important;
  background-color: transparent !important;
  margin-top: 15px !important;
  line-height: 1.6 !important;
  font-size: 16px !important;
}

/* エニアグラム詳細結果表示の位置修正 */
#detailed-result-content {
    position: relative !important;
    top: 0 !important;
    transform: none !important;
    margin-top: 20px !important;
    z-index: 1 !important;
}
/* === レスポンシブデザイン完成版 Phase 1 === */

/* 基本モバイル対応 (320px-479px) */
@media (max-width: 479px) {
    .container {
        padding: 0 10px;
    }
    
    .test-container {
        padding: 0 15px;
    }
    
    .questions-container {
        padding: 20px;
        border-radius: 15px;
    }
    
    .question-text {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* モバイル対応 (480px-767px) */
@media (max-width: 767px) {
    .detailed-test-section {
        padding: 100px 0 60px;
    }
    
    .brand-title {
        font-size: 2.5rem;
    }
    
    .detailed-test-section h1 {
        font-size: 1.8rem;
    }
    
    .question-container {
        padding: 20px;
        margin: 15px 0;
    }
}

/* Chart.js レスポンシブ対応 */
@media (max-width: 768px) {
    .chart-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .chart-container canvas {
        max-width: 100%;
        height: auto;
        width: auto !important;
        min-width: auto !important;
    }
    
    .scores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .score-item {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* タブレット対応 (769px-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 900px;
    }
    
    .chart-container {
        width: 90%;
        margin: 20px auto;
    }
    
    .scores-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* デスクトップ最適化 (1025px以上) */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
    
    .chart-container {
        width: 80%;
        margin: 30px auto;
    }
    
    .scores-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
/* =================================
   レスポンシブデザイン完成実装 - Phase 1
   基本レスポンシブ強化・ブレークポイント統一
   ================================= */

/* 超小画面モバイル対応 (320px-479px) */
@media (max-width: 479px) {
    /* ページ全体の最適化 */
    .container {
        padding: 8px !important;
        margin: 0 4px !important;
    }
    
    /* ヘッダー・ナビゲーション最適化 */
    .navbar {
        padding: 8px 12px !important;
    }
    
    .navbar-brand {
        font-size: 16px !important;
        padding: 4px 0 !important;
    }
    
    /* ハンバーガーメニューボタン最適化 */
    .navbar-toggler {
        padding: 6px 8px !important;
        font-size: 14px !important;
        border-radius: 4px !important;
    }
    
    /* メニュー項目タッチ対応 */
    .navbar-nav .nav-link {
        padding: 12px 16px !important;
        font-size: 16px !important;
        min-height: 44px !important; /* タッチ推奨サイズ */
        display: flex !important;
        align-items: center !important;
    }
    
    /* フォーム要素最適化 */
    .form-control {
        padding: 12px 14px !important;
        font-size: 16px !important; /* iOS拡大防止 */
        min-height: 44px !important;
    }
    
    .btn {
        padding: 12px 16px !important;
        font-size: 16px !important;
        min-height: 44px !important;
        border-radius: 6px !important;
    }
    
    /* カード・コンテンツ最適化 */
    .card {
        margin-bottom: 12px !important;
        border-radius: 8px !important;
    }
    
    .card-header {
        padding: 12px 16px !important;
        font-size: 16px !important;
    }
    
    .card-body {
        padding: 16px !important;
    }
    
    /* テキストサイズ最適化 */
    h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
        margin-bottom: 16px !important;
    }
    
    h2 {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 14px !important;
    }
    
    h3 {
        font-size: 18px !important;
        line-height: 1.4 !important;
        margin-bottom: 12px !important;
    }
    
    p, .text-content {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 12px !important;
    }
    
    /* 診断結果表示最適化 */
    .result-section {
        padding: 12px !important;
        margin-bottom: 16px !important;
    }
    
    .score-display {
        font-size: 18px !important;
        padding: 8px 12px !important;
    }
    
    /* テーブル最適化 */
    .table-responsive {
        font-size: 12px !important;
    }
    
    .table th,
    .table td {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
}

/* 小画面モバイル対応 (480px-767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .container {
        padding: 12px !important;
        margin: 0 8px !important;
    }
    
    .navbar {
        padding: 10px 16px !important;
    }
    
    .navbar-brand {
        font-size: 18px !important;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 16px !important;
        font-size: 15px !important;
        min-height: 44px !important;
    }
    
    .form-control {
        padding: 10px 12px !important;
        font-size: 15px !important;
    }
    
    .btn {
        padding: 10px 16px !important;
        font-size: 15px !important;
        min-height: 44px !important;
    }
    
    h1 {
        font-size: 28px !important;
    }
    
    h2 {
        font-size: 22px !important;
    }
    
    h3 {
        font-size: 20px !important;
    }
}

/* タブレット対応 (768px-1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 90% !important;
        padding: 16px !important;
    }
    
    /* 2カラムレイアウト最適化 */
    .row .col-md-6 {
        margin-bottom: 20px !important;
    }
    
    /* Chart.js以外のグラフ要素対応 */
    .chart-container:not([id*="chart"]) {
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto 20px !important;
    }
    
    /* フォーム要素調整 */
    .form-control {
        padding: 10px 14px !important;
    }
    
    .btn {
        padding: 10px 20px !important;
    }
    
    /* ナビゲーション調整 */
    .navbar-nav .nav-link {
        padding: 8px 16px !important;
    }
}

/* デスクトップ最適化 (1025px以上) */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px !important;
        margin: 0 auto !important;
    }
    
    /* 大画面でのマージン調整 */
    .main-content {
        padding: 24px 0 !important;
    }
    
    /* Chart.js以外の要素最適化 */
    .result-display {
        max-width: 800px !important;
        margin: 0 auto !important;
    }
    
    /* フォーム最適化 */
    .form-row .col {
        padding: 0 8px !important;
    }
}

/* 画像・メディア要素レスポンシブ対応 */
@media (max-width: 768px) {
    img:not(.logo):not(.icon) {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .media-container {
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* 動画埋め込み対応 */
    iframe,
    video {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* タッチデバイス最適化 */
@media (hover: none) and (pointer: coarse) {
    /* タッチ可能要素の最小サイズ確保 */
    .btn,
    .nav-link,
    .form-control,
    .clickable {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    /* ホバー効果をタッチ用に調整 */
    .btn:hover,
    .nav-link:hover {
        background-color: #f8f9fa !important;
        transform: none !important;
    }
    
    /* スクロール最適化 */
    .scrollable {
        -webkit-overflow-scrolling: touch !important;
    }
}

/* ロード時のちらつき防止 */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        animation: fadeIn 0.3s ease-in-out !important;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ダークモード対応（基本） */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1a1a1a !important;
        color: #ffffff !important;
    }
    
    .auto-dark .card {
        background-color: #2d2d2d !important;
        border-color: #404040 !important;
    }
}
/* =================================
   3理論統一レスポンシブデザイン - Phase 2
   診断ページ統一スタイル・レスポンシブ対応
   ================================= */

/* 3理論共通診断ページスタイル */
.test-section,
.detailed-test-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 120px 0 80px;
    position: relative;
}

.test-container,
.test-section .container,
.detailed-test-section .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー統一スタイル */
.test-header,
.detailed-test-section .brand-title,
.test-section .brand-title {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.brand-title {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 800;
    text-align: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.test-header h1,
.detailed-test-section h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: white;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.test-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* 質問コンテナ統一スタイル */
.questions-container,
.question-container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

/* プログレスバー統一スタイル */
.progress-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.progress-bar {
    background: white;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

/* =================================
   レスポンシブ対応 - 3理論診断ページ
   ================================= */

/* 超小画面モバイル対応 (320px-479px) */
@media (max-width: 479px) {
    .test-section,
    .detailed-test-section {
        padding: 100px 0 40px !important;
    }
    
    .test-container,
    .test-section .container,
    .detailed-test-section .container {
        padding: 0 10px !important;
        max-width: 100% !important;
    }
    
    .brand-title {
        font-size: 1.8rem !important;
        margin-bottom: 8px !important;
        line-height: 1.2 !important;
    }
    
    .test-header h1,
    .detailed-test-section h1 {
        font-size: 1.4rem !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
    }
    
    .test-header p {
        font-size: 0.9rem !important;
        margin-bottom: 20px !important;
    }
    
    .questions-container,
    .question-container {
        padding: 20px 16px !important;
        margin-bottom: 16px !important;
        border-radius: 10px !important;
    }
    
    .progress-container {
        padding: 12px !important;
        margin-bottom: 16px !important;
    }
    
    /* 質問テキスト最適化 */
    .question h3,
    .question-text {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 16px !important;
    }
    
    /* 選択肢ボタン最適化 */
    .answer-option,
    .option-button {
        padding: 12px 16px !important;
        margin-bottom: 8px !important;
        font-size: 0.9rem !important;
        min-height: 44px !important;
        border-radius: 6px !important;
    }
    
    /* ナビゲーションボタン最適化 */
    .navigation-buttons {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .btn-primary,
    .btn-secondary,
    .nav-button {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 1rem !important;
        min-height: 44px !important;
    }
}

/* 小画面モバイル対応 (480px-767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .test-section,
    .detailed-test-section {
        padding: 100px 0 60px !important;
    }
    
    .test-container,
    .test-section .container,
    .detailed-test-section .container {
        padding: 0 16px !important;
        max-width: 95% !important;
    }
    
    .brand-title {
        font-size: 2.2rem !important;
        margin-bottom: 12px !important;
    }
    
    .test-header h1,
    .detailed-test-section h1 {
        font-size: 1.6rem !important;
        margin-bottom: 15px !important;
    }
    
    .questions-container,
    .question-container {
        padding: 30px 24px !important;
        margin-bottom: 20px !important;
    }
    
    .answer-option,
    .option-button {
        padding: 10px 16px !important;
        margin-bottom: 6px !important;
        min-height: 44px !important;
    }
    
    .navigation-buttons {
        justify-content: space-between !important;
        gap: 16px !important;
    }
    
    .btn-primary,
    .btn-secondary {
        flex: 1 !important;
        padding: 12px 16px !important;
        min-height: 44px !important;
    }
}

/* タブレット対応 (768px-1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .test-section,
    .detailed-test-section {
        padding: 110px 0 70px !important;
    }
    
    .test-container,
    .test-section .container,
    .detailed-test-section .container {
        max-width: 90% !important;
        padding: 0 20px !important;
    }
    
    .brand-title {
        font-size: 2.6rem !important;
    }
    
    .test-header h1,
    .detailed-test-section h1 {
        font-size: 1.8rem !important;
    }
    
    .questions-container,
    .question-container {
        padding: 35px 30px !important;
        margin-bottom: 25px !important;
    }
    
    /* 2カラムレイアウト対応 */
    .answer-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
    
    .answer-option,
    .option-button {
        margin-bottom: 0 !important;
    }
}

/* デスクトップ最適化 (1025px以上) */
@media (min-width: 1025px) {
    .test-container,
    .test-section .container,
    .detailed-test-section .container {
        max-width: 800px !important;
    }
    
    .questions-container,
    .question-container {
        padding: 40px !important;
    }
    
    /* 大画面でのマルチカラム対応 */
    .answer-grid-large {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 16px !important;
    }
}

/* 質問番号・プログレス表示最適化 */
@media (max-width: 768px) {
    .question-number,
    .progress-text {
        font-size: 0.9rem !important;
    }
    
    .progress-bar {
        height: 6px !important;
    }
    
    .progress-percentage {
        font-size: 0.8rem !important;
    }
}

/* ローディング・エラー表示最適化 */
@media (max-width: 479px) {
    .loading-spinner,
    .error-message {
        padding: 16px !important;
        font-size: 0.9rem !important;
    }
    
    .retry-button {
        width: 100% !important;
        margin-top: 12px !important;
    }
}

/* フォーカス・アクセシビリティ強化 */
@media (max-width: 768px) {
    .answer-option:focus,
    .option-button:focus,
    .btn:focus {
        outline: 2px solid #007bff !important;
        outline-offset: 2px !important;
    }
    
    /* スクリーンリーダー対応 */
    .sr-only-mobile {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0,0,0,0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }
}
/* =================================
   UI統一・パフォーマンス最適化 - Phase 3
   最終調整・画像最適化・読み込み速度改善
   ================================= */

/* 画像・メディア要素完全レスポンシブ対応 */
.responsive-media {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* アイコン・ロゴ最適化 */
.logo-responsive {
    max-height: 40px !important;
    width: auto !important;
}

@media (max-width: 479px) {
    .logo-responsive {
        max-height: 32px !important;
    }
}

/* 統一カラーパレット */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-blue: #667eea;
    --primary-purple: #764ba2;
    --success-green: #28a745;
    --warning-orange: #ffc107;
    --danger-red: #dc3545;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --border-light: #e9ecef;
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.15);
}

/* 統一ボタンスタイル */
.btn-unified {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    text-transform: none !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px var(--shadow-light) !important;
}

.btn-unified:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px var(--shadow-medium) !important;
    color: white !important;
}

.btn-unified:active {
    transform: translateY(0) !important;
}

/* 統一カードスタイル */
.card-unified {
    border: 1px solid var(--border-light) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px var(--shadow-light) !important;
    transition: all 0.3s ease !important;
    background: white !important;
}

.card-unified:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px var(--shadow-medium) !important;
}

/* パフォーマンス最適化 */
.optimized {
    will-change: transform !important;
    backface-visibility: hidden !important;
    perspective: 1000px !important;
}

/* スムーズスクロール */
html {
    scroll-behavior: smooth !important;
}

/* レイアウトシフト防止 */
.layout-stable {
    contain: layout style paint !important;
}

/* 遅延読み込み対応 */
.lazy-load {
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.lazy-load.loaded {
    opacity: 1 !important;
}

/* =================================
   結果表示ページ統一レスポンシブ
   ================================= */

/* 結果表示コンテナ */
.results-container {
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

@media (max-width: 479px) {
    .results-container {
        padding: 12px !important;
    }
}

/* スコア表示統一 */
.score-display-unified {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 20px !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 12px var(--shadow-light) !important;
}

@media (max-width: 479px) {
    .score-display-unified {
        padding: 16px !important;
        margin-bottom: 16px !important;
    }
    
    .score-display-unified h3 {
        font-size: 1.2rem !important;
    }
    
    .score-display-unified .score-value {
        font-size: 1.8rem !important;
    }
}

/* Chart.js以外のグラフ要素レスポンシブ */
.chart-responsive:not([id*="chart"]) {
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto 20px !important;
    height: auto !important;
}

@media (max-width: 479px) {
    .chart-responsive:not([id*="chart"]) {
        max-width: 100% !important;
        margin-bottom: 16px !important;
    }
}

/* テーブルレスポンシブ強化 */
.table-responsive-enhanced {
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px var(--shadow-light) !important;
}

@media (max-width: 767px) {
    .table-responsive-enhanced {
        font-size: 0.875rem !important;
    }
    
    .table-responsive-enhanced th,
    .table-responsive-enhanced td {
        padding: 8px 6px !important;
        font-size: 0.8rem !important;
    }
    
    /* テーブルをカードスタイルに変換 */
    .table-card-mobile {
        display: none !important;
    }
    
    .mobile-card-view {
        display: block !important;
    }
    
    .mobile-card-item {
        background: white !important;
        border: 1px solid var(--border-light) !important;
        border-radius: 8px !important;
        padding: 16px !important;
        margin-bottom: 12px !important;
        box-shadow: 0 2px 4px var(--shadow-light) !important;
    }
}

@media (min-width: 768px) {
    .mobile-card-view {
        display: none !important;
    }
    
    .table-card-mobile {
        display: table !important;
    }
}

/* =================================
   フォーム要素統一レスポンシブ
   ================================= */

/* 入力フィールド統一 */
.form-control-unified {
    border: 2px solid var(--border-light) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    background: white !important;
}

.form-control-unified:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    outline: none !important;
}

@media (max-width: 479px) {
    .form-control-unified {
        font-size: 16px !important; /* iOS拡大防止 */
        padding: 14px 16px !important;
    }
}

/* セレクトボックス統一 */
.select-unified {
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

/* =================================
   ナビゲーション統一レスポンシブ
   ================================= */

/* ブレッドクラム */
.breadcrumb-unified {
    background: var(--bg-light) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
}

@media (max-width: 479px) {
    .breadcrumb-unified {
        padding: 8px 12px !important;
        margin-bottom: 16px !important;
        font-size: 0.875rem !important;
    }
}

/* ページネーション */
.pagination-unified .page-link {
    border: 1px solid var(--border-light) !important;
    color: var(--text-dark) !important;
    padding: 8px 12px !important;
    margin: 0 2px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.pagination-unified .page-link:hover {
    background: var(--primary-blue) !important;
    color: white !important;
    border-color: var(--primary-blue) !important;
}

@media (max-width: 479px) {
    .pagination-unified .page-link {
        padding: 6px 8px !important;
        font-size: 0.875rem !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }
}

/* =================================
   パフォーマンス最適化設定
   ================================= */

/* GPU加速対象要素 */
.gpu-accelerated {
    transform: translateZ(0) !important;
    will-change: transform !important;
}

/* 重いアニメーション最適化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* メモリ使用量最適化 */
.memory-optimized {
    contain: strict !important;
}

/* 重要でない要素の遅延表示 */
.non-critical {
    content-visibility: auto !important;
    contain-intrinsic-size: 200px !important;
}

/* =================================
   印刷対応
   ================================= */

@media print {
    .no-print {
        display: none !important;
    }
    
    .print-friendly {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .page-break {
        page-break-before: always !important;
    }
}

/* =================================
   高コントラスト対応
   ================================= */

@media (prefers-contrast: high) {
    .high-contrast {
        border: 2px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
    }
    
    .high-contrast .btn {
        border: 2px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
    }
}

/* =================================
   最終調整・ブラウザ互換性
   ================================= */

/* Internet Explorer 対応 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .ie-fallback {
        display: block !important;
    }
}

/* Safari対応 */
@supports (-webkit-appearance: none) {
    .safari-fix {
        -webkit-appearance: none !important;
    }
}

/* Firefox対応 */
@-moz-document url-prefix() {
    .firefox-fix {
        -moz-appearance: none !important;
    }
}
/* 診断事例ページ専用スタイル */
.case-studies-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: auto;
    padding: 140px 0 20px;
    text-align: center;
    color: white;
}

/* PC・iPad専用ヘッダースペース調整 */
@media (min-width: 768px) {
    .case-studies-hero {
        padding: 130px 0 20px !important;
    }
}

/* PC専用さらに細かい調整 */
@media (min-width: 1200px) {
    .case-studies-hero {
        padding: 120px 0 20px !important;
    }
}

@media (max-width: 479px) {
    .case-studies-hero {
        padding: 90px 0 30px !important;
    }
}
/* 診断事例コンテンツセクション余白調整 */
.case-studies-content {
    padding: 0px 0 40px !important;
}

@media (max-width: 479px) {
    .case-studies-content {
        padding: 15px 0 60px !important;
    }
}
/* 診断方法セクション余白最適化 */
.diagnosis-method {
    margin-top: 20px !important;
    padding-top: 30px !important;
}

@media (max-width: 479px) {
    .diagnosis-method {
        margin-top: 15px !important;
        padding-top: 20px !important;
    }
}
/* 診断プロセス流れセクション位置統一 */
.process-steps {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    text-align: left;
}

.step-number {
    flex-shrink: 0;
    margin-right: 20px;
}

.step-content {
    flex: 1;
    text-align: left;
}

.step-content h3 {
    text-align: left !important;
    margin: 0 0 15px 0 !important;
    font-weight: 600;
}

.step-content p {
    text-align: left !important;
    margin: 0 !important;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .step {
        margin-bottom: 30px;
    }
    
    .step-number {
        margin-right: 15px;
    }
    
    .step-content h3 {
        font-size: 1.1rem !important;
    }
}
/* 詳細診断結果ページヘッダースペース調整 */
.detailed-results-section {
    padding-top: 70px !important;
    padding-bottom: 10px !important;
}

@media (max-width: 767px) {
    .detailed-results-section {
        padding: 40px 0 8px !important;
    }
}

@media (max-width: 479px) {
    .detailed-results-section {
        padding: 35px 0 5px !important;
    }
}
/* ロゴアイコンスタイル */
.logo-icon {
    height: 32px;
    width: 32px;
    margin-right: 10px;
    vertical-align: middle;
    object-fit: contain;
}

.footer-logo-icon {
    height: 36px;
    width: 36px;
    margin-right: 10px;
    vertical-align: middle;
    object-fit: contain;
}

/* レスポンシブ対応 */
@media (max-width: 479px) {
    .logo-icon {
        height: 28px;
        width: 28px;
        margin-right: 8px;
    }
    
    .footer-logo-icon {
        height: 32px;
        width: 32px;
        margin-right: 8px;
    }
}