/* ══════════════════════════════════════════
   Variables & Reset
══════════════════════════════════════════ */
/* ─── LOGIN OVERLAY ─────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 8888;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 40%, #2d0060 0%, #0d0d1a 55%, #1a0010 100%);
  padding: 1rem;
  transition: opacity 0.65s ease, transform 0.65s ease;
  overflow-y: auto;
}
.login-overlay.fade-out {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}
.login-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,107,157,0.32);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  backdrop-filter: blur(16px);
  text-align: center;
  box-shadow: 0 0 70px rgba(196,79,255,0.18);
  margin: auto;
}
.login-heart {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 0.8rem;
  animation: heartbeat 2s ease-in-out infinite;
}
.login-title {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #FF6B9D, #C44FFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
}
.login-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.8rem;
  line-height: 1.55;
}
.login-field { margin-bottom: 1rem; text-align: left; }
.login-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.3rem;
  letter-spacing: 0.04em;
}
.login-field input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,107,157,0.22);
  border-radius: 12px;
  padding: 0.72rem 1rem;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color-scheme: dark;
}
.login-field input:focus {
  border-color: #FF6B9D;
  box-shadow: 0 0 0 3px rgba(255,107,157,0.15);
}
.login-field input.correct {
  border-color: #7BFF6B;
  box-shadow: 0 0 0 3px rgba(123,255,107,0.12);
}
.login-field input.wrong {
  border-color: rgba(255,80,80,0.6);
  box-shadow: 0 0 0 3px rgba(255,80,80,0.1);
}
.login-error {
  font-size: 0.85rem;
  color: #FF6B9D;
  min-height: 1.3em;
  margin-bottom: 0.8rem;
  font-weight: 600;
}
.login-btn {
  width: 100%;
  background: linear-gradient(135deg, #FF6B9D, #C44FFF);
  border: none;
  border-radius: 14px;
  padding: 0.9rem 1.5rem;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  letter-spacing: 0.04em;
}
.login-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(196,79,255,0.38);
}
.login-btn:disabled { opacity: 0.6; cursor: default; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18%  { transform: translateX(-12px); }
  36%  { transform: translateX(12px); }
  54%  { transform: translateX(-8px); }
  72%  { transform: translateX(8px); }
}
.login-card.shake { animation: shake 0.5s ease; }
@keyframes successPulse {
  0%   { box-shadow: 0 0 0 0   rgba(123,255,107,0.55); }
  70%  { box-shadow: 0 0 0 28px rgba(123,255,107,0);   }
  100% { box-shadow: 0 0 0 0   rgba(123,255,107,0);    }
}
.login-card.success {
  animation: successPulse 0.75s ease forwards;
  border-color: rgba(123,255,107,0.5);
}

/* ─── GALLERY CAPTIONS & EVENT GROUPS ───────────── */
.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82), transparent);
  padding: 1rem 0.75rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  transform: translateY(100%);
  transition: transform 0.28s ease;
  pointer-events: none;
}
.gallery-item:hover .gallery-caption { transform: translateY(0); }

.gallery-event { margin-bottom: 3rem; }
.gallery-event-title {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.9rem;
  padding-left: 0.2rem;
  border-left: 3px solid;
  padding-left: 0.75rem;
}
/* ─────────────────────────────────────────────── */
:root {
  --pink:   #FF6B9D;
  --purple: #C44FFF;
  --coral:  #FF9A56;
  --gold:   #FFD700;
  --dark:   #0d0d1a;
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--dark);
  color: #fff;
  overflow-x: hidden;
}
.container { max-width: 1000px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; position: relative; }

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════
   Floating Hearts
══════════════════════════════════════════ */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hearts-bg span {
  position: absolute;
  bottom: -60px;
  opacity: 0;
  animation: floatUp linear infinite;
}
.hearts-bg span:nth-child(1)  { left:  5%; font-size: 1.2rem; animation-duration: 12s; animation-delay:  0s; }
.hearts-bg span:nth-child(2)  { left: 14%; font-size: 2rem;   animation-duration: 15s; animation-delay:  2s; }
.hearts-bg span:nth-child(3)  { left: 23%; font-size: 1rem;   animation-duration: 10s; animation-delay:  4s; }
.hearts-bg span:nth-child(4)  { left: 33%; font-size: 1.5rem; animation-duration: 18s; animation-delay:  1s; }
.hearts-bg span:nth-child(5)  { left: 45%; font-size: 0.9rem; animation-duration: 13s; animation-delay:  6s; }
.hearts-bg span:nth-child(6)  { left: 55%; font-size: 2.5rem; animation-duration: 16s; animation-delay:  3s; }
.hearts-bg span:nth-child(7)  { left: 63%; font-size: 1.3rem; animation-duration: 11s; animation-delay:  8s; }
.hearts-bg span:nth-child(8)  { left: 72%; font-size: 1.8rem; animation-duration: 14s; animation-delay:  5s; }
.hearts-bg span:nth-child(9)  { left: 82%; font-size: 1.1rem; animation-duration:  9s; animation-delay:  7s; }
.hearts-bg span:nth-child(10) { left: 90%; font-size: 0.8rem; animation-duration: 17s; animation-delay: 0.5s; }
.hearts-bg span:nth-child(11) { left: 10%; font-size: 2.2rem; animation-duration: 20s; animation-delay:  9s; }
.hearts-bg span:nth-child(12) { left: 50%; font-size: 1rem;   animation-duration:  8s; animation-delay: 11s; }
.hearts-bg span:nth-child(13) { left: 70%; font-size: 1.7rem; animation-duration: 22s; animation-delay:  4s; }
.hearts-bg span:nth-child(14) { left: 30%; font-size: 1.4rem; animation-duration: 19s; animation-delay: 2.5s; }

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg);         opacity: 0;    }
  10%  { opacity: 0.18; }
  90%  { opacity: 0.18; }
  100% { transform: translateY(-110vh) rotate(360deg);  opacity: 0;    }
}

/* ══════════════════════════════════════════
   Confetti
══════════════════════════════════════════ */
#confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(0)      rotate(0deg)   scale(1);   opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(105vh)  rotate(720deg) scale(0.5); opacity: 0; }
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 40%, #2d0060 0%, #0d0d1a 55%, #1a0010 100%);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 60%, rgba(255,107,157,0.12) 0%, transparent 60%);
  animation: pulseGlow 5s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes pulseGlow {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.08); }
}

.hero-content { position: relative; z-index: 2; padding: 2rem; }

.hero-couple {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(3rem, 11vw, 6.5rem);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, #FF6B9D 20%, #fff 50%, #C44FFF 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  animation: fadeDown 0.9s 0s ease both;
  letter-spacing: 0.01em;
}
.hero-amp {
  color: var(--pink);
  -webkit-text-fill-color: var(--pink);
}
.hero-anniv-badge {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.6rem;
  animation: fadeDown 0.9s 0.1s ease both;
}

.hero-pre {
  font-size: 1rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  animation: fadeDown 0.8s 0.2s ease both;
}
.hero-title {
  font-size: clamp(2.2rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  animation: fadeDown 0.8s 0.35s ease both;
}
.name-highlight {
  background: linear-gradient(135deg, var(--pink) 20%, var(--gold) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.65);
  margin-bottom: 3rem;
  animation: fadeDown 0.8s 0.5s ease both;
}
.scroll-arrow {
  display: inline-block;
  font-size: 2rem;
  color: var(--pink);
  text-decoration: none;
  animation: bounce 2s infinite, fadeDown 0.8s 0.65s ease both;
  transition: color 0.2s;
}
.scroll-arrow:hover { color: var(--purple); }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(10px); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   COUNTER
══════════════════════════════════════════ */
.counter-section {
  background: linear-gradient(180deg, #0d0d1a 0%, #160025 100%);
  z-index: 1;
}
.counter-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.counter-card {
  background: linear-gradient(135deg, rgba(255,107,157,0.1), rgba(196,79,255,0.1));
  border: 1px solid rgba(255,107,157,0.25);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  text-align: center;
  min-width: 140px;
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.counter-card:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 16px 40px rgba(196,79,255,0.2);
}
.counter-num {
  display: block;
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.counter-label {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.counter-tagline {
  text-align: center;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
}

/* ══════════════════════════════════════════
   TIMELINE
══════════════════════════════════════════ */
.timeline-section { background: #0d0d1a; }

.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
/* Vertical gradient line */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, var(--pink), var(--purple), var(--coral), var(--gold));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  display: flex;
  margin-bottom: 3rem;
}
/* Odd: card left, spacer right */
.timeline-item:nth-child(odd) {
  padding-right: calc(50% + 48px);
  justify-content: flex-end;
}
/* Even: spacer left, card right */
.timeline-item:nth-child(even) {
  padding-left: calc(50% + 48px);
  justify-content: flex-start;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 2;
  box-shadow: 0 0 0 5px rgba(255,255,255,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-item:hover .timeline-dot {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 0 10px rgba(255,255,255,0.1);
}

.timeline-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 4px solid var(--card-color, var(--pink));
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.25);
}
.timeline-date {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.4rem;
}
.timeline-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.timeline-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.6);
}

/* ══════════════════════════════════════════
   GALLERY
══════════════════════════════════════════ */
.gallery-section { background: linear-gradient(180deg, #0d0d1a 0%, #12001f 100%); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(135deg, rgba(196,79,255,0.18), rgba(255,107,157,0.18));
  border: 1px solid rgba(255,255,255,0.08);
}
.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 18px 45px rgba(196,79,255,0.3);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* When onerror fires, parent gets .placeholder class */
.gallery-item.placeholder img { display: none; }

.gallery-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
}
.gallery-item.placeholder .gallery-placeholder { display: flex; }
.gallery-placeholder small {
  font-size: 0.6rem;
  font-family: monospace;
  color: rgba(255,255,255,0.25);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 0 60px rgba(196,79,255,0.35);
  cursor: default;
  animation: lbIn 0.25s ease;
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); transform: rotate(90deg); }

/* ══════════════════════════════════════════
   LOVE LETTER
══════════════════════════════════════════ */
.letter-section { background: linear-gradient(135deg, #160025, #0d001a, #1f0a00); }

.letter-card {
  max-width: 680px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(255,255,255,0.065), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,107,157,0.22);
  border-radius: 24px;
  padding: 3rem;
  position: relative;
  backdrop-filter: blur(12px);
}
.letter-card::before,
.letter-card::after {
  font-family: 'Dancing Script', cursive;
  font-size: 9rem;
  color: rgba(255,107,157,0.1);
  position: absolute;
  line-height: 1;
  pointer-events: none;
}
.letter-card::before { content: '\201C'; top: -1.5rem; left: 1.2rem; }
.letter-card::after  { content: '\201D'; bottom: -4rem; right: 1.2rem; }

.letter-date {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1.5rem;
}
.letter-salutation {
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  color: var(--pink);
  margin-bottom: 1.5rem;
}
.letter-body {
  font-size: 1rem;
  line-height: 1.95;
  color: rgba(255,255,255,0.78);
}
.letter-body p { margin-bottom: 1rem; }
.letter-body p:last-child { margin-bottom: 0; }

/* ── Letter nicknames — plain text after the letter ── */
.letter-nicknames {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  border-top: 1px solid rgba(255,107,157,0.15);
  padding-top: 1.6rem;
}
.letter-nick {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.letter-nick-name {
  font-family: 'Dancing Script', cursive;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pink);
  line-height: 1.2;
}
.letter-nick.highlight .letter-nick-name {
  font-size: 1.55rem;
  background: linear-gradient(135deg, #FF6B9D, #C44FFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.letter-nick-quote {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  font-style: italic;
  line-height: 1.6;
}

.letter-signature {
  margin-top: 2rem;
  text-align: right;
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  color: rgba(255,255,255,0.6);
}
.letter-signature span {
  display: block;
  font-size: 1.9rem;
  color: var(--pink);
  margin-top: 0.3rem;
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer {
  background: #050510;
  text-align: center;
  padding: 3rem 1.5rem;
}
.footer-hearts {
  font-size: 1.4rem;
  letter-spacing: 0.6rem;
  margin-bottom: 1rem;
  opacity: 0.55;
  animation: heartbeat 2.5s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  20%       { transform: scale(1.08); }
  60%       { transform: scale(0.97); }
}
.footer-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pink);
  margin-bottom: 0.4rem;
}
.footer-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.12em;
}

/* ══════════════════════════════════════════
   Scroll Reveal
══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(32px) scale(0.97);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* Staggered delay for gallery items */
.gallery-item.reveal:nth-child(2) { transition-delay: 0.08s; }
.gallery-item.reveal:nth-child(3) { transition-delay: 0.16s; }
.gallery-item.reveal:nth-child(4) { transition-delay: 0.24s; }
.gallery-item.reveal:nth-child(5) { transition-delay: 0.32s; }
.gallery-item.reveal:nth-child(6) { transition-delay: 0.40s; }
.gallery-item.reveal:nth-child(7) { transition-delay: 0.48s; }
.gallery-item.reveal:nth-child(8) { transition-delay: 0.56s; }

/* ══════════════════════════════════════════
   Responsive
══════════════════════════════════════════ */
@media (max-width: 620px) {
  /* Timeline goes single-column */
  .timeline::before { left: 28px; }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding-left: 72px;
    padding-right: 0;
    justify-content: flex-start;
  }
  .timeline-dot {
    left: 28px;
    top: 28px;
    transform: translate(-50%, 0);
  }
  .timeline-item:hover .timeline-dot {
    transform: translate(-50%, 0) scale(1.15);
  }

  /* Counter 2×2 */
  .counter-card { padding: 1.5rem; min-width: 110px; }

  /* Letter */
  .letter-card { padding: 2rem 1.5rem; }

  /* Gallery 2 columns */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  /* Card stack on mobile */
  .card-stack { max-width: 100%; }
}

/* ══════════════════════════════════════════
   GALLERY EVENT DESCRIPTION
══════════════════════════════════════════ */
.gallery-event-desc {
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  font-style: italic;
  margin-bottom: 1.4rem;
  padding-left: 0.8rem;
}

/* ══════════════════════════════════════════
   STACKED CARD CAROUSEL
══════════════════════════════════════════ */
.card-stack {
  position: relative;
  max-width: 560px;
  margin: 0 auto 32px;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  user-select: none;
}
.card-stack[data-total="1"] { cursor: default; }

.cards-wrapper {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  will-change: transform;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  background: #0e0e1c;
}
/* Blurred version of the same photo fills letterbox bars */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--img, none);
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.38) saturate(1.5);
  z-index: 0;
}

/* Stack depth — only target .card children of .cards-wrapper */
.cards-wrapper > .card:nth-child(1) {
  z-index: 10;
  transform: rotate(0deg) scale(1) translateY(0);
  box-shadow: 0 14px 44px rgba(0,0,0,0.55);
}
.cards-wrapper > .card:nth-child(2) {
  z-index: 9;
  transform: rotate(-2.5deg) scale(0.96) translateY(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.cards-wrapper > .card:nth-child(3) {
  z-index: 8;
  transform: rotate(2deg) scale(0.92) translateY(16px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.cards-wrapper > .card:nth-child(n+4) {
  z-index: 7;
  transform: rotate(-1deg) scale(0.88) translateY(22px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Hover: lift front card */
.card-stack:not([data-total="1"]):hover .cards-wrapper > .card:nth-child(1) {
  transform: rotate(-0.5deg) scale(1.025) translateY(-4px);
  box-shadow: 0 22px 55px rgba(196,79,255,0.28);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  position: relative;
  z-index: 1;
}
.card.img-err img { display: none; }

.card-img-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, rgba(196,79,255,0.2), rgba(255,107,157,0.2));
  z-index: 2;
}
.card.img-err .card-img-placeholder { display: flex; }

.card-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  padding: 1.8rem 1rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  pointer-events: none;
  z-index: 2;
}

/* Fly-out animation */
.card.fly-out {
  z-index: 20 !important;
  transform: translateX(115%) rotate(22deg) !important;
  opacity: 0 !important;
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease !important;
  box-shadow: none !important;
}

/* Counter badge */
.card-counter {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 15;
  background: rgba(0,0,0,0.62);
  color: rgba(255,255,255,0.9);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.58rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* Flip hint */
.card-hint {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  background: rgba(0,0,0,0.58);
  color: rgba(255,255,255,0.78);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.22rem 0.7rem;
  border-radius: 16px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  letter-spacing: 0.06em;
  transition: opacity 0.5s ease;
  white-space: nowrap;
}
.card-hint.hidden { opacity: 0; }

/* ══════════════════════════════════════════
   MONTAGE "WATCH OUR STORY" BUTTON
══════════════════════════════════════════ */
.montage-bar {
  display: flex;
  justify-content: center;
  padding: 3rem 0;
}
.montage-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border: none;
  border-radius: 50px;
  padding: 0.9rem 2.2rem;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  letter-spacing: 0.03em;
  box-shadow: 0 6px 24px rgba(196,79,255,0.3);
}
.montage-trigger-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 38px rgba(196,79,255,0.48);
}
.montage-trigger-btn:active { transform: scale(0.98); }

/* ══════════════════════════════════════════
   FULL-SCREEN MONTAGE OVERLAY
══════════════════════════════════════════ */
.montage-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9000;
  display: none;
  overflow: hidden;
}
.montage-overlay.active { display: block; }

.montage-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s ease;
  overflow: hidden;
}
.montage-slide.visible { opacity: 1; }

/* Blurred backdrop fills letterbox bars */
.montage-blur {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.32) saturate(1.5);
  z-index: 0;
}

/* Sharp contained photo on top */
.montage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}
.montage-slide.ken-a { animation: kenBurnsA 4.5s ease-out both; }
.montage-slide.ken-b { animation: kenBurnsB 4.5s ease-out both; }

@keyframes kenBurnsA {
  from { transform: scale(1)    translate(0, 0); }
  to   { transform: scale(1.14) translate(-2.5%, -1.5%); }
}
@keyframes kenBurnsB {
  from { transform: scale(1.1)  translate(-2%, -1%); }
  to   { transform: scale(1)    translate(1.5%, 0.5%); }
}

.montage-event-label {
  position: absolute;
  top: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.68);
  color: rgba(255,255,255,0.96);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.55rem 1.5rem;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.montage-event-label.visible { opacity: 1; }

.montage-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.5rem 1.5rem 1.2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
}
.montage-controls button {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.montage-controls button:hover { background: rgba(255,255,255,0.25); transform: scale(1.08); }

.montage-progress-wrap {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
}
#montage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 4px;
  width: 0%;
}
.montage-slide-num {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.6);
  font-family: 'Poppins', sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
