* {
  box-sizing: border-box;
  /* font-family: "Noto Serif TC", "PingFang TC", serif; */
  /* font-family: "Verdana", "Helvetica", "Arial", sans-serif; */
}

/* ===== 基本設定 ===== */
html {
  margin: 0;
}
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip; /* 用 clip 代替 hidden，不會破壞 sticky */
}
body {
  font-family: "Chiron GoRound TC", "Noto Serif TC", serif;
  background: #faf9f7;
  color: #333;
  line-height: 1.9;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  letter-spacing: 2px;
}

h1 {
  font-size: 32px;
  margin-bottom: 12px;
}
.card {
  background: #fff;
  border-radius: 20px;
  padding: 45px 25px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}
.card h1::before {
  content: url("../media/blue_pink_flower.png");
  position: relative;
  top: 15px;
  left: -10px;
}
h2 {
  font-size: 24px;
  margin-bottom: 12px;
}
h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

section {
  padding: 70px 20px;
  position: relative;
  overflow: hidden;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.divider {
  height: 12px;
  margin: 20px auto 40px;
}
/* ===== 主視覺 ===== */
.hero {
  background:
    linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
    url("../media/_DSC1581-1.webp");
  background-size: cover;
  background-position: center 70%;
  color: #fff;
  padding: 200px 40px;
  animation: showup 0.8s ease forwards;
}
@keyframes showup {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero h1 {
  font-size: 44px;
  margin-bottom: 12px;
  animation: right-in 0.8s ease forwards 0.3s;
  opacity: 0;
}
.hero p {
  letter-spacing: 3px;
  font-size: 16px;
  animation: right-in 0.8s ease forwards 0.8s;
  opacity: 0;
}
@keyframes right-in {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== 倒數計時 ===== */
#wedding-date span {
  color: #999;
}
.countdown {
  font-size: 36px;
  color: #b89c6a;
  letter-spacing: 2px;
}

/* ===== 滑入動畫初始狀態 ===== */
.container.card {
  opacity: 0;
}

/* ===== 新郎、新娘及雙方主婚人 ===== */
#couple-info .card {
  display: flex;
  flex-direction: column;
}
#couple-info .info-grid {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}
#couple-info .info-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.bride-photo,
.groom-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border: #b89c6a 4px solid;
}
.bride-photo {
  background-image: url("../media/_DSC2036-1.webp");
  background-size: cover;
  background-position: center top;
}
.groom-photo {
  background-image: url("../media/_DSC1924.webp");
  background-size: 240%;
  background-position: 10% center;
}

/* ===== 婚禮資訊 ===== */
.info-item {
  margin-bottom: 18px;
}

.info-item span {
  font-size: 14px;
  color: #999;
}

.info-item strong {
  font-size: 18px;
}
/* ===== 交通方式 ===== */
#transportation embed {
  width: 72%;
  height: 320px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 20px;
}
/* ===== 衣著參考 ===== */
section#dress-code .card {
  position: relative;
}
section#dress-code .card::before {
  content: url("../media/yellow_flower.png");
  display: block;
  position: absolute;
  top: -20px;
  right: -20px;
}
section#dress-code .card::after {
  content: url("../media/purple_flower.png");
  display: block;
  position: absolute;
  bottom: -20px;
  left: -20px;
}

.color-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}
.color-swatch {
  display: inline-block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 8px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== 婚紗照輪播 ===== */
.slider-section {
  padding: 90px 20px;
}

.slider {
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  border-radius: 24px;
}

@keyframes marquee-infinite {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.slides {
  display: flex;
  width: max-content;
  animation: marquee-infinite 18s linear infinite;
}

.slides img {
  height: 520px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

/* 左右切換 */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.6);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  color: #555;
  transition: 0.3s;
}

.nav:hover {
  background: rgba(255, 255, 255, 0.85);
}

.nav.prev {
  left: 20px;
}
.nav.next {
  right: 20px;
}

/* ===== 地圖按鈕 ===== */
.map-btn {
  display: inline-block;
  margin-top: 25px;
  padding: 12px 30px;
  border-radius: 999px;
  background: #c9a063;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

/* ===== Footer ===== */
footer {
  padding: 35px 20px;
  font-size: 14px;
  color: #777;
  text-align: center;
}

/* 婚紗輪播 */
.photo-slider {
  overflow: hidden;
  width: 100%;
}

/* .slides {
  display: flex;
  animation: slide 12s infinite;
}

.slides img {
  width: 100%;
  height: 70vh;
  object-fit: cover;
} */

/*@keyframes slide {
  0% { transform: translateX(0); }
  33% { transform: translateX(-30%); }
  66% { transform: translateX(-60%); }
}*/

@keyframes slide {
  0% {
    transform: translateX(0);
  }
  33% {
    transform: translateX(-100%);
  }
  66% {
    transform: translateX(-200%);
  }
}

/* 故事 */
.story {
  max-width: 800px;
  margin: auto;
  padding: 60px 20px;
}

.timeline .event {
  margin-bottom: 40px;
}

.year {
  font-weight: bold;
  color: #b58b6a;
}

/* ===== 婚紗照片展示區 ===== */
#wedding-photos-section {
  padding: 0;
  background: #1a1a1a;
  overflow: visible; /* 覆蓋 section 的 overflow: hidden，讓 sticky 正常運作 */
}

.photos-header {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
}

.photos-header h2 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 300;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 4px;
  opacity: 0;
}

.photos-header p {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  opacity: 0;
}

.photos-pinned-wrapper {
  /* 根據照片數量計算高度: 100vh + 照片數 × 100vh */
  height: 900vh; /* 8張照片 */
  position: relative;
}

.photos-pinned-container {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #1a1a1a;
}

.photos-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.photo-card {
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  will-change: transform;
}

/* 第一張照片預設顯示 */
.photo-card:first-child {
  transform: translateX(0);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.photo-card .caption {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  padding: 16px 32px;
  border-radius: 999px;
  z-index: 10;

  display: none;
}

.photo-card .caption p {
  color: #fff;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  margin: 0;
  white-space: nowrap;
}

.photo-card .page-indicator {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 10;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 300;
}

.photos-footer {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff7f7;
  padding: 0 20px;
}

.photos-footer p {
  font-size: 30px;
  color: #333;
  font-weight: 300;
  text-align: center;
  max-width: 600px;
  opacity: 0;
}

/*---------- 手機版 ----------*/
@media (max-width: 768px) {
  body {
    line-height: 1.5;
  }
  .slides img {
    /* width: 300px; */
    height: 360px;
  }
  section {
    padding: 40px 20px;
  }

  .hero h1 {
    font-size: 34px;
  }
  #transportation embed {
    width: 100%;
    height: 220px;
  }

  /* 婚紗照片展示區 - 手機版 */
  .photos-stack {
    height: 60vh;
    top: 20vh;
  }

  .photo-card .caption {
    padding: 12px 24px;
    bottom: 32px;
  }

  .photo-card .page-indicator {
    top: 20px;
    right: 20px;
  }

  #couple-info .info-grid {
    flex-direction: column;
  }
  #wedding-info .info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .photos-footer p {
    font-size: 20px;
  }
}
