/* === Premium Magahi–Madhubani Invitation Theme (Matte) === */
:root {
  --paper: #f9f0f0; /* Deeper dusty rose background */
  --ink: #2e0f0f; /* Darker reddish ink for text */
  --muted: #8a5e5e; /* Deeper muted dusty rose for secondary text */
  --maroon: #5a0e0e; /* Deeper maroon */
  --teal-light: #5a9c92; /* Deeper teal */
  --gold: #8a6a1f; /* Deeper warm gold */
  --ring: #d4a307; /* Deeper gold for focus rings */
  --shadow-soft: 0 15px 60px rgba(0, 0, 0, 0.15);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Tiro Devanagari Hindi', sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fdf5f5 0%, #f9ecec 30%, #fdf5f5 100%), 
              url('assets/img/gold-pattern.svg'); /* Fallback gold pattern */
  background-size: cover, 180px; /* Adjust pattern size */
  background-repeat: no-repeat, repeat; /* Ensure gradient doesn't repeat */
  background-attachment: fixed; /* Keep background fixed during scroll */
  overflow-x: hidden;
  /* Add paper texture overlay */
  position: relative;
  /* Remove global italic - apply selectively */
  font-style: normal;
  letter-spacing: 0.02em;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="200" height="200"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noise)" opacity="0.03"/%3E%3C/svg%3E');
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

body::after {
  /* Ensure this layer does not obstruct the video */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2; /* Ensure it's below the video */
  background: none; /* Remove texture to allow video visibility */
  opacity: 0; /* Fully transparent */
}

/* Remove all video-related styles */
#videoBackground,
#videoLightOverlay,
#videoMask {
  display: none !important;
}

/* Add Samarkan font */
@font-face {
  font-family: 'Samarkan';
  src: url('fonts/Samarkan.ttf') format('truetype');
  font-display: swap;
}

.hero {
  position: relative;
  height: 35vh;
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  z-index: 1;
  /* Add subtle vignette effect for depth */
  box-shadow: inset 0 -40px 60px -20px rgba(0, 0, 0, 0.15);
}

/* Hero header banner - MORE OPAQUE for distinction */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('img/bg33.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(0.85) contrast(0.92) brightness(1.05);
  opacity: 1; /* Changed from 0.95 to full opacity */
  z-index: 0;
}

/* Add stronger paper texture overlay to hero for more opacity */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 215, 180, 0.12) 0%, rgba(255, 192, 203, 0.08) 25%, rgba(255, 228, 196, 0.10) 50%, rgba(255, 218, 185, 0.08) 75%, rgba(255, 205, 210, 0.12) 100%);
  background-size: 400% 400%;
  background-position: 0% 50%;
  animation: heroTextureFlow 30s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
  opacity: 0.7;
}

/* Smooth zoom transition for intermediate screens */
@media (max-width: 1250px) and (min-width: 781px) {
  .hero::before {
    background-size: 400% 400%;
  }
}

/* Mobile - moderate zoom only */
@media (max-width: 780px), (orientation: portrait) {
  .hero::before {
    background-size: 150% auto; /* Much less zoom */
  }
}

.hero-inner {
  position: relative;
  text-align: center;
  padding: 1.5rem 1.5rem 1.25rem; /* Slightly more balanced padding */
  z-index: 10 !important; /* Increased to appear above the overlay */
}

/* Remove the oval backdrop - it looked cheap */
/* .hero-inner::before removed */

.script {
  font-family: 'Samarkan', 'Dancing Script', 'Great Vibes', cursive;
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  background: linear-gradient(
    135deg,
    #700000 0%,      /* Rich dark red */
    #8b1538 15%,     /* Crimson */
    #4a0e4e 30%,     /* Deep purple */
    #2c003e 45%,     /* Royal purple */
    #1a0033 60%,     /* Dark violet */
    #700000 75%,     /* Rich dark red */
    #8b1538 100%     /* Crimson */
  );
  background-size: 300% 300%; /* Increased from 200% for more dramatic movement */
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.12em; /* Increased from 0.08em for more elegance */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4))   /* Softer shadows */
          drop-shadow(0 1px 2px rgba(255, 255, 255, 0.2))
          saturate(0.95); /* Slight desaturation for matte look */
  font-weight: 400;
  margin: 0 0 0.5rem;
  animation: shimmer 6s ease-in-out infinite, gradientShift 10s ease-in-out infinite; /* Faster gradient shift */
  text-shadow: none;
  position: relative;
  font-style: normal;
}

/* Replace Ganesh with back34.jpg - DESKTOP (LARGER SIZE) */
.script::after {
  content: "";
  position: absolute;
  right: -200px; /* Changed from -180px */
  top: 50%;
  transform: translateY(-50%);
  width: 200px; /* Changed from 170px */
  height: 300px; /* Changed from 260px */
  background-image: url('img/back34.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25)) saturate(0.9) contrast(0.95);
  border-radius: 12px;
}

/* Tablet - slightly larger version on right */
@media (min-width: 900px) and (max-width: 1200px) {
  .script::after {
    right: -130px; /* Changed from -120px */
    width: 95px; /* Changed from 80px */
    height: 165px; /* Changed from 140px */
  }
}

/* MOBILE - MUCH LARGER floating version in top-right of hero */
@media (max-width: 900px) {
  .script::after {
    position: fixed;
    right: 8px; /* Changed from 10px for more space */
    top: 70px;
    transform: none;
    width: 70px; /* Changed from 45px - 55% larger! */
    height: 120px; /* Changed from 75px - 60% la545rger! */
    opacity: 0.8; /* Slightly more visible */
    z-index: 100;
    pointer-events: none;
  }
}

/* Extra small mobile - generously larger */
@media (max-width: 480px) {
  .script::after {
    width: 60px; /* Changed from 38px - 58% larger! */
    height: 105px; /* Changed from 65px - 62% larger! */
    top: 60px;
  }
}

@keyframes shimmer {
  0%,
  100% {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4))
            drop-shadow(0 1px 2px rgba(255, 255, 255, 0.2))
            saturate(0.95)
            brightness(1);
  }
  50% {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5))
            drop-shadow(0 2px 3px rgba(255, 255, 255, 0.3))
            saturate(0.98)
            brightness(1.08); /* Softer brightness change */
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  33% {
    background-position: 50% 100%;
  }
  66% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Spinning animation for loading indicator */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes heroTextureFlow {
  0%, 100% {
    background-position: 0% 50%, 0 0;
  }
  25% {
    background-position: 100% 75%, 50px 50px;
  }
  50% {
    background-position: 50% 25%, 100px 100px;
  }
  75% {
    background-position: 100% 50%, 50px 100px;
  }
}

.tabs {
  display: flex;
  gap: .6rem;
  justify-content: center;
  align-items: center;
  background-image: url('img/banner-17.png'); /* Image background */
  background-size: cover !important; /* Fill entire navbar, zoom if needed */
  background-position: center !important; /* Center the image */
  background-repeat: no-repeat !important; /* Never repeat/tile */
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: .55rem .8rem;
  position: relative;
  z-index: 1;
  overflow: hidden; /* Clip any overflow from zoomed image */
}

/* Remove all pseudo-element texture attempts */
.tabs::before,
.tabs::after {
  display: none !important;
}

/* Add orange translucent overlay ON TOP of background image */
.tabs::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: rgba(255, 140, 0, 0.4) !important; /* Orange overlay - 40% opacity */
  pointer-events: none !important;
  z-index: 1 !important; /* Above image, below text */
  display: block !important;
  mix-blend-mode: normal !important; /* Normal layering */
}

/* Ensure tabs appear above overlays */
.tab {
  position: relative !important;
  z-index: 10 !important;
  color: #000 !important; /* Changed to black for new background */
  text-decoration: none;
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  padding: .5rem .9rem;
  border-radius: 4px;
  background: transparent;
  transition: background .2s, color .2s;
  font-style: normal;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.2); /* Light overlay on hover */
  color: #000 !important; /* Keep black on hover */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tab:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  color: #000 !important; /* Keep black on focus */
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.2rem 1.1rem;
  position: relative;
  z-index: 1;
}

/* Refined section spacing for elegance */
.section {
  margin: 2.5rem 0; /* Reduced from 3.5rem */
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.section::before {
  content: none !important;
}

.section > * {
  position: relative;
  z-index: 1;
}

.section .grid-2,
.section .grid-3 {
  position: relative;
  z-index: 1;
}

.section .grid-2::before,
.section .grid-3::before {
  content: none !important;
}

.section .grid-2 > *,
.section .grid-3 > * {
  position: relative;
  z-index: 1;
}

.section .grid-2 > *::before,
.section .grid-3 > *::before {
  content: none !important;
}

.section .grid-2 > * > *,
.section .grid-3 > * > * {
  position: relative;
  z-index: 1;
}

.section-invite {
  display: grid;
  grid-template-columns: 1fr; /* Changed to single column - side art removed */
  gap: 1.2rem;
  align-items: stretch;
}

.section-invite > div {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.section-invite .side-art {
  display: flex;
  align-items: stretch;
  padding: 0; /* Ensure no padding */
}

.section-invite .side-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(186, 144, 65, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  flex: 1;
}

.section-invite .card {
  padding: 1.5rem 1.35rem; /* Match invite-card padding exactly */
  margin: 0; /* Remove margin inside grid */
}

.section-invite > div::before {
  content: none !important;
}

.section-invite > div > * {
  position: relative;
  z-index: 1;
}

.invite-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.75rem 1.5rem; /* Matches .card padding */
  box-sizing: border-box;
  width: 100%; /* Ensure full width */
  position: relative; /* For background positioning */
  overflow: hidden; /* Contain background image */
  background: transparent !important;
}

/* Add decorative background to invitation card - BEHIND video */
.invite-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('img/bg21.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.5;
  z-index: 0; /* Changed from 0 to 1 - above card base, below content */
  pointer-events: none;
}

/* White semi-transparent overlay for readability */
.invite-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(255, 250, 245, 0.85) 0%,
    rgba(255, 245, 238, 0.83) 50%,
    rgba(255, 248, 243, 0.82) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Ensure ALL invitation content appears above both backgrounds */
.invite-card > * {
  position: relative;
  z-index: 2;
}

.section-invite .side-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(186, 144, 65, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

#itinerary.section {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

#itinerary.section::before {
  content: none !important;
}

#venues.section .grid-2 > div {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

#venues.section .grid-2 > div::before {
  content: none !important;
}

#travel.section,
#rsvp.section,
#memories.section,
#guests.section {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

#travel.section::before,
#rsvp.section::before,
#memories.section::before,
#guests.section::before {
  content: none !important;
}

.top-border,
.bottom-border {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
  margin: 0.6rem 0;
  border: 1px solid rgba(186, 144, 65, 0.35);
  /* NO animation */
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding: 0;
  margin: 0.6rem 0 1rem 0;
}

.pill-list li {
  list-style: none;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
}

/* Timeline nodes - three column layout with connecting lines */
.timeline {
  position: relative;
  padding-left: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Changed from repeat(2, 1fr) */
  gap: 1.2rem 1.5rem;
}

/* Remove the old single vertical line */
.timeline:before {
  content: none;
}

.node {
  display: flex;
  gap: 1rem;
  margin: 0;
  align-items: flex-start;
  position: relative;
}

/* Connecting line from dot to next item */
.node::after {
  content: "";
  position: absolute;
  left: 6px; /* Center of dot */
  top: 32px; /* Below dot */
  width: 2px;
  height: calc(100% + 1.5rem); /* Extend to next row */
  background: linear-gradient(to bottom, var(--gold), transparent);
  opacity: 0.4;
  z-index: -1;
}

/* Remove line from last three items (one per column) */
.node:nth-last-child(1)::after,
.node:nth-last-child(2)::after,
.node:nth-last-child(3)::after { /* Added third column */
  content: none;
}

/* Horizontal connector between columns (zigzag effect) */
.node:nth-child(odd)::before {
  content: "";
  position: absolute;
  left: calc(100% + 1rem); /* From right of dot */
  top: 6px; /* Centered with dot */
  width: calc(2rem); /* Gap width */
  height: 2px;
  background: linear-gradient(to right, var(--gold) 0%, transparent 100%);
  opacity: 0.3;
  z-index: -1;
}

/* Remove horizontal line from last odd item if it's also the last overall */
.node:nth-child(odd):last-child::before {
  content: none;
}

.node .dot {
  width: 12px;
  height: 12px;
  min-width: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--maroon) 0%, var(--gold) 100%);
  margin-top: 0.45rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(138, 106, 31, 0.15); /* Add ring effect */
  position: relative;
  z-index: 1;
}

/* Pulse animation for dots */
@keyframes pulse {
   0%, 100% {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(138, 106, 31, 0.15);
  }
  50% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 0 0 5px rgba(138, 106, 31, 0.25);
  }
}

.node .dot {
  animation: pulse 2s ease-in-out infinite;
}

.node .title {
  font-weight: 700;
  color: var(--gold); /* Changed from var(--maroon) to golden */
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  font-family: 'Inter', 'Tiro Devanagari Hindi', sans-serif;
  font-style: normal;
}

/* Medium screens - 2 columns max */
@media (min-width: 821px) and (max-width: 1100px) {
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .node:nth-last-child(1)::after,
  .node:nth-last-child(2)::after {
    content: none;
  }
  
  .node:nth-last-child(3)::after {
    content: ""; /* Re-enable for middle items */
  }
}

/* Mobile - single column, simpler connections */
@media (max-width: 820px) {
  .timeline {
    grid-template-columns: 1fr;
    gap: 1.2rem; /* Reduced from 1.5rem */
    padding-left: 2rem; /* Make room for line */
  }
  
  /* Single vertical line on left side */
  .timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--maroon), var(--gold));
    opacity: 0.4;
  }
  
  /* Remove complex connectors on mobile */
  .node::after,
  .node::before {
    content: none;
  }
  
  .node {
    padding-left: 0;
  }
}

.node .content {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(90, 156, 146, 0.25);
  border-radius: 14px; /* Reduced from 16px */
  padding: 0.85rem 1rem; /* Reduced from 1rem 1.25rem */
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

/* Background pattern for timeline nodes */
.node .content::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('img/back37.png');
  background-size: 400%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
  filter: saturate(0.8) contrast(0.9);
}

/* Ensure text content appears above background */
.node .title,
.node .meta,
.node .actions {
  position: relative;
  z-index: 1;
}

.node .meta {
  color: #4a1f1f; /* Changed from var(--muted) to deeper, darker color */
  font-size: 0.8rem; /* Reduced from 0.85rem */
  line-height: 1.5; /* Reduced from 1.6 */
  font-style: italic;
  letter-spacing: 0.02em;
  font-weight: 600; /* Added weight for better visibility */
}

.node .actions {
  margin-top: 0.5rem; /* Reduced from 0.6rem */
}

.btn,
.btn-primary,
.admin-button,
.file.btn {
  color: #2e0f0f;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  transition: all .3s ease;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  display: inline-block;
  font-style: normal;
}

.btn:hover,
.btn-primary:hover,
.admin-button:hover,
.file.btn:hover {
  background: linear-gradient(90deg, #d4a307 0%, #ff8800 100%);
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:focus,
.btn-primary:focus,
.admin-button:focus,
.file.btn:focus {
  outline: 2px solid var(--gold);
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: #fff;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.15);
  font-style: normal;
}

.chip:hover {
  background: rgba(0, 0, 0, 0.32);
}

.chip-primary {
  border-color: transparent;
  background: linear-gradient(90deg, var(--maroon), var(--teal-light)); /* Deeper chip gradient */
  font-style: normal;
}

.lang-toggle,
.gear {
  position: absolute;
  top: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.38rem 0.66rem;
  border-radius: 999px;
  cursor: pointer;
  font-style: normal;
}

.lang-toggle {
  right: 10px;
}

.gear {
  right: 70px;
}

/* Grid adjustments for better spacing */
.grid-2 {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem; /* Reduced from 2rem */
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem 1rem; /* Reduced from 0.75rem 1.2rem */
}

.venue .banner img {
  width: 100%;
  height: 180px; /* Reduced from 200px */
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(186, 144, 65, 0.35);
  margin-bottom: 1rem; /* Reduced from 1.25rem */
}

.venue .v-content {
  padding: 0.4rem 0; /* Reduced from 0.6rem 0 */
  position: relative;
  z-index: 2; /* Increased to ensure visibility */
  display: block; /* Explicit display */
}

.venue .v-content > * {
  position: relative;
  z-index: 1;
}

/* Individual venue item spacing */
.venue-item {
  margin-bottom: 1.2rem; /* Reduced from 1.5rem */
  padding-bottom: 1.2rem; /* Reduced from 1.5rem */
  border-bottom: 1px solid rgba(186, 144, 65, 0.15);
  display: block; /* Explicit display */
  position: relative;
  z-index: 1;
}

.venue .v-content {
  padding: 0.6rem 0;
  position: relative;
  z-index: 1; /* Ensure content is above any backgrounds */
}

/* Individual venue item spacing */
.venue-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(186, 144, 65, 0.15);
}

.venue-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Venue name styling */
.venue-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold); /* Changed from var(--maroon) to golden */
  margin: 0 0 0.3rem 0;
  font-family: 'Inter', 'Tiro Devanagari Hindi', sans-serif;
  letter-spacing: 0.02em;
}

/* Venue address styling */
.venue-address {
  font-size: 0.8rem; /* Reduced from 0.85rem */
  color: var(--muted);
  margin: 0 0 0.6rem 0; /* Reduced from 0.75rem */
  font-style: italic;
  line-height: 1.5;
}

/* Enhanced venue chip buttons */
.venue-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--maroon) 0%, var(--gold) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  transition: all .3s ease;
  text-decoration: none;
  cursor: pointer;
  font-style: normal;
}

.venue-chip:hover {
  background: linear-gradient(135deg, #700000 0%, #b8941f 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.venue-chip:active {
  transform: translateY(0);
}

/* Venue button styling - matches site button style */
.venue-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: auto; /* Fits content on all screens */
  justify-content: center;
}

/* Button icon styling */
.btn-icon {
  font-size: 1.2em;
  line-height: 1;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .venue-item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
  }
  
  .venue-name {
    font-size: 0.95rem;
  }
  
  .venue-address {
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
  }
  
  .venue-btn {
    font-size: 0.9rem;
    /* Removed width: 100% - now fits content on mobile too */
  }
}

/* Form labels - more compact */
form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* Reduced from 0.3rem */
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.45rem; /* Reduced from 0.5rem */
  font-size: 0.8rem; /* Reduced from 0.85rem */
  font-style: italic;
  color: var(--gold);
}

/* Input fields - more compact */
input,
select,
textarea {
  font: inherit;
  padding: 0.5rem 0.65rem; /* Reduced from 0.55rem 0.7rem */
  border: 1px solid rgba(184, 224, 216, 0.4);
  border-radius: 10px; /* Reduced from 12px */
  background: #fff;
  outline: none;
  transition: 0.15s box-shadow, 0.15s border-color;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-size: 0.88rem; /* Reduced from 0.9rem */
  font-style: normal;
  letter-spacing: normal;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.12); /* Reduced from 3px */
}

.wide {
  grid-column: 1 / -1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem; /* Reduced from 0.4rem */
  align-items: center;
  margin-top: 0.65rem; /* Reduced from 0.75rem */
}

.rsvp-card {
  padding: 1.75rem 1.5rem; /* Changed from 2rem 1.75rem to match .card padding */
  max-width: 100%; /* Changed from 700px - let it match other cards */
  margin: 1rem; /* Added margin - was missing! This matches .card */
}

/* Multi-step form wizard */
.rsvp-wizard {
  position: relative;
  min-height: 360px; /* Increased from 320px */
  padding: 0.5rem 0;
}

/* Step indicator dots */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(138, 106, 31, 0.3);
  transition: all 0.3s ease;
}

.step-dot.active {
  background: var(--gold);
  width: 24px;
  border-radius: 4px;
}

/* Form steps */
.form-step {
  display: none; /* Changed from position absolute */
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

.form-step.active {
  display: block; /* Show active step */
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Compact input groups */
.input-group {
  margin-bottom: 1.2rem;
}

.input-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-style: normal;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(186, 144, 65, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(138, 106, 31, 0.1);
  outline: none;
}

/* Inline input groups (for compact layouts) */
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-row-3 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

/* Form navigation */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

.btn-nav {
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(138, 106, 31, 0.3);
  background: transparent;
  color: var(--gold);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}

.btn-nav:hover {
  background: rgba(138, 106, 31, 0.1);
  border-color: var(--gold);
}

.btn-nav.btn-primary {
  background: linear-gradient(135deg, var(--maroon), var(--gold));
  color: #fff;
  border: none;
}

.btn-nav.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Step titles */
.step-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold); /* Changed from var(--maroon) to golden */
  margin-bottom: 0.3rem;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}

.step-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* Success state */
.rsvp-success {
  text-align: center;
  padding: 2rem 1rem;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.rsvp-success h3 {
  color: var(--gold); /* Changed from var(--maroon) to golden */
  margin-bottom: 0.5rem;
  font-style: normal;
}

.rsvp-success p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .rsvp-card {
    padding: 1.5rem 1.25rem; /* Changed from 1.5rem 1.25rem to match mobile .card padding */
    margin: 0.75rem; /* Added mobile margin - matches mobile .card */
  }
  
  .input-row,
  .input-row-3 {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .form-nav {
    flex-direction: column-reverse;
  }
  
  .btn-nav {
    width: 100%;
  }
  
  .rsvp-wizard {
    min-height: 420px;
  }
}

.msg {
  color: var(--teal);
  font-weight: 800;
}

.table-tools {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.6rem 0;
  align-items: center; /* Vertical alignment */
}

/* Guest Manager buttons - match site button style */
.table-tools .btn,
.table-tools .file.btn,
.table-tools #exportBtn,
.table-tools #logoutBtn {
  /* Match main site button style exactly */
  color: #2e0f0f !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 215, 0, 0.25) !important;
  font-weight: 400 !important;
  font-family: 'Inter', sans-serif !important;
  letter-spacing: 0.08em !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  border-radius: 999px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem !important; /* Consistent font size */
  transition: all .3s ease !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  outline: none !important;
  display: inline-block !important;
  font-style: normal !important;
  min-height: 36px !important; /* Consistent height */
  line-height: 1.2 !important;
}

.table-tools .btn:hover,
.table-tools .file.btn:hover,
.table-tools #exportBtn:hover,
.table-tools #logoutBtn:hover {
  background: linear-gradient(90deg, #d4a307 0%, #ff8800 100%) !important;
  color: #fff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* Search and filter inputs */
.table-tools #search,
.table-tools #statusFilter {
  padding: 0.5rem 0.75rem !important;
  border: 1px solid rgba(186, 144, 65, 0.3) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.85rem !important;
  font-family: 'Inter', sans-serif !important;
  min-height: 36px !important;
  line-height: 1.2 !important;
}

.table-tools #search:focus,
.table-tools #statusFilter:focus {
  border-color: var(--gold) !important;
  background: #fff !important;
  box-shadow: 0 0 0 2px rgba(138, 106, 31, 0.1) !important;
  outline: none !important;
}

/* Admin message styling */
.table-tools #adminMsg {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  padding: 0.5rem 0.75rem !important;
  font-family: 'Inter', sans-serif !important;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .table-tools {
    gap: 0.5rem;
  }
  
  .table-tools .btn,
  .table-tools .file.btn,
  .table-tools #exportBtn,
  .table-tools #logoutBtn {
    font-size: 0.8rem !important;
    padding: 0.45rem 0.9rem !important;
    min-height: 34px !important;
  }
  
  .table-tools #search,
  .table-tools #statusFilter {
    font-size: 0.8rem !important;
    min-height: 34px !important;
  }
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(186, 144, 65, 0.25);
  border-radius: 12px;
  max-height: 600px; /* Add fixed height - scrolling starts at 600px */
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem; /* Reduced from 0.96rem for more columns */
  background: #fff;
  font-style: normal;
  min-width: 1800px; /* Ensure horizontal scroll for all columns */
}

thead {
  background: #fff7ed;
  position: sticky;
  top: 0;
  z-index: 10;
}

th,
td {
  padding: 0.5rem 0.4rem; /* Reduced from 0.7rem 0.65rem */
  border-bottom: 1px solid #f0e6d6;
  vertical-align: middle;
  font-style: normal;
  white-space: nowrap; /* Prevent text wrapping */
}

/* Make editable inputs smaller */
.cell-input {
  width: 100%;
  min-width: 80px;
  padding: 0.3rem 0.4rem;
  font-size: 0.8rem;
  border: 1px solid rgba(186, 144, 65, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
}

.cell-input:focus {
  border-color: var(--gold);
  background: #fff;
  outline: none;
}

textarea.cell-input {
  resize: vertical;
  min-height: 32px;
  font-family: inherit;
}

/* Color-code different sections */
th:nth-child(n+4):nth-child(-n+8) {
  background: rgba(138, 106, 31, 0.05); /* Arrival columns - light gold */
}

th:nth-child(n+9):nth-child(-n+13) {
  background: rgba(90, 156, 146, 0.05); /* Departure columns - light teal */
}

tbody tr:hover {
  background: #fffdf5;
}

.footer {
  padding: 2.2rem 1rem;
  text-align: center;
  color: var(--muted);
  font-style: normal;
}

dialog {
  border: none;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  padding: 1.2rem;
  width: min(90vw, 440px);
  background: #fffaf3;
  border: 1px solid rgba(186, 144, 65, 0.45);
}

.pin-form input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(186, 144, 65, 0.4);
  border-radius: 12px;
  margin: 0.5rem 0;
  font-style: normal;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.gallery .img {
  margin: 0;
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(184, 224, 216, 0.35);
  filter: saturate(0.9) contrast(0.95); /* Matte finish */
  opacity: 0.92; /* Slightly transparent for paper effect */
}

.gallery .tall img {
  height: 320px;
}

.gallery .wide img {
  height: 180px;
}

@media (max-width: 1100px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .section-invite {
    grid-template-columns: 1fr !important;
  }
  .section-invite .side-art {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .section-invite {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    padding: 2rem 1.5rem;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 1.2rem; /* Reduced from 1.5rem */
    padding-left: 2rem;
  }

  .grid-3 {
    gap: 0.7rem 1rem; /* Reduced from 0.9rem 1.25rem */
  }
  
  form label {
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
  }
  
  input,
  select,
  textarea {
    padding: 0.55rem 0.7rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 540px) {
  .hero {
    min-height: 220px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.75rem 1.25rem;
  }
  
  .card h2 {
    font-size: 1.5rem;
  }
  
  .timeline {
    gap: 1.25rem;
  }
  
  .node .content {
    padding: 0.9rem 1rem; /* Reduced from 1rem 1.25rem */
  }
  
  .node .title {
    font-size: 0.95rem;
  }
  
  .node .meta {
    font-size: 0.8rem;
  }
}

@media (max-width: 640px) {
  .rsvp-card {
    padding: 1.5rem 1.25rem; /* Reduced from 1.5rem 1.25rem */
  }
  
  .grid-3 {
    gap: 0.6rem 1rem; /* Reduced from 0.8rem */
  }
  
  form label {
    margin-bottom: 0.4rem; /* Reduced from 0.5rem */
    gap: 0.25rem;
    font-size: 0.8rem;
  }
  
  input,
  select,
  textarea {
    padding: 0.5rem 0.65rem; /* Reduced from 0.65rem 0.75rem */
    font-size: 0.85rem; /* Reduced from 0.9rem */
  }
}

.banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(186, 144, 65, 0.35);
  /* NO animation */
}

/* Form labels - more compact */
form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem; /* Reduced from 0.6rem */
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem; /* Reduced from 0.5rem for tighter spacing */
  font-size: 0.9rem; /* Reduced from 0.95rem */
  font-style: italic;
  color: var (--gold);
}

/* Input fields - more compact */
input,
select,
textarea {
  font: inherit;
  padding: 0.7rem 0.85rem; /* Reduced from 0.85rem 1rem */
  border: 1px solid rgba(184, 224, 216, 0.4);
  border-radius: 12px; /* Reduced from 14px */
  background: #fff;
  outline: none;
  transition: 0.15s box-shadow, 0.15s border-color;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-size: 0.95rem; /* Reduced from 1rem */
  font-style: normal;
  letter-spacing: normal;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15); /* Reduced from 4px */
}

.wide {
  grid-column: 1 / -1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem; /* Reduced from 0.7rem */
  align-items: center;
  margin-top: 1rem; /* Reduced from 0.7rem but moved up from form */
}

.msg {
  color: var(--teal);
  font-weight: 800;
}

.table-tools {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.6rem 0;
  align-items: center; /* Vertical alignment */
}

/* Guest Manager buttons - match site button style */
.table-tools .btn,
.table-tools .file.btn,
.table-tools #exportBtn,
.table-tools #logoutBtn {
  /* Match main site button style exactly */
  color: #2e0f0f !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 215, 0, 0.25) !important;
  font-weight: 400 !important;
  font-family: 'Inter', sans-serif !important;
  letter-spacing: 0.08em !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  border-radius: 999px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem !important; /* Consistent font size */
  transition: all .3s ease !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  outline: none !important;
  display: inline-block !important;
  font-style: normal !important;
  min-height: 36px !important; /* Consistent height */
  line-height: 1.2 !important;
}

.table-tools .btn:hover,
.table-tools .file.btn:hover,
.table-tools #exportBtn:hover,
.table-tools #logoutBtn:hover {
  background: linear-gradient(90deg, #d4a307 0%, #ff8800 100%) !important;
  color: #fff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* Search and filter inputs */
.table-tools #search,
.table-tools #statusFilter {
  padding: 0.5rem 0.75rem !important;
  border: 1px solid rgba(186, 144, 65, 0.3) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.85rem !important;
  font-family: 'Inter', sans-serif !important;
  min-height: 36px !important;
  line-height: 1.2 !important;
}

.table-tools #search:focus,
.table-tools #statusFilter:focus {
  border-color: var(--gold) !important;
  background: #fff !important;
  box-shadow: 0 0 0 2px rgba(138, 106, 31, 0.1) !important;
  outline: none !important;
}

/* Admin message styling */
.table-tools #adminMsg {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  padding: 0.5rem 0.75rem !important;
  font-family: 'Inter', sans-serif !important;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .table-tools {
    gap: 0.5rem;
  }
  
  .table-tools .btn,
  .table-tools .file.btn,
  .table-tools #exportBtn,
  .table-tools #logoutBtn {
    font-size: 0.8rem !important;
    padding: 0.45rem 0.9rem !important;
    min-height: 34px !important;
  }
  
  .table-tools #search,
  .table-tools #statusFilter {
    font-size: 0.8rem !important;
    min-height: 34px !important;
  }
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(186, 144, 65, 0.25);
  border-radius: 12px;
  max-height: 600px; /* Add fixed height - scrolling starts at 600px */
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem; /* Reduced from 0.96rem for more columns */
  background: #fff;
  font-style: normal;
  min-width: 1800px; /* Ensure horizontal scroll for all columns */
}

thead {
  background: #fff7ed;
  position: sticky;
  top: 0;
  z-index: 10;
}

th,
td {
  padding: 0.5rem 0.4rem; /* Reduced from 0.7rem 0.65rem */
  border-bottom: 1px solid #f0e6d6;
  vertical-align: middle;
  font-style: normal;
  white-space: nowrap; /* Prevent text wrapping */
}

/* Make editable inputs smaller */
.cell-input {
  width: 100%;
  min-width: 80px;
  padding: 0.3rem 0.4rem;
  font-size: 0.8rem;
  border: 1px solid rgba(186, 144, 65, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
}

.cell-input:focus {
  border-color: var(--gold);
  background: #fff;
  outline: none;
}

textarea.cell-input {
  resize: vertical;
  min-height: 32px;
  font-family: inherit;
}

/* Color-code different sections */
th:nth-child(n+4):nth-child(-n+8) {
  background: rgba(138, 106, 31, 0.05); /* Arrival columns - light gold */
}

th:nth-child(n+9):nth-child(-n+13) {
  background: rgba(90, 156, 146, 0.05); /* Departure columns - light teal */
}

tbody tr:hover {
  background: #fffdf5;
}

.footer {
  padding: 2.2rem 1rem;
  text-align: center;
  color: var(--muted);
  font-style: normal;
}

dialog {
  border: none;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  padding: 1.2rem;
  width: min(90vw, 440px);
  background: #fffaf3;
  border: 1px solid rgba(186, 144, 65, 0.45);
  z-index: 10000; /* Higher than floating actions only when modal is open */
}

.pin-form input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(186, 144, 65, 0.4);
  border-radius: 12px;
  margin: 0.5rem 0;
  font-style: normal;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.gallery .img {
  margin: 0;
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(184, 224, 216, 0.35);
  filter: saturate(0.9) contrast(0.95); /* Matte finish */
  opacity: 0.92; /* Slightly transparent for paper effect */
}

.gallery .tall img {
  height: 320px;
}

.gallery .wide img {
  height: 180px;
}

@media (max-width: 1100px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .section-invite {
    grid-template-columns: 1fr !important;
  }
  .section-invite .side-art {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .section-invite {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    padding: 2rem 1.5rem;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 1.2rem; /* Reduced from 1.5rem */
    padding-left: 2rem;
  }

  .grid-3 {
    gap: 0.7rem 1rem; /* Reduced from 0.9rem 1.25rem */
  }
  
  form label {
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
  }
  
  input,
  select,
  textarea {
    padding: 0.55rem 0.7rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 540px) {
  .hero {
    min-height: 220px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.75rem 1.25rem;
  }
  
  .card h2 {
    font-size: 1.5rem;
  }
  
  .timeline {
    gap: 1.25rem;
  }
  
  .node .content {
    padding: 0.9rem 1rem; /* Reduced from 1rem 1.25rem */
  }
  
  .node .title {
    font-size: 0.95rem;
  }
  
  .node .meta {
    font-size: 0.8rem;
  }
}

@media (max-width: 640px) {
  .rsvp-card {
    padding: 1.5rem 1.25rem; /* Reduced from 1.5rem 1.25rem */
  }
  
  .grid-3 {
    gap: 0.6rem 1rem; /* Reduced from 0.8rem */
  }
  
  form label {
    margin-bottom: 0.4rem; /* Reduced from 0.5rem */
    gap: 0.25rem;
    font-size: 0.8rem;
  }
  
  input,
  select,
  textarea {
    padding: 0.5rem 0.65rem; /* Reduced from 0.65rem 0.75rem */
    font-size: 0.85rem; /* Reduced from 0.9rem */
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive tabs */
.nav-toggle {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #ddd);
  border-radius: 0.5rem;
  font: inherit;
  cursor: pointer;
}

.tabs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.tabs .tab {
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  padding: 0.6rem 1rem;
  font-style: normal;
  color: #000 !important; /* Changed to black */
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  transition: all .3s ease;
  text-decoration: none;
}

/* Button-like hover for tabs */
.tabs .tab:hover {
  background: linear-gradient(90deg, #d4a307 0%, #ff8800 100%);
  color: #fff !important; /* White on hover for contrast with gradient */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Compact horizontal scroll on narrow screens */
@media (max-width: 780px) {
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tabs .tab {
    flex: 0 0 auto;
    padding: 0.55rem 0.8rem;
    font-size: 0.8rem;
  }

  .nav-toggle {
    display: inline-block;
    margin: 0.5rem 0.75rem 0;
  }

  /* When expanded (hamburger tapped) allow wrap for easier tapping */
  .tabs.open {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .tabs.open .tab {
    flex: 1 1 calc(50% - 0.5rem);
    text-align: center;
  }
}

/* Optional subtle fade edges when scrollable */
@media (max-width: 780px) {
  .tabs {
    position: relative;
    mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  }

  .tabs.open {
    mask: none;
  }
}

/* Tighten hero vertical spacing */
.script {
  margin: 0 0 0.25rem;
} /* remove large default h1 margins */
.muted {
  margin: 0 0 0.45rem;
  display: block;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  letter-spacing: 0.25em; /* More spacing for luxury feel */
  font-weight: 600; /* Changed from 300 to 600 for bold */
  text-transform: uppercase;
  color: rgba(46, 15, 15, 0.7); /* Slightly more transparent */
  position: relative;
  /* Add subtle text shadow for depth */
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  font-style: normal;
}

/* Add decorative dots to date */
.muted::before,
.muted::after {
  content: "•";
  display: inline-block;
  margin: 0 0.5em;
  opacity: 0.5;
  font-size: 0.7em;
}

.hero-ctas {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0.25rem auto 0; /* was larger; reduce gap above chips */
  padding: 0 0.4rem;
}

.hero-ctas .chip {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  /* DEFAULT STATE - Orange gradient with white text */
  background: linear-gradient(90deg, #d4a307 0%, #ff8800 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.08em;
  transition: all .3s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-style: normal;
}

/* Hover/Clicked state - Subtle light scheme */
.hero-ctas .chip:hover,
.hero-ctas .chip:active,
.hero-ctas .chip.active {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #2e0f0f !important;
  border: 1px solid rgba(255, 215, 0, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Active/pressed effect */
.hero-ctas .chip:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) inset, 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Button-like style for navbar tabs */
.tabs .tab {
  color: #000 !important; /* Changed to black */
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  transition: all .3s ease;
  text-decoration: none;
  white-space: nowrap;
  font-style: normal;
}

/* Button-like hover for tabs */
.tabs .tab:hover {
  background: linear-gradient(90deg, #d4a307 0%, #ff8800 100%); /* Dark yellow to orange */
  color: #fff !important; /* Keep white on hover */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
  .hero-ctas {
    gap: 0.4rem;
    margin: 0.2rem auto 0;
  }

  .hero-ctas .chip {
    font-size: 0.8rem;
    padding: 0.38rem 0.65rem;
  }
}

/* New grouped floating actions - WEDDING THEMED - COMPACT SIZE */
.floating-actions {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 99999; /* Increased to maximum priority */
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.floating-actions .audio-toggle {
  position: static;
  /* Wedding-themed gradient background */
  background: linear-gradient(135deg, 
    rgba(255, 250, 245, 0.95) 0%,
    rgba(255, 245, 238, 0.93) 50%,
    rgba(255, 248, 243, 0.92) 100%
  );
  border: 1.5px solid rgba(186, 144, 65, 0.4);
  padding: 0.3rem 0.5rem; /* Much smaller padding */
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.7rem; /* Much smaller font */
  line-height: 1;
  color: var(--maroon);
  /* Elegant shadow with gold tint */
  box-shadow: 
    0 2px 8px rgba(138, 106, 31, 0.2),
    0 1px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px) saturate(1.1);
  transition: all 0.3s ease;
  font-style: normal;
  z-index: 99999; /* Individual z-index at maximum */
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* Add subtle texture */
  position: relative;
  overflow: hidden;
  /* Smaller dimensions */
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Add subtle paper texture to buttons */
.floating-actions .audio-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="50" height="50"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noise)" opacity="0.02"/%3E%3C/svg%3E');
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

/* Ensure text appears above texture */
.floating-actions .audio-toggle {
  position: relative;
}

.floating-actions .audio-toggle > * {
  position: relative;
  z-index: 2;
}

/* Elegant hover effect with golden glow */
.floating-actions .audio-toggle:hover {
  background: linear-gradient(135deg, 
    rgba(255, 248, 240, 0.98) 0%,
    rgba(255, 242, 230, 0.96) 50%,
    rgba(255, 245, 235, 0.94) 100%
  );
  border-color: rgba(186, 144, 65, 0.7);
  color: var(--gold);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 4px 12px rgba(138, 106, 31, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(138, 106, 31, 0.2);
}

/* Active/pressed state */
.floating-actions .audio-toggle:active {
  transform: translateY(0) scale(1.02);
  box-shadow: 
    0 1px 4px rgba(138, 106, 31, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(138, 106, 31, 0.1);
}

.floating-actions .audio-toggle.needs-user {
  opacity: 0.8;
  border-color: rgba(186, 144, 65, 0.5) !important;
  animation: pulse-gentle 2s ease-in-out infinite;
  background: linear-gradient(135deg, 
    rgba(255, 248, 220, 0.98) 0%,
    rgba(255, 242, 200, 0.96) 50%,
    rgba(255, 245, 210, 0.94) 100%
  ) !important;
}

@keyframes pulse-gentle {
  0%, 100% {
    transform: scale(1);
    box-shadow: 
      0 2px 8px rgba(212, 163, 7, 0.3),
      0 1px 4px rgba(0, 0, 0, 0.1),
      0 0 0 2px rgba(212, 163, 7, 0.2);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 
      0 4px 12px rgba(212, 163, 7, 0.4),
      0 2px 6px rgba(0, 0, 0, 0.15),
      0 0 0 3px rgba(212, 163, 7, 0.3);
  }
}

/* Remove pulse when playing */
.floating-actions .audio-toggle:not(.needs-user) {
  animation: none;
}

/* Mobile specific adjustments - even smaller */
@media (max-width: 560px) {
  .floating-actions {
    top: 8px;
    right: 8px;
    gap: 6px;
    z-index: 99999;
  }

  .floating-actions .audio-toggle {
    padding: 0.25rem 0.4rem;
    font-size: 0.65rem;
    border-width: 1px;
    /* Even smaller touch target for mobile */
    min-width: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Extra small mobile - minimal size */
@media (max-width: 480px) {
  .floating-actions {
    top: 6px;
    right: 6px;
    gap: 4px;
  }

  .floating-actions .audio-toggle {
    padding: 0.2rem 0.35rem;
    font-size: 0.6rem;
    min-width: 26px;
    min-height: 26px;
  }
}

/* Ensure ALL other elements have lower z-index */
.hero,
.tabs,
main,
.card,
.back-to-top,
.script::after {
  z-index: auto; /* Reset to default stacking */
}

/* Ensure modals stay above floating actions only when open */
dialog {
  z-index: 100000; /* Higher than floating actions only when modal is open */
}

/* Welcome overlay should be highest of all */
.welcome-overlay {
  z-index: 100001; /* Highest priority */
}

/* Static buttons in footer - less prominent */
.static-controls {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 8px;
  z-index: 1000; /* Lower than floating music button */
  pointer-events: auto;
}

.static-controls .lang-toggle,
.static-controls .gear {
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 500;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-style: normal;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.static-controls .lang-toggle:hover,
.static-controls .gear:hover {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.static-controls .lang-toggle:active,
.static-controls .gear:active {
  transform: translateY(0);
}

.static-controls .lang-toggle {
  font-family: 'Inter', 'Tiro Devanagari Hindi', sans-serif;
  letter-spacing: 0.02em;
  min-width: 32px;
  font-size: 0.6rem;
}

.static-controls .gear {
  font-size: 0.7rem;
}

/* Mobile adjustments for static controls */
@media (max-width: 640px) {
  .static-controls {
    bottom: 16px;
    left: 16px;
    gap: 6px;
  }
  
  .static-controls .lang-toggle,
  .static-controls .gear {
    padding: 0.2rem 0.35rem;
    font-size: 0.6rem;
    min-width: 26px;
    min-height: 26px;
  }
  
  .static-controls .lang-toggle {
    min-width: 30px;
    font-size: 0.55rem;
  }
}

/* Remove old floating action styles for lang and gear */
.floating-actions .lang-toggle,
.floating-actions .gear {
  display: none !important;
}

/* New grouped floating actions */
.floating-actions {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 130;
  display: flex;
  gap: 8px;
}

.floating-actions .lang-toggle,
.floating-actions .gear {
  position: static;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.38rem 0.66rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px) saturate(1.2);
  transition: background 0.2s, transform 0.2s;
  font-style: normal;
}

.floating-actions .lang-toggle:hover,
.floating-actions .gear:hover {
  background: #fff;
  transform: translateY(-2px);
}

.floating-actions .lang-toggle:active,
.floating-actions .gear:active {
  transform: translateY(0);
}

@media (max-width: 560px) {
  .floating-actions {
    top: 8px;
    right: 8px;
    gap: 6px;
  }

  .floating-actions .lang-toggle,
  .floating-actions .gear {
    padding: 0.32rem 0.54rem;
  }
}

.floating-actions .audio-toggle {
  position: static;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.38rem 0.66rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px) saturate(1.2);
  transition: background 0.2s, transform 0.2s, opacity 0.3s;
  font-style: normal;
}

.floating-actions .audio-toggle.needs-user {
  opacity: 0.6;
}

.floating-actions .audio-toggle:hover {
  background: #fff;
  transform: translateY(-2px);
}

@media (max-width: 560px) {
  .floating-actions .audio-toggle {
    padding: 0.32rem 0.54rem;
  }
}

/* Welcome Overlay (full-screen, Namaste image) */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.4s ease;
  font-style: normal;
}

.welcome-overlay.fade-out {
  animation: fadeOut 0.4s ease forwards;
}

.welcome-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 90vw;
  text-align: center;
}

.welcome-namaste {
  width: clamp(200px, 50vw, 400px);
  height: auto;
  opacity: 0.95;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
  animation: float 3s ease-in-out infinite;
}

.welcome-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #fef3c7;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  font-style: normal;
}

.welcome-btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(15, 118, 110, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-style: normal;
}

.welcome-btn:hover,
.welcome-btn:focus {
  background: rgba(15, 118, 110, 0.6);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.welcome-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-style: normal;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Modal styles */
.modal {
  border: none;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  padding: 1.5rem;
  width: min(90vw, 480px);
  background: #fff;
  border: 1px solid rgba(186, 144, 65, 0.45);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

/* Modal form grid layout */
.modal .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal .grid-2 label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
}

.modal .grid-2 input,
.modal .grid-2 select,
.modal .grid-2 textarea {
  font: inherit;
  padding: 0.75rem;
  border: 1px solid rgba(184, 224, 216, 0.4);
  border-radius: 8px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal .grid-2 input:focus,
.modal .grid-2 select:focus,
.modal .grid-2 textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

.modal .grid-2 .wide {
  grid-column: 1 / -1;
}

.modal .actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

/* Enhanced card styling with corner ornaments - Pure CSS approach */
.card {
  background: linear-gradient(180deg, 
    rgba(255, 250, 245, 0.95) 0%,     /* Warm ivory with hint of rose */
    rgba(255, 245, 238, 0.93) 50%,    /* Soft peachy rose */
    rgba(255, 248, 243, 0.92) 100%    /* Light rose gold */
  );
  border: 2px solid rgba(186, 144, 65, 0.3); /* More defined border */
  border-radius: var(--radius-xl);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 12px 50px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8); /* Subtle inner glow */
  padding: 1.75rem 1.5rem; /* Reduced from 2rem 1.75rem */
  position: relative;
  overflow: visible; /* Allow ornaments to extend beyond card */
  margin: 1rem; /* Reduced from 1.25rem */
}

/* All four corners using card pseudo-elements and wrapping approach */
.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  background-image: url('img/corner-ornament.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.75;
  pointer-events: none;
  z-index: 10;
}

/* Top-left corner */
.card::before {
  top: -16px;
  left: -16px;
  transform: rotate(0deg);
}

/* Top-right corner */
.card::after {
  top: -16px;
  right: -16px;
  transform: scaleX(-1);
}

/* Bottom corners - we'll add via wrapper div with data-ornament attribute */
.corner-ornament {
  position: absolute;
  width: 80px;
  height: 80px;
  background-image: url('img/corner-ornament.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.75;
  pointer-events: none;
  z-index: 10;
}

.corner-ornament.bottom-left {
  bottom: -16px;
  left: -16px;
  transform: scaleY(-1);
}

.corner-ornament.bottom-right {
  bottom: -16px;
  right: -16px;
  transform: scale(-1);
}

/* Adjust for smaller screens */
@media (max-width: 640px) {
  .card {
    margin: 0.75rem; /* Reduced from 1rem */
    padding: 1.5rem 1.25rem; /* Reduced from 1.75rem 1.25rem */
  }
  
  .card::before,
  .card::after,
  .corner-ornament {
    width: 50px;
    height: 50px;
  }
  
  .card::before,
  .corner-ornament.bottom-left {
    left: -10px;
  }
  
  .card::after,
  .corner-ornament.bottom-right {
    right: -10px;
  }
  
  .card::before {
    top: -10px;
  }
  
  .card::after {
    top: -10px;
  }
  
  .corner-ornament.bottom-left,
  .corner-ornament.bottom-right {
    bottom: -10px;
  }
}

/* Card headings - match header style (all caps, Inter font, smaller) */
.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 0.85rem; /* Reduced from 1rem */
  padding-bottom: 0.4rem; /* Reduced from 0.5rem */
  border-bottom: 2px solid rgba(186, 144, 65, 0.2);
  letter-spacing: 0.2em; /* Reduced from 0.25em */
  font-weight: 600;
  font-family: 'Inter', 'Tiro Devanagari Hindi', sans-serif; /* Same as header */
  text-transform: uppercase; /* All caps like header */
  text-align: center;
  position: relative;
  z-index: 10; /* Add explicit z-index to ensure visibility */
  color: rgba(46, 15, 15, 0.8);
  filter: saturate(0.9) contrast(0.95);
  opacity: 0.95;
  font-style: normal;
}

/* Main section headings (h2) - smaller, cleaner */
.card h2 {
  font-size: clamp(0.9rem, 2vw, 1.1rem); /* Reduced from 0.95-1.15rem */
  background: linear-gradient(135deg, var(--maroon) 0%, var(--gold) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1)) saturate(0.85) contrast(0.92);
  z-index: 10; /* Ensure gradient text is visible */
}

/* Sub-headings (h3) - golden color */
.card h3 {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--gold); /* Already golden - keeping it */
  filter: saturate(0.88) contrast(0.94);
  z-index: 10; /* Ensure visibility */
}

/* Hindi language adjustments */
[data-lang="hi"] .card h2,
[data-lang="hi"] .card h3 {
  font-family: 'Tiro Devanagari Hindi', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.15em; /* Tighter for Devanagari */
}

/* Decorative line accent before headings */
.card h2::before,
.card h3::before {
  content: "";
  display: block;
  width: 35px; /* Reduced from 40px */
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 0.5rem; /* Reduced from 0.6rem */
  border-radius: 999px;
  opacity: 0.75;
}

/* Venue headings - left-aligned */
.venue h3 {
  text-align: left;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.75rem;
}

.venue h3::before {
  content: none;
}

/* Responsive heading adjustments */
@media (max-width: 640px) {
  .card h2 {
    font-size: 1rem;
    letter-spacing: 0.2em;
  }
  
  .card h3 {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
  }
  
  .card h2::before,
  .card h3::before {
    width: 30px; /* Reduced from 40px */
    height: 2px;
    margin-bottom: 0.5rem;
  }
}

/* Card headings more prominent */
.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 1rem; /* Reduced from 1.5rem */
  padding-bottom: 0.5rem; /* Reduced from 0.75rem */
  border-bottom: 2px solid rgba(186, 144, 65, 0.2);
  letter-spacing: 0.2em; /* Reduced from 0.25em */
  font-weight: 600;
  font-style: normal;
}

/* Remove ornaments from invitation, travel, RSVP, and venue cards */
.invite-card::before,
.invite-card::after,
#invite .card::before,
#invite .card::after,
#travel .card::before,
#travel .card::after,
.rsvp-card::before,
.rsvp-card::after,
#rsvp .card::before,
#rsvp .card::after,
.venue.card::before,
.venue.card::after,
#venues .card::before,
#venues .card::after {
  content: none !important;
}

/* Invitation card NOW HAS ornaments - remove exclusion */
/* .invite-card keeps default .card ornaments */

/* Invitation video aspect ratio and size - optimized for WhatsApp/mobile viewing */
.invite-video {
  margin: 0.85rem 0; /* Reduced from 1rem */
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-wrapper {
  width: 100%;
  max-width: 320px; /* Reduced from 340px */
  aspect-ratio: 9 / 16;
  margin: 0 auto; /* Center horizontally */
  border-radius: 14px; /* Reduced from 16px */
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15); /* Softer shadow */
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(186, 144, 65, 0.3); /* Reduced from 3px */
  position: relative; /* For play button overlay */
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from cover to contain to show full video */
  display: block;
  background: #000;
  border-radius: 0;
  cursor: pointer; /* Show it's clickable */
}

/* Ensure native video controls are visible */
.video-wrapper video::-webkit-media-controls {
  display: flex !important;
}

.video-wrapper video::-webkit-media-controls-panel {
  display: flex !important;
}

.video-wrapper video::-webkit-media-controls-play-button {
  display: flex !important;
}

/* Better mobile optimization */
@media (max-width: 640px) {
  .video-wrapper {
    max-width: min(85vw, 320px); /* Reduced from 360px */
    border-radius: 12px;
    margin-left: auto; /* Force center */
    margin-right: auto; /* Force center */
  }
}

@media (max-width: 480px) {
  .video-wrapper {
    max-width: min(80vw, 300px); /* Reduced from 340px */
    border-radius: 10px;
  }
  
  .invite-video {
    margin: 0.75rem 0; 
    text-align: center; /* Ensure parent centers content */
  }
}

/* Mobile - invitation card full width */
@media (max-width: 640px) {
  .card {
    margin: 0.75rem;
    padding: 1.5rem 1.25rem;
  }
  
  .invite-card {
    padding: 1.5rem 1.25rem; /* Matches mobile .card */
    width: 100%; /* Full width on mobile */
  }
}

/* Tighter spacing for all cards */
.card {
  padding: 1.75rem 1.5rem; /* Reduced from 2rem 1.75rem */
  margin: 1.25rem; /* Reduced from 1.5rem */
}

@media (max-width: 640px) {
  .card {
    margin: 0.75rem; /* Reduced from 1rem */
    padding: 1.5rem 1.25rem; /* Reduced from 1.75rem 1.25rem */
  }
  
  .invite-card {
    padding: 1.5rem 1.25rem; /* NOW MATCHES mobile .card padding */
  }
}

/* Apply elegant style to all paragraphs and regular text */
p, .lead, .note, .meta, .request-line, .family-line {
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.03em;
  line-height: 1.7;
}

/* Hindi language adjustments */
[data-lang="hi"] p,
[data-lang="hi"] .lead,
[data-lang="hi"] form label {
  font-family: 'Tiro Devanagari Hindi', serif;
}

/* Back to top button - wedding themed with orange-yellow gradient */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4a307 0%, #ff8800 100%); /* Orange-yellow gradient */
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 9998; /* High z-index but below floating actions */
  box-shadow: 0 4px 12px rgba(212, 163, 7, 0.3), /* Golden shadow */
              0 0 0 3px rgba(212, 163, 7, 0.15);
  transition: all 0.3s ease;
  visibility: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
}

.back-to-top.visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.1);
  background: linear-gradient(135deg, #e6b800 0%, #ff9500 100%); /* Brighter on hover */
  box-shadow: 0 6px 20px rgba(212, 163, 7, 0.4), /* Enhanced golden shadow */
              0 0 0 4px rgba(212, 163, 7, 0.25);
}

.back-to-top:active {
  transform: translateY(-2px) scale(1.05);
}

.back-to-top .arrow {
  line-height: 1;
  font-size: 1.8rem;
  animation: bounce 2s ease-in-out infinite;
}

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

/* Mobile adjustments */
@media (max-width: 640px) {
  .back-to-top {
    width: 48px;
    height: 48px;
    bottom: 16px;
    right: 16px;
    font-size: 1.3rem;
  }
  
  .back-to-top .arrow {
    font-size: 1.5rem;
  }
}

/* Adjust position to avoid overlap with floating actions */
@media (max-width: 900px) {
  .back-to-top {
    bottom: 24px;
    right: 80px; /* Move left to avoid floating actions */
  }
}

@media (max-width: 640px) {
  .back-to-top {
    bottom: 16px;
    right: 70px; /* Move left to avoid floating actions on mobile */
  }
}

/* Hide when floating actions are near */
@media (max-width: 900px) and (max-height: 700px) {
  .back-to-top {
    bottom: 80px; /* Move up to avoid overlap with Ganesh icon */
  }
}

/* Travel section - two column layout */
.travel-card {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 1.5rem; /* Reduced from 2rem */
  align-items: center;
}

.travel-content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem; /* Reduced from 1rem */
}

.travel-content h3 {
  margin-bottom: 0.4rem;
  text-align: left;
  border-bottom: 2px solid rgba(186, 144, 65, 0.2);
  padding-bottom: 0.4rem;
  color: var(--gold); /* Added golden color */
}

.travel-content h3::before {
  content: "";
  display: block;
  width: 35px; /* Reduced from 40px */
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 0 0 0.5rem 0; /* Reduced from 0.6rem */
  border-radius: 999px;
  opacity: 0.75;
}

.travel-content .bullet {
  list-style: none;
  padding: 0;
  margin: 0 0 0.4rem 0; /* Reduced from 0.5rem */
}

.travel-content .bullet li {
  font-size: 0.95rem; /* Reduced from 1rem */
  font-weight: 600;
  color: var(--maroon);
  padding: 0.3rem 0; /* Reduced from 0.35rem */
  font-family: 'Inter', monospace;
  letter-spacing: 0.05em;
}

.travel-content .bullet li::before {
}

.travel-content .note {
  margin: 0;
  font-size: 0.85rem; /* Reduced from 0.9rem */
  line-height: 1.5; /* Reduced from 1.6 */
}

.travel-banner {
  height: 100%;
  min-height: 160px; /* Reduced from 180px */
}

.travel-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(186, 144, 65, 0.35);
  filter: saturate(0.9) contrast(0.95);
  opacity: 0.92;
}

/* Mobile: stack vertically */
@media (max-width: 820px) {
  .travel-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .travel-banner {
    min-height: 140px;
  }
}

/* RSVP Section - Enhanced Compact Design with Arrival/Departure */
.rsvp-card {
  padding: 1.75rem 1.5rem; /* Changed from 2rem 1.75rem to match .card padding */
  max-width: 100%; /* Changed from 700px - let it match other cards */
  margin: 1rem; /* Added margin - was missing! This matches .card */
}

/* Ultra-compact form groups */
.form-group-row-wide {
  display: grid;
  grid-template-columns: 2fr 1.2fr 0.8fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.form-group-row-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.form-group-row-3-compact {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.form-section-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin: 1rem 0 0.5rem 0;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(186, 144, 65, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-style: normal;
}

.form-section-header:first-of-type {
  margin-top: 0.5rem;
}

/* Compact input groups */
.form-group-row {
  display: grid;
  grid-template-columns: 2fr 1fr 0.8fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.form-group-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.form-group-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

/* Conditional form sections */
.conditional-section {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(255, 248, 243, 0.6);
  border: 1px solid rgba(186, 144, 65, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.conditional-section.active {
  background: rgba(255, 248, 243, 0.8);
  border-color: rgba(186, 144, 65, 0.4);
}

.form-group {
  margin-bottom: 0.8rem;
}

.form-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-style: normal;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(186, 144, 65, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(138, 106, 31, 0.1);
  outline: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

/* Form submit area */
.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(186, 144, 65, 0.2);
}

.form-actions .btn-primary {
  padding: 0.65rem 1.8rem;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .rsvp-card {
    padding: 1.5rem 1.25rem; /* Changed from 1.5rem 1.25rem to match mobile .card padding */
    margin: 0.75rem; /* Added mobile margin - matches mobile .card */
  }
  
  .form-group-row,
  .form-group-row-2,
  .form-group-row-3,
  .form-group-row-wide,
  .form-group-row-4,
  .form-group-row-3-compact {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  
  .conditional-section {
    padding: 0.5rem;
    margin-top: 0.4rem;
  }
  
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .form-actions .btn-primary {
    width: 100%;
  }
  
  .form-group label {
    font-size: 0.75rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* RESTORE ALL THREE FLOATING BUTTONS */
.floating-actions {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 99999;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.floating-actions .lang-toggle,
.floating-actions .gear,
.floating-actions .audio-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.38rem 0.66rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px) saturate(1.2);
  transition: background 0.2s, transform 0.2s;
  font-style: normal;
  align-items: center;
  justify-content: center;
}

.floating-actions .lang-toggle:hover,
.floating-actions .gear:hover,
.floating-actions .audio-toggle:hover {
  background: #fff;
  transform: translateY(-2px);
}

.floating-actions .audio-toggle.needs-user {
  opacity: 0.6;
}

@media (max-width: 560px) {
  .floating-actions {
    top: 8px;
    right: 8px;
    gap: 6px;
  }

  .floating-actions .lang-toggle,
  .floating-actions .gear,
  .floating-actions .audio-toggle {
    padding: 0.32rem 0.54rem;
  }
}

/* HIDE BROKEN STATIC CONTROLS */
.static-controls {
  display: none !important;
}

/* ENSURE ALL THREE FLOATING BUTTONS ARE VISIBLE */
.floating-actions {
  position: fixed !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 99999 !important;
  display: flex !important;
  gap: 8px !important;
  pointer-events: auto !important;
}

.floating-actions .lang-toggle,
.floating-actions .gear,
.floating-actions .audio-toggle {
  display: flex !important;
  position: static !important;
  background: rgba(255, 255, 255, 0.9) !important;
  padding: 0.38rem 0.66rem !important;
  border: none !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  font: inherit !important;
  line-height: 1 !important;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(4px) saturate(1.2) !important;
  transition: background 0.2s, transform 0.2s !important;
  font-style: normal !important;
  align-items: center !important;
  justify-content: center !important;
  color: #333 !important;
}

.floating-actions .lang-toggle:hover,
.floating-actions .gear:hover,
.floating-actions .audio-toggle:hover {
  background: #fff !important;
  transform: translateY(-2px) !important;
}

.floating-actions .audio-toggle.needs-user {
  opacity: 0.6 !important;
}

@media (max-width: 560px) {
  .floating-actions {
    top: 8px !important;
    right: 8px !important;
    gap: 6px !important;
  }

  .floating-actions .lang-toggle,
  .floating-actions .gear,
  .floating-actions .audio-toggle {
    padding: 0.32rem 0.54rem !important;
  }
}
