/* Đặt @import ở đầu file */
@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Great+Vibes&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Nâng cấp giao diện thiệp cưới */
:root {
  --primary-color: #c8396b;
  --secondary-color: #f27999;
  --accent-color: #f8c8dc;
  --gold: #d4af37;
  --gold-light: #f0e6a9;
  --gold-gradient: linear-gradient(135deg, #d4af37, #f0e6a9, #d4af37);
  --text-color: #2d2d2d;
  --light-text: #5a5a5a;
  --background: #fff9fb;
  --card-bg: rgba(255, 255, 255, 0.95);
  --shadow: 0 10px 30px rgba(200, 57, 107, 0.15);
  --border-radius: 15px;
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --font-title: "Cormorant Garamond", serif;
  --font-heading: "Playfair Display", serif;
  --font-body: "Lora", serif;
  --font-script: "Great Vibes", cursive;
}

body {
  font-family: var(--font-body);
  background: url("https://images.unsplash.com/photo-1464366400600-7168b8af9bc3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80")
    fixed;
  background-size: cover;
  min-height: 100vh;
  color: var(--text-color);
  overflow-x: hidden;
  position: relative;
  line-height: 1.8;
  letter-spacing: 0.3px;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 249, 251, 0.9);
  backdrop-filter: blur(5px);
  z-index: -1;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 50px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  /* Giảm backdrop-filter để tăng performance */
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  /* Thêm will-change để tối ưu GPU */
  will-change: transform;
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://www.transparenttextures.com/patterns/cubes.png");
  opacity: 0.05;
  z-index: -1;
}

.container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(212, 175, 55, 0.05) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(212, 175, 55, 0.05) 0%,
      transparent 20%
    );
  z-index: -1;
}

.container:hover {
  box-shadow: 0 15px 40px rgba(216, 84, 142, 0.25);
  transform: translateY(-5px);
}

/* Phần điều hướng */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
  transform: translateY(0);
  opacity: 1;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
}

.logo {
  font-family: 'Great Vibes', cursive;
  font-size: 3rem;
  background: var(--gold-gradient);
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  letter-spacing: 4px;
  text-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
  transition: all 0.3s;
  padding: 0 8px;
}
@media (max-width: 768px) {
  .logo {
    font-size: 2.2rem;
  }
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin: 0 15px;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #e75480;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
  transform: none;
}

.burger {
  display: none;
  cursor: pointer;
}

.burger div {
  width: 25px;
  height: 3px;
  background-color: #e75480;
  margin: 5px;
  transition: all 0.3s ease;
}

/* Phần thiệp mời */
.section {
  min-height: 90vh;
  padding-top: 80px;
  padding-bottom: 80px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Thiết kế mới cho trang chủ */
.hero-container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 50px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.97),
    rgba(255, 249, 251, 0.95)
  );
  border: 1px solid rgba(200, 57, 107, 0.2);
  box-shadow: 0 20px 50px rgba(200, 57, 107, 0.2),
    0 0 30px rgba(212, 175, 55, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  transition: all 0.5s ease;
  overflow: hidden;
  position: relative;
}

.hero-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
      circle at 30% 30%,
      rgba(212, 175, 55, 0.05) 0%,
      transparent 25%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(212, 175, 55, 0.05) 0%,
      transparent 25%
    );
  animation: rotateBackground 30s linear infinite;
  z-index: -1;
}

@keyframes rotateBackground {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hero-content {
  text-align: center;
}

.hero-header {
  margin-bottom: 30px;
}

/* Lễ Thành Hôn - script hồng đậm sang trọng, dùng Great Vibes */
.hero-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: 4.2rem;
  color: var(--primary-color);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 2px;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  text-shadow: 0 2px 8px rgba(200, 57, 107, 0.15);
  margin-bottom: 18px;
}

.hero-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.couple-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0 30px;
  text-align: center;
}

.couple-names h2 {
  font-family: 'Great Vibes', cursive;
  font-size: 3.3rem;
  color: #a67c52;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 1.5px;
  margin: 10px 0;
  text-shadow: 0 2px 8px rgba(166,124,82,0.10);
}

.heart-divider {
  margin: 15px 0;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.heart-divider::before,
.heart-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light));
}

.heart-divider::before {
  right: 100%;
  margin-right: 10px;
}

.heart-divider::after {
  left: 100%;
  margin-left: 10px;
  background: linear-gradient(90deg, var(--gold-light), transparent);
}

.wedding-date {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-top: 20px;
  letter-spacing: 3px;
  position: relative;
  display: inline-block;
}

.wedding-date::before,
.wedding-date::after {
  content: "❦";
  color: var(--gold);
  font-size: 1.2rem;
  margin: 0 15px;
  opacity: 0.7;
}

.couple-image-container {
  margin: 40px auto;
  position: relative;
}

.couple-image {
  margin: 0 auto;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 0 0 0 15px rgba(216, 84, 142, 0.1);
  transition: all 0.5s ease;
  position: relative;
}

.couple-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    transparent 30%,
    rgba(216, 84, 142, 0.2)
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.couple-image:hover {
  transform: scale(1.05) rotate(3deg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 0 20px rgba(216, 84, 142, 0.15);
}

.couple-image:hover::before {
  opacity: 1;
}

.couple-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.couple-image:hover img {
  transform: scale(1.1);
}

.invitation-text {
  margin: 30px 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--text-color);
}

.guest-name {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--primary-color);
  margin: 15px 0;
}

.event-details {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin: 30px 0;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  text-align: left;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  width: 45%;
  min-width: 300px;
}

.detail-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.detail-item i {
  font-size: 2rem;
  color: #e75480;
  margin-right: 15px;
  margin-top: 5px;
}

.detail-item h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.detail-item p {
  font-size: 1.1rem;
  color: var(--text-color);
}

.countdown-section {
  margin: 60px 0;
  position: relative;
}

.countdown-section h3 {
  font-family: var(--font-title);
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: var(--primary-color);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 25px;
}

.time-block {
  background: linear-gradient(135deg, #fff, #f8f8f8);
  border-radius: 15px;
  padding: 20px 25px;
  min-width: 120px;
  box-shadow: 0 10px 20px rgba(216, 84, 142, 0.1),
    0 0 0 1px rgba(216, 84, 142, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.time-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  opacity: 0.7;
}

.time-block:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(216, 84, 142, 0.2),
    0 0 0 1px rgba(216, 84, 142, 0.1);
}

.time-block span:first-child {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
  line-height: 1;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

.time-block .label {
  font-size: 1rem;
  color: var(--light-text);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 5px;
  font-weight: 500;
}

.nav-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}

/* Cập nhật nút */
.nav-button,
#rsvpButton {
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 12px 30px;
  border-radius: 50px;
  border: none;
  box-shadow: 0 5px 15px rgba(200, 57, 107, 0.3);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.nav-button:before,
#rsvpButton:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    var(--secondary-color),
    var(--primary-color)
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.nav-button:hover:before,
#rsvpButton:hover:before {
  opacity: 1;
}

.nav-button:hover,
#rsvpButton:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(200, 57, 107, 0.4);
}

/* Timeline - Câu chuyện tình yêu */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 40px auto;
}

.timeline-item {
  padding: 25px 35px;
  position: relative;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  gap: 25px;
  border: 1px solid rgba(216, 84, 142, 0.1);
  overflow: hidden;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--secondary-color)
  );
  opacity: 0.7;
}

.timeline-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  background-color: rgba(255, 255, 255, 1);
}

.timeline-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 0 15px rgba(216, 84, 142, 0.3);
  flex-shrink: 0;
  transition: all 0.4s ease;
}

.timeline-item:hover .timeline-img {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 20px rgba(216, 84, 142, 0.5);
}

.timeline-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.timeline-item:hover .timeline-img img {
  transform: scale(1.1);
}

.timeline-content {
  flex-grow: 1;
}

.timeline-content h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
  font-size: 1.8rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.timeline-content h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gold);
}

.timeline-content .date {
  display: inline-block;
  padding: 5px 15px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 15px;
  font-weight: 500;
  box-shadow: 0 3px 10px rgba(216, 84, 142, 0.2);
}

.timeline-content p {
  line-height: 1.8;
  color: var(--text-color);
}

/* Gallery - Bộ sưu tập ảnh */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
  position: relative;
  min-height: 300px;
  transition: height 0.5s ease;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  /* Tối ưu transition */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 300px;
  opacity: 1;
  transform: scale(1);
  display: block;
  /* Thêm will-change để tối ưu GPU */
  will-change: transform;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Tối ưu transition */
  transition: transform 0.3s ease;
  /* Thêm will-change để tối ưu GPU */
  will-change: transform;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
  transform: translateY(0);
}

.gallery-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
  margin-top: 20px;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 10px 20px;
  margin: 0 10px;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.5s ease;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(200, 57, 107, 0.3);
}

.filter-btn.active {
  position: relative;
}

.filter-btn.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
}

/* Animation cho gallery items khi filter */
.gallery-item {
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center;
  opacity: 1;
  transform: scale(1);
  display: block;
}

.gallery-item.hide {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  position: absolute;
  display: none;
}

.gallery-item.show {
  animation: showItem 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  display: block;
}

@keyframes showItem {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Thêm animation cho gallery grid */
.gallery-grid {
  position: relative;
  min-height: 300px;
  transition: height 0.5s ease;
}

/* RSVP - Xác nhận tham dự */
.rsvp-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 40px;
}

.rsvp-form {
  flex: 1;
  min-width: 300px;
  background: rgba(255, 255, 255, 0.95);
  padding: 35px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(216, 84, 142, 0.1);
  position: relative;
  overflow: hidden;
}

.rsvp-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(216, 84, 142, 0.3);
  outline: none;
  background-color: white;
}

.form-group textarea {
  height: 150px;
  resize: vertical;
}

#rsvpButton {
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  box-shadow: 0 5px 15px rgba(216, 84, 142, 0.3);
  width: 100%;
  font-size: 1.1rem;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

#rsvpButton::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    var(--secondary-color),
    var(--primary-color)
  );
  transition: all 0.4s ease;
  z-index: -1;
}

#rsvpButton:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(216, 84, 142, 0.5);
}

#rsvpButton:hover::before {
  left: 0;
}

.rsvp-image {
  flex: 1;
  min-width: 300px;
  max-width: 450px;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transition: all 0.5s ease;
  height: 600px;
  border: 10px solid white;
}

.rsvp-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(216, 84, 142, 0.1),
    rgba(216, 84, 142, 0.3)
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.rsvp-image:hover::before {
  opacity: 1;
}

.rsvp-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.rsvp-image:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.rsvp-image:hover img {
  transform: scale(1.1) rotate(2deg);
}

/* Location - Địa điểm */
.house-selection-buttons {
  display: flex;
  flex-direction: row !important;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
}

.house-selection-btn {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f8f8;
  color: #666;
  font-family: 'Playfair Display', serif;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.house-selection-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.house-selection-btn span {
  position: relative;
  z-index: 2;
}

.house-selection-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.house-selection-btn.active {
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 154, 158, 0.18);
}

.house-selection-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 154, 158, 0.4);
}

.location-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  align-items: stretch;
}

.location-info {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.location-card {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  border: 1px solid rgba(255, 154, 158, 0.1);
  width: 100%;
  height: 100%;
}

.location-card.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  margin-bottom: 0;
}

.location-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 100%);
}

.location-card h3 {
  color: #333;
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 0.5rem;
}

.location-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 100%);
}

.location-card p {
  margin: 1rem 0;
  color: #555;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location-card i {
  color: #ff9a9e;
  font-size: 1.2rem;
  width: 25px;
}

.location-directions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.location-directions h4 {
  color: #333;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
}

.direction-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.direction-item i {
  color: #ff9a9e;
  font-size: 1.2rem;
  margin-top: 0.2rem;
}

.direction-item p {
  margin: 0;
  color: #666;
  font-size: 1rem;
  line-height: 1.5;
}
.location-maps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.map-container {
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  border: 1px solid rgba(255, 154, 158, 0.1);
  height: 100%;
  min-height: 400px;
}

.map-container.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.map-container h3 {
  color: #333;
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: center;
}

.map-container iframe {
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  height: calc(100% - 80px);
  min-height: 300px;
}

@media (max-width: 768px) {
  .location-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .house-selection-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .house-selection-btn {
    width: 200px;
  }
  
  .location-card {
    padding: 1.5rem;
  }
  
  .map-container {
    min-height: 300px;
  }
  
  .map-container iframe {
    min-height: 250px;
  }
}

/* Footer */
footer {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding-bottom: 50px;
  min-height: auto !important;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(212, 175, 55, 0.05) 0%,
      transparent 25%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(212, 175, 55, 0.05) 0%,
      transparent 25%
    );
  z-index: -1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.footer-logo h2 {
  font-family: var(--font-script);
  font-size: 3rem;
  background: var(--gold-gradient);
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}

.footer-logo p {
  font-family: var(--font-title);
  color: var(--primary-color);
  font-size: 1.3rem;
  letter-spacing: 3px;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  display: inline-block;
  margin: 0 15px;
  color: var(--primary-color);
  font-size: 2rem;
  transition: all 0.4s ease;
}

.footer-social a:hover {
  transform: translateY(-8px) rotate(15deg);
  color: var(--gold);
  text-shadow: 0 5px 15px rgba(216, 84, 142, 0.3);
}

.footer-message {
  text-align: center;
  margin: 50px 0;
  padding: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(200, 57, 107, 0.1);
  position: relative;
}

.footer-message::before,
.footer-message::after {
  content: '"';
  font-family: var(--font-script);
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.3;
  position: absolute;
}

.footer-message::before {
  top: 10px;
  left: 20px;
}

.footer-message::after {
  bottom: -20px;
  right: 20px;
  transform: rotate(180deg);
}

.footer-message p {
  color: var(--text-color);
  line-height: 1.9;
  font-size: 1.3rem;
  margin-bottom: 15px;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.footer-copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(216, 84, 142, 0.1);
}

.footer-copyright p {
  color: var(--light-text);
  font-size: 1rem;
}

/* Floating elements */
.floating-petals {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.petal {
  position: absolute;
  background-image: url("https://i.imgur.com/EPFEi0f.png");
  background-size: contain;
  background-repeat: no-repeat;
  width: 15px;
  height: 15px;
  opacity: 0.8;
  animation: petalFall linear infinite;
}

@keyframes petalFall {
  0% {
    transform: translateY(-5%) rotate(0deg);
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
  }
}

/* Music control */
.music-control {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
}

#musicToggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e75480;
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

#musicToggle:hover {
  background-color: #d64777;
  transform: scale(1.1);
}

/* Section Nhạc Cưới */
.music-section {
  padding: 80px 0;
  background: transparent;
  position: relative;
}

.music-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(212, 175, 55, 0.05) 0%,
    transparent 70%
  );
  z-index: -1;
}

.music-header {
  text-align: center;
  margin-bottom: 40px;
}

.music-header h3 {
  font-family: var(--font-script);
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  text-shadow: 0 2px 8px rgba(200, 57, 107, 0.15);
}

.music-header p {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--light-text);
  font-style: italic;
}

.music-player {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  max-width: 100%;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(200, 57, 107, 0.15);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.music-player:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(200, 57, 107, 0.25);
}

.music-player iframe {
  border-radius: 15px;
  display: block;
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .music-section {
    padding: 60px 0;
  }
  
  .music-header h3 {
    font-size: 2.5rem;
  }
  
  .music-header p {
    font-size: 1.1rem;
  }
  
  .music-player iframe {
    width: 100% !important;
    height: 300px !important;
  }
}

@media (max-width: 480px) {
  .music-section {
    padding: 40px 0;
  }
  
  .music-header h3 {
    font-size: 2rem;
  }
  
  .music-header p {
    font-size: 1rem;
  }
  
  .music-player iframe {
    width: 100% !important;
    height: 250px !important;
  }
}

/* Responsive cho iframe nhạc trong tab */
@media (max-width: 768px) {
  .music-player iframe {
    width: 100% !important;
    height: 280px !important;
  }
}

@media (max-width: 480px) {
  .music-player iframe {
    width: 100% !important;
    height: 220px !important;
  }
}

/* Responsive */
@media (max-width: 992px) {
  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-item:nth-child(odd) .timeline-img,
  .timeline-item:nth-child(even) .timeline-img {
    left: -5px;
  }

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

  .gallery-item {
    height: 250px;
    display: block;
  }

  .filter-btn {
    padding: 7px 18px;
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  /* Hiển thị burger menu */
  .burger {
    display: block !important;
    cursor: pointer;
    z-index: 1001;
  }

  /* Sửa lỗi menu không hiển thị */
  .nav-links {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 70%;
    background-color: rgba(255, 255, 255, 0.98);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.5s ease-in;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .nav-links li {
    opacity: 0;
    margin: 20px 0;
  }

  /* Quan trọng: Đảm bảo menu hiển thị khi active */
  .nav-active {
    transform: translateX(0%) !important;
  }

  /* Animation cho burger menu */
  .toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px) !important;
  }

  .toggle .line2 {
    opacity: 0 !important;
  }

  .toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px) !important;
  }

  /* Animation cho nav links */
  @keyframes navLinkFade {
    from {
      opacity: 0;
      transform: translateX(50px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .nav-container {
    padding: 10px 5%;
  }

  .logo {
    font-size: 1.5rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
  }

  .nav-links.show {
    right: 0;
  }

  .nav-links li {
    margin: 15px 0;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s ease;
  }

  .nav-links.show li {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-links.show li:nth-child(1) {
    transition-delay: 0.2s;
  }
  .nav-links.show li:nth-child(2) {
    transition-delay: 0.3s;
  }
  .nav-links.show li:nth-child(3) {
    transition-delay: 0.4s;
  }
  .nav-links.show li:nth-child(4) {
    transition-delay: 0.5s;
  }
  .nav-links.show li:nth-child(5) {
    transition-delay: 0.6s;
  }
  .nav-links.show li:nth-child(6) {
    transition-delay: 0.7s;
  }

  .envelope {
    height: 400px;
  }

  h1,
  .section-title {
    font-size: 2rem;
  }

  .names h2 {
    font-size: 1.5rem;
  }

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

  .gallery-item {
    height: 200px;
    display: block;
  }

  .gallery-item::after {
    font-size: 1.3rem;
    bottom: 12px;
    right: 12px;
  }

  .filter-btn {
    padding: 6px 15px;
    font-size: 0.9rem;
  }

  /* Điều chỉnh container */
  .container {
    width: 95%;
    padding: 30px 15px;
  }

  /* Điều chỉnh font size */
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  p {
    font-size: 0.95rem;
  }

  /* Điều chỉnh couple names */
  .couple-names h2 {
    font-size: 2rem;
  }

  /* Điều chỉnh countdown */
  .countdown-container {
    flex-wrap: wrap;
  }

  .countdown-item {
    width: 45%;
    margin: 10px 5px;
  }

  /* Điều chỉnh gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Điều chỉnh form RSVP */
  .form-group {
    flex-direction: column;
  }

  .form-group .form-control {
    width: 100%;
    margin-bottom: 10px;
  }

  /* Điều chỉnh timeline */
  .timeline-container {
    padding-left: 30px;
  }

  .timeline-item {
    padding-left: 30px;
  }

  .timeline-item::before {
    left: -10px;
  }

  /* Điều chỉnh lightbox */
  .lightbox-image {
    max-width: 95%;
    max-height: 80%;
  }

  .lightbox-close {
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  /* Đảm bảo icon menu luôn hiển thị đúng */
  .nav-links:not(.nav-active) + .burger .line1,
  .nav-links:not(.nav-active) + .burger .line2,
  .nav-links:not(.nav-active) + .burger .line3 {
    transform: none !important;
    opacity: 1 !important;
  }

  .nav-active + .burger .line1 {
    transform: rotate(-45deg) translate(-5px, 6px) !important;
  }

  .nav-active + .burger .line2 {
    opacity: 0 !important;
  }

  .nav-active + .burger .line3 {
    transform: rotate(45deg) translate(-5px, -6px) !important;
  }
}

@media (max-width: 576px) {
  .envelope {
    height: 350px;
  }

  .details-wrap {
    padding: 15px;
  }

  h1,
  .section-title {
    font-size: 1.8rem;
  }

  .names h2 {
    font-size: 1.3rem;
  }

  .countdown-timer {
    gap: 5px;
  }

  .time-block {
    min-width: 50px;
    padding: 5px;
  }

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

  .gallery-item {
    height: 150px;
  }

  .gallery-item::after {
    font-size: 1.2rem;
    bottom: 10px;
    right: 10px;
  }

  .filter-btn {
    padding: 5px 12px;
    font-size: 0.85rem;
    margin-bottom: 5px;
  }

  .gallery-filter {
    gap: 8px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .lightbox-close {
    font-size: 1.5rem;
    top: 15px;
    right: 15px;
  }
}

/* Animation for nav links */
@keyframes navLinkFade {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Toggle animation for burger menu */
.toggle .line1 {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
  opacity: 0;
}

.toggle .line3 {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Thêm CSS cho lightbox */
.lightbox-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  /* Tối ưu transition */
  transition: opacity 0.2s ease;
  cursor: pointer;
  /* Thêm will-change để tối ưu GPU */
  will-change: opacity;
}

.lightbox-container.active {
  opacity: 1;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  cursor: default;
  /* Thêm will-change để tối ưu GPU */
  will-change: transform;
}

.lightbox-container.active .lightbox-image {
  transform: scale(1);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  font-size: 1.8rem;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-close:hover {
  transform: scale(1.1);
}

/* Xóa bỏ overlay cho menu mobile */
.menu-overlay {
  display: none;
}

/* Đảm bảo các section có khoảng cách đúng */
#main-nav + .section {
  padding-top: 120px;
}

/* Thêm margin cho section cuối cùng */
.section:last-of-type {
  min-height: auto !important;
  margin-bottom: 0;
  padding-bottom: 100px;
}

/* Thêm CSS cho hoa rơi - Sửa lỗi ảnh không tìm thấy */
.flower {
  position: fixed;
  pointer-events: none;
  z-index: 100;
  animation: flowerFall linear forwards;
  border-radius: 50%;
  --flower-color: hsl(350, 100%, 80%);
  --flower-center: hsl(350, 100%, 70%);
  --petal-count: 5;
}

@keyframes flowerFall {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
  }
}

/* Tạo hoa đơn giản bằng CSS thuần túy */
.flower::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--flower-color);
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.flower::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30%;
  height: 30%;
  background-color: var(--flower-center);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.7);
}

/* Tạo cánh hoa bằng CSS */
.flower .petal {
  position: absolute;
  top: 0;
  left: 50%;
  width: 40%;
  height: 100%;
  background-color: var(--flower-color);
  border-radius: 50% 50% 0 0;
  transform-origin: bottom center;
}

/* Tạo cánh hoa tự động bằng CSS */
@property --petal-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.flower {
  --petal-angle: calc(360deg / var(--petal-count));
}

.flower::before {
  mask: repeating-conic-gradient(
    from 0deg,
    #000 0deg,
    #000 calc(var(--petal-angle) * 0.4),
    transparent calc(var(--petal-angle) * 0.4),
    transparent var(--petal-angle)
  );
  mask-size: 100% 100%;
  mask-position: center;
}

/* Media queries cho thiết bị rất nhỏ */
@media (max-width: 480px) {
  /* Điều chỉnh container */
  .container {
    width: 100%;
    padding: 20px 10px;
  }

  /* Điều chỉnh font size */
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  /* Điều chỉnh couple names */
  .couple-names h2 {
    font-size: 1.7rem;
  }

  /* Điều chỉnh gallery */
  .gallery-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
  }

  /* Điều chỉnh filter buttons */
  .filter-buttons {
    flex-wrap: wrap;
  }

  .filter-btn {
    margin: 5px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  /* Điều chỉnh timeline */
  .timeline-container {
    padding-left: 20px;
  }

  .timeline-item {
    padding-left: 20px;
  }

  .gallery-item {
    height: 250px;
  }
}

/* Thêm hiệu ứng highlight cho section */
@keyframes section-highlight {
  0% {
    box-shadow: 0 0 0 rgba(200, 57, 107, 0);
  }
  50% {
    box-shadow: 0 0 30px rgba(200, 57, 107, 0.3);
  }
  100% {
    box-shadow: 0 0 0 rgba(200, 57, 107, 0);
  }
}

.highlight-section {
  animation: section-highlight 1.5s ease-in-out;
}

/* Đảm bảo scroll behavior mượt mà */
html {
  scroll-behavior: smooth;
}

/* Thêm transition cho active link */
.nav-links a {
  transition: color 0.3s ease, font-weight 0.3s ease;
}

.nav-links a.active {
  color: var(--primary-color);
  font-weight: 700;
  position: relative;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Wedding schedule card tối ưu cho Bootstrap */
.wedding-schedule-card {
  background: #fff9fb;
  border: none;
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(200, 57, 107, 0.07);
  font-family: "Roboto", "Arial", "Segoe UI", sans-serif !important;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.schedule-title {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #c8396b;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.schedule-img {
  width: 100%;
  max-width: 220px;
  height: 180px;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(200, 57, 107, 0.08);
}
.schedule-time {
  font-family: "Lora", serif;
  font-size: 1.1rem;
  color: #222;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.schedule-address {
  font-family: "Lora", serif;
  font-size: 1rem;
  color: #888;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}
.schedule-add-calendar {
  font-size: 1rem;
  font-weight: 500;
  margin-top: auto;
}
@media (max-width: 900px) {
  .wedding-schedule-card {
    min-height: 0;
    padding: 1.5rem 0.5rem;
  }
  .schedule-img {
    max-width: 100%;
    height: 140px;
  }
}

/* Lịch trình cưới - bố cục 2 card song song, border, nền sáng, bo góc, shadow, font sans-serif */
.schedule-outer-border {
  border-radius: 18px;
  /* background: linear-gradient(135deg, #fff5f5 0%, #fff 100%); */
  padding: 40px 0 30px 0;
  margin: 0 auto 40px auto;
  position: relative;
  max-width: 1100px;
  /* border: 1px solid rgba(200, 57, 107, 0.1);
  box-shadow: 0 8px 32px rgba(200, 57, 107, 0.08); */
}
.schedule-card-custom {
  background: #fff;
  border: 1.5px solid rgba(200, 57, 107, 0.15);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(200, 57, 107, 0.07);
  padding: 32px 28px 32px 28px;
  text-align: center;
  margin-bottom: 0;
  font-family: "Montserrat", "Roboto", Arial, sans-serif;
  min-width: 280px;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.schedule-card-custom:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 32px rgba(200, 57, 107, 0.15);
  border-color: rgba(200, 57, 107, 0.25);
}
.schedule-title-custom {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.schedule-img-custom {
  width: 210px;
  height: 210px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 auto 18px auto;
  box-shadow: 0 2px 10px rgba(200, 57, 107, 0.08);
  display: block;
}
.schedule-time-custom {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.08rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.schedule-heart {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 8px;
}
.schedule-address-custom {
  font-size: 1rem;
  color: var(--light-text);
  margin-bottom: 18px;
  line-height: 1.6;
  font-family: "Roboto", Arial, sans-serif;
  flex-grow: 1;
}
.schedule-map-custom {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  font-weight: 600;
  margin-bottom: 14px;
  text-decoration: none;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(200, 57, 107, 0.15);
}
.schedule-map-custom:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200, 57, 107, 0.25);
}
.schedule-add-calendar-custom {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 1rem;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0;
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.schedule-add-calendar-custom:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200, 57, 107, 0.25);
}

/* CSS cho phần QR và chọn chú rể/cô dâu */
.gift-switch {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.switch-btn {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f8f8;
  color: #666;
  font-family: 'Playfair Display', serif;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.switch-btn.active {
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 154, 158, 0.18);
}

.switch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.qr-section {
  width: 100%;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.qr-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.qr-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(255,154,158,0.10);
  padding: 2.5rem 2rem;
  max-width: 340px;
  width: 100%;
  margin: 0 auto;
  border: 1.5px solid #ffe0e6;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-card h3 {
  color: #d16d7f;
  font-family: 'Dancing Script', cursive;
  font-size: 2.1rem;
  margin-bottom: 1.2rem;
  letter-spacing: 1px;
}

.qr-image {
  margin: 1.2rem 0 1.5rem 0;
  padding: 1.2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(255,154,158,0.10);
  display: inline-block;
}

.qr-image img {
  width: 340px;
  height: 420px;
  border-radius: 16px;
}

.gift-info {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(255,154,158,0.08);
  padding: 2rem 2rem 1.5rem 2rem;
  margin-bottom: 1.5rem;
  border: 1.5px solid #ffe0e6;
  min-width: 260px;
  max-width: 350px;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.gift-info.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.gift-info p {
  margin: 0.7rem 0;
  color: #555;
  font-size: 1.13rem;
  line-height: 1.7;
  font-family: serif;
}

.gift-info strong {
  color: #d16d7f;
  font-weight: 600;
}

.gift-message {
  text-align: left;
  margin-bottom: 2.2rem;
  color: #666;
  font-size: 1.15rem;
  font-family: serif;
  line-height: 1.7;
  max-width: 350px;
}

@media (max-width: 900px) {
  .gift-main {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }
  .gift-info-col, .gift-qr-col {
    align-items: center;
    width: 100%;
  }
  .gift-info, .gift-message {
    max-width: 100%;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .gift-container {
    padding: 1.2rem 0.2rem;
    border-radius: 0;
  }
  .qr-card, .gift-info {
    padding: 1.2rem 0.7rem;
    border-radius: 10px;
  }
  .qr-image img {
    width: 250px;
    height: 300px;
  }
}

/* CSS từ index.html - Modal chọn nhà */
.house-selection-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.house-selection-content {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.house-selection-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 100%);
}

.house-selection-content h2 {
  margin-bottom: 2.5rem;
  color: #333;
  font-family: 'Dancing Script', cursive;
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  display: inline-block;
}

.house-selection-content h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 100%);
}

.house-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 1rem;
}

.house-btn {
  padding: 1.2rem 2.5rem;
  font-size: 1.3rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s ease;
  background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
  color: #333;
  font-family: 'Playfair Display', serif;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.house-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.house-btn span {
  position: relative;
  z-index: 2;
}

.house-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.house-btn:hover::before {
  opacity: 1;
}

.house-btn:hover span {
  color: white;
}

/* Lịch trình */
.schedule-section {
  display: none;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.schedule-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.schedule-house-title {
  text-align: center;
  margin-bottom: 2.5rem;
  color: #333;
  font-family: 'Dancing Script', cursive;
  font-size: 2.5rem;
  position: relative;
  padding-bottom: 1rem;
}

.schedule-house-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 100%);
}

/* Gift section layout fix */
.gift-section-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(255,154,158,0.08);
  margin: 0 auto 3rem auto;
  max-width: 600px;
  padding: 2.5rem 1.5rem;
}

.gift-container {
  max-width: 100%;
  padding: 0;
}

.gift-message {
  margin-bottom: 2.5rem;
}

.gift-switch {
  margin-bottom: 2.5rem;
}

.qr-codes {
  justify-content: center;
  gap: 0;
}

.qr-section {
  width: 100%;
}

.qr-card {
  margin: 0 auto;
  max-width: 400px;
}

@media (max-width: 768px) {
  .gift-section-wrapper {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    padding: 1rem 0.2rem;
  }
}

/* CSS cho gift-main và các cột */
.gift-main {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  width: 100%;
  align-items: stretch;
  justify-content: center;
}

.gift-qr-col {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-info-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .schedule-outer-border {
    padding: 20px 0 10px 0;
  }
  .schedule-card-custom {
    padding: 18px 5px;
    min-width: 0;
  }
  .schedule-img-custom {
    width: 100%;
    max-width: 180px;
    height: 180px;
  }
}

@media (max-width: 768px) {
  .schedule-outer-border {
    padding: 15px 10px 10px 10px;
    margin: 0 auto 20px auto;
  }
  
  .schedule-card-custom {
    padding: 20px 15px;
    margin-bottom: 15px;
  }
  
  .schedule-title-custom {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
  
  .schedule-img-custom {
    width: 160px;
    height: 160px;
    margin: 0 auto 15px auto;
  }
  
  .schedule-time-custom {
    font-size: 1rem;
    margin-bottom: 8px;
  }
  
  .schedule-heart {
    font-size: 1.1rem;
    margin-bottom: 6px;
  }
  
  .schedule-address-custom {
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
  }
  
  .schedule-map-custom {
    font-size: 0.9rem;
    padding: 8px 16px;
    margin-bottom: 12px;
  }
  
  .schedule-add-calendar-custom {
    font-size: 0.9rem;
    padding: 8px 16px;
  }
}

@media (max-width: 576px) {
  .schedule-outer-border {
    padding: 10px 5px 5px 5px;
    border-radius: 12px;
  }
  
  .schedule-card-custom {
    padding: 15px 10px;
    border-radius: 12px;
  }
  
  .schedule-title-custom {
    font-size: 1rem;
    margin-bottom: 12px;
    letter-spacing: 1px;
  }
  
  .schedule-img-custom {
    width: 140px;
    height: 140px;
    margin: 0 auto 12px auto;
    border-radius: 8px;
  }
  
  .schedule-time-custom {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }
  
  .schedule-heart {
    font-size: 1rem;
    margin-bottom: 5px;
  }
  
  .schedule-address-custom {
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
  }
  
  .schedule-map-custom {
    font-size: 0.85rem;
    padding: 7px 14px;
    margin-bottom: 10px;
    border-radius: 20px;
  }
  
  .schedule-add-calendar-custom {
    font-size: 0.85rem;
    padding: 7px 14px;
    border-radius: 20px;
  }
}

@media (max-width: 480px) {
  .schedule-outer-border {
    padding: 8px 3px 3px 3px;
  }
  
  .schedule-card-custom {
    padding: 12px 8px;
  }
  
  .schedule-title-custom {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }
  
  .schedule-img-custom {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px auto;
  }
  
  .schedule-time-custom {
    font-size: 0.85rem;
    margin-bottom: 5px;
  }
  
  .schedule-heart {
    font-size: 0.9rem;
    margin-bottom: 4px;
  }
  
  .schedule-address-custom {
    font-size: 0.8rem;
    margin-bottom: 10px;
  }
  
  .schedule-map-custom {
    font-size: 0.8rem;
    padding: 6px 12px;
    margin-bottom: 8px;
  }
  
  .schedule-add-calendar-custom {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

/* Đảm bảo 2 card schedule có cùng height */
.schedule-outer-border .row {
  align-items: stretch;
}

.schedule-outer-border .col-12,
.schedule-outer-border .col-md-6,
.schedule-outer-border .col-lg-5 {
  display: flex;
  flex-direction: column;
}

/* Lazy loading và placeholder */
.lazy-load-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Tối ưu hóa ảnh */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 1; /* Thay đổi từ 0 thành 1 để ảnh hiển thị ngay */
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Placeholder cho ảnh chưa load */
.schedule-img-custom:not([src]),
.qr-image img:not([src]) {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 0.9rem;
}

.schedule-img-custom:not([src])::before {
  content: "🖼️";
  font-size: 2rem;
}

.qr-image img:not([src])::before {
  content: "📱";
  font-size: 2rem;
}

/* Tối ưu hóa gallery images */
.gallery-item img {
  transition: opacity 0.3s ease, transform 0.5s ease;
  opacity: 1; /* Đảm bảo ảnh gallery luôn hiển thị */
}

.gallery-item img[loading="lazy"] {
  opacity: 1; /* Thay đổi từ 0 thành 1 */
}

.gallery-item img[loading="lazy"].loaded {
  opacity: 1;
}

@media (max-width: 768px) {
  .gift-main {
    flex-direction: column !important;
    gap: 1.2rem;
    align-items: center;
    width: 100%;
  }
  .gift-qr-col, .gift-info-col {
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
  }
  .gift-info, .gift-message {
    max-width: 100%;
    text-align: center;
    margin: 0 auto 1rem auto;
  }
  .qr-card {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 1rem auto;
  }
  .qr-image img {
    width: 200px;
    height: 240px;
    max-width: 90vw;
  }
}

@media (max-width: 768px) {
  .time-block span:first-child {
    font-size: 2.1rem;
  }
}
@media (max-width: 480px) {
  .time-block span:first-child {
    font-size: 1.4rem;
  }
}

.hidden { display: none !important; }

/* Wedding tab nav */
.wedding-tab-nav {
  width: 100%;
  max-width: 1200px;
  margin: 40px auto 0 auto;
  display: flex;
  flex-direction: row !important;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
  margin-bottom: 2.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.wedding-tab-nav::-webkit-scrollbar, .wedding-tab-items-row::-webkit-scrollbar {
  display: none;
}

/* Tab ngang đẹp cho wedding-tab-nav */
.tab-btn {
  min-width: 120px;
  padding: 0.7rem 1.1rem;
  font-size: 1rem;
  font-family: 'Playfair Display', serif;
  border: 1.5px solid #ffb6c1;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-color);
  font-weight: 600;
  box-shadow: 0 1px 8px rgba(255,182,193,0.07);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  outline: none;
  margin: 0 0.3rem;
  letter-spacing: 0.5px;
  display: inline-block;
}
.tab-btn.active, .tab-btn:hover, .tab-btn:focus {
  background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(255,182,193,0.18);
}
@media (max-width: 600px) {
  .tab-btn {
    min-width: 80px;
    padding: 0.45rem 0.5rem;
    font-size: 0.93rem;
    margin: 0 0.15rem;
  }
}

@media (max-width: 600px) {
  .countdown-section h3 {
    font-size: 1.2rem;
  }
}

/* Wedding tab wrapper - đảm bảo background nhất quán */
.wedding-tab-wrapper {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  backdrop-filter: none !important;
}

.wedding-tab-wrapper::before,
.wedding-tab-wrapper::after {
  display: none !important;
}

