/* ==========================================================================
   Why Junior Section - RBS陸上教室がジュニア期におすすめな理由専用スタイル
   ========================================================================== */

/* ジュニア期セクション全体 */
#why-junior {
  background: var(--white);
  padding: var(--section-padding) 0 !important;
  position: relative;
  overflow: hidden;
  scroll-margin-top: var(--scroll-offset) !important;
}

#why-junior::before {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 250px;
  height: 250px;
  background: var(--primary-teal);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  opacity: 0.08;
  animation: morphing 8s ease-in-out infinite;
}

/* ジュニア期見出し */
#why-junior h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy-dark);
  text-align: center;
  margin-bottom: 50px;
  line-height: 1.4;
  /* 日本語の自然な改行制御 */
  word-break: auto-phrase;
  word-wrap: break-word;
}

/* ジュニア期コンテンツ */
.why-junior-content {
  position: relative;
  z-index: 2;
}

/* 理由リスト - モバイルファーストアプローチ */
.reason-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 50px;
  position: relative;
  z-index: 2;
}

/* 理由アイテム */
.reason-item {
  background: var(--white);
  padding: 25px 20px;
  border-radius: 15px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.reason-item::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 15px;
  z-index: -1;
}

.reason-item:nth-child(1)::before {
  background: var(--primary-blue);
  opacity: 0.15;
}

.reason-item:nth-child(2)::before {
  background: var(--primary-blue);
  opacity: 0.15;
}

.reason-item:nth-child(3)::before {
  background: var(--primary-blue);
  opacity: 0.15;
}

.reason-item:nth-child(4)::before {
  background: var(--primary-blue);
  opacity: 0.15;
}

.reason-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

/* 理由アイテムの左側アクセント */
.reason-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 0 15px 15px 0;
}

.reason-item:nth-child(1)::after {
  background: var(--primary-blue);
}

.reason-item:nth-child(2)::after {
  background: var(--primary-blue);
}

.reason-item:nth-child(3)::after {
  background: var(--primary-blue);
}

.reason-item:nth-child(4)::after {
  background: var(--primary-blue);
}

/* 理由タイトル */
.reason-item h4 {
  color: var(--navy-dark);
  font-size: 20px;
  margin-bottom: 15px;
  font-weight: 800;
  position: relative;
  padding-left: 15px;
  line-height: 1.4;
  /* シンプルな改行制御 */
  word-break: auto-phrase;
}

/* 理由説明 */
.reason-item p {
  color: var(--gray-medium);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 500;
  margin: 0;
  padding-left: 15px;
  /* シンプルな改行制御 */
  word-break: auto-phrase;
}

.reason-item p strong {
  color: var(--navy-dark);
  font-weight: 700;
}

/* 色付きテキストスタイル - ジュニア期専用 */
.reason-item .text-primary {
  color: var(--primary-blue);
  font-weight: 700;
}

.reason-item .text-success {
  color: var(--primary-teal);
  font-weight: 700;
}

.reason-item .text-highlight {
  background: var(--secondary-yellow);
  color: var(--navy-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.reason-item .text-warning {
  color: var(--primary-orange);
  font-weight: 700;
}

/* ボトムメッセージ */
.bottom-message {
  text-align: center;
  background: #e91e63 !important;
  color: var(--white);
  padding: 40px 20px;
  border-radius: 20px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  box-shadow: 0 12px 40px rgba(233, 30, 99, 0.3) !important;
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  /* シンプルな改行制御 */
  word-break: auto-phrase;
}

.bottom-message::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 6s infinite;
}

/* タブレット以上 (768px以上) */
@media (min-width: 768px) {
  #why-junior h2 {
    font-size: 36px;
    margin-bottom: 60px;
  }

  #why-junior {
    padding: var(--section-padding) 0 !important;
    scroll-margin-top: var(--scroll-offset) !important;
  }

  #why-junior::before {
    width: 300px;
    height: 300px;
  }

  .reason-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
    margin-bottom: 60px;
  }

  .reason-item {
    padding: 35px 30px;
    border-radius: 20px;
  }

  .reason-item::before {
    border-radius: 20px;
  }

  .reason-item::after {
    width: 5px;
    border-radius: 0 20px 20px 0;
  }

  .reason-item h4 {
    font-size: 22px;
    margin-bottom: 18px;
    padding-left: 20px;
  }

  .reason-item p {
    font-size: 17px;
    padding-left: 20px;
  }

  .bottom-message {
    padding: 50px 40px;
    border-radius: 25px;
    font-size: 24px;
    margin-top: 50px;
  }
}

/* デスクトップ (1200px以上) */
@media (min-width: 1200px) {
  #why-junior h2 {
    font-size: 40px;
    margin-bottom: 70px;
  }

  #why-junior {
    padding: var(--section-padding) 0 !important;
    scroll-margin-top: var(--scroll-offset) !important;
  }

  .reason-list {
    gap: 50px;
    margin-bottom: 80px;
  }

  .reason-item {
    padding: 40px 35px;
    border-radius: 25px;
  }

  .reason-item::before {
    border-radius: 25px;
  }

  .reason-item::after {
    width: 6px;
    border-radius: 0 25px 25px 0;
  }

  .reason-item h4 {
    font-size: 26px;
    margin-bottom: 20px;
    padding-left: 25px;
  }

  .reason-item p {
    font-size: 18px;
    padding-left: 25px;
  }

  .bottom-message {
    padding: 60px 50px;
    border-radius: 30px;
    font-size: 26px;
    margin-top: 60px;
  }
}

/* タブレット以下（768px以下） */
@media (max-width: 768px) {
  .bottom-message {
    /* タブレットでも日本語最適化改行 */
    word-break: auto-phrase;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.6;
    text-align: center;
  }
}

/* モバイル（480px以下） */
@media (max-width: 480px) {
  #why-junior h2 {
    font-size: 24px;
    margin-bottom: 40px;
    line-height: 1.3;
    /* モバイルでは自動改行を優先 */
    word-break: auto-phrase;
    overflow-wrap: break-word;
  }

  #why-junior {
    padding: var(--section-padding) 0 !important;
    scroll-margin-top: var(--scroll-offset) !important;
  }

  #why-junior::before {
    width: 200px;
    height: 200px;
  }

  .reason-list {
    gap: 20px;
    margin-bottom: 40px;
  }

  .reason-item {
    padding: 20px 15px;
    border-radius: 12px;
  }

  .reason-item::before {
    border-radius: 12px;
  }

  .reason-item::after {
    width: 3px;
    border-radius: 0 12px 12px 0;
  }

  .reason-item h4 {
    font-size: 18px;
    margin-bottom: 12px;
    padding-left: 12px;
    line-height: 1.3;
  }

  .reason-item p {
    font-size: 15px;
    line-height: 1.6;
    padding-left: 12px;
  }

  .bottom-message {
    padding: 30px 20px;
    border-radius: 15px;
    font-size: 18px;
    line-height: 1.6;
    margin-top: 30px;
    /* モバイルでは日本語最適化改行 */
    word-break: auto-phrase;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: center;
  }
}

/* アニメーション */
@keyframes morphing {
  0%, 100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: rotate(0deg);
  }
  25% {
    border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    transform: rotate(90deg);
  }
  50% {
    border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    transform: rotate(180deg);
  }
  75% {
    border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    transform: rotate(270deg);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
  .reason-item,
  .bottom-message::before,
  #why-junior::before {
    transition: none;
    animation: none;
  }
}

/* 高コントラスト対応 */
@media (prefers-contrast: high) {
  .reason-item {
    border-width: 3px;
  }
  
  .reason-item::after {
    width: 6px;
  }
  
  .bottom-message {
    border: 2px solid var(--white);
  }
} 