/* =========================================
   Peggy's 80th Birthday — Main Stylesheet
   ========================================= */

:root {
  --rose-gold: #c9927a;
  --gold: #d4a843;
  --deep-pink: #c0397a;
  --blush: #f7e8ef;
  --cream: #fdf6ec;
  --charcoal: #2d2d2d;
  --soft-shadow: 0 4px 20px rgba(192, 57, 122, 0.12);
  --card-radius: 16px;
}

/* ── Base ── */
body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: var(--cream);
  color: var(--charcoal);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--deep-pink); text-decoration: none; }
a:hover { color: var(--rose-gold); text-decoration: underline; }

/* ── Navbar ── */
.navbar-birthday {
  background: linear-gradient(135deg, #1a0010 0%, #3d0028 50%, #1a0010 100%);
  border-bottom: 3px solid var(--gold);
  padding: 0.75rem 0;
}

.navbar-birthday .navbar-brand {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--gold) !important;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(212,168,67,0.5);
}

.navbar-birthday .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem !important;
  border-radius: 20px;
  transition: all 0.2s;
}

.navbar-birthday .nav-link:hover,
.navbar-birthday .nav-link.active {
  color: var(--gold) !important;
  background: rgba(212,168,67,0.15);
}

.navbar-birthday .navbar-toggler {
  border-color: var(--gold);
}

/* ── Hero / Collage Section ── */
.hero-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collage-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  z-index: 0;
}

.collage-grid .collage-item {
  overflow: hidden;
  background: linear-gradient(135deg, #3d0028, #c9927a);
}

.collage-grid .collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.5s;
}

.collage-grid .collage-item:hover img {
  opacity: 0.8;
}

.collage-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 0, 16, 0.55) 0%,
    rgba(60, 0, 40, 0.45) 40%,
    rgba(26, 0, 16, 0.65) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  width: 100%;
  max-width: 700px;
}

.birthday-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--gold);
  text-shadow: 0 2px 20px rgba(0,0,0,0.6), 0 0 40px rgba(212,168,67,0.3);
  line-height: 1.1;
  margin-bottom: 0.25rem;
  letter-spacing: 2px;
}

.birthday-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-style: italic;
}

.rsvp-card {
  background: rgba(253, 246, 236, 0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--card-radius);
  padding: 2rem 2.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  border: 2px solid var(--gold);
  max-width: 420px;
  margin: 0 auto;
}

.rsvp-card h2 {
  color: var(--deep-pink);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.rsvp-card p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.btn-rsvp {
  background: linear-gradient(135deg, var(--deep-pink), var(--rose-gold));
  border: none;
  color: white;
  padding: 0.65rem 2rem;
  border-radius: 30px;
  font-size: 1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(192,57,122,0.35);
  transition: all 0.3s;
  width: 100%;
}

.btn-rsvp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192,57,122,0.45);
  color: white;
}

/* ── Party Count-up Banner ── */
.birthday-stats {
  background: linear-gradient(90deg, #3d0028, var(--deep-pink), #3d0028);
  padding: 1rem 0;
  text-align: center;
  color: white;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.birthday-stats .stat-number {
  color: var(--gold);
  font-size: 1.8rem;
  font-weight: bold;
}

/* ── Section Headings ── */
.section-heading {
  text-align: center;
  padding: 3rem 0 1.5rem;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--deep-pink);
  position: relative;
  display: inline-block;
}

.section-heading h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

.section-heading p {
  color: #888;
  font-style: italic;
  margin-top: 1rem;
}

/* ── RSVP Family Page ── */
.family-hero {
  background: linear-gradient(135deg, #3d0028, var(--deep-pink));
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.family-hero h1 { color: var(--gold); }

.guest-card {
  background: white;
  border: 2px solid transparent;
  border-radius: var(--card-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.guest-card.attending {
  border-color: var(--deep-pink);
  background: var(--blush);
  box-shadow: var(--soft-shadow);
}

.guest-name {
  font-size: 1.2rem;
  font-weight: bold;
  flex: 1;
}

.guest-check {
  width: 28px;
  height: 28px;
  accent-color: var(--deep-pink);
  cursor: pointer;
}

/* Custom high-contrast RSVP checkbox */
.guest-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  border: 3px solid #888;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  vertical-align: middle;
}

.guest-toggle:checked {
  background: var(--deep-pink);
  border-color: var(--deep-pink);
}

.guest-toggle:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 7px;
  width: 8px;
  height: 14px;
  border: 3px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.guest-toggle:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.25);
}

.guest-toggle:hover:not(:checked) {
  border-color: var(--deep-pink);
  background: var(--blush);
}

/* ── Peggy's Wall ── */
.wall-hero {
  background: linear-gradient(135deg, #0a0020, #2a0040, #0a0020);
  padding: 4rem 0;
  text-align: center;
  color: white;
}

.wall-hero h1 {
  color: var(--gold);
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.canvas-container {
  border: 3px solid var(--deep-pink);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: white;
  box-shadow: var(--soft-shadow);
  cursor: crosshair;
}

#drawing-canvas {
  display: block;
  width: 100%;
  touch-action: none;
}

.canvas-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--blush);
  border: 2px solid var(--deep-pink);
  border-top: none;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}

.color-swatch.active,
.color-swatch:hover {
  transform: scale(1.2);
  border-color: var(--charcoal);
}

.brush-size {
  accent-color: var(--deep-pink);
}

/* ── Message Cards (Peggy's Wall) ── */
.message-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border-left: 4px solid var(--deep-pink);
  transition: transform 0.2s;
}

.message-card:hover { transform: translateY(-3px); }

.message-card.sketch-card { border-left-color: var(--gold); }

.message-author {
  font-weight: bold;
  color: var(--deep-pink);
  font-size: 1rem;
}

.message-date {
  font-size: 0.8rem;
  color: #aaa;
}

/* ── Memories Page ── */
.memories-hero {
  background: linear-gradient(135deg, #002a1a, #0a5c3a, #002a1a);
  padding: 4rem 0;
  text-align: center;
  color: white;
}

.memories-hero h1 { color: #7dffd0; }

.memory-card {
  background: white;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s;
  height: 100%;
}

.memory-card:hover { transform: translateY(-4px); }

.memory-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

.memory-card .card-body { padding: 1.25rem; }

.memory-author {
  color: #0a5c3a;
  font-weight: bold;
}

/* ── Photo Album ── */
.album-hero {
  background: linear-gradient(135deg, #001a30, #003d6e, #001a30);
  padding: 4rem 0;
  text-align: center;
  color: white;
}

.album-hero h1 { color: #7dd4ff; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  padding: 2rem 0;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  cursor: pointer;
  aspect-ratio: 4/3;
  background: #eee;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.photo-item:hover img { transform: scale(1.06); }

.photo-item .photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.photo-item:hover .photo-overlay { transform: translateY(0); }

/* ── Upload Forms ── */
.upload-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: var(--soft-shadow);
  border: 2px solid var(--blush);
}

.upload-card h3 {
  color: var(--deep-pink);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.btn-submit {
  background: linear-gradient(135deg, var(--deep-pink), var(--rose-gold));
  border: none;
  color: white;
  padding: 0.65rem 2rem;
  border-radius: 30px;
  font-size: 1rem;
  transition: all 0.3s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(192,57,122,0.35);
  color: white;
}

.btn-outline-birthday {
  border: 2px solid var(--deep-pink);
  color: var(--deep-pink);
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  transition: all 0.3s;
  background: transparent;
}

.btn-outline-birthday:hover {
  background: var(--deep-pink);
  color: white;
}

/* ── Updates Banner ── */
.updates-section {
  background: var(--blush);
  padding: 2rem 0;
}

.update-item {
  background: white;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--gold);
  margin-bottom: 0.75rem;
}

.update-item.pinned { border-left-color: var(--deep-pink); }

/* ── Lightbox ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-overlay.active { display: flex; }

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.8);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
}

/* ── Confetti Animation ── */
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  pointer-events: none;
  animation: confetti-fall linear forwards;
  z-index: 9998;
}

/* ── Footer ── */
.site-footer {
  background: linear-gradient(135deg, #1a0010, #3d0028);
  color: rgba(255,255,255,0.7);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 3px solid var(--gold);
}

.site-footer .gold-text { color: var(--gold); }

/* ── Alerts ── */
.alert-birthday {
  background: linear-gradient(135deg, var(--blush), white);
  border: 2px solid var(--deep-pink);
  color: var(--charcoal);
  border-radius: var(--card-radius);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .collage-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, 1fr);
  }

  .rsvp-card {
    padding: 1.5rem;
  }

  .guest-card {
    flex-wrap: wrap;
  }

  .canvas-toolbar {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .collage-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--deep-pink), var(--rose-gold));
  border-radius: 4px;
}
