/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  font-family: 'Open Sans', sans-serif;
  color: #2c2c2c;
  background: #FFFCF7;
  line-height: 1.6;
}
h1, h2, h3 { font-family: 'Playfair Display', serif; }
a { color: #5a7d3a; text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Nav === */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,252,247,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: box-shadow 0.3s;
}
#navbar.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1.5rem;
}
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; color: #3a5a1e; }
.nav-links a {
  margin-left: 1.8rem; font-size: 0.95rem; font-weight: 600;
  color: #555; transition: color 0.2s;
}
.nav-links a:hover { color: #3a5a1e; text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #555; }

/* === Hero === */
#hero {
  position: relative; min-height: 100vh;
  background: url('hero.jpg') left bottom/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
}
.hero-content {
  position: relative; text-align: center; color: #fff;
  padding: 2rem; width: 100%;
}
.hero-content h1 {
  font-size: clamp(1.6rem, 5vw, 4rem);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.hero-date {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 600; margin-bottom: 0.3rem;
  text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}
.hero-location {
  font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem;
}
.hero-btn {
  display: inline-block; padding: 0.9rem 2.5rem;
  background: #5a7d3a; color: #fff; border-radius: 50px;
  font-weight: 600; font-size: 1.05rem;
  transition: background 0.3s, transform 0.2s;
  text-decoration: none;
}
.hero-btn:hover { background: #4a6b2e; transform: translateY(-2px); text-decoration: none; }
.rsvp-btn { font-size: 1.2rem; padding: 1rem 3rem; }

/* === Sections === */
section { padding: 5rem 1.5rem; }
section:nth-child(even) { background: #f5f0e8; }
.container { max-width: 1000px; margin: 0 auto; }
h2 {
  font-size: 2.2rem; text-align: center; margin-bottom: 0.5rem;
  color: #3a5a1e;
}
.section-intro {
  text-align: center; color: #666; max-width: 600px;
  margin: 0 auto 2.5rem; font-size: 1.05rem;
}

/* === RSVP === */
.form-wrap {
  max-width: 700px; margin: 0 auto;
  background: #fff; border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}
.form-wrap iframe { display: block; width: 100%; min-height: 900px; }

/* === Agenda Timeline === */
.timeline { display: flex; flex-direction: column; gap: 2rem; }
.day-card {
  background: #fff; border-radius: 12px;
  padding: 2rem; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border-left: 5px solid #5a7d3a;
}
.day-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.day-badge {
  background: #5a7d3a; color: #fff; padding: 0.3rem 0.8rem;
  border-radius: 6px; font-weight: 700; font-size: 0.85rem; text-transform: uppercase;
}
.day-badge.sat { background: #c0392b; }
.day-badge.sun { background: #8e44ad; }
.day-badge.mon { background: #2c3e50; }
.day-header h3 { font-size: 1.3rem; color: #2c2c2c; }
.day-card ul { list-style: none; padding-left: 0; }
.day-card li { padding: 0.4rem 0; border-bottom: 1px solid #f0ebe3; }
.day-card li:last-child { border-bottom: none; }
.time {
  display: inline-block; background: #f5f0e8; padding: 0.15rem 0.6rem;
  border-radius: 4px; font-size: 0.85rem; font-weight: 600;
  color: #5a7d3a; margin-right: 0.5rem;
}
.memorial-details {
  background: #f9f6f0; border-radius: 8px; padding: 1rem 1.5rem;
  margin: 0.8rem 0; border-left: 3px solid #8e44ad;
}
.memorial-details li { font-size: 0.95rem; border-bottom: 1px solid #ece7dd; }

/* === Photos === */
.upload-area {
  border: 3px dashed #c5b89a; border-radius: 12px;
  padding: 3rem 2rem; text-align: center;
  background: #fff; cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}
.upload-area:hover, .upload-area.dragover {
  border-color: #5a7d3a; background: #f0f7e8;
}
.upload-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.upload-link { color: #5a7d3a; font-weight: 600; cursor: pointer; text-decoration: underline; }
.upload-hint { font-size: 0.85rem; color: #999; margin-top: 0.5rem; }
.upload-progress {
  margin-top: 1rem; padding: 1rem; background: #fff;
  border-radius: 8px; text-align: center; color: #5a7d3a; font-weight: 600;
}

.gallery {
  margin-top: 2.5rem;
  columns: 3; column-gap: 1rem;
}
.gallery-img {
  width: 100%; margin-bottom: 1rem;
  border-radius: 8px; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  break-inside: avoid;
}
.gallery-img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* === Lightbox === */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; object-fit: contain; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: none; border: none;
  color: #fff; font-size: 2.5rem; cursor: pointer;
  padding: 0.5rem; opacity: 0.8; transition: opacity 0.2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 1rem; right: 1.5rem; font-size: 3rem; }
.lb-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 3.5rem; }
.lb-next { right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 3.5rem; }

/* === Details === */
.details-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; margin-top: 2rem;
}
.detail-card {
  background: #fff; border-radius: 12px; padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  text-align: center;
}
.detail-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }
.detail-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; color: #3a5a1e; }
.detail-card p { font-size: 0.95rem; color: #555; margin-bottom: 0.4rem; }
.detail-link { font-weight: 600; font-size: 0.95rem; }

/* === Footer === */
footer {
  text-align: center; padding: 2rem;
  background: #3a5a1e; color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

/* === Mobile === */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(255,252,247,0.98); padding: 1rem; border-bottom: 1px solid rgba(0,0,0,0.1); }
  .nav-links.open { display: flex; }
  .nav-links a { margin: 0.5rem 0; margin-left: 0; }
  .nav-toggle { display: block; }
  .gallery { columns: 2; }
}
@media (max-width: 480px) {
  .gallery { columns: 1; }
  section { padding: 3rem 1rem; }
}
