/*
===============================================
葬儀料金シミュレーション専用CSS
simulation.css
===============================================
*/

/* ==================== 共通設定 ==================== */
.simulation-container {
  padding: 60px 0;
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* ==================== イントロセクション ==================== */
.simulation-intro {
  padding: 40px 0;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.simulation-title-wrapper {
  text-align: center;
}

.simulation-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.badge-text{
  font-size: 2rem;
}

.badge-icon {
  font-size: 1.8rem;
}

.simulation-title {
  font-size: 3.6rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 16px;
  font-family: "Noto Serif JP", serif;
}

.simulation-subtitle {
  font-size: 1.7rem;
  color: #666;
  line-height: 1.6;
}

/* ==================== ステップ共通 ==================== */
.simulation-step {
  margin-bottom: 60px;
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-header {
  text-align: center;
  margin-bottom: 40px;
}

.step-number {
  display: inline-block;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.step-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: #333;
  font-family: "Noto Serif JP", serif;
}

/* ==================== Step 1: 葬儀形式選択 ==================== */
.funeral-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.funeral-type-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
}

.funeral-type-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.funeral-type-card.selected {
  border-color: #7286D3;
  box-shadow: 0 8px 32px rgba(114, 134, 211, 0.3);
  transform: translateY(-4px); /* 選択状態でも少し浮かせる */
  background: linear-gradient(to bottom, #f0f9f0 0%, #ffffff 100%); /* 薄い緑の背景 */

}

/* 選択状態でもホバー効果を維持 */
.funeral-type-card.selected:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(114, 134, 211, 0.3);
}

/* チェックマークを追加（より明確に） */
.funeral-type-card.selected::after {
  content: '✓';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: #7286D3;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: checkmark-appear 0.3s ease;
}

@keyframes checkmark-appear {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.type-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.type-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.type-content {
  padding: 24px;
  text-align: center;
}

.type-name {
  font-size: 2.2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  font-family: "Noto Serif JP", serif;
}

.type-description {
  font-size: 1.6rem;
  color: #666;
  line-height: 1.8;
}

/* ==================== Step 2: プラン選択 ==================== */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.plan-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
}

.plan-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.plan-card.selected {
  border-color: #7286D3;
  box-shadow: 0 8px 32px rgba(114, 134, 211, 0.3);
  transform: translateY(-4px);
  background: linear-gradient(to bottom, #f0f9f0 0%, #ffffff 100%);
}

.plan-card.selected:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(114, 134, 211, 0.3);
}

.plan-card.selected::after {
  content: '✓';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: #7286D3;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: checkmark-appear 0.3s ease;
  z-index: 10;
}

.plan-image {
  width: 100%;
  height: 230px;
  overflow: hidden;
}

.plan-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.plan-card:hover .plan-image img {
  transform: scale(1.1);
}

.plan-content {
  padding: 0 20px 20px 20px;
}

.plan-name {
  font-size: 2.0rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  font-family: "Noto Serif JP", serif;
}

.plan-description {
  font-size: 1.4rem;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.6;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-amount {
  font-size: 2.8rem;
  font-weight: 500;
  color: #7286D3;
  font-family: "Poppins", sans-serif;
}

.price-tax {
  font-size: 1.3rem;
  color: #999;
}

/* ==================== Step 3: 式場選択 ==================== */
.venue-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.venue-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
}

.venue-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.venue-card.selected {
  border-color: #7286D3;
  box-shadow: 0 8px 32px rgba(114, 134, 211, 0.3);
  transform: translateY(-4px);
  background: linear-gradient(to bottom, #f0f9f0 0%, #ffffff 100%);
}

.venue-card.selected:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(114, 134, 211, 0.3);
}

.venue-card.selected::after {
  content: '✓';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: #7286D3;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: checkmark-appear 0.3s ease;
  z-index: 10;
}

.venue-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.venue-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.venue-card:hover .venue-image img {
  transform: scale(1.1);
}

.venue-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #FF9800;
  color: white;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.venue-content {
  padding: 20px;
}

.venue-name {
  font-size: 2.0rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  font-family: "Noto Serif JP", serif;
}

.venue-description {
  font-size: 1.4rem;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.6;
}

.venue-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-label {
  font-size: 1.2rem;
  color: #999;
}

/* ==================== 見積もり結果 ==================== */
.simulation-result {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
  margin-top: 60px;
  animation: fadeInUp 0.6s ease;
}

.result-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e0e0e0;
}

.result-title {
  font-size: 3.0rem;
  font-weight: 700;
  color: #333;
  font-family: "Noto Serif JP", serif;
}

.result-content {
  margin-bottom: 40px;
}

.result-details {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 1.6rem;
  color: #666;
  font-weight: 500;
}

.detail-value {
  font-size: 1.8rem;
  color: #333;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  text-align: right;
}

/* ==================== 注意書き ==================== */
.result-notes {
  margin: 24px 0;
  padding: 16px 20px;
  background: #fff9e6;
  border-left: 4px solid #FF9800;
  border-radius: 4px;
}

.result-notes p {
  font-size: 1.4rem;
  color: #666;
  line-height: 1.8;
  margin: 0;
}

.result-notes p + p {
  margin-top: 8px;
}

.result-total {
  background: #7286D3;
  color: white;
  padding: 32px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  box-shadow: 0 4px 20px rgba(114, 134, 211, 0.3);
  gap: 30px;
}

.total-label {
  font-size: 2.0rem;
  font-weight: 600;
}

.total-amount {
  font-size: 3.6rem;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
}

.total-tax {
  font-size: 1.4rem;
  opacity: 0.9;
}

/* ==================== オプション参考表示 ==================== */
.result-options {
  margin-bottom: 40px;
  padding: 32px;
  background: #f8f9fa;
  border-radius: 12px;
}

.options-title {
  font-size: 2.0rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  font-family: "Noto Serif JP", serif;
}

.options-note {
  font-size: 1.3rem;
  color: #999;
  margin-bottom: 24px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.option-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.option-image {
  width: 100%;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.option-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.option-name {
  font-size: 1.4rem;
  color: #333;
  font-weight: 600;
  text-align: center;
}

/* ==================== CTAボタン ==================== */
.result-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 3rem;
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  border-radius: 50px;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-button.primary {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
  color: white;
}

.action-button.primary:hover {
  background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.action-button.secondary {
  background: white;
  color: #4CAF50;
  border: 2px solid #4CAF50;
}

.action-button.secondary:hover {
  background: #4CAF50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.button-text {
  font-size: 1.6rem;
}

/* ==================== レスポンシブ対応 ==================== */
@media screen and (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .simulation-intro {
    padding: 24px 0;
  }

  .simulation-title {
    font-size: 2.6rem;
  }

  .simulation-subtitle {
    font-size: 1.4rem;
  }

  .simulation-container {
    padding: 40px 0;
  }

  .simulation-step {
    margin-bottom: 40px;
  }

  .step-title {
    font-size: 2.2rem;
  }

  /* Step 1 */
  .funeral-type-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .type-image {
    height: 180px;
  }

  /* Step 2 */
  .plan-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .plan-image {
    height: 180px;
  }

  /* Step 3 */
  .venue-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .venue-image {
    height: 160px;
  }

  /* 見積もり結果 */
  .simulation-result {
    padding: 24px 16px;
  }

  .result-title {
    font-size: 2.4rem;
  }

  .result-total {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
  }

  .total-amount {
    font-size: 3.0rem;
  }

  .total-label{
    text-align: center !important;
  }

  /* オプション */
  .options-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
  }

  .option-item {
    padding-bottom: 12px;
  }

  .option-name {
    font-size: 1.2rem;
  }

  /* CTAボタン */
  .result-actions {
    flex-direction: column;
    gap: 12px;
  }

  .action-button {
    width: 100%;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 480px) {
  .simulation-badge {
    font-size: 1.2rem;
    padding: 6px 20px;
  }

  .simulation-title {
    font-size: 2.2rem;
  }

  .simulation-subtitle {
    font-size: 1.5rem;
  }

  .step-title {
    font-size: 2.0rem;
  }

  .type-name,
  .plan-name,
  .venue-name {
    font-size: 1.8rem;
  }

  .price-amount {
    font-size: 2.4rem;
  }

  .detail-label {
    font-size: 1.4rem;
  }

  .detail-value {
    font-size: 1.6rem;
  }

  .total-label {
    font-size: 1.6rem;
  }

  .total-amount {
    font-size: 2.6rem;
  }
}

@media screen and (max-width: 768px) {
  /* 既存のコードの中に追加 */
  
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .detail-value {
    width: 100%;
    text-align: right;
  }
}

/* フッターの電話番号 - モバイルでボタン化 */
@media screen and (max-width: 768px) {
  .footer-text .freedial {
    margin: 20px 0;
  }

  p.freedial::before{
    display: none;
  }
  
  .footer-text .freedial a {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 12px;
    background: linear-gradient(135deg, #666637 0%, #545429 100%);
    color: white !important;
    padding: 16px 24px 12px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(102, 102, 55, 0.3);
    transition: all 0.3s ease;
    font-size: 2.4rem;
    font-weight: 700;
  }
  
  /* 電話アイコン（数字の前に横並び） */
  .footer-text .freedial a::before {
    content: '\f095';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2.0rem;
    animation: phone-ring 1.5s ease-in-out infinite;
  }
  
  /* 「タップで発信」を次の行に配置 */
  .footer-text .freedial a::after {
    content: 'タップで発信';
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
    flex-basis: 100%;
    text-align: center;
  }
  
  @keyframes phone-ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
  }
  
  .footer-text .freedial a:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(102, 102, 55, 0.4);
  }
}