/* 
  =========================================
  KASAVU & POORAM DESIGN SYSTEM (style.css)
  =========================================
  Wedding theme for Sumi & Ajay | Thrissur, Kerala
*/

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&family=Marcellus&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --bg-cream: #FAF6EE;
  --bg-cream-dark: #F3ECE0;
  --bg-dark-panel: #1A120B;
  --bg-dark-overlay: rgba(26, 18, 11, 0.85);
  
  --gold-metallic: #D4AF37;
  --gold-light: #F3E5AB;
  --gold-dark: #AA7C11;
  --gold-gradient: linear-gradient(135deg, #B8860B 0%, #E5C158 50%, #B8860B 100%);
  --gold-glow: 0 0 20px rgba(212, 175, 55, 0.4);

  --crimson-festive: #A31D1D;
  --crimson-dark: #761111;
  --crimson-gradient: linear-gradient(135deg, #A31D1D 0%, #761111 100%);
  
  --emerald-kerala: #0D3E2F;
  --emerald-light: #185E48;
  --emerald-gradient: linear-gradient(135deg, #0D3E2F 0%, #1A5F49 100%);

  --text-dark: #231912;
  --text-medium: #55443B;
  --text-light: #FFFDF9;
  --text-muted: #A3968F;

  /* Typography */
  --font-display: 'Marcellus', serif;
  --font-body: 'Outfit', sans-serif;

  /* Transitions & Shadows */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-soft: 0 10px 40px rgba(35, 25, 18, 0.08);
  --shadow-dark: 0 20px 50px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 15px 35px rgba(26, 18, 11, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);

  /* Borders */
  --border-gold-thin: 1px solid rgba(212, 175, 55, 0.3);
  --border-gold-medium: 2px solid #D4AF37;
}

/* =========================================
   BASE & RESET STYLES
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-cream);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-cream-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--crimson-festive);
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  margin-top: 0;
  line-height: 1.25;
  color: var(--text-dark);
  letter-spacing: 0.03em;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  margin-bottom: 0.5em;
  position: relative;
}

h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

p {
  margin-top: 0;
  margin-bottom: 1.2em;
}

/* Canvas background overlay for falling petals */
#petal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99;
}

/* =========================================
   REUSABLE UTILITIES & KASAVU STYLING
   ========================================= */
.container {
  width: min(100% - 40px, 1200px);
  margin: 0 auto;
  position: relative;
}

.section {
  padding: 100px 0;
  position: relative;
}

/* Kasavu Triple Border details */
.kasavu-border {
  position: relative;
  border: 1px solid var(--gold-metallic);
  padding: 40px;
  background-color: rgba(255, 253, 249, 0.7);
  box-shadow: var(--shadow-soft);
}

.kasavu-border::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px solid var(--gold-metallic);
  pointer-events: none;
}

.kasavu-border::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  pointer-events: none;
}

/* Beautiful separators inspired by temple elements */
.kasavu-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 40px auto;
  max-width: 400px;
}

.kasavu-divider::before,
.kasavu-divider::after {
  content: '';
  height: 1px;
  flex-grow: 1;
  background: linear-gradient(90deg, transparent, var(--gold-metallic), transparent);
}

.kasavu-divider-icon {
  width: 24px;
  height: 24px;
  fill: var(--gold-metallic);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  animation: gentlePulse 3s ease-in-out infinite;
}

/* Label above headings */
.section-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--crimson-festive);
  margin-bottom: 10px;
  display: block;
}

/* Primary Button with gold foil effect */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: var(--crimson-festive);
  color: var(--text-light);
  border: 1px solid var(--gold-metallic);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-gradient);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--gold-glow), 0 8px 25px rgba(163, 29, 29, 0.3);
  color: var(--text-dark);
  border-color: var(--gold-dark);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--gold-metallic);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.15);
}

/* Secondary button styling for dark backgrounds (like the Hero section) */
.hero-actions .btn-secondary {
  color: var(--text-light);
}

.hero-actions .btn-secondary:hover {
  color: var(--text-dark);
  background-color: var(--gold-metallic);
  border-color: var(--gold-dark);
}

/* =========================================
   FLOATING MUSIC & PETAL CONTROLS
   ========================================= */
.floating-controls {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  gap: 12px;
  z-index: 1000;
}

.control-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--bg-dark-panel);
  border: 1px solid var(--gold-metallic);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-dark), var(--gold-glow);
  transition: var(--transition-smooth);
}

.control-btn:hover {
  transform: scale(1.1);
  background-color: var(--crimson-festive);
  color: var(--text-light);
}

.control-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Audio visualizer elements inside music control */
.music-playing-indicator {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.music-playing-indicator span {
  width: 2px;
  height: 100%;
  background-color: var(--gold-light);
  animation: bounceBar 0.8s ease-in-out infinite alternate;
}

.music-playing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.music-playing-indicator span:nth-child(3) { animation-delay: 0.4s; }

.control-btn.playing .music-icon-svg { display: none; }
.control-btn.playing .music-playing-indicator { display: flex; }

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-dark-panel);
  background-image: 
    linear-gradient(to bottom, rgba(26, 18, 11, 0.4) 0%, rgba(26, 18, 11, 0.85) 100%),
    url('Unknown.jpg');
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
  overflow: hidden;
}

/* Waving Palm silhouettes on the sides of the Hero */
.hero-palm {
  position: absolute;
  bottom: 0;
  width: 320px;
  height: auto;
  opacity: 0.25;
  pointer-events: none;
  z-index: 1;
  fill: var(--emerald-kerala);
}

.hero-palm-left {
  left: -50px;
  transform: scaleX(-1);
  animation: gentleSwayLeft 12s ease-in-out infinite alternate;
}

.hero-palm-right {
  right: -50px;
  animation: gentleSwayRight 15s ease-in-out infinite alternate;
}

/* Floating Elephants with Nettipattams in the Hero Background */
.hero-bg-elephant {
  position: absolute;
  bottom: -40px;
  width: min(450px, 80vw);
  height: auto;
  opacity: 0.12;
  z-index: 1;
  fill: var(--gold-metallic);
  pointer-events: none;
}

.hero-bg-elephant-left {
  left: -20px;
  animation: gentleFloatLeft 20s ease-in-out infinite;
}

.hero-bg-elephant-right {
  right: -20px;
  transform: scaleX(-1);
  animation: gentleFloatRight 25s ease-in-out infinite;
}

/* Main Invite Frame */
.hero-frame {
  max-width: 780px;
  width: 90%;
  padding: 60px 40px;
  text-align: center;
  color: var(--text-light);
  border: 1px solid var(--gold-metallic);
  background-color: var(--bg-dark-overlay);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-dark), 0 0 40px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 2;
  animation: fadeInScale 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Elegant brass corners */
.hero-frame::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 2px solid var(--gold-metallic);
  pointer-events: none;
}

.hero-frame::after {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  pointer-events: none;
}

/* Corner brass accents */
.corner-accent {
  position: absolute;
  width: 25px;
  height: 25px;
  border: 3px solid var(--gold-metallic);
  z-index: 3;
}

.corner-top-left { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.corner-top-right { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.corner-bottom-left { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.corner-bottom-right { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

/* Hero Couple Portrait Frame */
.hero-portrait-frame {
  width: 170px;
  height: 210px;
  margin: 15px auto 25px;
  border-radius: 120px 120px 20px 20px;
  border: 3px solid var(--gold-metallic);
  outline: 1px solid var(--crimson-festive);
  outline-offset: -5px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(212, 175, 55, 0.3);
  position: relative;
  background-color: var(--bg-dark-panel);
  animation: gentleFloat 6s ease-in-out infinite;
}

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

.hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  filter: contrast(1.05) brightness(0.95);
  transition: transform 0.8s ease;
}

.hero-portrait-frame:hover .hero-portrait-img {
  transform: scale(1.08);
}

.hero-eyebrow {
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold-light);
  margin-bottom: 20px;
}

.hero-title-main {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  color: var(--text-light);
  margin-bottom: 10px;
  line-height: 1.1;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hero-title-main span {
  display: block;
  font-size: 0.45em;
  color: var(--gold-metallic);
  margin: 15px 0;
  position: relative;
}

.hero-title-main span::before,
.hero-title-main span::after {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 40px;
  height: 1px;
  background-color: var(--gold-metallic);
  margin: 0 15px;
}

.hero-date {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-top: 25px;
  margin-bottom: 5px;
}

.hero-location {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--gold-light);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}


/* =========================================
   INTRO SECTION (COUNTDOWN TIMER)
   ========================================= */
.intro {
  text-align: center;
}

.intro-text-block {
  max-width: 800px;
  margin: 0 auto 50px;
}

.intro-title {
  color: var(--crimson-festive);
  margin-bottom: 24px;
}

.intro-desc {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-medium);
}

/* Countdown container */
.countdown-box {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.countdown-card {
  width: min(100px, 20vw);
  padding: 15px 10px;
  background: var(--bg-cream-dark);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: var(--shadow-card);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--transition-smooth);
}

.countdown-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-metallic);
  box-shadow: var(--shadow-soft), var(--gold-glow);
}

.countdown-number {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--crimson-festive);
  font-weight: 500;
  line-height: 1;
}

.countdown-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-medium);
  margin-top: 5px;
  font-weight: 600;
}

/* =========================================
   INTERACTIVE FESTIVAL EXPERIENCE (style.css)
   ========================================= */
.festival-section {
  background: linear-gradient(to bottom, #FAF6EE 0%, #F5ECDD 100%);
  overflow: hidden;
}

.festival-intro {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 50px;
  color: var(--text-medium);
  font-size: 1.15rem;
  line-height: 1.8;
}

.festival-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.festival-block {
  background: white;
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 50px 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  transition: var(--transition-smooth);
}

.festival-block::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(212, 175, 55, 0.15);
  border-radius: calc(var(--border-radius-lg) - 10px);
  pointer-events: none;
}

.festival-block:hover {
  border-color: var(--gold-metallic);
  box-shadow: var(--shadow-soft), var(--gold-glow);
}

.festival-block h3 {
  text-align: center;
  color: var(--crimson-festive);
  font-size: 2rem;
  margin-bottom: 8px;
}

.festival-block-desc {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 35px;
  color: var(--text-medium);
  font-size: 0.95rem;
}

/* Pooram elements layout */
.pooram-interactive-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* The Parade Grid */
.pooram-elephants-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 60px;
  width: 100%;
  max-width: 900px;
  padding: 20px 0;
  position: relative;
}

/* Elephant Graphic Box */
.elephant-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 320px;
  position: relative;
}

.elephant-display-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-medium);
  margin-top: 15px;
  background-color: rgba(212, 175, 55, 0.15);
  padding: 4px 16px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

/* Muthukuda (Umbrella SVG) styling */
.muthukuda-wrapper {
  position: relative;
  width: 180px;
  height: 140px;
  z-index: 10;
  transform-origin: bottom center;
  transition: var(--transition-smooth);
}

/* Umbrella Colors Classes */
.muthukuda-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
  transition: var(--transition-smooth);
}

/* Umbrella Parts selection for color swapping */
.umbrella-layer-top { fill: var(--umbrella-primary); transition: fill 0.5s ease; }
.umbrella-layer-mid { fill: var(--umbrella-secondary); transition: fill 0.5s ease; }
.umbrella-layer-bottom { fill: var(--umbrella-primary); transition: fill 0.5s ease; }
.umbrella-tassels { fill: #FFD700; }
.umbrella-rim { fill: #E5C158; }
.umbrella-pole { fill: #AA7C11; }

/* Elephant Body (using high-res transparent PNG) */
.elephant-wrapper {
  width: 100%;
  max-width: 260px;
  height: auto;
  position: relative;
  margin-top: -35px; /* Pull it up slightly to overlap with the umbrella pole */
  z-index: 5;
}

.elephant-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
  transition: transform 0.5s ease;
}

/* Thiruvambady elephant faces right, so we flip the default left-facing image */
#elephant-thiruvambady .elephant-img {
  transform: scaleX(-1);
}

/* Paramekkavu elephant faces left (default) */
#elephant-paramekkavu .elephant-img {
  transform: scaleX(1);
}

/* Kudamattom Action Controls */
.pooram-actions-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--bg-cream-dark);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
  max-width: 600px;
  width: 100%;
}

.pooram-actions-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--crimson-festive);
  text-align: center;
  margin-bottom: 5px;
}

.umbrella-color-swatches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.swatch-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.swatch-btn::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.swatch-btn.active::after {
  border-color: var(--gold-metallic);
}

.swatch-btn:hover {
  transform: scale(1.15);
}

/* Swatch Colors */
.swatch-crimson { background-color: #A31D1D; }
.swatch-gold { background-color: #E5C158; }
.swatch-emerald { background-color: #0D3E2F; }
.swatch-royal { background-color: #1A5276; }
.swatch-orange { background-color: #D35400; }
.swatch-purple { background-color: #7D3C98; }

.kudamattom-desc {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-medium);
  margin-top: 10px;
  font-style: italic;
}

/* Umbrella matching state animation */
.umbrella-swap-anim {
  animation: umbrellaFlip 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Chenda Melam layout details */
.chenda-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 20px;
}

.chenda-card {
  background-color: var(--bg-cream);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 40px 30px;
  text-align: center;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  color: var(--text-dark);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.chenda-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(212, 175, 55, 0.2);
  border-radius: calc(var(--border-radius-lg) - 8px);
  pointer-events: none;
  transition: var(--transition-smooth);
}

.chenda-card:hover {
  transform: translateY(-8px);
  background-color: white;
  border-color: var(--gold-metallic);
  box-shadow: var(--shadow-soft), var(--gold-glow);
}

.chenda-card:hover::before {
  border-color: rgba(212, 175, 55, 0.4);
}

.chenda-svg-wrapper {
  width: 120px;
  height: 150px;
  margin: 0 auto 20px;
  position: relative;
  transition: var(--transition-smooth);
}

.chenda-svg {
  width: 100%;
  height: 100%;
  fill: var(--crimson-festive);
  transition: var(--transition-smooth);
}

/* Percussion visual hit wave */
.chenda-ripple {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gold-metallic);
  opacity: 0;
  pointer-events: none;
}

/* Hit states */
.chenda-card.hit {
  animation: cardShudder 0.15s ease-in-out;
}

.chenda-card.hit .chenda-svg-wrapper {
  transform: scale(0.95);
}

.chenda-card.hit .chenda-ripple {
  animation: drumRipple 0.3s ease-out;
}

.chenda-card.hit .chenda-svg {
  fill: var(--gold-metallic);
}

.chenda-title {
  color: var(--text-dark);
  margin-bottom: 8px;
}

.chenda-subtitle {
  color: var(--crimson-festive);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 15px;
}

.chenda-desc {
  font-size: 0.9rem;
  color: var(--text-medium);
}

.chenda-instruction {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-medium);
  margin-top: 30px;
  letter-spacing: 0.05em;
}

/* =========================================
   OUR MOMENTS (GALLERY POLAROID OVERHAUL)
   ========================================= */
.gallery-section {
  background: linear-gradient(to bottom, #FAF6EE 0%, #F3ECE0 100%), 
              radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%);
  position: relative;
  overflow: hidden;
}

/* Beautiful textured or layered background feel */
.gallery-section::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.25;
  pointer-events: none;
  background-image: radial-gradient(var(--gold-metallic) 0.5px, transparent 0.5px), 
                    radial-gradient(var(--gold-metallic) 0.5px, #FAF6EE 0.5px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 50px;
  padding: 20px 10px;
}

.polaroid-card {
  background-color: #FFFDF9;
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: 16px 16px 24px;
  box-shadow: 0 15px 35px rgba(26, 18, 11, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  width: 320px;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  z-index: 1;
}

/* Add slight rotations to cards for the organic scrapbook look */
.polaroid-card:nth-child(1) {
  transform: rotate(-2.5deg) translateY(0);
}

.polaroid-card:nth-child(2) {
  transform: rotate(2deg) translateY(-8px);
}

.polaroid-card:nth-child(3) {
  transform: rotate(-1.5deg) translateY(5px);
}

.polaroid-card:nth-child(4) {
  transform: rotate(3deg) translateY(-4px);
}

/* Gold Pushpin at the top */
.gold-pushpin {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  z-index: 5;
  pointer-events: none;
}

.gold-pushpin::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, #FFF4B8 0%, #D4AF37 60%, #8A640F 100%);
  border-radius: 50%;
  top: 0;
  left: 5px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), inset -1px -1px 3px rgba(0,0,0,0.4);
}

.gold-pushpin::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 12px;
  background: linear-gradient(to right, #B8860B, #8A640F);
  top: 13px;
  left: 11px;
  transform: rotate(-15deg);
  box-shadow: 2px 2px 3px rgba(0,0,0,0.2);
}

.polaroid-image-wrapper {
  width: 100%;
  height: 280px;
  overflow: hidden;
  border: 1px solid rgba(26, 18, 11, 0.06);
  position: relative;
  background-color: #eee;
}

.polaroid-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: block;
}

.polaroid-caption {
  padding-top: 18px;
  text-align: center;
}

.polaroid-caption h3 {
  font-family: 'Caveat', cursive;
  font-size: 1.95rem;
  color: var(--crimson-festive);
  margin-bottom: 2px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.polaroid-caption p {
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  color: var(--text-medium);
  margin-bottom: 0;
  font-style: normal;
  opacity: 0.85;
}

/* Hover effect */
.polaroid-card:hover {
  transform: scale(1.05) rotate(0deg) translateY(-15px) !important;
  z-index: 10;
  box-shadow: 0 25px 50px rgba(26, 18, 11, 0.25), 0 0 20px rgba(212, 175, 55, 0.3);
  border-color: var(--gold-metallic);
}

.polaroid-card:hover .polaroid-image-wrapper img {
  transform: scale(1.05);
}

/* Lightbox Modal CSS */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(13, 9, 6, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox.show {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.show .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 4px solid white;
  box-shadow: var(--shadow-dark);
  border-radius: var(--border-radius-sm);
  background-color: #1a120b;
}

.lightbox-caption {
  font-family: 'Caveat', cursive;
  font-size: 2.2rem;
  color: var(--gold-light);
  margin-top: 15px;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  font-weight: 700;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 3.5rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  z-index: 2010;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lightbox-close:hover {
  color: var(--gold-metallic);
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .polaroid-card {
    width: 290px;
    padding: 12px 12px 20px;
  }
  
  .polaroid-image-wrapper {
    height: 250px;
  }
  
  .polaroid-card:nth-child(1),
  .polaroid-card:nth-child(2),
  .polaroid-card:nth-child(3) {
    transform: rotate(0deg) translateY(0); /* Disable rotations on mobile to save space */
  }
  
  .polaroid-card:hover {
    transform: translateY(-8px) !important;
  }

  .lightbox-close {
    top: 15px;
    right: 15px;
    font-size: 2.8rem;
  }

  .lightbox-caption {
    font-size: 1.8rem;
  }
}

/* =========================================
   KATHAKALI MOTIF STYLING
   ========================================= */
.kathakali-badge {
  width: 90px;
  height: 110px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
  transition: var(--transition-smooth);
}

.kathakali-badge:hover {
  transform: scale(1.08) rotate(2deg);
}

.kathakali-svg {
  width: 100%;
  height: 100%;
}



/* =========================================
   WEDDING DETAILS & VENUES
   ========================================= */
.details-section {
  background: linear-gradient(to bottom, #FAF6EE 0%, #F3ECE0 100%);
}

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

.detail-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 40px 30px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.detail-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-metallic);
  box-shadow: var(--shadow-soft), var(--gold-glow);
}

.detail-header {
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding-bottom: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.detail-header-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 15px;
  fill: var(--crimson-festive);
}

.detail-time {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--crimson-festive);
  font-weight: 500;
  margin-top: 5px;
}

.detail-body {
  flex-grow: 1;
  text-align: center;
  color: var(--text-medium);
  font-size: 0.95rem;
}

.venue-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-top: 10px;
  margin-bottom: 5px;
}

.detail-actions {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-calendar {
  background: white;
  color: var(--crimson-festive);
  border: 1px solid var(--crimson-festive);
  font-size: 0.8rem;
  padding: 10px 20px;
}

.btn-calendar:hover {
  background: var(--crimson-festive);
  color: white;
}

/* =========================================
   RSVP SECTION (ENVELOPE LOOK)
   ========================================= */
.rsvp-section {
  background-color: var(--bg-cream-dark);
}

.rsvp-container {
  max-width: 750px;
  margin: 0 auto;
}

/* The Invitation Envelope Wrapper */
.rsvp-envelope {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.rsvp-envelope-header {
  background: var(--emerald-gradient);
  color: var(--text-light);
  padding: 30px 40px;
  text-align: center;
  position: relative;
  border-bottom: 2px solid var(--gold-metallic);
}

.rsvp-envelope-header::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  pointer-events: none;
}

.rsvp-envelope-header h3 {
  color: var(--gold-light);
  margin-bottom: 5px;
}

.rsvp-envelope-header p {
  margin-bottom: 0;
  font-size: 0.95rem;
  opacity: 0.9;
  letter-spacing: 0.05em;
}

.rsvp-form {
  padding: 40px;
}

.rsvp-form-group {
  margin-bottom: 25px;
}

.rsvp-form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-medium);
  margin-bottom: 8px;
}

.rsvp-form-group input[type="text"],
.rsvp-form-group input[type="email"],
.rsvp-form-group select,
.rsvp-form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-cream);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.rsvp-form-group input:focus,
.rsvp-form-group select:focus,
.rsvp-form-group textarea:focus {
  outline: none;
  border-color: var(--gold-metallic);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
  background-color: white;
}

/* Custom Styled Radio Badges for Attending Choice */
.rsvp-radio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.rsvp-radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: var(--bg-cream);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-weight: 600;
  text-align: center;
  color: var(--text-medium);
  position: relative;
}

.rsvp-radio-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.rsvp-radio-label:hover {
  border-color: var(--gold-metallic);
  background-color: rgba(212, 175, 55, 0.05);
}

.rsvp-radio-label.selected {
  background-color: var(--emerald-kerala);
  color: var(--text-light);
  border-color: var(--gold-metallic);
  box-shadow: var(--shadow-card);
}

/* Success Card Overlay styling */
.rsvp-success-card {
  position: absolute;
  inset: 0;
  background-color: white;
  z-index: 50;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  animation: overlayReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.rsvp-success-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 25px;
  fill: var(--gold-metallic);
  filter: drop-shadow(0 4px 10px rgba(212, 175, 55, 0.2));
}

.rsvp-success-title {
  color: var(--crimson-festive);
  margin-bottom: 12px;
}

.rsvp-success-text {
  color: var(--text-medium);
  max-width: 450px;
  font-size: 1.05rem;
}

/* =========================================
   FOOTER (TRADITIONAL GREETING)
   ========================================= */
.footer {
  background-color: var(--bg-dark-panel);
  color: var(--text-light);
  padding: 60px 0;
  text-align: center;
  border-top: 2px solid var(--gold-metallic);
  position: relative;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--gold-light);
  margin-bottom: 10px;
  letter-spacing: 0.1em;
}

.footer-quote {
  font-style: italic;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 30px;
  font-size: 0.95rem;
}

.footer-bottom {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 20px;
}

.hidden {
  display: none !important;
}

/* =========================================
   KEYFRAME ANIMATIONS
   ========================================= */
@keyframes fadeInScale {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes overlayReveal {
  0% { opacity: 0; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes gentlePulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes bounceBar {
  0% { height: 10%; }
  100% { height: 100%; }
}


@keyframes umbrellaFlip {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(0.9) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes cardShudder {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-4px) rotate(-1deg); }
  75% { transform: translateY(2px) rotate(1deg); }
}

@keyframes drumRipple {
  0% { width: 80px; height: 20px; opacity: 1; }
  100% { width: 140px; height: 40px; opacity: 0; }
}

@keyframes gentleSwayLeft {
  0% { transform: scaleX(-1) rotate(0deg); }
  100% { transform: scaleX(-1) rotate(4deg); }
}

@keyframes gentleSwayRight {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-5deg); }
}

@keyframes gentleFloatLeft {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(15px, -15px) rotate(2deg); }
}

@keyframes gentleFloatRight {
  0%, 100% { transform: scaleX(-1) translate(0, 0); }
  50% { transform: scaleX(-1) translate(-20px, -10px) rotate(-3deg); }
}

/* =========================================
   RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 992px) {
  .hero-palm-left, .hero-palm-right {
    width: 200px;
    opacity: 0.15;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
  
  .kasavu-border {
    padding: 24px 16px;
  }
  
  .kasavu-border::before { inset: 4px; }
  .kasavu-border::after { inset: 8px; }

  .hero-frame {
    padding: 40px 20px;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .floating-controls {
    bottom: 16px;
    left: 16px;
  }

  /* Pooram display changes for stack */
  .pooram-elephants-row {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
  
  .elephant-display {
    max-width: 250px;
  }

  /* Drums visual changes */
  .chenda-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }



  /* RSVP Form adjustments */
  .rsvp-radio-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .rsvp-form {
    padding: 20px;
  }
}

/* =========================================
   KATHAKALI MOTIF EXTENSIONS
   ========================================= */
.kathakali-hero-seal {
  width: 60px;
  height: 72px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.kathakali-hero-seal:hover {
  transform: scale(1.15) rotate(3deg);
}

.rsvp-envelope-seal {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 70px;
  z-index: 10;
  cursor: pointer;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rsvp-envelope:hover .rsvp-envelope-seal {
  transform: translateX(-50%) scale(1.1) rotate(-5deg);
}

.rsvp-envelope-seal:hover {
  transform: translateX(-50%) scale(1.2) rotate(5deg) !important;
}

/* Adjust RSVP envelope header padding to accommodate the seal */
.rsvp-envelope-header {
  padding-bottom: 45px !important;
}