/* ==========================================================================
   TRADITIONAL SOUTH INDIAN TEMPLE WEDDING INVITATION STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=Great+Vibes&family=Noto+Serif+Telugu:wght@400;600;700&family=Poppins:wght@300;400;600;700&family=Rozha+One&display=swap');

:root {
  --color-maroon: #4a0404;
  --color-dark-maroon: #2b0202;
  --color-deep-red: #800000;
  --color-gold-primary: #d4af37;
  --color-gold-light: #f3e5ab;
  --color-gold-bright: #ffd700;
  --color-saffron: #ff9933;
  --color-jasmine-white: #fffdf5;
  --color-text-dark: #2c1a0e;
  --font-heading: 'Cinzel Decorative', 'Rozha One', serif;
  --font-script: 'Great Vibes', cursive;
  --font-body: 'Poppins', 'Noto Serif Telugu', sans-serif;
  --font-telugu: 'Noto Serif Telugu', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-dark-maroon);
  color: var(--color-jasmine-white);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-dark-maroon);
}
::-webkit-scrollbar-thumb {
  background: var(--color-gold-primary);
  border-radius: 5px;
  border: 2px solid var(--color-maroon);
}

/* Background Pattern Overlay */
.bg-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(circle, rgba(212, 175, 55, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(74, 4, 4, 0.95), rgba(43, 2, 2, 0.98));
  background-size: 24px 24px, 100% 100%;
  z-index: -2;
}

/* Canvas Flower Petals Rain */
#flower-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10;
}

/* ==========================================================================
   1. 3D BALAJI TEMPLE DOOR HERO ENTRANCE
   ========================================================================== */

.door-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  perspective: 1500px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: #110101;
  transition: opacity 1.2s ease-in-out, visibility 1.2s;
}

.door-wrapper.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.door-container {
  position: relative;
  width: 100%;
  max-width: 650px;
  height: 100vh;
  display: flex;
  transform-style: preserve-3d;
  box-shadow: 0 0 80px rgba(255, 215, 0, 0.4);
}

/* Symmetrical Door Panels */
.door-panel {
  width: 50%;
  height: 100%;
  background-image: url('../assets/balaji_temple_door.jpg');
  background-size: 200% 100%;
  position: absolute;
  top: 0;
  transition: transform 2.2s cubic-bezier(0.77, 0, 0.175, 1);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
  border-top: 4px solid var(--color-gold-bright);
  border-bottom: 4px solid var(--color-gold-bright);
}

.door-left {
  left: 0;
  background-position: left center;
  transform-origin: left center;
  border-right: 2px solid var(--color-gold-primary);
}

.door-right {
  right: 0;
  background-position: right center;
  transform-origin: right center;
  border-left: 2px solid var(--color-gold-primary);
}

/* Door Opening Animation States */
.door-wrapper.open .door-left {
  transform: rotateY(-115deg);
}

.door-wrapper.open .door-right {
  transform: rotateY(115deg);
}

/* Center Golden Radiance Light */
.door-light-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(255, 215, 0, 0.6) 0%, rgba(212, 175, 55, 0.2) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  pointer-events: none;
  z-index: 1001;
}

.door-wrapper.open .door-light-beam {
  opacity: 1;
}

/* Door Entrance Call to Action Overlay */
.door-overlay-content {
  position: absolute;
  z-index: 1005;
  text-align: center;
  color: var(--color-gold-light);
  background: rgba(43, 2, 2, 0.88);
  padding: 30px 45px;
  border-radius: 20px;
  border: 2px solid var(--color-gold-primary);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), inset 0 0 15px rgba(212, 175, 55, 0.2);
  backdrop-filter: blur(8px);
  animation: pulse-glow 3s infinite ease-in-out;
  cursor: pointer;
  transform: scale(1);
  transition: transform 0.3s ease, opacity 0.8s ease;
  max-width: 90%;
}

.door-overlay-content:hover {
  transform: scale(1.04);
}

.door-wrapper.open .door-overlay-content {
  opacity: 0;
  pointer-events: none;
}

.shloka-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-gold-bright);
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.couple-preview-names {
  font-family: var(--font-script);
  font-size: 3rem;
  color: var(--color-jasmine-white);
  margin: 8px 0;
  text-shadow: 0 2px 10px rgba(255, 215, 0, 0.6);
}

.enter-btn {
  margin-top: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #d4af37, #aa7c11);
  color: #2b0202;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.enter-btn:hover {
  background: linear-gradient(135deg, #ffd700, #d4af37);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.8);
}

/* ==========================================================================
   2. MAIN SITE CONTENT LAYOUT & PILLAR FRAMES
   ========================================================================== */

.main-invitation-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 20;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease 1s, transform 1.2s ease 1s;
}

.main-invitation-container.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Side Temple Pillars Framing */
.pillar-frame-left,
.pillar-frame-right {
  position: fixed;
  top: 0;
  width: 90px;
  height: 100vh;
  background-image: url('../assets/temple_pillar_border.jpg');
  background-size: contain;
  background-repeat: repeat-y;
  z-index: 15;
  pointer-events: none;
  opacity: 0.85;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.7));
}

.pillar-frame-left {
  left: 0;
}

.pillar-frame-right {
  right: 0;
  transform: scaleX(-1);
}

@media (max-width: 768px) {
  .pillar-frame-left,
  .pillar-frame-right {
    width: 45px;
    opacity: 0.6;
  }
}

/* ==========================================================================
   3. HEADER & PARENTS CARD & ROTATING RANGOLI MANDALA
   ========================================================================== */

.invitation-header {
  text-align: center;
  position: relative;
  padding: 60px 20px 40px;
}

.rangoli-halo-container {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 280px;
  z-index: -1;
  opacity: 0.45;
}

.rangoli-halo {
  width: 100%;
  height: 100%;
  background-image: url('../assets/rangoli_pattern.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  animation: spin-slow 40s linear infinite;
  box-shadow: 0 0 50px rgba(252, 186, 3, 0.4);
}

.god-blessing-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-gold-bright);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.telugu-shloka {
  font-family: var(--font-telugu);
  font-size: 1.15rem;
  color: var(--color-gold-light);
  line-height: 1.8;
  max-width: 680px;
  margin: 15px auto 25px;
  font-style: italic;
}

.couple-title-display {
  font-family: var(--font-heading);
  font-size: 3.8rem;
  background: linear-gradient(135deg, #fffdf5 0%, #ffd700 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 20px 0 10px;
  line-height: 1.2;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.9));
}

.couple-script-amp {
  font-family: var(--font-script);
  font-size: 3.2rem;
  color: var(--color-saffron);
  -webkit-text-fill-color: initial;
  display: inline-block;
  margin: 0 15px;
}

/* Parents Card Block */
.parents-invitation-card {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin: 25px auto;
  max-width: 750px;
  background: rgba(43, 2, 2, 0.7);
  border: 1px dashed var(--color-gold-primary);
  border-radius: 16px;
  padding: 20px 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  flex-wrap: wrap;
}

.parent-box {
  text-align: center;
}

.parent-title {
  font-size: 0.85rem;
  color: var(--color-saffron);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  font-weight: 600;
}

.parent-names {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-gold-light);
  font-weight: 700;
}

.parent-divider {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-gold-bright);
}

.wedding-tagline {
  font-size: 1.05rem;
  letter-spacing: 2px;
  color: var(--color-gold-light);
  text-transform: uppercase;
  font-weight: 300;
}

/* Decorative Garland Divider */
.garland-divider {
  width: 100%;
  height: 60px;
  background-image: url('../assets/marigold_jasmine_garland.jpg');
  background-size: contain;
  background-repeat: repeat-x;
  background-position: center;
  margin: 40px 0;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

/* ==========================================================================
   4. SCRATCH CARD TICKET MODEL COUNTDOWN TIMER
   ========================================================================== */

.mandapam-section {
  position: relative;
  background: radial-gradient(ellipse at center, rgba(74, 4, 4, 0.92), rgba(27, 2, 2, 0.96)),
              url('../assets/wedding_mandapam.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 24px;
  border: 2px solid var(--color-gold-primary);
  padding: 50px 30px;
  margin: 40px 0;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  text-align: center;
}

.mandapam-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 2, 2, 0.7);
  z-index: 1;
}

.mandapam-content {
  position: relative;
  z-index: 2;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--color-gold-bright);
  margin-bottom: 25px;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* Scratch Card Container */
.scratch-countdown-container {
  background: linear-gradient(135deg, rgba(74, 4, 4, 0.95), rgba(43, 2, 2, 0.98));
  border: 3px double var(--color-gold-bright);
  border-radius: 20px;
  padding: 25px 20px;
  margin: 30px auto;
  max-width: 900px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(212, 175, 55, 0.25);
  position: relative;
}

.scratch-header-tag {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700, #d4af37);
  color: #2b0202;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

/* Scratch Card Grid */
.countdown-wrapper.scratch-model {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.scratch-card-box {
  position: relative;
  width: 140px;
  height: 140px;
  background: linear-gradient(145deg, #2b0202, #4a0404);
  border: 3px solid var(--color-gold-primary);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scratch-card-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(255, 215, 0, 0.4);
}

.scratch-card-top-strip {
  background: var(--color-gold-primary);
  color: #2b0202;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 0;
  text-align: center;
  border-bottom: 1px solid var(--color-gold-bright);
}

/* Surface Foil Scratch Layer */
.scratch-surface-layer {
  position: absolute;
  top: 22px;
  left: 0;
  width: 100%;
  height: calc(100% - 22px);
  background: linear-gradient(135deg, #d4af37 0%, #aa7c11 50%, #f3e5ab 100%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.4);
}

.scratch-surface-layer.scratched {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) rotate(5deg);
  pointer-events: none;
}

.scratch-foil-pattern {
  text-align: center;
  color: #2b0202;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
  padding: 10px;
}

.scratch-foil-pattern i {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 4px;
  color: #4a0404;
}

/* Scratch Card Inner Content Revealed */
.scratch-card-body {
  height: calc(100% - 22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.scratch-card-box .countdown-val {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--color-gold-bright);
  font-weight: 900;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.9);
}

.scratch-card-box .countdown-label {
  font-size: 0.72rem;
  color: var(--color-gold-light);
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 2px;
}

.scratch-tip-text {
  font-size: 0.88rem;
  color: var(--color-gold-light);
  margin-top: 18px;
  font-style: italic;
}

/* ==========================================================================
   5. EVENT TIMELINE & CARDS
   ========================================================================== */

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.event-card {
  background: linear-gradient(145deg, rgba(74, 4, 4, 0.9), rgba(43, 2, 2, 0.95));
  border: 2px solid var(--color-gold-primary);
  border-radius: 20px;
  padding: 35px 25px;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(212, 175, 55, 0.4);
}

.event-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  background: var(--color-gold-primary);
  color: var(--color-maroon);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.event-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-gold-bright);
  margin-bottom: 10px;
}

.event-time {
  font-size: 1.1rem;
  color: var(--color-saffron);
  font-weight: 600;
  margin-bottom: 12px;
}

.event-desc {
  font-size: 0.95rem;
  color: var(--color-jasmine-white);
  line-height: 1.6;
  margin-bottom: 20px;
}

.calendar-btn {
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--color-gold-primary);
  color: var(--color-gold-light);
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.calendar-btn:hover {
  background: var(--color-gold-primary);
  color: var(--color-maroon);
  font-weight: 600;
}

/* ==========================================================================
   6. VENUE LOCATION & MAP CARD
   ========================================================================== */

.venue-card {
  background: rgba(43, 2, 2, 0.92);
  border: 2px solid var(--color-gold-primary);
  border-radius: 20px;
  padding: 40px 30px;
  margin: 40px 0;
  text-align: center;
}

.venue-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-gold-bright);
  margin-bottom: 10px;
}

.venue-address {
  font-size: 1.1rem;
  color: var(--color-jasmine-white);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 25px;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #ffd700, var(--color-gold-primary));
  color: #2b0202;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.8);
}

/* ==========================================================================
   7. INTERACTIVE RSVP FORM & WISHES
   ========================================================================== */

.rsvp-section {
  background: linear-gradient(180deg, rgba(74, 4, 4, 0.95), rgba(27, 2, 2, 0.98));
  border: 2px solid var(--color-gold-primary);
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 650px;
  margin: 40px auto;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--color-gold-light);
  margin-bottom: 8px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(20, 2, 2, 0.8);
  border: 1px solid var(--color-gold-primary);
  border-radius: 10px;
  color: var(--color-jasmine-white);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--color-gold-bright);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-gold-bright), var(--color-gold-primary));
  color: #2b0202;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
  transition: transform 0.2s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
}

/* Toast Message */
.toast-msg {
  display: none;
  margin-top: 15px;
  padding: 12px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--color-gold-primary);
  color: var(--color-gold-bright);
  border-radius: 8px;
  font-size: 0.95rem;
}

/* ==========================================================================
   8. AUDIO CONTROL FLOATING BUTTON
   ========================================================================== */

.audio-toggle-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold-bright), var(--color-gold-primary));
  color: var(--color-maroon);
  border: 2px solid var(--color-jasmine-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  z-index: 999;
  transition: transform 0.3s ease;
}

.audio-toggle-btn:hover {
  transform: scale(1.1);
}

.audio-toggle-btn.playing {
  animation: pulse-spin 4s infinite linear;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-gold-light);
  font-size: 0.9rem;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  margin-top: 60px;
}

/* Keyframe Animations */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 0 50px rgba(255, 215, 0, 0.8); }
}

@keyframes pulse-spin {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.08) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}
