/* Classic Elegance – Door Opening Animated Template */
.tpl-ce-wrapper {
  position: relative; min-height: 500px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  background: linear-gradient(135deg, #fdf8f0 0%, #f5ead6 100%);
  overflow: hidden; perspective: 1200px;
}

/* ── Door Envelope ────────────────────── */
.tpl-ce-envelope {
  position: absolute; inset: 0; z-index: 10;
  display: flex; cursor: pointer;
  transition: opacity .6s ease .8s;
}
.tpl-ce-envelope.opened { pointer-events: none; opacity: 0; }

.tpl-ce-door {
  width: 50%; height: 100%; position: relative;
  transition: transform 1.2s cubic-bezier(.77,0,.18,1);
  transform-style: preserve-3d;
}
.tpl-ce-door-left  { transform-origin: left center; }
.tpl-ce-door-right { transform-origin: right center; }
.tpl-ce-envelope.opened .tpl-ce-door-left  { transform: rotateY(-105deg); }
.tpl-ce-envelope.opened .tpl-ce-door-right { transform: rotateY(105deg); }

.tpl-ce-door-face {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, #8B7355 0%, #6B5535 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  backface-visibility: hidden;
  box-shadow: inset 0 0 60px rgba(0,0,0,.2);
  border: 2px solid #c9a96e;
}
.tpl-ce-door-ornament { font-size: 22px; color: #c9a96e; letter-spacing: 6px; }
.tpl-ce-door-text {
  font-family: 'Playfair Display', serif; font-size: 18px;
  font-weight: 700; color: #f5ead6; text-align: center;
  line-height: 1.4; letter-spacing: 2px; text-transform: uppercase;
}

.tpl-ce-tap-hint {
  position: absolute; bottom: 24px; left: 0; right: 0; text-align: center;
  font-size: 13px; color: #f5ead6; z-index: 11;
  animation: ce-pulse 2s ease-in-out infinite;
  font-family: 'Montserrat', sans-serif; font-weight: 600;
}
@keyframes ce-pulse {
  0%, 100% { opacity: .6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.tpl-ce-envelope.opened .tpl-ce-tap-hint { display: none; }

/* ── Card Inner ───────────────────────── */
.tpl-ce-card-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px;
  padding: 40px 30px; text-align: center;
}
.tpl-ce-particles {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.tpl-ce-particle {
  position: absolute; top: -20px; font-size: 14px; color: #c9a96e;
  animation: ce-fall linear forwards; opacity: 0;
}
@keyframes ce-fall {
  0% { opacity: 0; transform: translateY(-20px) rotate(0deg); }
  10% { opacity: .8; }
  90% { opacity: .6; }
  100% { opacity: 0; transform: translateY(500px) rotate(720deg); }
}

.tpl-ce-content { position: relative; }

.tpl-ce-ornament-top, .tpl-ce-ornament-bottom {
  font-size: 20px; color: #c9a96e; letter-spacing: 12px; margin-bottom: 16px;
}
.tpl-ce-ornament-bottom { margin-bottom: 0; margin-top: 16px; }

.tpl-ce-together {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: #8a7a6a; margin-bottom: 10px;
}

.tpl-ce-parents {
  font-size: 13px; color: #6a5a4a; margin-bottom: 12px;
  line-height: 1.6; display: flex; flex-direction: column;
  align-items: center; gap: 2px;
}
.tpl-ce-amp { font-style: italic; color: #c9a96e; font-size: 15px; }

.tpl-ce-pleasure {
  font-size: 12px; color: #8a7a6a; margin-bottom: 16px; line-height: 1.6;
}

.tpl-ce-names-wrap { margin-bottom: 12px; }
.tpl-ce-name {
  font-family: 'Great Vibes', 'Playfair Display', cursive;
  font-size: 38px; font-weight: 400; color: #3a2a1a;
  margin: 0; line-height: 1.2;
}
.tpl-ce-and-symbol {
  font-family: 'Great Vibes', cursive; font-size: 28px;
  color: #c9a96e; margin: 4px 0;
}

.tpl-ce-divider {
  width: 80px; height: 2px; margin: 18px auto;
  background: linear-gradient(90deg, transparent, #c9a96e, transparent);
}

.tpl-ce-details { margin-top: 16px; }
.tpl-ce-detail-row {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 6px; font-size: 14px; color: #3a2a1a;
}
.tpl-ce-detail-row i { color: #c9a96e; font-size: 13px; width: 16px; }
.tpl-ce-detail-row.small { font-size: 12px; color: #8a7a6a; }

/* ── Animate-in elements after door opens ── */
.animate-in {
  opacity: 0; transform: translateY(20px);
  animation: ce-reveal .8s ease forwards;
  animation-delay: var(--delay, 0s);
}
.tpl-ce-envelope:not(.opened) ~ .tpl-ce-card-inner .animate-in {
  animation-play-state: paused;
}
@keyframes ce-reveal {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .tpl-ce-wrapper { min-height: 420px; }
  .tpl-ce-card-inner { padding: 24px 16px; }
  .tpl-ce-name { font-size: 28px; }
  .tpl-ce-door-text { font-size: 14px; }
}
