/* ==========================================================================
   MÜHÜR SAAS - 3D WAX SEAL, ENVELOPE & MULTI-THEME ENGINE STYLESHEET
   ========================================================================== */

.invitation-viewport {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 16px 80px 16px;
  background-color: var(--inv-bg, #FAF7F2);
  color: var(--inv-text, #1A1A1A);
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.4s ease;
}

/* Background Pattern Watermarks */
.invitation-viewport::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--inv-primary, #D4AF37) 0.65px, transparent 0.65px);
  background-size: 28px 28px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Envelope Stage Container */
.envelope-stage {
  width: 100%;
  max-width: 540px;
  perspective: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Personalization Header on Top of Envelope */
.guest-salutation-card {
  text-align: center;
  margin-bottom: 24px;
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  animation: fadeInDown 0.8s ease;
}

.guest-salutation-card .guest-title {
  font-family: var(--font-royal);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--inv-primary, #9E2A2B);
  font-weight: 700;
}

.guest-salutation-card .guest-name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-top: 4px;
}

/* 3D Envelope Box */
.envelope-wrapper {
  width: 100%;
  height: 330px;
  background: var(--inv-bg, #FAF7F2);
  border-radius: 14px;
  position: relative;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(212, 175, 55, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: visible;
  transition: all 0.8s ease;
}

.envelope-wrapper.opened {
  height: 0;
  opacity: 0;
  margin-bottom: 0;
  pointer-events: none;
  transform: scale(0.9) translateY(40px);
}

/* Envelope Flap (Top triangle) */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 100% 0, 50% 55%);
  background: linear-gradient(180deg, #ede6d6 0%, #dfd6c2 100%);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  z-index: 5;
  transform-origin: top;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.5);
}

.envelope-wrapper.opening .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

/* Envelope Body Bottom & Side Triangles */
.envelope-pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 100%, 50% 55%, 100% 100%);
  background: linear-gradient(0deg, #e4dcce 0%, #f2ebde 100%);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  z-index: 4;
}

.envelope-side-left {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 0 100%, 50% 55%);
  background: #eae2d3;
  border-radius: 14px;
  z-index: 3;
}

.envelope-side-right {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(100% 0, 100% 100%, 50% 55%);
  background: #e6ded0;
  border-radius: 14px;
  z-index: 3;
}

/* 3D Wax Seal Button */
.wax-seal-container {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wax-seal-container:hover {
  transform: translate(-50%, -52%) scale(1.06);
}

.wax-seal-btn {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background-color: var(--seal-color, #9E2A2B);
  background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35) 0%, transparent 60%),
                    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.4) 0%, transparent 70%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -3px 6px rgba(0, 0, 0, 0.5);
  border: 4px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s ease;
}

.wax-seal-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 46% 54% 52% 48% / 48% 46% 54% 52%;
  background: inherit;
  z-index: -1;
  opacity: 0.9;
  filter: blur(0.5px);
}

.wax-monogram {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-royal);
  font-size: 1.25rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 -1px 2px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
}

.wax-seal-hint {
  margin-top: 14px;
  font-family: var(--font-royal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111;
  background: rgba(255, 255, 255, 0.95);
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  white-space: nowrap;
  animation: bounce 2s infinite ease-in-out;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.wax-seal-btn.cracking {
  animation: sealBreak 0.6s forwards ease-in-out;
}

@keyframes sealBreak {
  0% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(5deg); filter: brightness(1.2); }
  100% { transform: scale(0.7) rotate(-15deg); opacity: 0; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MAIN INVITATION CARD (UNFOLDED) & THEME ENGINE
   ========================================================================== */

.invitation-card-container {
  width: 100%;
  max-width: 580px;
  background: var(--inv-card-bg, #FFFFFF);
  border-radius: 24px;
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 44px 28px;
  margin: 0 auto;
  position: relative;
  opacity: 0;
  transform: translateY(60px) scale(0.96);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  overflow: hidden;
}

.invitation-card-container.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ==========================================================================
   THEME 1: SARAY İHTİŞAMI & ALTIN VARAK (theme-luxury-gold)
   ========================================================================== */
.theme-luxury-gold {
  --inv-bg: #FDFBF7;
  --inv-primary: #D4AF37;
  --inv-text: #1A1A1A;
}

.theme-luxury-gold .invitation-card-container {
  border: 2px solid #D4AF37;
}

.theme-luxury-gold .invitation-card-container::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  pointer-events: none;
}

.theme-luxury-gold .bride-groom-title {
  font-family: var(--font-royal);
  font-size: 2.3rem;
  font-weight: 800;
  color: #111;
}

/* ==========================================================================
   THEME 2: BOTANİK ZÜMRÜT & OKALİPTÜS (theme-botanical-green / Mislina & Furkan)
   ========================================================================== */
.theme-botanical-green {
  --inv-bg: #FAF7F2;
  --inv-primary: #2D4A3E;
  --inv-text: #222E28;
}

.theme-botanical-green .invitation-card-container {
  border: 3.5px solid #2D4A3E;
  border-radius: 28px;
  background: #FFFFFF;
}

.theme-botanical-green .invitation-card-container::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1.5px solid rgba(45, 74, 62, 0.35);
  border-radius: 20px;
  pointer-events: none;
}

/* Botanical Corner Leaf Decorations */
.botanical-corner-decor {
  position: absolute;
  width: 85px;
  height: 85px;
  pointer-events: none;
  opacity: 0.45;
  z-index: 1;
}
.b-corner-tl { top: 6px; left: 6px; }
.b-corner-tr { top: 6px; right: 6px; transform: scaleX(-1); }
.b-corner-bl { bottom: 6px; left: 6px; transform: scaleY(-1); }
.b-corner-br { bottom: 6px; right: 6px; transform: scale(-1); }

.theme-botanical-green .bride-groom-title {
  font-family: var(--font-script);
  font-size: 3.6rem;
  font-weight: 400;
  color: #2D4A3E;
  line-height: 1.1;
  text-shadow: 1px 1px 0px rgba(197, 160, 89, 0.3);
}

.theme-botanical-green .bismillah-arabic {
  color: #2D4A3E;
}

.theme-botanical-green .quote-block {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #384A41;
}

/* ==========================================================================
   THEME 3: KRALİYET BORDOSU & KADİFE (theme-royal-velvet)
   ========================================================================== */
.theme-royal-velvet {
  --inv-bg: #FFF9FA;
  --inv-primary: #800F2F;
  --inv-text: #330511;
}

.theme-royal-velvet .invitation-card-container {
  border: 3px solid #800F2F;
  border-radius: 24px;
  background: #FFFFFF;
}

.theme-royal-velvet .invitation-card-container::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(128, 15, 47, 0.35);
  border-radius: 16px;
  pointer-events: none;
}

.theme-royal-velvet .bride-groom-title {
  font-family: var(--font-cursive);
  font-size: 3.4rem;
  font-weight: 400;
  color: #800F2F;
}

/* ==========================================================================
   THEME 4: HAUTE COUTURE NOIR (theme-minimal-noir)
   ========================================================================== */
.theme-minimal-noir {
  --inv-bg: #F4F4F5;
  --inv-primary: #111111;
  --inv-text: #111111;
}

.theme-minimal-noir .invitation-card-container {
  border: 2px solid #111111;
  border-radius: 4px;
  background: #FFFFFF;
}

.theme-minimal-noir .invitation-card-container::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid #111111;
  border-radius: 2px;
  pointer-events: none;
}

.theme-minimal-noir .bride-groom-title {
  font-family: var(--font-modern);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111;
}

/* ==========================================================================
   THEME 5: BOHEM RÜYA & TERRAKOTTA (theme-boho-chic)
   ========================================================================== */
.theme-boho-chic {
  --inv-bg: #FBF6F0;
  --inv-primary: #C47B5A;
  --inv-text: #4A2818;
}

.theme-boho-chic .invitation-card-container {
  border: 3px solid #C47B5A;
  border-radius: 36px 36px 20px 20px;
  background: #FFFFFF;
}

.theme-boho-chic .bride-groom-title {
  font-family: var(--font-script);
  font-size: 3.4rem;
  color: #C47B5A;
}

/* Card Header & Bismillah */
.card-header-block {
  text-align: center;
  margin-bottom: 22px;
  position: relative;
  z-index: 2;
}

.bismillah-arabic {
  font-family: var(--font-arabic);
  font-size: 1.45rem;
  color: var(--inv-primary, #D4AF37);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0;
  position: relative;
  z-index: 2;
}

.ornament-divider::before,
.ornament-divider::after {
  content: '';
  height: 1px;
  width: 70px;
  background: linear-gradient(to right, transparent, var(--inv-primary, #D4AF37), transparent);
}

.ornament-icon {
  color: var(--inv-primary, #D4AF37);
  font-size: 1.1rem;
}

/* Couple Names Banner */
.couple-names-section {
  text-align: center;
  margin: 20px 0;
  position: relative;
  z-index: 2;
}

.couple-ampersand {
  font-family: var(--font-cursive);
  font-size: 2.4rem;
  color: var(--inv-primary, #D4AF37);
  display: block;
  margin: -6px 0;
}

.parents-block {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #444;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: center;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  border-bottom: 1px dashed rgba(0, 0, 0, 0.12);
  padding: 12px 0;
}

.parents-block strong {
  color: var(--inv-primary, #2D4A3E);
  font-size: 0.98rem;
  display: block;
  margin-top: 2px;
}

.quote-block {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: #384A41;
  line-height: 1.7;
  max-width: 480px;
  margin: 20px auto;
  position: relative;
  z-index: 2;
}

/* Countdown Live Grid */
.countdown-box {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  margin: 26px 0;
  position: relative;
  z-index: 2;
}

.countdown-title {
  font-family: var(--font-royal);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--inv-primary, #D4AF37);
  font-weight: 700;
  margin-bottom: 12px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.countdown-unit {
  flex: 1;
  max-width: 75px;
  background: #FFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 10px 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.countdown-number {
  font-family: var(--font-royal);
  font-size: 1.5rem;
  font-weight: 800;
  color: #111;
}

.countdown-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #777;
  margin-top: 2px;
}

/* Event Details & Venue */
.event-venue-card {
  background: #FFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin: 24px 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
  position: relative;
  z-index: 2;
}

.venue-name-title {
  font-family: var(--font-royal);
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
}

.venue-date-badge {
  display: inline-block;
  background: var(--inv-primary, #D4AF37);
  color: #FFF;
  font-family: var(--font-royal);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.venue-address-text {
  font-size: 0.92rem;
  color: #555;
  max-width: 440px;
  margin: 0 auto 18px auto;
  line-height: 1.5;
}

/* 3-Way Smart Navigation Buttons */
.nav-buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.btn-navi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-navi-google { background: #4285F4; color: #FFF; }
.btn-navi-apple { background: #000000; color: #FFF; }
.btn-navi-yandex { background: #FC3F1D; color: #FFF; }

.btn-navi:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Calendar Alarm Block */
.calendar-alarm-section {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 28px 0;
  position: relative;
  z-index: 2;
}

.btn-calendar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  background: #FFF;
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.btn-calendar:hover {
  background: #FAF7F2;
  border-color: var(--inv-primary, #D4AF37);
  transform: translateY(-2px);
}

/* Program Timeline */
.timeline-block {
  margin: 28px 0;
  position: relative;
  z-index: 2;
}

.timeline-header {
  text-align: center;
  font-family: var(--font-royal);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--inv-primary, #D4AF37);
  margin-bottom: 20px;
}

.timeline-items-list {
  position: relative;
  padding-left: 24px;
}

.timeline-items-list::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: rgba(0, 0, 0, 0.1);
}

.timeline-row {
  position: relative;
  margin-bottom: 16px;
  padding-left: 12px;
}

.timeline-row::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--inv-primary, #D4AF37);
  border: 2px solid #FFF;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.timeline-time-badge {
  font-family: var(--font-royal);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--inv-primary, #D4AF37);
}

.timeline-title-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
}

/* Badges: Dress Code & Privacy */
.info-badges-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0;
  position: relative;
  z-index: 2;
}

.info-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #FAF8F2;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-size: 0.85rem;
  color: #444;
}

.info-pill svg {
  color: var(--inv-primary, #D4AF37);
  flex-shrink: 0;
}

/* Floating Audio Widget */
.floating-music-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 23, 34, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 10px 18px;
  border-radius: 30px;
  color: #FFF;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.floating-music-widget:hover {
  border-color: var(--gold-400);
  transform: scale(1.04);
}

.music-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.music-equalizer span {
  width: 3px;
  background: var(--gold-400);
  border-radius: 2px;
  animation: eqBars 1s infinite ease-in-out;
}

.music-equalizer span:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.music-equalizer span:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.music-equalizer span:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.music-equalizer span:nth-child(4) { height: 80%; animation-delay: 0.4s; }

.floating-music-widget.paused .music-equalizer span {
  animation: none;
  height: 4px;
}

@keyframes eqBars {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}
