/* story.css */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f3f0;
  overflow-x: hidden;
}



/* 故事章節容器 */
.story-section {
  position: relative;
  width: 90%;
  max-width: 1000px; /* 限制寬度讓圖文靠近 */
  margin: 0 auto;
  padding: 40px 0;
}

.story-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px; /* 縮小圖文間距 */
  margin-bottom: 120px; /* 縮小區塊間距 */
  width: 100%;
}

.story-block.reverse {
  flex-direction: row-reverse;
}

/* 圖文容器對稱設定 */
.story-block .text,
.story-block .image {
  flex: 0 1 450px; /* 固定基礎寬度，不隨寬螢幕散開 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  will-change: transform, opacity;
}

.story-block .text {
  flex: 0 1 500px;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;      /* 文字靠右 */
  align-items: flex-end;
}

.story-block.reverse .text {
  text-align: left;       /* 文字靠左 */
  align-items: flex-start;
  
}

.story-block img {
  max-height: 450px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}
.story-text {
    text-align: center;
}
/* 手機版：徹底解決距離太遠問題 */
@media (max-width: 768px) {
  .story-section {
    padding: 20px 0;
  }
  
  .story-block {
    flex-direction: column !important;
    gap: 15px !important; /* 壓縮圖片與文字的距離 */
    margin-bottom: 120px !important; /* 壓縮故事塊之間的距離 */
  }

  .story-block .text,
  .story-block .image {
    flex: 1 1 auto;
    max-width: 100%;
    text-align: center !important;
	  align-items: center !important; /* 強制所有按鈕置中 */
  }

  .story-block img {
    max-height: 280px !important; /* 縮小圖片高度 */
    margin: 0 auto;
  }
  

}
