/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  caret-color: transparent !important;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #ffebd1;
  color: #81191a;
  overflow-x: hidden;
}

.hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

/* --- Slideshow --- */
.slideshow {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

/* --- Overlay --- */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 200, 200, 0.25);
  backdrop-filter: blur(1px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
}

.overlay h1 {
  font-size: 3em;
  margin-bottom: 10px;
  font-family: "Great Vibes", cursive;
}

.overlay h2 {
  font-size: 2em;
}

.overlay p {
  font-size: 1.2em;
  margin-top: 10px;
}

/* --- Countdown Timer --- */
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-top: 25px;
  color: #fff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  opacity: 1 !important;
  /* Bắt buộc hiện */
  transform: translateY(0);
  animation: none;
  /* Bỏ animation để không bị delay */
  z-index: 10;
  /* đảm bảo nằm trên overlay */
}


.time-box {
  background: rgba(255, 0, 0, 0.2);
  padding: 10px 15px;
  border-radius: 10px;
  text-align: center;
  min-width: 65px;
  backdrop-filter: blur(5px);
}

.time-box span {
  display: block;
  font-size: 2em;
  font-weight: bold;
  color: #fff;
  font-family: "Poppins", sans-serif;
}

.time-box p {
  font-size: 0.9em;
  margin-top: 3px;
  color: #ffe6e6;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .countdown {
    gap: 15px;
  }

  .time-box {
    min-width: 55px;
    padding: 8px 10px;
  }

  .time-box span {
    font-size: 1.6em;
  }

  .time-box p {
    font-size: 0.8em;
  }
}


/* --- Couple Section --- */
.couple-section {
  text-align: center;
  padding: 60px 20px;
}

.couple-details {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.groom-info,
.bride-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  background-color: #fcf6f0;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  min-width: 300px;

  /* Hiệu ứng ban đầu (ẩn + chuẩn bị trượt) */
  opacity: 0;
  transition: all 1s ease-out;
}

/* Chú rể: xuất hiện từ trái */
.groom-info {
  transform: translateX(-80px);
}

/* Cô dâu: xuất hiện từ phải */
.bride-info {
  transform: translateX(80px);
}

/* Khi scroll tới thì thêm class .show */
.show {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

.couple-details .photo img {
  width: 280px;
  height: 380px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 15px;
}

.groom-info .role,
.bride-info .role {
  font-family: "Great Vibes", cursive;
  font-size: 1.8em;
  color: #81191a;
  margin-bottom: 5px;
}

.groom-info .name,
.bride-info .name {
  font-family: "Poppins", sans-serif;
  font-size: 1.5em;
  font-weight: 600;
  color: #81191a;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.couple-title {
  color: #81191a;
  margin: 20px 0 30px;
  font-weight: 600;
  font-family: "Great Vibes", cursive;
  font-size: 2.5em;
}

.couple-desc {
  font-family: 'Noto Sans', sans-serif;
  max-width: 700px;
  margin: 0 auto 20px;
  color: #81191a;
  line-height: 1.7;
}


.parents {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 120px;
  flex-wrap: wrap;
  margin-top: 40px;
  color: #81191a;
  text-align: left;
}

.parent-column {
  min-width: 180px;
}

.parent-column h4 {
  font-family: "Great Vibes", cursive;
  font-size: 2em;
  color: #81191a;
  margin-bottom: 10px;
  text-align: center;
}

.parent-column p {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1em;
  margin: 4px 0;
  text-align: center;
}

.parent-column .address {
  margin-top: 10px;
  font-style: italic;
  font-size: 0.95em;
  color: #5c0f12;
  text-align: center;
  line-height: 1.4;
}


/* Divider giữa chú rể và cô dâu */
.couple-details .divider {
  width: 2px;
  background-color: #f4c7c3;
  /* Màu hồng nhạt */
  height: 200px;
  /* Chiều cao của đường kẻ */
  align-self: center;
  /* Căn giữa theo chiều dọc trong flex container */
  margin: 0 20px;
  /* Khoảng cách hai bên của đường kẻ */
}

.heart {
  position: fixed;
  bottom: -10px;
  font-size: 20px;
  animation: floatUp linear forwards;
  opacity: 0.8;
  color: #ff8fab;
}

.info {
  text-align: center;
  padding: 60px 20px;
  background-color: #fffaf8;
}

.info h2 {
  font-size: 2.2em;
  font-family: "Great Vibes", cursive;
  color: #81191a;
  margin-bottom: 25px;
}

/* Ảnh nhỏ gọn, căn giữa */
.info-image {
  max-width: 600px;
  /* Giới hạn chiều rộng tối đa */
  margin: 0 auto;
}

.info-image img {
  width: 85%;
  /* Ảnh chiếm 85% vùng hiển thị */
  max-width: 500px;
  /* Không to quá trên PC */
  height: auto;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  object-fit: contain;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-image img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* --- Album --- */
.album {
  text-align: center;
  padding: 60px 20px;
  /* background: #fff0f5; */
}

.album h2 {
  font-family: "Great Vibes", cursive;
  color: #81191a;
  font-size: 2.5em;
  margin-bottom: 40px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 15px;
  justify-items: center;
}

.album-grid img {
  width: 100%;
  border-radius: 10px;
  transition: transform 0.3s;
  object-fit: cover;
}

.album-grid img:hover {
  transform: scale(1.05);
}

/* --- Info --- */
.info {
  text-align: center;
  padding: 40px 20px;
  /* background: #fffafc; */
}

/* --- QR --- */
/* QR Section */
.qr {
  text-align: center;
  padding: 60px 20px;
  background: #fff7f9;
}

.qr-title {
  font-size: 28px;
  margin-bottom: 30px;
  font-family: "Great Vibes", cursive;
  color: #81191a;
}

.qr-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: nowrap !important;
  /* Không cho xuống dòng */
}

.qr-box {
  background: #ffffff;
  padding: 20px;
  border-radius: 16px;
  width: 260px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 15px;
}

.qr-name,
.qr-bank,
.qr-name-bank {
  font-size: 16px;
  margin: 5px 0;
  font-family: "Poppins", sans-serif;
}


/* --- Footer --- */
footer {
  font-family: "Great Vibes", cursive;
  text-align: center;
  padding: 30px;
  background: #81191a;
  color: #ffebd1;
  font-size: 1.8em;
}

/* --- Music Button --- */
.music-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

#musicBtn {
  font-size: 26px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 55px;
  color: #ff69b4;
  height: 55px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, background 0.3s ease;
}

#musicBtn:hover {
  background: rgba(255, 182, 193, 0.9);
  transform: scale(1.1);
}

/* Hiệu ứng xoay nhẹ khi phát */
#musicBtn.playing {
  animation: spin 4s linear infinite;
}

.overlay h1,
.overlay h2,
.overlay p {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.5s ease forwards;
}

.overlay h2 {
  animation-delay: 0.3s;
}

.overlay p {
  animation-delay: 0.6s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* --- Floating Hearts Animation --- */
.heart-floating {
  position: fixed;
  color: #ff8fab;
  font-size: 20px;
  animation: floatUp 5s linear infinite;
  opacity: 0.8;
  z-index: 999;
  pointer-events: none;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-100vh) rotate(360deg) scale(1.5);
    opacity: 0;
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .overlay h1 {
    font-size: 3em;
  }

  .overlay h2 {
    font-size: 1.2em;
  }

  .photo img {
    width: 220px;
    height: 220px;
  }

  .parents {
    flex-direction: row !important;
    /* ép hiển thị ngang */
    justify-content: space-between;
    gap: 40px;
    text-align: left;
    /* tuỳ chọn: giúp nội dung không bị căn giữa */
  }

  .parents>div {
    flex: 1;
    min-width: 140px;
    /* đảm bảo mỗi bên có không gian */
  }

  .parent-column {
    flex: 1;
    text-align: left;
  }

  .parent-column h4 {
    font-size: 2em;
  }

  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .qr-container {
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    /* Luôn nằm ngang */
    gap: 10px;
  }

  .qr-box {
    width: 45%;
    /* Thu nhỏ lại để vừa 2 cột */
    max-width: none;
  }

  .qr-img {
    width: 120px !important;
    height: auto;
  }

  .divider {
    display: none;
  }


  .lightbox img {
    max-width: 95%;
    max-height: 75vh;
  }

  .footer {
    font-size: 1em;
  }

  .info {
    padding: 40px 15px;
  }



  .info-image img {
    width: 90%;
    /* Co lại vừa khung trên điện thoại */
    max-width: 320px;
    /* Giới hạn kích thước nhỏ hơn */
    border-radius: 10px;
  }
}

@media (max-width: 480px) {

  .qr-container {
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    gap: 6px;
  }

  .qr-box {
    width: 48%;
    /* Cho vừa màn 360px–420px */
    padding: 12px;
  }

  .qr-img {
    width: 110px !important;
  }

  .slide {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }

  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .album-grid img {
    border-radius: 8px;
  }

  .parents {
    font-size: 0.85em;
    /* Chữ nhỏ gọn nhất cho điện thoại */
    gap: 15px;
  }

  .parent-column h4 {
    font-size: 1.8em;
  }

  .parent-column p {
    font-size: 0.9em;
  }


}

/* --- Lightbox (Xem ảnh phóng to) --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 36px;
  cursor: pointer;
}

.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 10px;
}

.lightbox .prev {
  left: 20px;
}

.lightbox .next {
  right: 20px;
}

/* Lightbox phóng to QR */
.qr-lightbox {
  display: none;
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}

.qr-lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.qr-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 40px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  user-select: none;
}