/* ===== グラデーションアニメーション ===== */
@keyframes pulse-gradient {
  0% {
    background-position: center;
    background-size: 100% 100%;
  }
  50% {
    background-position: center;
    background-size: 120% 120%;
  }
  100% {
    background-position: center;
    background-size: 100% 100%;
  }
}

/* ===== 全体レイアウト ===== */
.container.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== インタラクティブコンテンツグループ ===== */
.interactive-content-group {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: end;
  margin: -25rem auto 0;
  padding-bottom: 8rem;
}

/* ===== テキストパネル ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.text-panel {
  flex: 1;
  min-width: 320px;
  max-width: 480px;
  background: #fff;
  color: #333;
  border-radius: 8px;
  padding: 2rem 2.5rem;
  line-height: 1.7;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  order: 1; /* 左側に表示 */
  z-index: 10; /* 重なりがある場合に表示されるように */
}

.text-panel .text-content {
  display: none;
  margin: 0;
  opacity: 0;
}

.text-panel .text-content.active {
  display: block !important;
  opacity: 1;
  animation: fadeIn .5s ease-in-out forwards;
}

/* テキストパネルの見出し */
.text-panel .text-title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 1rem;
}

.text-panel .text-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background-color: #000;
}

/* テキストパネルの説明文 */
.text-panel .text-description {
  font-size: 1.4rem;
  line-height: 1.8;
  margin: 0;
  color: #333;
}

/* 古いスタイルは削除 */

/* ===== 円コンポーネント ===== */
.circle-wrapper {
  position: relative;
  flex: 1;
  min-width: 320px;
  width: 480px;
  height: 540px;
  order: 2; /* 右側に表示 */
}

.circle {
  --size: 320px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.6) 100%);   /* 放射状グラデーション */
  opacity: 1;   /* 透過度はグラデーションで制御するため　1に設定 */
  animation: pulse-gradient 4s ease-in-out infinite;   /* 放射状アニメーション */
  background-size: 100% 100%;
  background-position: center;
  position: absolute;
  cursor: pointer;
  transition: opacity .25s, background-color .25s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
  line-height: 1.4;
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  border: none;
  transition: all .5s;
}

.circle:hover,
.circle[aria-pressed="true"] {
  border: 1px solid #555;
  background: radial-gradient(circle, rgba(0,0,0,0.1) 10%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,1) 100%);   /* ホバー時の放射状グラデーション */
  animation: pulse-gradient 3s ease-in-out infinite;   /* ホバー時はより速いアニメーション */
}

/* 円の配置 - 右側に寄せる */
.circle-1 {
  top: 10%;
  left: 40%;
  animation-delay: 0s; /* アニメーションのタイミングを各サークルでずらす */
}
.circle-2 {
  top: 50%;
  left: 20%;
  animation-delay: -1.5s;
}
.circle-3 {
  top: 50%;
  left: 60%;
  animation-delay: -0.8s;
}

.circle span {
  pointer-events: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .interactive-content-group {
    flex-direction: row;
    align-items: center;
    margin: 0;
    padding-bottom: 0;
  }
  
  .text-panel {
    max-width: 100%;
    order: 2; /* モバイルでは下に表示 */
  }
  
  .circle-wrapper {
    width: 100%;
    height: 380px;
    order: 1; /* モバイルでは上に表示 */
  }
  
  .circle {
    --size: 280px;
    font-size: 1.6rem;
    &.circle-1 {
      top: 6%;
      left: 0;
      right: 0;
      margin: auto;
    }
    &.circle-2 {
      top: 50%;
      left: -7%;
      right: auto;
      margin: auto;
    }
    &.circle-3 {
      top: 50%;
      left: auto;
      right: -7%;
      margin: auto;
    }
  }
}

@media (max-width: 576px) {
  .circle {
    --size: 240px;
    font-size: 1.4rem;
  }
  
  .text-panel {
    padding: 1.5rem;
  }
}
