@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@300;400;500;700&family=Noto+Sans+TC:wght@200;400;600;700;900&display=swap');
/*--------------------*/
/* 1. 全域設定 Global */
/*--------------------*/
*, *::before, *::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body, html {
  overflow-x: hidden;
}
body {
  font-family: 'Lato', 'Noto Sans TC', "微軟正黑體", 'Microsoft JhengHei', sans-serif;
  margin: 0 auto;
  background: #f1f8f5;
  background-image: url("sky.jpg");
  background-position: bottom right;
  background-attachment: fixed;
  font-size: 18px;
  line-height: 1.8;
}
::selection {
  background: #E97600;
  color: #fff;
}
::-moz-selection {
  background: #E97600;
  color: #fff;
}
a {
  text-decoration: none;
}
h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}
#kv {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  overflow: hidden;
}
#kv img {
  display: block;
  width: 100%;
  height: auto;
}
.kv-desktop {
  display: block;
}
.kv-mobile {
  display: none;
}

@media (max-width: 1440px) {
	body{
		background-position: top center;
		background-size: cover;
	}
}
@media (max-width: 768px) {
	
  .kv-desktop {
    display: none;
  }
  .kv-mobile {
    display: block;
  }
}
/*-----------------------------*/
/* 2. intro-section 區塊 */
/*-----------------------------*/
.intro-section {
  position: relative;
  max-width: 1000px;
  margin: 4rem auto 2rem;
  padding: .8rem .8rem 1.2rem;
  background: linear-gradient(165deg, #4DBC6D 0%, #65BB7E 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(95, 95, 95, 0.3);
  border-radius: 12px;
}
.intro-title {
  font-weight: 700;
  font-size: 2.4rem;
  margin-bottom: 1rem;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}
.intro-text {
  font-size: 1.2rem;
  line-height: 1.8;
  white-space: pre-line;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}
.wave-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 40px;
  animation: wave-move 6s linear infinite;
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
@keyframes wave-move {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
@media (min-width: 768px) {
  .intro-section {
    width: 96%;
  }
}
@media (max-width: 576px) {
  .intro-section {
    border-radius: 0;
    margin: 0;
  }
  .intro-title {
    font-size: 1.5rem;
  }
  .intro-text {
    font-size: 1.1rem;
    line-height: 1.6;
  }
 
}
/*------------------------------*/
/* 3. video-text-section 區塊 */
/*------------------------------*/
.video-text-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  width: 100%;
  padding: 20px;
  margin: 1rem auto 2rem;
  max-width: 1000px;
  background-color: #fff;
  box-shadow: 0 4px 15px rgba(95, 95, 95, 0.3);
  border-radius: 12px;
}
.video-box, .text-box {
  flex: 1 1 100%;
}
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.text-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.quote-text {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.quote-author {
  text-align: right;
  font-style: italic;
  margin-bottom: 0.5rem;
}
.video-link-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6em 1.2em;
  background-color: #BB9200;
  color: white;
  text-decoration: none;
  border-radius: 999px;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}
.video-link-btn:hover {
  background-color: #DAAE00;
}
@media (min-width: 768px) {
  .video-text-section {
    width: 96%;
  }
  .video-box, .text-box {
    flex: 1 1 48%;
  }
}
@media (max-width: 576px) {
  .video-text-section {
    border-radius: 0;
    margin: 0;
  }
  .quote-text {
    font-size: 1.1rem;
    line-height: 1.6;
  }
}
/*-------------------------*/
/* 4. book-container 區塊 */
/*-------------------------*/
.book-container {
  width: 100%;
  padding: 20px;
  margin: 1rem auto 2rem;
  max-width: 1000px;
  background-color: #fffef0;
  box-shadow: 0 4px 15px rgba(95, 95, 95, 0.3);
  border-radius: 12px;
}
ul.book-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0 auto;
  list-style: none;
 
}
@media (max-width: 768px) {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
@media (max-width: 576px) {
  ul.book-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .book-item {
    padding: 10px 5px 0;
  }

  .book-item img {
    width: 100%;
    max-width: 120px;
  }
}

.book-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
  padding: 20px 10px 0;
  width: 100%;

}

.book-item:hover {
  transform: translateY(-4px);
}
.book-item img {
  width: 160px;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  display: block;
  margin: auto;
}


@media (min-width: 768px) {
  .book-item {
    max-width: 240px;
    margin: 0 auto; /* 桌機才置中 */
  }
}

.book-info {
  padding: 0.75rem;
  flex: 1;
}
.book-feature {
  font-size: 0.9rem;
  color: #d9534f;
  font-weight: bold;
  margin-bottom: 0.4rem;
 height: 2em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.2em;
  height: 2.4em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-price {
  font-size: 0.9rem;
  color: #8C8C8C;
  user-select: none;
}
.book-price::before {
  content: "定價：$";
}
.price-number {
  text-decoration: line-through;
  margin-left: 0.2em;
  font-size: 1.1rem;
}
.more-btn {
  display: block;
  width: fit-content;
  margin: 2rem 0 auto auto;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(165deg, #58BBB9 0%, #338A88 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background 0.4s ease-in-out, transform 0.2s ease;
  text-align: center;
}
.more-btn:hover {
  transform: translateY(-2px);
}
@media (min-width: 768px) {
  .book-container {
    width: 96%;
  }
  .book-item img {
    width: 140px;
  }
}
@media (max-width: 576px) {
  .book-container {
    border-radius: 0;
    margin: 0;
  }
  .book-item img {
    width: 120px;
  }
  .more-btn {
    display: block;
    width: 80%;
    margin: 2rem auto 0;
    text-align: center;
  }
}
/*-------------------------*/
/* 5. pic-container 圖片燈箱 */
/*-------------------------*/
.pic-container {
  width: 100%;
  padding: 20px;
  margin: 1rem auto 2rem;
  max-width: 1000px;
  background-color: #fff;
  box-shadow: 0 4px 15px rgba(95, 95, 95, 0.3);
  border-radius: 12px;
  text-align: center;
  color: #8C8C8C;
  font-size: 0.8rem;
}
.pic-container img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  margin: 1rem auto;
}
@media (min-width: 768px) {
  .pic-container {
    width: 96%;
  }
}
@media (max-width: 576px) {
  .pic-container {
    border-radius: 0;
    margin: 0;
  }
}
/*-------------------------*/
/* 6. new-book-section 新書介紹 */
/*-------------------------*/
.new-book-section {
  width: 100%;
  padding: 20px;
  margin: 1rem auto 2rem;
  max-width: 1000px;
  background-color: #fffef0;
  box-shadow: 0 4px 15px rgba(95, 95, 95, 0.3);
  border-radius: 12px;
}
.new-book-wrapper {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.new-book {
  flex: 1 1 240px;
  max-width: 36%;
  box-sizing: border-box;
  text-align: center;
}
.new-book a.book-item {
  display: block;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.new-book img {
  width: 100%;
  max-width: 240px;
  height: auto;
  display: block;
  border-radius: 6px;
  aspect-ratio: 1 / 1.2;      /* 強制 1:1 比例 */
  object-fit: contain;        /* 補滿容器且不變形 */
  margin: 20px auto;
}
.new-book .book-title {
  font-size: 1.2rem;
  height: 1.3rem;
  margin-bottom: 0;
}
.book-description {
  max-width: 64%;
  color: #333;
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.book-description .highlight {
  font-weight: 700;
  color: #E77D12;
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 12px;
}
.book-description .book-name {
  font-weight: 700;
  color: #000;
  font-size: 1.3rem;
  text-align: start;
  margin-bottom: 12px;
}
#pic {
  float: right;
  margin: 3px;
  text-align: center;
}
#pic02 {
  float: right;
  margin: 3px;
  text-align: center;
}
@media (max-width: 768px) {
  .new-book-section {
    width: 96%;
  }
  .new-book-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .new-book, .book-description {
    max-width: 100%;
  }
  .new-book {
    flex: none;
    width: 100%;
    margin-bottom: 20px;
  }
}
@media (max-width: 576px) {
  .new-book-section {
    width: 100%;
    border-radius: 0;
    margin: 0;
  }
  .new-book {
    max-width: 80%;
  }
  .book-description {
    max-width: 100%;
  }
  #pic {
    float: none;
  }
  #pic02 {
    float: none;
  }
}
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #27b04f;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  opacity: 0; /* 初始透明 */
  pointer-events: none; /* 不可點擊 */
  z-index: 999;
  padding: 0;
  align-items: center;
  justify-content: center;
  display: flex;
  transition: background-color 0.3s ease, opacity 0.5s ease;
}
#backToTop.show {
  opacity: 1;
  pointer-events: auto; /* 可點擊 */
}
#backToTop:hover {
  background-color: #1B903D;
}
#backToTop svg {
  width: 24px;
  height: 24px;
}
@media (max-width: 767px) {
  #backToTop {
    bottom: 5rem;
    right: 1rem;
  }
}
.site-footer {
  background-color: #333;
  color: #fff;
  font-size: 12px;
  text-align: center;
  padding: 15px 10px;
}
/* 調整 footer 在手機上不被 nav 擋住 */
@media (max-width: 767px) {
  .site-footer {
    padding-bottom: 3.5rem; /* 預留 nav 高度 */
  }
}
/* 桌機：右側浮動導覽 */
.floating-nav {
  position: fixed;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.floating-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.floating-nav li {
  width: 100px;
  height: 76px;
  background-color: #e95283; /* 孔雀綠 */
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px; /* ← 加上這行可增加按鈕之間的距離 */
}
.floating-nav li.active {
  background-color: #27b04f; /* 亮橘色 */
}
.floating-nav a {
  display: block;
  text-align: center;
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  line-height: 1.3;
  padding: 0.6rem 0.4rem; /* ↑ 調整這裡可增加上下間距 */
  white-space: pre-line;
}
.floating-nav a:hover {
  color: #fff000;
}
/* 手機版：底部一排四欄 */
@media (max-width: 767px) {
  .floating-nav {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    transform: none;
    flex-direction: row;
    justify-content: space-between;
    background-color: #e95283;
    padding: 0;
  }
  .floating-nav ul {
    display: flex;
    width: 100%;
    justify-content: space-around;
  }
  .floating-nav li {
    width: 25%;
    height: auto;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    padding: .3rem;
  }
  .floating-nav a {
    font-size: 14px;
    color: #fff;
    white-space: pre-line;
    line-height: 1.3;
    padding: 0.3rem 0;
    display: block;
  }
}
/*-------------------------*/
/*  image-gallery 跳圖 */
/*-------------------------*/
.image-gallery {
  width: 100%;
  padding: 20px;
  margin: 1rem auto 2rem;
  max-width: 1000px;
  background-color: #fffef0;
  box-shadow: 0 4px 15px rgba(95, 95, 95, 0.3);
  border-radius: 12px;
  text-align: center;
  color: #8C8C8C;
  font-size: 0.8rem;
}
.big-image-wrapper {
  position: relative;
  text-align: center;
  margin-bottom: 2rem;
}
.big-image-wrapper img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 1;
  transition: opacity 0.4s ease;
}
.big-image-wrapper img.fade-out {
  opacity: 0;
}
.big-image-title {
  margin: 1rem 0;
  font-weight: 600;
  font-size: 1.4rem;
  color: #333;
}
.thumbnail-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}
.thumbnail {
  position: relative;
  flex: 1 1 calc(25% - 2rem);
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}
.thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.thumbnail .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem;
  transition: opacity 0.3s ease;
  border-radius: 6px;
}
.thumbnail:hover {
  transform: scale(0.96);
  z-index: 10;
}
.thumbnail:hover .overlay {
  opacity: 1;
}
.icon-magnify {
  width: 28px;
  height: 28px;
  margin-bottom: 0.3rem;
  stroke-width: 2.5;
}
/* active 樣式 */
.thumbnail.active {
  box-shadow: 0 0 0 2px #27b04f;
  z-index: 11;
}
/* 手機版 2x2 排列 */
@media (max-width: 768px) {
  .image-gallery {
    width: 96%;
  }
  .thumbnail-wrapper {
    flex-wrap: wrap;
  }
  .thumbnail {
    flex: 1 1 40%;
    margin-bottom: 1rem;
  }
  /* 手機上讓 overlay 一直顯示 */
  .thumbnail .overlay {
    font-size: 1rem;
    opacity: 1;
  }
}
@media (max-width: 576px) {
  .image-gallery {
    width: 100%;
    border-radius: 0;
    margin: 0;
  }
}
.d-inline{
	display: none;
}
.d-none{
	display: inline;
}
@media (max-width: 576px) {
	.d-none{
	display: none;
}
	.d-inline{
	display: inline;
}
}
.ads-section {
  text-align: center;
  margin: 30px auto;
	max-width: 1000px;
}

.ads-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  justify-items: center;
  align-items: center;
}

.ad-item {
  display: block;
  position: relative;
  width: 100%;
  max-width: 300px; /* 每張圖片最大寬度 */
  overflow: hidden;
  
  transition: transform 0.3s ease-in-out;
}

.ad-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ad-item:hover {
  transform: scale(1.02);
}

@media (max-width: 768px) {
	.ads-section{
		width: 90%;
	} 
}

@media (max-width: 480px) {
  .ads-container {
    grid-template-columns: 1fr; /* 單欄佈局 */
  }
}

.bn{
	
	padding: 40px 0;
	text-align: center;
	 background-image: url("bg_y.jpg");
	background-position: center top;
}
.bn img{
	display: block;
	margin: 0 auto;
	width: 96%;
	max-width: 1060px;
	transition: transform 0.2s ease;
}
.bn img:hover {
  transform: scale(0.98);
}
#jciAD, #jciAD iframe, iframe[src*="book.com.tw"] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}