






/* Bố cục 2 hình nam ngang cô dâu chú rể */
.couple-box {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;           /* Khoảng cách giữa 2 hình */
    padding: 20px 0;
    position: relative;  /* Đảm bảo việc căn chỉnh dễ dàng */
  }
  
  .name-img {
    position: absolute;
    bottom: -40px;
    left: 50%;
    opacity: 0;
    
    transition: transform 3s ease, opacity 2s ease;
  }
  .intro {
    pointer-events: auto;
    z-index: 10000;
    cursor: pointer;
  }
  .name-img img {
    width: 300px;          /* kiểm soát độ to */
    max-width: 150%;

  }
/* VỊ TRÍ BAN ĐẦU */

/* Chú rể – từ trái */
.person:first-child .name-img {
  transform: translateX(-180%);
}

/* Cô dâu – từ phải */
.person:last-child .name-img {
  transform: translateX(70%);
}





.name-img.show img {
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.18));
}

/* KHI HIỆN */
.person:first-child .name-img.show {
  transform: translateX(-95%);
  opacity: 1;
}

.person:last-child .name-img.show {
  transform: translateX(-52%);
  opacity: 1;
}

  .person p {
    bottom: -50px;
  }
  
  .name-img .role {
    width: 120px;
    opacity: 0.95;
  }
















  
  
  /* Khung mỗi người */
  .person {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;   /* CĂN GIỮA TRỤC NGANG */
    text-align: center;
    width: 300px;          /* BẰNG WIDTH AVATAR */
  
  }
  
  
  /* Hình cô dâu – chú rể */
  .person .avatar {
      width: 300px;
      height: 300px;
      object-fit: cover;    /* Giúp hình không bị méo */
      border-radius: 150px;  /* Bo góc đẹp */
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      border: 4px solid #e489a4;
      margin-bottom: 20px;
  } 
  
  
  
  
  

  


  .pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    overflow: hidden; /* tránh tràn khi chạy */
  }
  


/* ảnh động */

.pair .photo {
  flex: 0 0 48%;        /* mỗi ảnh chiếm ~1/2 */
  max-width: 48%;
  aspect-ratio: 3 / 4;
}

.photo img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  display: block;
}





.photo {
  opacity: 0;
  transition: transform 1s ease, opacity 0.8s ease;
}

/* vị trí ban đầu */
.from-left {
    transform: translateX(-160px);
}

.from-right {
    transform: translateX(160px);
}

/* khi hiện */
.photo.show {
  opacity: 1;
  transform: translate(0, 0);
}



/* ===== SECTION 3 ẢNH ===== */
.triple {
  position: relative;
  margin-top: -60px; /* khoảng CHẠM */
  z-index: 1;
}

.triple-group {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.up {
  transform: translateY(160px); /* ĐẨY TỪ DƯỚI LÊN */

}































  .invite-text {
    display: flex;
    justify-content: center;
    margin: 60px 0;
    overflow: hidden; /* chống tràn khi chạy */
  }
  
  .invite-text img {
    width: 260px;
    max-width: 80vw;
    opacity: 0;
    transform: translateX(-200px);
    transition: transform 7s cubic-bezier(.22,.61,.36,1), opacity 1s ease;
  }
  
  /* khi hiện */
  .invite-text.show img {
    opacity: 1;
    transform: translateX(0);
  }
  






  .couple-title {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    
  }
  
  .couple-title img {
    width: 320px;
 
    transform: translateY(40px);
    transition: transform 1.2s ease, opacity 1s ease;
  }
  
  /* KHI HIỆN */
  .couple-title.show img {
    opacity: 1;
    transform: translateY(0);
  }

  .album{
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    
  }






/* mobile */
@media (max-width: 768px) {
  @media (max-width: 768px) {
    .person {
      width: 160px;
    }
  
    .person .avatar {
      width: 160px;
      height: 160px;
    }
  
    .name-img img {
      width: 140px;
    }
  
    .couple-box .person:first-child .name-img.show {
      transform: translateX(-75%);
    }
  
    .couple-box .person:last-child .name-img.show {
      transform: translateX(-70%);
    }
  }
  
  .name-img .role {
    width: 90px;
  }







  .couple-title img {
    width: 240px;
    transform: translateY(10%);
  }


  .couple-title img {
    width: 240px;
    transform: translateY(10%);
  }


  .album img {
    width: 240px;

    transform: translateY(10%);
  }













    .pair {
      display: flex;
      flex-direction: row;          /* NẰM NGANG */
      justify-content: center;
      align-items: center;
      gap: 12px;                    /* khoảng cách nhỏ */
      margin: 80px 0;
      overflow: hidden;
  }

  .photo {
      flex: 0 0 48%;                /* mỗi ảnh ~1/2 màn hình */
      opacity: 0;
  }

  .photo img {
      width: 100%;
      border-radius: 12px;
  }

  /* giảm biên độ trượt cho mobile */
  .from-left {
      transform: translateX(-40px);
  }

  .from-right {
      transform: translateX(40px);
  }

  .triple-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
  }
  .triple-group .photo {
    flex: 0 0 calc(33.333% - 8px);
    max-width: calc(33.333% - 8px);
  }
.triple-group img {
    width: 100%;
}
.up {
  transform: translateY(100px); /* GIẢM BIÊN ĐỘ CHO MOBILE */
}
}
.invite-text img {
  width: 200px;
  transform: translateX(-150px);

    }



/* ===== INTRO FULLSCREEN ===== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  cursor: pointer;
  background: #000;
}

/* mỗi nửa màn hình */
.intro-panel {
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 1.4s cubic-bezier(.77,0,.18,1);
}

.intro-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* trạng thái ban đầu: dính sát */
.intro-panel.left {
  transform: translateX(0);
}

.intro-panel.right {
  transform: translateX(0);
}

/* khi tách ra */
.intro.open .intro-panel.left {
  transform: translateX(-100%);
}

.intro.open .intro-panel.right {
  transform: translateX(100%);
}

/* chữ gợi ý */
.intro-hint {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0.8;
  animation: blink 1.6s infinite;
}

@keyframes blink {
  0%,100% { opacity: .3 }
  50% { opacity: 1 }
}
