/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: 'Montserrat', sans-serif;
  color: #333;
  height: 100%;
  scroll-behavior: smooth;
  padding-bottom: 80px; /* prevent overlap with player bar */
}

/* Anchor offset for fixed navbar (only for anchors, keep hero full-bleed) */
section:not(#hero) {
  scroll-margin-top: 70px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

.navbar .logo {
  font-weight: 600;
  font-size: 1.2rem;
}

.navbar nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.navbar nav a:hover,
.navbar nav a:focus {
  color: #e63973;
  outline: none;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -2;
}

/* Gradient overlay on hero for better contrast (keeps video visible) */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.65));
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  /* removed global dark background so gradient handles the dimming */
}

/* Wedding Hero Styling */
.wedding-intro h1 {
  font-family: "Great Vibes", cursive;
  font-size: 5.5rem;
  text-shadow: 3px 3px 12px rgba(0,0,0,0.6);
  line-height: 1.5;
  letter-spacing: 2px;
  color: #fff5f8;
}

.wedding-intro .date {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-style: italic;
  color: #f8e1e7;
}

.save-date-btn {
  padding: 14px 32px;
  background: #e63973;
  color: white;
  border-radius: 999px;
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.save-date-btn:hover {
  background: #c42e60;
  transform: scale(1.05);
}

/* Countdown */
.countdown {
  display: flex;
  gap: 20px;
  margin-bottom: 2rem;
  justify-content: center;
}

.time-box {
  background: rgba(255,255,255,0.2);
  padding: 12px 18px;
  border-radius: 12px;
  text-align: center;
  color: #fff;
  backdrop-filter: blur(5px);
}

.time-box span {
  font-size: 2rem;
  font-weight: bold;
  display: block;
}

.time-box small {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Sections */
section {
  padding: 80px 20px;
  text-align: center;
}

.story, .details, .rsvp {
  background: #fdfdfd;
}

.story h2, .details h2, .rsvp h2 {
  font-family: "Great Vibes", cursive;
  font-size: 2.5rem;
  color: #e63973;
  margin-bottom: 20px;
}

/* Carousel Filmstrip */
.carousel-container {
  position: relative;
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-viewport {
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.6s ease;
  will-change: transform;
  padding: 20px 0;
}

.carousel-slide {
  flex: 0 0 60%;
  max-width: 700px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.5;
  transform: scale(0.85);
  transition: all 0.45s cubic-bezier(.2,.9,.2,1);
}

.carousel-slide img {
  width: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

/* prev / next */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.2rem;
  color: #e63973;
  cursor: pointer;
  padding: 10px;
  z-index: 5;
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.prev { left: 10px; }
.next { right: 10px; }

.prev:hover, .next:hover {
  background: #e63973;
  color: white;
}

.prev:focus, .next:focus {
  outline: 2px solid #e63973;
}

/* small caption */
.carousel-caption {
  margin-top: 18px;
  font-size: 1.05rem;
  color: #222; /* darker for contrast */
  opacity: 0.95;
}

/* Footer */
footer {
  padding: 30px;
  background: #333;
  color: #fff;
  text-align: center;
}

/* Player Bar */
.player-bar-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid #ccc;
  font-size: 1rem;
  z-index: 2000;
}

.player-bar-status {
  display: flex;
  gap: 4px;
}

.player-bar-status-column {
  width: 4px;
  height: 20px;
  background: #e63973;
  animation: bounce 1s infinite ease-in-out;
}

.player-bar-status-column:nth-child(2) { animation-delay: 0.2s; }
.player-bar-status-column:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 100% { height: 6px; }
  50% { height: 20px; }
}

.player-btn-list span {
  margin-left: 10px;
  cursor: pointer;
}

/* Audio Overlay */
.audio-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.audio-overlay .overlay-content {
  text-align: center;
  color: white;
}

.audio-overlay p {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.audio-overlay button {
  padding: 12px 24px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}
.audio-overlay button:hover { background: #1d4ed8; }

/* Wedding Details Grid */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
  padding: 0 20px;
}

.detail-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.detail-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.detail-card img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.detail-card p {
  padding: 20px;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #222; /* darker contrast */
}

/* Lightbox Fullscreen */
.lightbox {
  display: none;
  position: fixed;
  z-index: 5000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  animation: fadeIn 0.4s ease;
}

.lightbox img {
  max-width: 90%;
  max-height: 75%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  transform: scale(0.8);
  animation: zoomIn 0.4s ease forwards;
}

.lightbox p {
  color: #fff;
  margin-top: 15px;
  font-size: 1.2rem;
  text-align: center;
  font-style: italic;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 35px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s;
}
.lightbox .close:hover { transform: scale(1.2); }

@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
@keyframes zoomIn { from {transform: scale(0.8);} to {transform: scale(1);} }

/* RSVP Overlay */
.rsvp-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  justify-content: center; align-items: center;
  z-index: 6000;
  padding: 20px;
}

.rsvp-content {
  background: #fff;
  padding: 36px;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: left;
  position: relative;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: slideUp 0.36s ease;
}

.rsvp-content h2 {
  font-family: "Great Vibes", cursive;
  font-size: 2.2rem;
  color: #e63973;
  margin-bottom: 6px;
  text-align: center;
}

.rsvp-content p { text-align: center; margin-bottom: 18px; color: #444; }

.close-rsvp {
  position: absolute; top: 12px; right: 14px;
  font-size: 1.5rem; background: transparent; border: none; cursor: pointer;
  color: #333;
}

.rsvp-form label {
  display: block; margin: 12px 0 6px; font-weight: 600; color: #333;
}

.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
  width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 1rem; color: #222;
}

.rsvp-form textarea { resize: vertical; min-height: 90px; }

.rsvp-form button {
  margin-top: 16px; width: 100%; padding: 12px 16px;
  background: #e63973; color: white; border: none; border-radius: 8px;
  font-size: 1.05rem; cursor: pointer;
}

.rsvp-form button:hover { background: #c42e60; transform: translateY(-1px); }

/* Animations */
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .carousel-slide { flex: 0 0 80%; }
  .wedding-intro h1 { font-size: 4rem; }
}

@media (max-width: 520px) {
  .carousel-slide { flex: 0 0 95%; }
  .prev, .next { display: none; }
  .wedding-intro h1 { font-size: 2.8rem; }
  .rsvp-content { padding: 18px; margin: 0 8px; width: calc(100% - 16px); }
}

/* Thank You Popup */
.thankyou-popup {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 6000;
  animation: fadeIn 0.4s ease;
}

.thankyou-content {
  background: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  animation: scaleIn 0.4s ease;
}

.thankyou-content h2 {
  font-family: "Great Vibes", cursive;
  font-size: 2.2rem;
  color: #e63973;
  margin-bottom: 15px;
}

.thankyou-content p {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.6;
}

.close-thankyou {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 1.8rem;
  color: #555;
  cursor: pointer;
  transition: color 0.2s;
}
.close-thankyou:hover { color: #e63973; }

@keyframes scaleIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.map-section {
  padding: 3rem 1rem;
  text-align: center;
  background: #fafafa;
}
.map-section h2 {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  margin-bottom: 2rem;
}
.map-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.map-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  margin-bottom: 1rem;
}
.map-card iframe {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
@media (min-width: 768px) {
  .map-container {
    grid-template-columns: 1fr 1fr;
  }
}

.reload-map-btn {
  margin-top: 10px;
  padding: 8px 14px;
  background: #e8e8e8;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s;
}
.reload-map-btn:hover {
  background: #d6d6d6;
}

/* Falling petals effect */
.petals {
  pointer-events: none; /* so it doesn’t block clicks */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  z-index: 9999; /* petals above everything */
}

.petal {
  position: absolute;
  top: -10%;
  background: pink;
  border-radius: 50%;
  opacity: 0.8;
  width: 12px;
  height: 18px;
  transform: rotate(15deg);
  animation: fall linear forwards;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0;
  }
}

/* Continuous Fade + Scale (Breathing Effect) */
.hero-content h1,
.hero-content .date,
.hero-content .countdown,
.hero-content .save-date-btn {
  animation: fadeScaleLoop 6s ease-in-out infinite;
}

/* Keyframes */
@keyframes fadeScaleLoop {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;        /* never fully disappears */
    transform: scale(1.05); /* slight grow */
  }
}
