/* Make the Social section title a bit smaller */
#social h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}
/* Reveal on scroll animation */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
/* Wedding Website Styles */

/* CSS Variables - Theme System */
:root {
  /* Colors */
  --bg: #FAF8F3;
  --text: #000000;
  --primary: #000000;
  --secondary: #B4C5E4;
  --accent: #BFD4E5;
  --muted: #000000;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #000000;
  --gray-700: #000000;
  --gray-800: #000000;
  --gray-900: #000000;
  
  /* Typography */
  --display: var(--cfg-display, 'Cinzel Decorative', serif);
  --serif: var(--cfg-serif, 'Cormorant Garamond', serif);
  --sans: var(--cfg-sans, 'Avenir Next Arabic', 'Avenir Next', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif);
  --script: var(--cfg-script, 'Great Vibes', cursive);
  
  /* Branding Sizes */
  --nav-logo-size-desktop: 120px;
  --nav-logo-size-mobile: 115px;
  --footer-logo-size: 150px;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Layout */
  --container-width: 1200px;
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --border-radius-lg: 16px;
  
  /* Shadows */
  --shadow: 0 8px 24px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 16px 32px rgba(0,0,0,.12);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index scale */
  --z-nav: 1000;
  --z-lightbox: 2000;
  --z-customize: 1500;
}

/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent horizontal scroll */
  overflow-x: hidden;
  /* Improve touch scrolling on iOS */
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 0;
  min-height: 100%;
}

/* Focus management */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: white;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  z-index: 100;
  transition: var(--transition-fast);
}

.skip-link:focus {
  top: 6px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Section spacing */
.section {
  padding: var(--space-2xl) 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-lg);
  font-variant-numeric: oldstyle-nums;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
}

h2 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  text-align: center;
  margin-bottom: var(--space-2xl);
}

h3 {
  font-family: 'Forum', serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

/* Sub-headings use Georgia Pro */
h4, h5, h6 {
  font-family: 'Georgia Pro', Georgia, serif;
}

p {
  font-family: 'Avenir Next Arabic', 'Avenir Next', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin-bottom: var(--space-md);
}

/* Display typography for logos, hero names, brand titles */
.site-logo, .brand-title, .hero .names, .hero-names {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Script styling for hero names when enabled */
.hero .names.script, .hero-names.script {
  font-family: var(--script);
  text-transform: none;
  letter-spacing: 0.01em;
}

/* Button and navigation typography */
button, a, nav {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Utility typography classes */
.uppercase {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 2vw, 1.25rem);
}

.small {
  font-size: 0.9375rem;
  color: #555;
}

/* Safe fallbacks for older browsers */
@supports not (font-variant-numeric: oldstyle-nums) {
  h1, h2, h3 {
    letter-spacing: 0.03em;
  }
}

/* Buttons */
/* Universal button reset - modern minimalist style with borders */
button:not(.btn):not(.nav-toggle):not(.close):not(.customize-actions button):not(.carousel-btn):not(.carousel-dot):not(.faq-question) {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: var(--border-radius);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--sans);
  font-weight: 500;
}

button:not(.btn):not(.nav-toggle):not(.close):not(.customize-actions button):not(.carousel-btn):not(.carousel-dot):not(.faq-question):hover,
button:not(.btn):not(.nav-toggle):not(.close):not(.customize-actions button):not(.carousel-btn):not(.carousel-dot):not(.faq-question):focus {
  background: #ADD8E6;
  color: var(--primary);
  border-color: #ADD8E6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  border: 1px solid var(--text);
  border-radius: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  min-height: 48px; /* Touch-friendly minimum */
  -webkit-tap-highlight-color: transparent; /* Remove iOS tap highlight */
  background: transparent;
  color: var(--text);
}

.btn-primary {
  background: transparent;
  color: var(--gray-500);
  border-color: var(--text);
}

.btn-primary:hover,
.btn-primary:focus {
  background: #ADD8E6;
  color: var(--primary);
  border-color: #ADD8E6;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--gray-500);
  border-color: var(--text);
  font-weight: 400;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: #ADD8E6;
  color: var(--primary);
  border-color: #ADD8E6;
  transform: translateY(-1px);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(250, 248, 243, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(107, 122, 161, 0.1);
  z-index: var(--z-nav);
  transition: var(--transition);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

/* Navigation Branding System */
.nav-brand {
  flex-shrink: 0;
  z-index: 2;
}

.nav-brand .brand {
  display: block;
  transition: var(--transition);
  text-decoration: none;
  background: none !important;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.nav-brand .brand:hover,
.nav-brand .brand:focus,
.nav-brand .brand:active,
.nav-brand .brand:visited {
  background: none !important;
  background-color: transparent !important;
  color: inherit !important;
}

.brand-logo {
  transition: var(--transition);
  object-fit: contain;
  height: auto;
}

.nav-brand .brand:hover .brand-logo {
  opacity: 0.8;
  transform: scale(1.05);
}

/* Responsive brand logo sizing */
@media (min-width: 900px) {
  .brand-logo {
    width: var(--nav-logo-size-desktop);
  }
}

@media (max-width: 899px) {
  .brand-logo {
    width: var(--nav-logo-size-mobile);
  }
  
  /* Position logo more to the left on mobile */
  .nav-container {
    padding: 0 var(--space-md) 0 var(--space-xs);
  }
  
  .nav-brand {
    margin-left: calc(var(--space-md) * -2.5);
  }
}

/* Sticky nav: shrink on scroll but keep readable */
.nav.is-scrolled .brand-logo {
  width: calc(var(--nav-logo-size-desktop) * 0.75);
}

/* Optional wordmark next to crest */
.brand-word {
  margin-left: 0.55rem;
  font-family: var(--display, var(--serif));
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}

/* Invert on dark hero (if provided) */
.hero.is-dark .brand-logo {
  content: url("images/brand/jm-mark-invert.svg");
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.nav-toggle:hover,
.nav-toggle:focus {
  background: #ADD8E6;
  border-color: #ADD8E6;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition-fast);
}

.nav-toggle:hover span {
  background: var(--primary);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  position: relative;
  transition: var(--transition);
  border-radius: var(--border-radius-sm);
}

.nav-menu a:hover {
  background-color: #ADD8E6;
  color: var(--text);
  font-weight: 600;
}

.nav-menu a.active {
  background-color: #ADD8E6;
  color: var(--text);
  font-weight: 700;
}

.nav-menu a::after {
  display: none;
}

/* Mobile navigation */
@media (max-width: 768px) {
  .nav-container {
    justify-content: space-between;
    padding: 0 var(--space-md);
  }
  
  .nav-toggle {
    display: flex;
    order: 3;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: calc(var(--z-nav) - 1);
  }
  
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100); /* Fallback for mobile browsers */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(107, 122, 161, 0.8),
    rgba(180, 197, 228, 0.6)
  );
  z-index: 1;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -1;
  /* Will be set dynamically by JavaScript for responsive images */
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: var(--space-xl);
}

.hero-names {
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-bottom: var(--space-sm);
  opacity: 0.95;
}

.hero-date {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.hero-location {
  font-family: var(--serif);
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: var(--space-2xl);
  opacity: 0.9;
}

.hero-countdown {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.countdown-item {
  text-align: center;
}

.countdown-number {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
}

.countdown-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.hero-actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* Make hero buttons text white and bold */
.hero-actions .btn {
  color: white !important;
  font-weight: bold !important;
  border-color: white !important;
  border-width: 2px !important;
}

.hero-actions .btn:hover,
.hero-actions .btn:focus {
  color: var(--primary) !important;
}

/* Story Section */
.story {
  background: white;
}

.story-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.story-text {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.8;
  color: var(--gray-700);
}

/* Schedule Section */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.schedule-item {
  background: rgba(255, 255, 255, 0.1); /* Made transparent with slight white tint */
  padding: var(--space-2xl);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  backdrop-filter: blur(2px); /* Reduced blur effect for better readability */
  border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border for definition */
}

.schedule-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.schedule-item h3 {
  font-family: var(--serif);
  font-size: 2.05rem;
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.schedule-item h2 {
  font-family: 'Forum', serif;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.schedule-desc {
  font-family: 'Avenir Next Arabic', 'Avenir Next', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-600);
  font-size: 1.1rem;
}

.schedule-note {
  font-family: 'Avenir Next Arabic', 'Avenir Next', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-500);
  font-size: 0.9rem;
  font-style: italic;
  margin-top: var(--space-sm);
  line-height: 1.4;
}

.schedule-map-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-lg);
}

.schedule-map-actions .btn {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.schedule-map-actions .btn svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  aspect-ratio: 4 / 3;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

/* Stays & Travel Section */
.stays-travel {
  background: transparent;
}

.stays-travel .block {
  text-align: center;
  margin: 6rem 0;
}

.stays-travel h2 {
  font-family: var(--serif);
  letter-spacing: 0.06em;
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
  color: var(--text);
}

.stays-travel .sub {
  font-family: 'Georgia Pro', Georgia, serif;
  color: #666;
  max-width: 46ch;
  margin: 0.75rem auto 1.75rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}

.cta.outline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.25rem;
  border: 1px solid #000000;
  border-radius: 0;
  color: var(--gray-500);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.15s ease, background 0.15s ease;
  cursor: pointer;
  background: none;
  font-family: inherit;
  font-size: inherit;
  white-space: nowrap;
}

.cta.outline svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.cta.outline:hover {
  transform: translateY(-1px);
  background: #ADD8E6;
}

.cta.outline:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Pale blue hover and active states for stays and travel guide buttons */
.stays #stays-link.cta.outline:hover,
.stays #stays-link.cta.outline:active,
.travel .cta.outline:hover,
.travel .cta.outline:active {
  background-color: #ADD8E6 !important;
  border-color: #ADD8E6 !important;
}

/* Modal Styles */
.flip-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  padding: 2rem;
  z-index: var(--z-lightbox, 2000);
}

.flip-modal[hidden] {
  display: none;
}

.flip-modal iframe {
  width: min(100%, 960px);
  height: min(80vh, 680px);
  background: #fff;
  border: none;
  border-radius: var(--border-radius-lg, 16px);
  box-shadow: var(--shadow-lg);
}

.flip-modal .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none !important;
  color: white !important;
  cursor: pointer;
  padding: var(--space-sm);
  margin-bottom: var(--space-md);
  border-radius: 4px;
  transition: var(--transition);
  font-size: 2rem;
  opacity: 1;
  box-shadow: none !important;
}

.flip-modal .close svg {
  stroke: white !important;
}

.flip-modal .close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.flip-modal .close:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
}

/* Attire Section */
.attire-palette {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  min-height: 3rem;
  align-items: center;
}

.color-chip {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.color-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.color-name {
  font-weight: 500;
  color: var(--gray-700);
}

.attire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-3xl);
  margin-bottom: var(--space-2xl);
}

.attire-section {
  display: grid;
  grid-template-rows: auto auto 1fr;
  height: 100%;
}

.attire-section h3 {
  text-align: center;
  color: var(--primary);
  margin-bottom: var(--space-lg);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-row: 1;
}

.attire-guidelines {
  text-align: center;
  color: var(--gray-600);
  margin-bottom: var(--space-xl);
  font-style: italic;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-row: 2;
  padding: 0 var(--space-md);
}

.carousel-container {
  grid-row: 3;
  align-self: stretch;
}

.carousel-container {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  background: transparent;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 3 / 4;
  position: relative;
  background: transparent;
}

.carousel-slide:hover {
  transform: scale(1.02);
}

.carousel-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
  border-radius: var(--border-radius-lg);
}

.carousel-slide:hover::before {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--border-radius-lg);
}

.carousel-slide:hover img {
  transform: scale(1.05);
}

.carousel-slide::before {
  border-radius: var(--border-radius-lg);
}

/* Loading state for carousel images */
.carousel-slide img:not([src]) {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  opacity: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.carousel:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.carousel-btn svg {
  transition: transform 0.2s ease;
}

.carousel-btn:hover svg {
  transform: scale(1.1);
}

.carousel-prev {
  left: var(--space-lg);
}

.carousel-next {
  right: var(--space-lg);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding: var(--space-md);
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.2);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.carousel-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transition: all 0.3s ease;
}

.carousel-dot[aria-current="true"] {
  border-color: var(--primary);
  transform: scale(1.2);
}

.carousel-dot[aria-current="true"]::before {
  opacity: 1;
}

.carousel-dot:hover {
  border-color: var(--primary);
  transform: scale(1.1);
}

.carousel-overlay {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius);
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  z-index: 5;
}

.swipe-hint {
  position: absolute;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  z-index: 5;
  display: none;
}

@media (pointer: coarse) {
  .swipe-hint {
    display: block;
  }
  
  .carousel-btn {
    opacity: 1;
  }
}

/* Desktop carousel alignment */
@media (min-width: 768px) {
  .attire-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  
  .attire-section {
    display: grid;
    grid-template-rows: 60px 80px 1fr;
    height: 100%;
  }
  
  .attire-section h3 {
    min-height: 60px;
    margin-bottom: 0;
  }
  
  .attire-guidelines {
    min-height: 80px;
    margin-bottom: 0;
  }
  
  .carousel-container {
    margin-top: var(--space-xl);
    border-radius: var(--border-radius-lg);
  }
  
  /* Ensure curved edges on desktop - more specific selectors */
  .carousel-container .carousel-slide {
    border-radius: var(--border-radius-lg) !important;
  }
  
  .carousel-container .carousel-slide img {
    border-radius: var(--border-radius-lg) !important;
  }
  
  .carousel-container .carousel-slide::before {
    border-radius: var(--border-radius-lg) !important;
  }
  
  .carousel-container .carousel {
    border-radius: var(--border-radius-lg);
  }
}

.attire-note {
  text-align: center;
  color: var(--gray-600);
  font-style: italic;
  max-width: 600px;
  margin: -var(--space-xl) auto 0 auto;
  font-size: 0.9rem;
}

/* Ensure perfect centering on larger screens */
@media (min-width: 1024px) {
  .attire-note {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
}

/* Registry Section */
.registry-grid {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.registry-item {
  display: inline-flex;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.registry-item:hover {
  background: var(--gray-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* FAQ Section */
.faq {
  background: transparent;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border-radius: var(--border-radius);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: var(--space-xl);
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--gray-50);
}

.faq-question[aria-expanded="true"] {
  background: var(--gray-50);
}

.faq-icon {
  transition: var(--transition);
  transform: rotate(0deg);
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 var(--space-xl) var(--space-xl);
  color: var(--gray-600);
  line-height: 1.7;
  display: none;
}

.faq-answer.open {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

/* RSVP Section */
.rsvp {
  text-align: center;
}

.rsvp h2 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  letter-spacing: 0.06em;
}

.rsvp .sub {
  font-family: 'Georgia Pro', Georgia, serif;
  color: #555;
  margin: 0.25rem 0 1.5rem;
}

.envelope {
  position: relative;
  width: min(90vw, 560px);
  margin: 0 auto 2.5rem;
  transition: var(--transition);
}

.envelope:hover {
  transform: translateY(-4px);
}

.envelope-bg {
  width: 100%;
  height: auto;
  display: block;
}

.envelope-card {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 70%;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.rsvp .cta.outline {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border: 2px solid #fff;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(2px);
  transition: var(--transition);
  border-radius: 0;
  z-index: 3;
  background: rgba(0, 0, 0, 0.3);
}

.rsvp .cta.outline:hover {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6) inset;
  transform: translate(-50%, -50%) translateY(-2px);
}

.rsvp .cta.outline:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.rsvp .cta.outline[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.closed-note {
  color: var(--gray-600);
  font-style: italic;
  margin-top: var(--space-lg);
}

.rsvp-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 2rem;
  z-index: var(--z-lightbox, 2000);
}

.rsvp-modal[hidden] {
  display: none;
}

.rsvp-modal iframe {
  width: min(100%, 920px);
  height: min(80vh, 680px);
  background: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.rsvp-modal .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white !important;
  cursor: pointer;
  padding: var(--space-sm);
  margin-bottom: var(--space-md);
  border-radius: 4px;
  transition: var(--transition);
  font-size: 2rem;
  opacity: 1;
}

.rsvp-modal .close svg {
  stroke: white !important;
}

.rsvp-modal .close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.rsvp-modal .close:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Fallback for missing images */
.envelope-fallback {
  max-width: 500px;
  margin: 0 auto;
  padding: var(--space-2xl);
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .envelope {
    width: 95vw;
  }
  
  .envelope-card {
    width: 68%;
    top: 52%;
  }
  
  .rsvp .cta.outline {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    top: 52%;
    max-width: 140px;
    white-space: nowrap;
  }
}

/* Footer */
.footer {
  background: var(--gray-900);
  color: white;
  padding: var(--space-2xl) 0;
  margin: 0;
  margin-bottom: 0 !important;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  box-sizing: border-box;
}

/* Footer Branding System */
.footer-brand {
  display: grid;
  place-items: center;
  margin-block: 2rem 1rem;
}

.footer-brand .footer-logo {
  width: var(--footer-logo-size);
  height: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: var(--transition);
}

.footer-brand .footer-logo:hover {
  opacity: 1;
  transform: scale(1.05);
}

.footer-content {
  text-align: center;
}

.footer-hashtag {
  font-family: var(--script);
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
  color: var(--secondary);
}

.footer-socials {
  margin-bottom: var(--space-lg);
}

.footer-copyright {
  color: var(--gray-400);
  font-size: 0.9rem;
  text-align: center;
  display: block;
  margin: 0 auto;
}

/* Target the actual copyright paragraph in footer */
.footer .container > p {
  color: var(--gray-400);
  font-size: 0.9rem;
  text-align: center;
  display: block;
  margin: 0 auto;
  margin-bottom: 0 !important;
}

/* Ensure no extra space after footer */
.footer:last-child {
  margin-bottom: 0 !important;
}

body > *:last-child {
  margin-bottom: 0 !important;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 100;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--gray-700);
  transform: translateY(-2px);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-lightbox);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--border-radius);
}

.lightbox-close {
  position: absolute;
  top: -60px;
  right: 0;
  background: none;
  border: none;
  color: white !important;
  cursor: pointer;
  padding: var(--space-sm);
  margin-bottom: var(--space-md);
  border-radius: 4px;
  transition: var(--transition);
}

.lightbox-close svg {
  stroke: white !important;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  padding: var(--space-lg);
  border-radius: 50%;
  transition: var(--transition);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

/* Customization Panel */
.customize-panel {
  position: fixed;
  top: 50%;
  right: -320px;
  transform: translateY(-50%);
  width: 320px;
  background: white;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-customize);
  transition: var(--transition);
}

.customize-panel.open {
  right: 0;
}

.customize-toggle {
  position: absolute;
  left: -48px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.customize-toggle:hover {
  background: var(--gray-700);
}

.customize-content {
  padding: var(--space-xl);
}

.customize-content h3 {
  margin-bottom: var(--space-lg);
  color: var(--primary);
}

.customize-content label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  margin-top: var(--space-lg);
  color: var(--text);
}

.customize-content input {
  width: 100%;
  padding: var(--space-sm);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
}

.customize-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.customize-actions button {
  flex: 1;
  padding: var(--space-sm);
  border: 1px solid var(--text);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  background: transparent;
  color: var(--text);
}

.customize-actions button[type="submit"] {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
  font-weight: 500;
}

.customize-actions button[type="button"] {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
  font-weight: 400;
}

.customize-actions button:hover {
  background: #ADD8E6;
  color: var(--primary);
  border-color: #ADD8E6;
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --space-4xl: 3rem;
    --space-3xl: 2rem;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  /* Hero section mobile optimizations */
  .hero-countdown {
    gap: var(--space-lg);
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .countdown-item {
    min-width: 80px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }
  
  /* Make names single line on mobile */
  .hero-names {
    font-size: clamp(2.5rem, 7vw, 4rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Hide location text on mobile */
  .hero-location {
    display: none;
  }
  
  /* Typography adjustments for mobile */
  h2 {
    font-size: clamp(2rem, 7vw, 3rem);
    margin-bottom: var(--space-xl);
  }
  
  /* Grid adjustments */
  .attire-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: stretch;
  }
  
  .attire-section {
    display: grid;
    grid-template-rows: 50px 70px 1fr;
    height: 100%;
  }
  
  .attire-section h3 {
    min-height: 50px;
    font-size: 1.2rem;
    margin-bottom: 0;
  }
  
  .attire-guidelines {
    min-height: 70px;
    font-size: 0.9rem;
    margin-bottom: 0;
    padding: 0 var(--space-sm);
  }
  
  .attire-note {
    font-size: 0.9rem;
  }
  
  .carousel-container {
    border-radius: var(--border-radius);
    position: relative;
  }
  
  /* Hide navigation buttons on mobile */
  .carousel-btn {
    display: none;
  }
  
  /* Add swipe indicator */
  .carousel-container::after {
    content: 'SWIPE TO VIEW';
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: var(--space-sm) var(--space-lg);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 10;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  /* Hide swipe indicator after swiping starts */
  .carousel-container.swiping-started::after {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
  }
  
  .carousel-slide {
    flex: 0 0 100%;
    border-radius: var(--border-radius);
  }
  
  .carousel-slide:hover {
    transform: scale(1.01);
  }
  
  .carousel-slide img {
    border-radius: var(--border-radius);
  }
  
  /* Fix text wrapping issues */
  .attire-guidelines {
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 0 var(--space-xs);
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
  }
  
  .attire-note {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  /* Improve dots for mobile */
  .carousel-dots {
    margin-top: var(--space-md);
    padding: var(--space-sm);
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .carousel-dot {
    width: 10px;
    height: 10px;
    border-width: 2px;
    min-width: 10px;
    min-height: 10px;
  }
  
  /* Touch-friendly spacing */
  .carousel-track {
    padding: 0;
    gap: 0;
  }
}

/* Extra small mobile devices - enhanced touch targets */
@media (max-width: 480px) {
  /* Buttons are hidden on mobile, so no button styles needed */
  
  .carousel-slide {
    border-radius: 12px;
  }
  
  .carousel-slide img {
    border-radius: 12px;
  }
  
  .carousel-slide::before {
    border-radius: 12px;
  }
  
  /* Better text handling for very small screens */
  .attire-guidelines {
    font-size: 0.8rem;
    line-height: 1.3;
    padding: 0;
    margin-bottom: var(--space-md);
  }
  
  .attire-note {
    font-size: 0.8rem;
    line-height: 1.3;
  }
  
  /* Optimize dots for small screens */
  .carousel-dots {
    gap: var(--space-sm);
    margin-top: var(--space-sm);
  }
  
  .carousel-dot {
    width: 8px;
    height: 8px;
    border-width: 2px;
  }
  
  /* Smaller swipe indicator */
  .carousel-container::after {
    font-size: 0.7rem;
    padding: var(--space-xs) var(--space-md);
    top: var(--space-sm);
    right: var(--space-sm);
    border-radius: 16px;
    letter-spacing: 0.3px;
  }
  
  /* Hide swipe indicator after swiping starts - mobile */
  .carousel-container.swiping-started::after {
    opacity: 0;
    transform: translateY(-8px);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
  }
  
  /* Form improvements for mobile */
  .rsvp-form {
    padding: 0;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: var(--space-lg);
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Lightbox mobile optimizations */
  .lightbox-nav {
    display: none;
  }
  
  .lightbox-content {
    max-width: 95vw;
    max-height: 85vh;
    margin: 0 var(--space-sm);
  }
  
  /* Customize panel mobile */
  .customize-panel {
    width: 280px;
    right: -280px;
  }
  
  .customize-toggle {
    width: 44px;
    height: 44px;
  }
  
  /* Mobile button alignment */
  .cta-row {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: nowrap;
  }
  
  .cta.outline {
    font-size: 0.85rem;
    padding: 0.65rem 1rem;
    min-width: auto;
    flex: 0 0 auto;
    text-align: center;
  }
  
  /* Mobile color palette alignment */
  .attire .attire-palette {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
  }
  
  .attire .color-chip {
    flex: 0 0 auto;
    min-width: 120px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  /* Extra small mobile devices */
  .container {
    padding: 0 var(--space-sm);
  }
  
  /* Navigation mobile improvements */
  .nav-menu {
    padding: var(--space-md);
    gap: var(--space-md);
  }
  
  .nav-container {
    padding: 0 var(--space-md);
  }
  
  /* Hero section for small screens */
  .hero-content {
    padding: var(--space-md);
  }
  
  .hero-countdown {
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
  }
  
  .countdown-item {
    min-width: 70px;
  }
  
  .countdown-number {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }
  
  .countdown-label {
    font-size: 0.8rem;
  }
  
  /* Extra small mobile button adjustments */
  .cta.outline {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.9rem;
  }
  
  /* Color palette extra small screens */
  .color-chip {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
  }
  
  .color-swatch {
    width: 20px;
    height: 20px;
  }
  
  /* Grid layouts for small screens */
  .schedule-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .schedule-item {
    padding: var(--space-xl);
  }
  
  .schedule-map-actions {
    gap: var(--space-sm);
    flex-wrap: wrap;
  }
  
  .schedule-map-actions .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    white-space: nowrap;
  }
  
  /* Stays & Travel mobile styles */
  .stays-travel .block {
    margin: 3rem 0;
  }
  
  .cta-row {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: nowrap;
  }
  
  /* Make buttons smaller on mobile for better fit */
  .cta.outline {
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
    min-width: auto;
  }
  
  .flip-modal {
    padding: 1rem;
  }
  
  .flip-modal iframe {
    height: min(70vh, 600px);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  
  /* Attire section mobile */
  .attire-palette {
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
  }
  
  .color-chip {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.9rem;
  }
  
  /* Venue section improvements */
  .venue-directions {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .venue-item {
    margin-bottom: var(--space-xl);
  }
  
  /* Form optimizations for small screens */
  .radio-group {
    gap: var(--space-lg);
  }
  
  .radio-group label {
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
  }
  
  /* Registry section */
  .registry-grid {
    flex-direction: column;
    align-items: center;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .registry-item {
    width: 100%;
    justify-content: center;
  }
  
  /* FAQ mobile improvements */
  .faq-question {
    padding: var(--space-lg);
    font-size: 1rem;
  }
  
  .faq-answer {
    padding: 0 var(--space-lg) var(--space-lg);
    font-size: 0.95rem;
  }
  
  /* Back to top button mobile */
  .back-to-top {
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 44px;
    height: 44px;
  }
  
  /* Carousel improvements for mobile */
  .carousel-btn {
    width: 40px;
    height: 40px;
    opacity: 1; /* Always visible on mobile */
  }
  
  .carousel-overlay {
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-md);
  }
}

/* Print Styles */
@media print {
  .nav,
  .back-to-top,
  .customize-panel,
  .lightbox {
    display: none;
  }
  
  .hero {
    min-height: auto;
    padding: var(--space-2xl) 0;
  }
  
  .section {
    padding: var(--space-xl) 0;
  }
  
  * {
    box-shadow: none !important;
  }
}

/* Animation utilities */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition);
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --shadow: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.5);
  }
  
  .btn {
    border-width: 3px;
  }
}

/* Mobile-specific touch interactions */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .btn:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
  
  .gallery-item:hover {
    transform: none;
  }
  
  .carousel-slide:hover {
    transform: none;
  }
  
  /* Optimize hero background for mobile */
  .hero-bg {
    background-attachment: scroll !important; /* Override fixed attachment on mobile */
  }
  
  /* Make touch targets larger */
  .carousel-btn {
    opacity: 1 !important;
    width: 48px;
    height: 48px;
  }
  
  .nav-menu a {
    padding: var(--space-lg) var(--space-md);
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  
  /* Improve touch feedback */
  .btn:active,
  .gallery-item:active,
  .carousel-slide:active {
    transform: scale(0.98);
  }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: var(--space-xl) 0;
  }
  
  .hero-bg {
    background-attachment: scroll; /* Better performance on mobile landscape */
    background-position: center center;
  }
  
  .hero-countdown {
    margin-bottom: var(--space-lg);
  }
  
  .section {
    padding: var(--space-lg) 0;
  }
}

/* Ultra-wide mobile screens */
@media (max-width: 480px) and (min-aspect-ratio: 2/1) {
  .hero-content {
    max-width: 90vw;
  }
  
  .hero-countdown {
    flex-direction: row;
    justify-content: space-around;
    max-width: 100%;
  }
}

/* Very small screens (older phones) */
@media (max-width: 320px) {
  :root {
    --space-lg: 1rem;
    --space-xl: 1.25rem;
    --space-2xl: 1.5rem;
  }
  
  .container {
    padding: 0 var(--space-xs);
  }
  
  .hero-names {
    font-size: clamp(2rem, 12vw, 3rem);
  }
  
  .countdown-item {
    min-width: 60px;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
  
  .customize-panel {
    width: 100vw;
    right: -100vw;
    border-radius: 0;
  }
  
  .customize-toggle {
    left: -40px;
    width: 40px;
    height: 40px;
  }
}

/* ===== Floral band using PNG ===== */
/* Continuous Flower Background spanning Schedule and Venue */
.schedule.section {
  position: relative;
}

/* Create a wrapper that spans both sections */
.schedule.section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, 85vw); /* Increased from 500px to 700px */
  height: 400vh; /* Reverted back to previous setting */
  background-image: url("../images/decor/flower-bg.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto; /* Full width, auto height */
  opacity: 1; /* Removed opacity - fully visible */
  z-index: 0;
  pointer-events: none;
}

.venue.section {
  position: relative;
  z-index: 1;
  background: transparent; /* Ensure no background blocks flower */
}

/* Ensure content is above flower background */
.schedule .container,
.venue .container {
  position: relative;
  z-index: 2;
}

/* Mobile adjustments for flower background */
@media (max-width: 768px) {
  .schedule.section::after {
    width: min(500px, 90vw); /* Increased from 350px to 500px */
    opacity: 1; /* Removed opacity - fully visible on mobile too */
    height: 350vh; /* Reverted back to previous setting */
    background-size: 100% auto;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .schedule.section::after {
    width: min(600px, 85vw); /* Increased from 450px to 600px */
    height: 380vh; /* Reverted back to previous setting */
    background-size: 100% auto;
  }
}

.floral-bg {
  position: relative;
  isolation: isolate;
}
.floral-bg::before{
  content:"";
  position:absolute; inset:0; z-index:-1;
  background-image: var(--floral-bg-url, url("../images/decor/flower-bg.png"));
  background-repeat:no-repeat;
  background-position: center top;
  background-size: min(900px, 90vw) auto;
  opacity:.14;                 /* subtle default */
  pointer-events:none;
}

/* Blend helpers for opaque/white-backed PNGs */
.floral-bg.blend-multiply::before { mix-blend-mode: multiply; opacity:.22; }
.floral-bg.blend-screen::before   { mix-blend-mode: screen;   opacity:.16; }
.floral-bg.blend-normal::before   { mix-blend-mode: normal;   opacity:.14; }

/* Mobile tweak */
@media (max-width:768px){
  .floral-bg::before{
    background-position:center 2rem;
    background-size:min(640px,95vw) auto;
    opacity:.18;
  }
}

/* Falling Petals Animation */
.petal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 900; /* Below navigation (1000) */
  overflow: hidden;
}

/* Sectioned petal container for timeline and venue */
.petal-container-sections {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 900; /* Below navigation (1000) */
  overflow: hidden;
}

.falling-petal {
  position: absolute;
  pointer-events: none;
  opacity: 0.8;
  animation: fall linear infinite;
  transform-origin: center;
  /* Performance optimizations */
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0); /* Force GPU acceleration */
  backface-visibility: hidden;
}

@keyframes fall {
  0% {
    transform: translate3d(0, -100px, 0) rotateZ(0deg) scale(1);
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translate3d(0, calc(200vh), 0) rotateZ(360deg) scale(0.8);
    opacity: 0;
  }
}

@keyframes sway {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(10px, 0, 0);
  }
  75% {
    transform: translate3d(-10px, 0, 0);
  }
}

.falling-petal.sway {
  animation: fall linear infinite, sway ease-in-out infinite;
}

/* Different petal sizes */
.falling-petal.small {
  width: 20px;
  height: 20px;
}

.falling-petal.medium {
  width: 30px;
  height: 30px;
}

.falling-petal.large {
  width: 40px;
  height: 40px;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  .falling-petal {
    animation: none !important;
    display: none;
  }
  
  .petal-container,
  .petal-container-sections {
    display: none;
  }
}

/* Responsive petal container */
@media (max-width: 768px) {
  /* Disable petals animation completely on mobile */
  .petal-container,
  .petal-container-sections {
    display: none !important;
  }
  
  .falling-petal {
    display: none !important;
  }
}

  /* Instagram follow block */
  .social { text-align:center; margin: clamp(3rem, 8vw, 6rem) auto; }
  .social .container { max-width: min(92vw, 720px); margin-inline:auto; }
  .social h2 { font-family: var(--serif); letter-spacing:.06em; }
  .social .sub { color:#555; margin:.25rem 0 1.25rem; }
  .social .handle a { font-weight:700; text-decoration:none; color:var(--primary,#6B7AA1); border-bottom:1px solid currentColor; padding-bottom:2px; }
  .social .handle a:hover { color:#0D2233; background:var(--pale-blue,#BFD4E5); }

  .social-media { margin: 1.25rem auto 1.75rem; position:relative; }
  .social-video {
    display:block;
    width:min(90vw, 260px);
    margin-left:auto;
    margin-right:auto;
    aspect-ratio: 3 / 2;
    height:auto;
    border-radius:12px;
    box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.06));
    background:#000; /* while poster loads */
    object-fit: cover;
  }
  .social-play {
    position:absolute; inset:auto 0 12px 0; margin-inline:auto;
    width:56px; height:56px; border-radius:50%;
    border:1px solid #fff; background:rgba(0,0,0,.35); color:#fff;
    display:grid; place-items:center; font-size:1.2rem; cursor:pointer;
  }

  /* Divider above */
  #social { position:relative; }
  #social::before{ content:""; position:absolute; left:50%; top:-1.5rem; transform:translateX(-50%); width:120px; height:1px; background: color-mix(in oklab, #000 25%, transparent); opacity:.15; }

  /* Reduced motion: don’t autoplay; show play button */
  @media (prefers-reduced-motion: reduce) {
    .social-play { display:block; }
  }