/* CSS Variables for Theme */
:root {
  --color-gold: #c0a080;
  --color-dark-brown: #4a3f35;
  --color-cream: #f5f3f0;
  --color-text: #6b5b4b;
  --font-heading: "Cormorant Garamond", serif;
  --font-body: "Poppins", sans-serif;
}

/* Loading Indicator for API - Enhanced */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(245, 243, 240, 0.95) 0%, rgba(192, 160, 128, 0.1) 100%);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(192, 160, 128, 0.2);
  max-width: 400px;
  width: 90%;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
}

.loading-spinner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 4px solid rgba(192, 160, 128, 0.2);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.loading-spinner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-top-color: var(--color-gold);
  border-right-color: var(--color-gold);
  border-radius: 50%;
  animation: elegantSpin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loading-hearts {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  color: var(--color-gold);
  animation: heartbeat 2s ease-in-out infinite;
}

.loading-text {
  color: var(--color-dark-brown);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.6;
}

.loading-subtitle {
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  opacity: 0.8;
  font-style: italic;
}

/* Error State Styles */
.error-container {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(231, 76, 60, 0.2);
  max-width: 450px;
  width: 90%;
}

.error-container.show {
  display: flex;
}

.error-icon {
  font-size: 3rem;
  color: #e74c3c;
  animation: shake 0.5s ease-in-out;
}

.error-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-dark-brown);
  margin: 0;
}

.error-message {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.error-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.refresh-button {
  background: linear-gradient(135deg, var(--color-gold), var(--color-dark-brown));
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.refresh-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.refresh-button:active {
  transform: translateY(0);
}

.fallback-button {
  background: transparent;
  color: var(--color-gold);
  border: 2px solid var(--color-gold);
  padding: 10px 20px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.fallback-button:hover {
  background: var(--color-gold);
  color: white;
  transform: translateY(-2px);
}

/* Enhanced Animations */
@keyframes elegantSpin {
  0% {
    transform: rotate(0deg);
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: rotate(360deg);
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.6;
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes fadeInError {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Basic Reset and Body Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-cream);
  background-image: radial-gradient(circle at 25% 25%, rgba(192, 160, 128, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(192, 160, 128, 0.1) 0%, transparent 50%),
    linear-gradient(to top, #e6e2dd 0%, #f5f3f0 100%);
  color: var(--color-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

/* Floating decorative elements */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23C0A080" fill-opacity="0.05"><circle cx="30" cy="30" r="4"/></g></svg>');
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -1;
}

/* Cover Page with Parallax Effect */
#cover {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
  background-image: url("https://picsum.photos/1280/720?random=5");
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 100;
  overflow: hidden;
}

#cover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

/* Animated decorative elements on cover */
#cover::after {
  content: "❤️";
  position: absolute;
  font-size: 2rem;
  opacity: 0.3;
  animation: float 6s ease-in-out infinite;
  top: 20%;
  left: 80%;
}

.floating-hearts {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.heart {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.4;
  animation: floatUp 15s infinite linear;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

#cover > * {
  position: relative;
  z-index: 2;
  animation: fadeIn 2s ease-in-out;
}

#cover h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  margin: 1rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#cover p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

#guest-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-gold);
  padding-bottom: 0.5rem;
}

.open-button {
  background-color: var(--color-gold);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  font-family: var(--font-body);
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-top: 2rem;
}

.open-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Main Invitation Content */
#main-invitation {
  display: none; /* Initially hidden */
  animation: fadeIn 1.5s ease;
  padding-bottom: 100px; /* Ensure content doesn't get hidden behind navbar */
}

/* Save the Date Section */
.save-date-section {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
  background-image: url("https://picsum.photos/1280/720?random=8");
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
  margin-bottom: 0;
}

.save-date-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(192, 160, 128, 0.7), rgba(74, 63, 53, 0.7));
}

.save-date-content {
  position: relative;
  z-index: 2;
  animation: fadeIn 2s ease-in-out;
}

.save-date-content > * {
  margin-bottom: 1rem;
}

.save-date-label {
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.9;
  font-size: 1rem;
  margin-top: 2rem;
}

.save-date-section .couple-names {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  margin: 1.5rem 0;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  background: linear-gradient(45deg, #ffffff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wedding-date {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.wedding-venue {
  font-size: 1.3rem;
  font-weight: 400;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.save-date-button {
  background: linear-gradient(135deg, var(--color-gold), var(--color-dark-brown));
  color: white;
  border: none;
  padding: 15px 35px;
  font-size: 1.1rem;
  font-family: var(--font-body);
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10rem;
}

.save-date-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.save-date-button i {
  margin-right: 8px;
}

/* Home Couple Photo Styles */
.home-couple-photo {
  margin: 2.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-container {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.couple-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(192, 160, 128, 0.5),
    inset 0 0 20px rgba(192, 160, 128, 0.1);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.couple-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 5px rgba(192, 160, 128, 0.7),
    inset 0 0 30px rgba(192, 160, 128, 0.2);
}

.photo-frame {
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: linear-gradient(
    45deg,
    rgba(192, 160, 128, 0.1) 0%,
    transparent 25%,
    rgba(192, 160, 128, 0.1) 50%,
    transparent 75%,
    rgba(192, 160, 128, 0.1) 100%
  );
  animation: photoRotate 15s linear infinite;
  z-index: 1;
}

@keyframes photoRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.photo-hearts {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 3;
}

.heart-icon {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.7;
  animation: floatingHearts 6s ease-in-out infinite;
}

.heart-icon:nth-child(1) {
  top: 10%;
  right: 20%;
  animation-delay: 0s;
}

.heart-icon:nth-child(2) {
  bottom: 15%;
  left: 10%;
  animation-delay: 2s;
}

.heart-icon:nth-child(3) {
  top: 60%;
  right: 5%;
  animation-delay: 4s;
}

@keyframes floatingHearts {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-10px) scale(1.2);
    opacity: 1;
  }
}

.section {
  padding: 100px 20px;
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* Decorative section dividers */
.section::before {
  content: "✦";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--color-gold);
  opacity: 0.6;
}

.section:nth-child(even) {
  background: radial-gradient(ellipse at top, rgba(192, 160, 128, 0.05) 0%, transparent 70%), rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  margin: 2rem auto;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  color: var(--color-dark-brown);
  margin-bottom: 1rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-dark-brown), var(--color-gold));
  border-radius: 2px;
}

.section-title::before {
  content: "♦";
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-gold);
  font-size: 1.5rem;
  opacity: 0.7;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-dark-brown), var(--color-gold));
  border-radius: 2px;
}

.section-title::before {
  content: "♦";
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-gold);
  font-size: 1.5rem;
  opacity: 0.7;
}

.section-subtitle {
  font-style: italic;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Ayat & Pembukaan */
#pembukaan .quote {
  font-style: italic;
  padding: 1.5rem;
  border-left: 4px solid var(--color-gold);
  margin-bottom: 1rem;
}

/* Mempelai Section */
.couple-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
}

.couple-container::before {
  content: "";
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.couple-container::after {
  content: "";
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.couple-profile {
  width: 300px;
  position: relative;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(192, 160, 128, 0.2);
}

.couple-profile::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(45deg, var(--color-gold), transparent, var(--color-gold));
  border-radius: 25px;
  z-index: -1;
  opacity: 0.3;
}

.couple-profile img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid white;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 0 10px rgba(192, 160, 128, 0.1);
  transition: transform 0.3s ease;
}

.couple-profile:hover img {
  transform: scale(1.05);
}

.couple-name {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-dark-brown);
  position: relative;
}

.couple-name::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--color-gold);
}

.ampersand {
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--color-gold);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.ampersand::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  opacity: 0.3;
  z-index: -1;
}

/* Acara Section */
#acara {
  background-color: rgba(255, 255, 255, 0.5);
}
.event-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.event-card {
  background: var(--color-cream);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(192, 160, 128, 0.1);
  width: 350px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-dark-brown));
}

.event-card::after {
  content: "♦";
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--color-gold);
  font-size: 1.5rem;
  opacity: 0.3;
}

.event-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(192, 160, 128, 0.2);
}
.event-card h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-gold);
  margin-bottom: 1.5rem;
}
.event-card p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.event-card i {
  color: var(--color-gold);
  margin-right: 12px;
  width: 20px;
}

.primary-button {
  display: inline-block;
  background-color: var(--color-dark-brown);
  color: white;
  text-decoration: none;
  padding: 12px 30px;
  border-radius: 50px;
  margin-top: 1rem;
  transition: all 0.3s ease;
  border: none;
  font-family: var(--font-body);
}
.primary-button:hover {
  background-color: var(--color-gold);
  transform: scale(1.05);
}

/* Countdown Timer */
#countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 3rem;
  position: relative;
}

#countdown::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.time-box {
  background: white;
  padding: 20px 15px;
  border-radius: 15px;
  min-width: 80px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  border: 2px solid rgba(192, 160, 128, 0.2);
  transition: transform 0.3s ease;
}

.time-box:hover {
  transform: translateY(-5px);
}

.time-box::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(45deg, var(--color-gold), transparent, var(--color-dark-brown));
  border-radius: 18px;
  z-index: -1;
  opacity: 0.3;
}
.time-box span {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-dark-brown);
}
.time-box small {
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* Story Section with Images - Enhanced Responsive Design */
.story-container {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  margin-top: 4rem;
  position: relative;
  min-height: 300px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.story-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--color-gold) 10%,
    var(--color-gold) 90%,
    transparent 100%
  );
  z-index: 1;
}

/* Ensure story items are visible even during loading */
.story-item {
  display: flex;
  gap: 3rem;
  align-items: center;
  position: relative;
  padding: 3rem 0;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
  min-height: 400px;
}

/* Animation enhancement - add subtle entrance effect */
.story-item:not(.is-visible) {
  opacity: 0.7;
  transform: translateY(20px);
}

.story-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.story-item:nth-child(even) {
  flex-direction: row-reverse;
}

/* Timeline dots */
.story-item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: var(--color-gold);
  border: 5px solid var(--color-cream);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--color-gold);
}

.story-image {
  flex: 0 0 400px;
  position: relative;
}

.story-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  border: 3px solid rgba(255, 255, 255, 0.8);
}

.story-image img:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 10px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--color-gold);
}

/* Decorative frame for images */
.story-image::before {
  content: "";
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  border: 2px solid rgba(192, 160, 128, 0.3);
  border-radius: 25px;
  z-index: -1;
  transition: all 0.4s ease;
}

.story-image:hover::before {
  border-color: rgba(192, 160, 128, 0.6);
  transform: rotate(-2deg);
}

.story-text {
  flex: 1;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(192, 160, 128, 0.2);
  position: relative;
  text-align: left;
  max-width: 500px;
}

.story-item:nth-child(even) .story-text {
  text-align: right;
}

/* Speech bubble effect */
.story-text::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border: 20px solid transparent;
  transform: translateY(-50%);
}

.story-item:nth-child(odd) .story-text::before {
  left: -20px;
  border-right-color: rgba(255, 255, 255, 0.9);
}

.story-item:nth-child(even) .story-text::before {
  right: -20px;
  border-left-color: rgba(255, 255, 255, 0.9);
}

.story-text h4 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--color-dark-brown);
  margin-bottom: 0.8rem;
  position: relative;
}

.story-text h4::after {
  content: "";
  position: absolute;
  bottom: -8px;
  width: 60px;
  height: 3px;
  background: var(--color-gold);
}

.story-item:nth-child(odd) .story-text h4::after {
  left: 0;
}

.story-item:nth-child(even) .story-text h4::after {
  right: 0;
}

.story-text small {
  color: var(--color-gold);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1.2rem;
}

.story-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0;
  color: var(--color-text);
  font-style: italic;
}

.story-item:nth-child(odd) .story-text::before {
  left: -15px;
  border-right-color: rgba(255, 255, 255, 0.8);
}

.story-item:nth-child(even) .story-text::before {
  right: -15px;
  border-left-color: rgba(255, 255, 255, 0.8);
}

.story-text h4 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-dark-brown);
  margin-bottom: 0.5rem;
  position: relative;
}

.story-text h4::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 50px;
  height: 2px;
  background: var(--color-gold);
}

.story-item:nth-child(odd) .story-text h4::after {
  left: 0;
}

.story-item:nth-child(even) .story-text h4::after {
  right: 0;
}

.story-text small {
  color: var(--color-gold);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}

.story-text p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  color: var(--color-text);
  font-style: italic;
}

/* Gallery */
.gallery-grid {
  columns: 4;
  column-gap: 25px;
  position: relative;
  margin-top: 4rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-grid::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.gallery-grid img {
  width: 100%;
  margin-bottom: 25px;
  border-radius: 15px;
  transition: all 0.4s ease;
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(192, 160, 128, 0.2);
  cursor: pointer;
}

.gallery-grid img:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 0 0 4px var(--color-gold);
  border-color: var(--color-gold);
  z-index: 10;
  position: relative;
}

/* Form and wishes layout */
.form-and-wishes {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  text-align: left;
  position: relative;
  align-items: stretch;
  min-height: 500px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-and-wishes::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.form-container {
  flex: 1;
  padding: 2rem 2.5rem 2.5rem 2.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(192, 160, 128, 0.2);
  backdrop-filter: blur(10px);
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-container::before {
  content: "✉️";
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  opacity: 0.3;
}
.form-group {
  position: relative;
  padding-top: 1.5rem;
}

.form-group:first-child {
  padding-top: 2rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid #ccc;
  font-size: 1rem;
  background: transparent;
  outline: none;
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}
FRA .form-group label {
  position: absolute;
  top: 15px;
  left: 0;
  transition: all 0.2s ease-out;
  pointer-events: none;
}
.form-group input[type="text"]:focus + label,
.form-group input[type="text"]:valid + label,
.form-group input[type="text"].valid + label,
.form-group input[type="email"]:focus + label,
.form-group input[type="email"]:valid + label,
.form-group input[type="email"].valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label,
.form-group textarea.valid + label {
  top: -10px;
  font-size: 0.8rem;
  color: var(--color-gold);
}

/* Wishes/Comments Pagination */
.wishes-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(192, 160, 128, 0.2);
  margin-top: auto;
  flex-shrink: 0;
}

.pagination-btn {
  background: white;
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover {
  background: var(--color-gold);
  color: white;
  transform: translateY(-2px);
}

.pagination-btn.active {
  background: var(--color-dark-brown);
  border-color: var(--color-dark-brown);
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: #f5f5f5;
  color: #ccc;
  border-color: #e0e0e0;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5 !important;
  color: #ccc !important;
  border-color: #e0e0e0 !important;
}

.pagination-btn.disabled:hover {
  transform: none !important;
}

/* Form validation styles */
.form-group.success input[type="text"],
.form-group.success input[type="email"],
.form-group.success textarea {
  border-bottom-color: var(--color-gold);
}

.form-group.error input[type="text"],
.form-group.error input[type="email"],
.form-group.error textarea {
  border-bottom-color: #e74c3c;
}

.form-feedback {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-feedback.show {
  opacity: 1;
}

.form-feedback.success {
  color: var(--color-gold);
}

.form-feedback.error {
  color: #e74c3c;
}

/* Simple attendance group (new) */
.attendance-group-simple {
  margin-top: 1rem;
  margin-bottom: 2rem;
}
.attendance-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.6rem;
}
.attendance-simple-options {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.attendance-simple-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
  color: var(--color-text);
  position: relative;
}
/* .attendance-simple-options input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-gold);
  cursor: pointer;
}
.attendance-simple-options input[type="radio"]:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: 50%;
}
.attendance-simple-options input[type="radio"]:checked + span {
  font-weight: 600;
  color: var(--color-gold);
} */
@media (max-width: 600px) {
  .attendance-simple-options {
    gap: 0.9rem;
  }
  .attendance-simple-options label {
    font-size: 0.85rem;
  }
}

/* Select dropdown styling for attendance - removed as per change request */

/* Input hint styling */
.input-hint {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.3rem;
  font-style: italic;
  opacity: 0.8;
}

/* Improve form layout and attendance options on mobile */
@media (max-width: 768px) {
  .form-and-wishes {
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
  }

  .form-container,
  .wishes-container {
    padding: 1.5rem 1.5rem 2rem 1.5rem;
  }

  .form-group {
    padding-top: 1rem;
  }

  .form-group:first-child {
    padding-top: 1.5rem;
  }

  .form-group select {
    padding: 12px 2.5rem 12px 0;
    font-size: 0.95rem;
  }

  /* .radio-custom {
    width: 16px;
    height: 16px;
  } */

  .attendance-label {
    font-size: 0.9rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
  }

  .input-hint {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .form-container,
  .wishes-container {
    padding: 1rem 1rem 1.5rem 1rem;
  }

  .form-group {
    padding-top: 0.8rem;
  }

  .form-group:first-child {
    padding-top: 1.2rem;
  }

  .form-group select {
    padding: 10px 2rem 10px 0;
    font-size: 0.9rem;
  }
} /* Success Toast Styling */
.success-toast {
  font-family: "Poppins", sans-serif;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-message {
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 500;
}

/* Loading state for submit button */
.primary-button.loading {
  position: relative;
  color: transparent;
}

.primary-button.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.pagination-info {
  color: var(--color-text);
  font-size: 0.85rem;
  margin: 0 1rem;
  text-align: center;
  line-height: 1.4;
}

.pagination-info small {
  opacity: 0.8;
  font-size: 0.75rem;
}

.wishes-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 400px;
  padding-right: 10px;
  margin-bottom: 1rem;
  transition: opacity 0.3s ease;
}

/* Custom scrollbar for wishes list */
.wishes-list::-webkit-scrollbar {
  width: 6px;
}

.wishes-list::-webkit-scrollbar-track {
  background: rgba(192, 160, 128, 0.1);
  border-radius: 3px;
}

.wishes-list::-webkit-scrollbar-thumb {
  background: rgba(192, 160, 128, 0.5);
  border-radius: 3px;
}

.wishes-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

.wishes-container {
  flex: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(192, 160, 128, 0.2);
  backdrop-filter: blur(10px);
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  overflow: hidden;
}

.wishes-container::before {
  content: "💬";
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  opacity: 0.3;
}

.wish-item {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--color-gold);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInWish 0.5s ease forwards;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.wish-item:nth-child(odd) {
  animation-delay: 0.1s;
}

.wish-item:nth-child(even) {
  animation-delay: 0.2s;
}

@keyframes fadeInWish {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wish-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.wish-item strong {
  color: var(--color-dark-brown);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  word-break: break-word;
}

.wish-item p {
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0.5rem 0;
  word-break: break-word;
  white-space: pre-wrap;
}

.wish-item small {
  display: block;
  margin-top: 0.5rem;
  opacity: 0.7;
  font-size: 0.8rem;
}

/* Tanda Kasih */
#hadiah {
  background-color: rgba(255, 255, 255, 0.5);
}
.gift-list {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.gift-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  padding: 2rem 2.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(192, 160, 128, 0.2);
  width: 320px;
  position: relative;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gift-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-dark-brown));
  border-radius: 20px 20px 0 0;
}

.gift-card::after {
  content: "💎";
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.2rem;
  opacity: 0.3;
}

.gift-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(192, 160, 128, 0.3);
}
.gift-card h4 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-dark-brown);
  margin-bottom: 1rem;
}
.gift-card img {
  height: 25px;
  margin-bottom: 1rem;
}
.gift-card button {
  background: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 10px;
}
.gift-card button:hover {
  background: var(--color-gold);
  color: white;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: 0 -2px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 0.8rem 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  border-top: 1px solid rgba(192, 160, 128, 0.2);
}

.navbar.visible {
  transform: translateY(0);
}

.navbar ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.navbar a {
  text-decoration: none;
  color: var(--color-dark-brown);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.8rem 0.5rem;
  border-radius: 15px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 60px;
}

.navbar a i {
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.navbar a:hover {
  background: rgba(192, 160, 128, 0.1);
  color: var(--color-gold);
  transform: translateY(-3px);
}

.navbar a:hover i {
  transform: scale(1.2);
}

.navbar a.active {
  background: linear-gradient(135deg, var(--color-gold), var(--color-dark-brown));
  color: white;
  box-shadow: 0 4px 15px rgba(192, 160, 128, 0.3);
}

.navbar a.active i {
  transform: scale(1.1);
}

/* Music Player */
.music-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--color-gold), var(--color-dark-brown));
  border-radius: 50px;
  padding: 15px 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.music-player:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.music-player .play-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.music-player .play-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.music-info {
  color: white;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.music-title {
  font-weight: 600;
}

.music-artist {
  opacity: 0.8;
  font-size: 0.75rem;
}

.volume-control {
  display: none;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
}

.volume-control.show {
  display: flex;
}

.volume-slider {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.music-cover-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

/* Music player animations */
@keyframes musicNote {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-5px) rotate(-5deg);
  }
  75% {
    transform: translateY(-3px) rotate(5deg);
  }
}

.music-player.playing .music-info {
  animation: musicNote 2s ease-in-out infinite;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: 200px 0;
  }
}

/* Enhanced Scroll Animations with Repeatable Effects */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.animate-on-scroll.slide-up {
  transform: translateY(60px);
}

.animate-on-scroll.slide-left {
  transform: translateX(-60px);
}

.animate-on-scroll.slide-right {
  transform: translateX(60px);
}

.animate-on-scroll.zoom-in {
  transform: scale(0.8);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger animation delays for multiple elements */
.animate-on-scroll:nth-child(1) {
  transition-delay: 0ms;
}
.animate-on-scroll:nth-child(2) {
  transition-delay: 100ms;
}
.animate-on-scroll:nth-child(3) {
  transition-delay: 200ms;
}
.animate-on-scroll:nth-child(4) {
  transition-delay: 300ms;
}
.animate-on-scroll:nth-child(5) {
  transition-delay: 400ms;
}
.animate-on-scroll:nth-child(6) {
  transition-delay: 500ms;
}

/* Special animations for specific sections */
.gallery-grid .animate-on-scroll.is-visible {
  animation: zoomInBounce 0.6s ease-out forwards;
}

.story-item .animate-on-scroll.is-visible {
  animation: slideInWithBounce 0.8s ease-out forwards;
}

.event-card.animate-on-scroll.is-visible {
  animation: cardReveal 0.7s ease-out forwards;
}

@keyframes zoomInBounce {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInWithBounce {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardReveal {
  0% {
    opacity: 0;
    transform: translateY(30px) rotateX(15deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* Decorative elements */
.ornament {
  position: absolute;
  color: var(--color-gold);
  opacity: 0.2;
  font-size: 1.5rem;
  animation: sparkle 3s ease-in-out infinite;
}

.ornament-1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}
.ornament-2 {
  top: 20%;
  right: 15%;
  animation-delay: 1s;
}
.ornament-3 {
  bottom: 30%;
  left: 5%;
  animation-delay: 2s;
}
.ornament-4 {
  bottom: 10%;
  right: 10%;
  animation-delay: 0.5s;
}

/* Responsive - Tablet and Medium Screens */
@media (max-width: 1024px) {
  .story-container {
    gap: 4rem;
  }

  .story-item {
    gap: 2rem;
    padding: 2.5rem 0;
  }

  .story-image {
    flex: 0 0 320px;
  }

  .story-image img {
    height: 300px;
  }

  .story-text {
    padding: 1.8rem;
  }

  .story-text h4 {
    font-size: 2rem;
  }

  .gallery-grid {
    columns: 3;
    column-gap: 20px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .section {
    padding: 80px 15px 120px;
  } /* Extra bottom padding for bottom navbar */
  .section-title {
    font-size: 2.5rem;
  }
  .couple-container {
    flex-direction: column;
  }

  /* Enhanced Story Section Mobile Styles */
  .story-container::before {
    left: 30px;
    transform: translateX(0);
  }

  .story-item {
    flex-direction: column !important;
    gap: 1.5rem;
    padding: 2rem 0 2rem 3rem;
    text-align: center;
  }

  .story-item::before {
    left: 30px;
    transform: translate(-50%, -50%);
  }

  .story-image {
    flex: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .story-image img {
    height: 280px;
  }

  .story-text {
    text-align: center !important;
    margin: 0 auto;
    max-width: 100%;
  }

  .story-text::before {
    display: none;
  }

  .story-text h4 {
    font-size: 1.6rem;
  }

  .story-text h4::after {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
  }

  .story-item,
  .story-item:nth-child(even) {
    flex-direction: column;
  }
  .story-text,
  .story-item:nth-child(even) .story-text {
    text-align: center;
  }
  .gallery-grid {
    columns: 2;
  }
  .form-and-wishes {
    flex-direction: column;
    min-height: auto;
  }

  .wishes-container {
    margin-top: 2rem;
    min-height: 400px;
  }

  .wishes-list {
    max-height: 300px;
  }

  .navbar ul {
    padding: 0 0.5rem;
  }

  .navbar a {
    font-size: 0.7rem;
    padding: 0.6rem 0.3rem;
    min-width: 50px;
  }

  .navbar a i {
    font-size: 1.1rem;
  }

  .music-player {
    bottom: 80px; /* Move above navbar */
    right: 15px;
    padding: 12px 15px;
  }

  .music-info {
    display: none;
  }

  .pagination-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .pagination-info {
    font-size: 0.75rem;
    margin: 0 0.5rem;
  }

  /* Save the Date mobile styles */
  .save-date-section .couple-names {
    font-size: clamp(3rem, 15vw, 5rem);
    margin: 1rem 0;
  }

  .wedding-date {
    font-size: 2rem;
  }

  .wedding-venue {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  .save-date-button {
    padding: 12px 25px;
    font-size: 1rem;
  }

  /* Home couple photo mobile styles */
  .home-couple-photo {
    margin: 2rem 0;
  }

  .photo-container {
    width: 150px;
    height: 150px;
  }

  .couple-photo {
    width: 130px;
    height: 130px;
    border-width: 4px;
  }

  .photo-frame {
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
  }

  .heart-icon {
    font-size: 1rem;
  }
}
@media (max-width: 480px) {
  .gallery-grid {
    columns: 1;
  }

  .navbar a {
    font-size: 0.65rem;
    padding: 0.5rem 0.2rem;
    min-width: 45px;
  }

  .navbar a i {
    font-size: 1rem;
  }

  .form-and-wishes {
    margin-bottom: 2rem;
  }

  .wishes-container {
    padding: 1.5rem;
    min-height: 350px;
  }

  .wish-item {
    padding: 1rem;
    margin-bottom: 0.8rem;
  }

  .wishes-list {
    max-height: 250px;
    padding-right: 5px;
  }

  /* Save the Date small mobile styles */
  .save-date-section .couple-names {
    font-size: clamp(2.5rem, 18vw, 4rem);
  }

  .wedding-date {
    font-size: 1.8rem;
  }

  .save-date-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  /* Home couple photo small mobile styles */
  .home-couple-photo {
    margin: 1.5rem 0;
  }

  .photo-container {
    width: 120px;
    height: 120px;
  }

  .couple-photo {
    width: 100px;
    height: 100px;
    border-width: 3px;
  }

  .photo-frame {
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
  }

  .heart-icon {
    font-size: 0.9rem;
  }
}

/* Comments Loading States */
.comments-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.loading-spinner-small {
  margin-bottom: 1rem;
}

.spinner-heart {
  font-size: 2rem;
  animation: heartbeat 1.5s ease-in-out infinite;
}

.comments-loading p {
  color: var(--color-text);
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0;
}

.comments-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.comments-error .error-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.comments-error p {
  color: var(--color-text);
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0 0 1rem 0;
}

.retry-btn {
  background: var(--color-gold);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background: var(--color-secondary);
  transform: translateY(-1px);
}

/* Enhanced Wish Display */
.wish-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.wish-date {
  font-size: 0.75rem;
  color: var(--color-text);
  opacity: 0.6;
  font-weight: normal;
  flex-shrink: 0;
  margin-left: 1rem;
}

.wish-text {
  margin: 0.5rem 0;
  line-height: 1.4;
  color: var(--color-text);
}

.wish-status {
  display: block;
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  .wish-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .wish-date {
    margin-left: 0;
    align-self: flex-start;
  }
}

/* Bank Account Icon Styling */
.bank-account {
  text-align: center;
  padding: 1rem 0;
}

.bank-account i {
  display: block;
  margin: 0 auto 0.5rem auto;
}

.bank-account p {
  margin: 0.5rem 0;
}

.bank-account strong {
  font-size: 1.1rem;
  color: var(--color-dark-brown);
  font-weight: 600;
}

/* Footer Styling */
footer {
  text-align: center;
  padding: 4rem 2rem 6rem 2rem; /* Increased bottom padding to avoid navbar overlap */
  background: linear-gradient(135deg, rgba(245, 243, 240, 0.8) 0%, rgba(192, 160, 128, 0.1) 100%);
  margin-top: 3rem;
  border-top: 1px solid rgba(192, 160, 128, 0.2);
}

footer .closing-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text);
  max-width: 600px;
  margin: 0 auto 2rem auto;
  font-style: italic;
}

footer h3 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-dark-brown);
  margin: 1rem 0;
  font-weight: 700;
}

footer p:last-child {
  color: var(--color-gold);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 1px;
  margin: 0;
}

@media (max-width: 768px) {
  footer {
    padding: 3rem 1.5rem 5rem 1.5rem; /* Increased bottom padding for mobile navbar */
  }

  footer .closing-text {
    font-size: 1rem;
  }

  footer h3 {
    font-size: 2rem;
  }

  footer p:last-child {
    font-size: 1rem;
  }
}

/* Invalid Guest Page Styling */
.invalid-guest-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(245, 243, 240, 0.95) 0%, rgba(192, 160, 128, 0.1) 100%);
  backdrop-filter: blur(10px);
  z-index: 9998;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  overflow-y: auto;
}

.invalid-guest-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 3rem 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(192, 160, 128, 0.3);
  animation: invalidGuestFadeIn 0.5s ease-out;
  overflow: hidden;
  position: relative;
  margin-top: 20rem;
}

/* Add a subtle gradient overlay to enhance the rounded corner visibility */
.invalid-guest-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(192, 160, 128, 0.05) 0%, rgba(245, 243, 240, 0.1) 100%);
  border-radius: 18px;
  pointer-events: none;
  z-index: -1;
}

.invalid-guest-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.invalid-guest-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-dark-brown);
  margin-bottom: 1rem;
  font-weight: 700;
}

.invalid-guest-message {
  font-size: 1.1rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.invalid-guest-help {
  text-align: left;
  background: rgba(192, 160, 128, 0.15);
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--color-gold);
  border: 1px solid rgba(192, 160, 128, 0.2);
  box-shadow: 0 4px 12px rgba(192, 160, 128, 0.1);
}

.invalid-guest-help h4 {
  font-family: var(--font-heading);
  color: var(--color-dark-brown);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.invalid-guest-help ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.invalid-guest-help li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  line-height: 1.5;
}

.invalid-guest-help li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-weight: bold;
}

.invalid-guest-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.contact-host-btn,
.retry-guest-btn {
  background: var(--color-gold);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  min-width: 150px;
  justify-content: center;
}

.contact-host-btn:hover,
.retry-guest-btn:hover {
  background: var(--color-dark-brown);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(192, 160, 128, 0.4);
}

.contact-host-btn {
  background: #25d366; /* WhatsApp green */
}

.contact-host-btn:hover {
  background: #128c7e;
}

.invalid-guest-info {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(192, 160, 128, 0.2);
}

.invalid-guest-info small {
  color: var(--color-text);
  opacity: 0.8;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.invalid-guest-info i {
  color: var(--color-gold);
}

@keyframes invalidGuestFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 768px) {
  .invalid-guest-content {
    padding: 2rem 1.5rem;
    margin: 1rem;
    border-radius: 16px;
    border: 2px solid rgba(192, 160, 128, 0.4);
    margin-top: 10rem;
  }

  .invalid-guest-title {
    font-size: 2rem;
  }

  .invalid-guest-message {
    font-size: 1rem;
  }

  .invalid-guest-actions {
    flex-direction: column;
    align-items: center;
  }

  .contact-host-btn,
  .retry-guest-btn {
    width: 100%;
    max-width: 250px;
  }

  .invalid-guest-help {
    padding: 1rem;
    border-radius: 12px;
  }

  .invalid-guest-help h4 {
    font-size: 1.1rem;
  }
}

/* Error Dialog Styling */
.error-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  animation: errorDialogFadeIn 0.3s ease-out;
}

.error-dialog {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(192, 160, 128, 0.3);
  animation: errorDialogSlideUp 0.3s ease-out;
}

.error-dialog-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.error-dialog-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-dark-brown);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.error-dialog-message {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.error-dialog-actions {
  display: flex;
  justify-content: center;
}

.error-dialog-btn {
  background: var(--color-gold);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.error-dialog-btn:hover {
  background: var(--color-dark-brown);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(192, 160, 128, 0.4);
}

@keyframes errorDialogFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes errorDialogSlideUp {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 768px) {
  .error-dialog {
    padding: 1.5rem;
    margin: 1rem;
  }

  .error-dialog-title {
    font-size: 1.3rem;
  }

  .error-dialog-message {
    font-size: 0.9rem;
  }
}
