* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans TC", sans-serif;
  color: #333;
  background: #F9f9f9;
  line-height: 1.6;
  padding: 2rem;
}

h2.section-title,
h3.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
  color: #3D6349;
}
h4.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: bold;
  color: #395E41;
}
.section-subtitle {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #222;
}

/* ===== Hero 圖片區塊（上面放文字，支援 RWD） ===== */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  display: block;
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  padding: 1rem;
}

.hero-text h1 {
  font-size: 7rem;
  font-weight: 700;
  letter-spacing: 24px;
  margin-bottom: 0.5rem;
}

.hero-text p {
  font-size: 2rem;
}

/* ===== 特色介紹區塊 ===== */
.features {
  display: flex;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto 4rem auto;
  align-items: center;
}
.features img {
  max-width: 400px;
  width: 100%;
  border-radius: 1rem;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}
.features-text ul {
  margin-top: 1rem;
  list-style: inside disc;
  color: #444;
  font-size: 1rem;
}

/* ===== 輪播圖三區塊外框 ===== */
.carousel-wrapper {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
}
.carousel-section {
  background: white;
  width: 100%;
  max-width: 400px;
  height: 350px;
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  font-size: 18px;
}
.carousel-container {
  position: relative;
  overflow: hidden;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transition: opacity 0.5s ease;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 0.3rem 0.3rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel-btn.prev {
  left: 5px;
  width: 13%;
}

.carousel-btn.next {
  right: 5px;
  width: 13%;
}

/* ===== 圖片集區塊 ===== */
.gallery-section {
  max-width: 900px;
  margin: 3rem auto;
  text-align: center;
}
.gallery-grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}
.gallery-item {
  width: 960px;
}
.gallery-item img {
  width: 100%;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}
.gallery-item p {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #555;
}

/* ===== 預約表單樣式 ===== */
.form-section {
  max-width: 600px;
  margin: 3rem auto 5rem auto;
  padding: 1rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}
.form-section form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-section label {
  font-weight: 600;
  font-size: 1rem;
  color: #222;
}
.form-section input,
.form-section select {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.form-section button {
  background-color: #4a775c;
  color: white;
  padding: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.form-section button:hover {
  background-color: #b3000f;
}
.thank-you {
  margin-top: 1rem;
  font-weight: 700;
  color: #007700;
  text-align: center;
}

/* ===== 響應式 RWD ===== */
@media (max-width: 768px) {
  .features {
    flex-direction: column;
  }
  .features img {
    max-width: 100%;
  }
  .gallery-grid {
    flex-direction: column;
    gap: 1.5rem;
  }
  .gallery-item {
    width: 100%;
  }
  .carousel-wrapper {
    flex-direction: column;
    margin: 2rem 1rem;
    flex-wrap: wrap;
  }
  .carousel-section {
    max-width: 100%;
    height: 300px;
    margin-bottom: 2rem;
  }
  .hero {
    position: relative;
    overflow: hidden;
  }
  .hero img {
    height: 60vh;
    object-fit: cover;
  }
  .hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;        /* 限制文字區塊寬度 */
    text-align: center;
    padding: 0 1rem;
    box-sizing: border-box;
  }

  .hero-text h1 {
    writing-mode: vertical-rl;       /* 保持直式排列 */
    text-orientation: upright;       /* 保持直立字型 */
    font-size: 2.5rem;                 /* 手機適合大小 */
    line-height: 1.2;                /* 行距緊湊 */
    letter-spacing: 8px;             /* 適度字距 */
    margin: 0 auto;
    word-break: break-word;          /* 允許自動換行，避免超出 */
    overflow-wrap: break-word;       /* 防止跑版 */
    max-height: 80vh;                /* 限制最大高度 */
  }

  .hero-text p {
    display: none; /* 手機版隱藏副標 */
  }
  h2.section-title,
  h3.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: bold;
    color: #3D6349;
  }
  .section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #222;
  }
}

/* ===== 有質感的滑入動畫 ===== */
.slide-item {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 1s ease-out, transform 1s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform, opacity;
}
.slide-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 滑入動畫通用樣式 */
.slide-item {
  opacity: 0;
  transform: translateX(-40px);
  transition: transform 700ms cubic-bezier(.2, .9, .3, 1), opacity 700ms ease;
}

/* 從右滑入 */
.slide-item.from-right {
  transform: translateX(40px);
}

/* 進場後狀態 */
.slide-item.in {
  opacity: 1;
  transform: translateX(0);
}
#footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #3e5949;
  padding: 1rem 2rem;
  border-top: 1px solid #ccc;
  flex-wrap: wrap;
}

.footer-left a {
  margin-right: 1rem;
}

.footer-left img {
  width: 30px;
  height: 30px;
}

.footer-center {
  text-align: center;
  flex: 1;
	color: #fff;
}

.footer-center .logo  {
  width: 50px;
  vertical-align: middle;
	color: #fff;
}

.footer-center p {
  margin: 0.25rem 0;
	color: #FFFFFF;
}

@media (max-width: 768px) {
  #footer {
    flex-direction: column;
    text-align: center;
  }
  .footer-left {
    margin-bottom: 1rem;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.85);
  text-align: center;
}
.modal-content {
  max-width: 90%;
  max-height: 90%;
  margin: 5vh auto 0 auto;
  display: block;
  border-radius: 8px;
}
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover { color: #bbb; }
