/* ====== Base Styles ====== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: #E8C54A;
  color: #1c1917;
}

/* ====== Animations ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatHeart {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

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

.animate-fade-in {
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
}

.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== Navbar ====== */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(255, 249, 235, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .navbar-brand {
  color: #292524;
}

#navbar.scrolled .nav-link {
  color: #57534e;
}

.navbar-brand {
  color: white;
  transition: color 0.3s;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s;
}

/* ====== Floating Hearts ====== */
.floating-heart {
  position: absolute;
  color: #F8B4B4;
  animation: floatHeart linear infinite;
  pointer-events: none;
  opacity: 0;
}

/* ====== Schedule Cards ====== */
.schedule-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.schedule-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ====== Gallery ====== */
.gallery-item {
  overflow: hidden;
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover::after {
  background: rgba(0, 0, 0, 0.2);
}

/* ====== FAQ Accordion ====== */
.faq-item {
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FFF9EB;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #292524;
  transition: background 0.3s;
}

.faq-question:hover {
  background: #FFF3D6;
}

.faq-question .faq-icon {
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 1.5rem;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 1rem 1.5rem 1.25rem;
}

/* ====== Lightbox ====== */
#lightbox {
  animation: fadeIn 0.3s ease-out;
}

/* ====== RSVP form checkboxes ====== */
input[type="checkbox"]:checked + span,
.has-\:checked\:border-gold-400 {
  border-color: #E8C54A;
}

/* ====== Responsive tweaks ====== */
@media (max-width: 768px) {
  .timeline-item {
    padding-left: 2rem;
    border-left: 2px solid #E8C54A;
    position: relative;
    margin-bottom: 2rem;
  }
  
  .timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    background: #FFF9EB;
    border: 2px solid #E8C54A;
    border-radius: 50%;
  }
}

/* ====== Custom Scrollbar ====== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #FFF9EB;
}

::-webkit-scrollbar-thumb {
  background: #C4A23A;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #A17F2A;
}

/* ====== Countdown Shimmer ====== */
#countdown span:first-child {
  background: linear-gradient(90deg, #F2D675 0%, #fff 50%, #F2D675 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Back to top button */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: #E8C54A;
  color: #1c1917;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, background-color 0.3s;
  z-index: 40;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  background: #C4A23A;
}