@charset "utf-8";
/* CSS Document */
/* =========================
   幻燈片切換
========================= */
.slide {
  opacity: 0;
  transition: opacity 1s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.slide.active {
  opacity: 1;
  position: relative;
  z-index: 1;
}

/* =========================
   圖片互動效果
========================= */
.slide a img {
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}
.slide a img:hover {
  transform: scale(1.05);
  opacity: 0.9;
}
@media (max-width: 768px) {
  .slide a img:active {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

/* =========================
   標題與副標題動畫
========================= */
.hero-title, .hero-subtitle {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
}
.hero-title { animation-delay: 0.3s; }
.hero-subtitle { animation-delay: 0.4s; }

/* =========================
   按鈕互動效果
========================= */
.hero-btn {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.5s;
}
.hero-btn:hover {
  background-color: #d94f70;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}
.hero-btn:active {
  background-color: #b83d5a;
  transform: translateY(1px);
}

/* =========================
   進度條效果
========================= */
.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: #d94f70;
  width: 0%;
  animation: progress 5s linear forwards;
}
.slide.active .progress-bar {
  width: 100%;
}

/* =========================
   手機版字體與位置調整
========================= */
@media screen and (max-width: 1024px) {
  .caption .hero-title span {
    font-size: 26px !important;
    line-height: 1.5 !important;
  }
  .caption .hero-subtitle {
    font-size: 18px !important;
    line-height: 1.6 !important;
  }
  .caption .hero-title {
    margin-top: -20px !important;
    position: relative;
    top: -10px;
  }
  .caption .hero-subtitle {
    margin-top: -10px !important;
  }
  .hero-btn {
    font-size: 16px !important;
    padding: 12px 24px !important;
  }
}

/* =========================
   花瓣飄落效果
========================= */
.petal {
  position: fixed;
  top: -50px;
  width: 20px;
  height: 20px;
  background-image: url('images/petal.png');
  background-size: cover;
  opacity: 0.8;
  pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* =========================
   動畫定義
========================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes progress {
  from { width: 0%; }
  to { width: 100%; }
}

