/* ==========================================================================
   Angela & Maximilian's Wedding Website Stylesheet
   Design Theme: Ethereal Tuscan Sage & Champagne Gold
   ========================================================================== */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

html {
  overflow-x: hidden;
  /* Thin elegant scrollbar for Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 70, 56, 0.25) transparent;
}

/* --- Design Tokens / Custom Properties --- */
:root {
  /* Color Palette */
  --sage-light: #f3f6f4;
  --sage-medium: #d6e0db;
  --sage-dark: #2d4638;
  --sage-forest: #1b2d23;
  --champagne-gold: #d4af37;
  --gold-light: #faf7f0;
  --gold-dark: #b89025;
  --ivory: #fafaf7;
  --pure-white: #ffffff;
  --charcoal: #2c2c2c;
  --gray-medium: #707070;
  --gray-light: #e6e6e6;
  --coral-red: #d9534f;
  
  /* Glassmorphism Variables */
  --glass-bg: rgba(250, 250, 247, 0.75);
  --glass-border: rgba(212, 175, 55, 0.25);
  
  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(45, 70, 56, 0.05);
  --shadow-md: 0 12px 36px rgba(45, 70, 56, 0.08);
  --shadow-lg: 0 20px 50px rgba(45, 70, 56, 0.15);
  
  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-quick: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--sage-light);
  color: var(--charcoal);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  width: 100vw;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Floating Overlay Scrollbar for WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent; /* fully transparent track */
}
::-webkit-scrollbar-thumb {
  background: rgba(45, 70, 56, 0.25); /* semi-transparent sage-dark */
  border-radius: 10px;
  border: 2px solid transparent; /* padding inside track to make it float */
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.6); /* elegant semi-transparent gold on hover */
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* Reusable Typography classes */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--sage-forest);
  letter-spacing: 0.03em;
}

p {
  font-weight: 300;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}

a {
  color: var(--sage-dark);
  text-decoration: none;
  transition: var(--transition-quick);
}

a:hover {
  color: var(--champagne-gold);
}

/* ==========================================================================
   Layout & Container Utilities
   ========================================================================== */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

.section-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 20px;
  position: relative;
  font-style: italic;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--champagne-gold);
  margin: 15px auto 0 auto;
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-dark);
  margin-bottom: 50px;
  font-weight: 500;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  border-radius: 16px;
  padding: 40px;
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(212, 175, 55, 0.4);
}

/* Premium Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-primary {
  background: var(--sage-dark);
  color: var(--ivory);
  box-shadow: 0 4px 15px rgba(45, 70, 56, 0.2);
}

.btn-primary:hover {
  background: var(--sage-forest);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 70, 56, 0.3);
  color: var(--champagne-gold);
}

.btn-gold {
  background: var(--champagne-gold);
  color: var(--ivory);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
  color: var(--ivory);
}

.btn-outline {
  background: transparent;
  color: var(--sage-dark);
  border: 1px solid var(--sage-dark);
}

.btn-outline:hover {
  background: var(--sage-dark);
  color: var(--ivory);
  transform: translateY(-2px);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--ivory);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   Header & Sticky Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  transition: var(--transition-smooth);
}

.header.scrolled {
  height: 65px;
  background: rgba(250, 250, 247, 0.95);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--sage-forest);
  letter-spacing: 0.05em;
  font-style: italic;
}

.logo span {
  color: var(--champagne-gold);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-item a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage-dark);
  position: relative;
  padding: 8px 0;
}

.nav-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: var(--champagne-gold);
  transition: var(--transition-quick);
  transform: translateX(-50%);
}

.nav-item a:hover::after,
.nav-item.active a::after {
  width: 100%;
}

.nav-item a:hover,
.nav-item.active a {
  color: var(--champagne-gold);
}

.nav-item.nav-exit a:hover {
  color: var(--coral-red) !important;
  opacity: 1 !important;
}

.nav-item.nav-exit a::after {
  background-color: var(--coral-red) !important;
}

/* Mobile Menu Button */
.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-btn-burger {
  width: 24px;
  height: 2px;
  background: var(--sage-dark);
  position: relative;
  transition: var(--transition-quick);
}

.menu-btn-burger::before,
.menu-btn-burger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--sage-dark);
  transition: var(--transition-quick);
}

.menu-btn-burger::before {
  top: -8px;
}

.menu-btn-burger::after {
  bottom: -8px;
}

/* Burger Open State */
.menu-btn.open .menu-btn-burger {
  background: transparent;
}
.menu-btn.open .menu-btn-burger::before {
  transform: rotate(45deg);
  top: 0;
}
.menu-btn.open .menu-btn-burger::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  height: 100vh;
  min-height: 650px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(27, 45, 35, 0.4) 0%,
    rgba(27, 45, 35, 0.7) 100%
  );
  z-index: 1;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 800px;
  padding: 20px;
}

.hero-names {
  font-size: 5rem;
  line-height: 1.1;
  margin-bottom: 25px;
  font-family: var(--font-serif);
  color: var(--ivory);
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-names span {
  display: block;
  font-size: 2.2rem;
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--gold-light);
  margin: 10px 0;
}

.hero-venue {
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 35px;
  font-weight: 500;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

/* Countdown Timer */
.countdown-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: 500px;
  margin: 0 auto 40px auto;
}

.countdown-box {
  background: rgba(250, 250, 247, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(250, 250, 247, 0.2);
  border-radius: 12px;
  padding: 15px 10px;
  text-align: center;
}

.countdown-number {
  font-size: 2.2rem;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--pure-white);
  line-height: 1;
  margin-bottom: 5px;
}

.countdown-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage-medium);
  font-weight: 500;
}

/* ==========================================================================
   Story / Invitation Section
   ========================================================================== */
.story-section {
  background: var(--gold-light);
  perspective: 1200px; /* Enable 3D depth for nested card */
}

.invitation-card {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 45px;
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 1;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.invitation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fbfbf9; /* beautiful handcrafted cotton paper color */
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.5) 0%, rgba(0, 0, 0, 0) 100%),
    radial-gradient(rgba(0,0,0,0.015) 1px, transparent 0),
    radial-gradient(rgba(0,0,0,0.01) 1px, transparent 0);
  background-size: 100% 100%, 8px 8px, 12px 12px; /* organic fiber blend */
  background-position: 0 0, 0 0, 4px 4px;
  border: 1px solid rgba(212, 175, 55, 0.35); /* thin elegant wobbly gold line */
  box-shadow: 
    0 10px 30px rgba(45, 70, 56, 0.05),
    inset 0 0 25px rgba(0, 0, 0, 0.015); /* wobbly organic paper pressed edges */
  border-radius: 4px;
  z-index: -1;
  filter: url(#handcut-paper-edge); /* apply wobbly displacement filter for deckled edge */
}

/* 3D Floating Parallax Text Effect */
.invitation-hosts,
.invitation-request,
.invitation-couple,
.invitation-details,
.invitation-venue,
.invitation-location,
.invitation-footer {
  transform: translateZ(25px); /* Hover text slightly above wobbly paper background */
}

.invitation-hosts {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: var(--gray-medium);
}

.invitation-request {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--gray-medium);
  letter-spacing: 0.02em;
}

.invitation-couple {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  line-height: 1.25;
  margin: 30px 0;
  color: var(--sage-dark);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.invitation-couple span {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  margin: 5px 0;
  color: var(--champagne-gold);
  letter-spacing: 0.15em;
  text-transform: lowercase;
}

.invitation-details {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 25px;
  color: var(--charcoal);
  line-height: 1.6;
}

.invitation-details strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 5px;
  color: var(--sage-dark);
}

.invitation-venue {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 4px;
  color: var(--sage-forest);
}

.invitation-location {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  margin-bottom: 30px;
  font-weight: 500;
}

.invitation-footer {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--sage-forest);
  font-weight: 600;
  border-top: 1px solid var(--sage-medium);
  padding-top: 20px;
  display: inline-block;
  width: 75%;
}

/* ==========================================================================
   Schedule Section
   ========================================================================== */
.schedule-section {
  background: var(--sage-light);
}

.schedule-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 28px;
  background: transparent;
  border: 1px solid var(--sage-medium);
  border-radius: 25px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  color: var(--sage-dark);
  transition: var(--transition-quick);
}

.tab-btn:hover {
  border-color: var(--champagne-gold);
  color: var(--champagne-gold);
}

.tab-btn.active {
  background: var(--sage-dark);
  color: var(--ivory);
  border-color: var(--sage-dark);
  box-shadow: var(--shadow-sm);
}

.schedule-pane {
  display: none;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.schedule-pane.active {
  display: block;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
  display: flow-root; /* Establishes BFC to naturally clear child floats */
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--sage-medium);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  clear: both;
}

.timeline-item.left {
  float: left;
  text-align: right;
}

.timeline-item.right {
  float: right;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 30px;
  width: 12px;
  height: 12px;
  background: var(--champagne-gold);
  border: 2px solid var(--ivory);
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 0 0 4px var(--sage-medium);
}

.timeline-item.left .timeline-dot {
  right: -6px;
}

.timeline-item.right .timeline-dot {
  left: -6px;
}

.timeline-card {
  background: var(--ivory);
  border: 1px solid rgba(212, 175, 55, 0.1);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.timeline-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(212, 175, 55, 0.3);
}

.timeline-time {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--champagne-gold);
  margin-bottom: 5px;
}

.timeline-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--sage-forest);
}

.timeline-location {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  margin-bottom: 10px;
  font-weight: 500;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 15px;
}

.timeline-attire {
  font-size: 0.8rem;
  background: var(--sage-light);
  color: var(--sage-dark);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Location & Accommodations
   ========================================================================== */
.location-section {
  background: var(--ivory);
}

.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 20px;
}

.location-block h3 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  position: relative;
}

.location-block .subtitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--champagne-gold);
  margin-bottom: 25px;
  font-weight: 500;
  display: block;
}

.location-image-container {
  width: 100%;
  height: 320px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.location-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.location-image-container:hover .location-image {
  transform: scale(1.05);
}

.location-block p {
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--charcoal);
}

.accommodation-card-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.accommodation-card {
  display: flex;
  gap: 20px;
  background: var(--pure-white);
  border: 1px solid var(--sage-medium);
  border-radius: 12px;
  padding: 20px;
  align-items: center;
  transition: var(--transition-smooth);
}

.accommodation-card:hover {
  border-color: var(--champagne-gold);
  box-shadow: var(--shadow-md);
}

.accommodation-info h4 {
  font-size: 1.3rem;
  color: var(--sage-forest);
  margin-bottom: 5px;
}

.accommodation-info .type {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--gold-dark);
  letter-spacing: 0.05em;
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
}

.accommodation-info p {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.tag-onsite {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-dark);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.tag-general {
  background: rgba(45, 70, 56, 0.08);
  color: var(--sage-dark);
  border: 1px solid rgba(45, 70, 56, 0.15);
}

.accomm-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   RSVP Portal & Dashboard Section
   ========================================================================== */
.rsvp-section {
  background: var(--sage-light);
}

.rsvp-cta-box {
  max-width: 600px;
  margin: 0 auto 50px auto;
  text-align: center;
}

.rsvp-cta-box p {
  margin-bottom: 30px;
  font-size: 1.1rem;
}

/* RSVP Database Dashboard */
.dashboard-title {
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
  font-style: italic;
  color: var(--sage-forest);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  text-align: center;
  padding: 25px 15px;
  background: var(--pure-white);
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 3rem;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--sage-dark);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-medium);
  font-weight: 600;
}

.dashboard-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.dashboard-details-grid.single-column {
  grid-template-columns: 1fr;
}

.dashboard-breakdown {
  background: var(--pure-white);
  border-radius: 12px;
  padding: 30px;
  border: 1px solid rgba(212, 175, 55, 0.1);
  box-shadow: var(--shadow-sm);
}

.breakdown-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--sage-forest);
  border-bottom: 1px solid var(--sage-medium);
  padding-bottom: 10px;
}

.breakdown-row {
  margin-bottom: 15px;
}

.breakdown-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.breakdown-bar-container {
  width: 100%;
  height: 8px;
  background: var(--sage-light);
  border-radius: 4px;
  overflow: hidden;
}

.breakdown-bar {
  height: 100%;
  background: var(--champagne-gold);
  width: 0%;
  transition: width 1s ease-in-out;
  border-radius: 4px;
}

.breakdown-bar.sage {
  background: var(--sage-dark);
}

/* Lookup Directory CSS */
.lookup-container {
  max-width: 600px;
  margin: 0 auto;
}

.search-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.search-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 30px;
  border: 1px solid var(--sage-medium);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  background: var(--pure-white);
  transition: var(--transition-quick);
}

.search-input:focus {
  border-color: var(--champagne-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 50px;
}

.search-placeholder {
  text-align: center;
  color: var(--gray-medium);
  font-style: italic;
  font-size: 0.95rem;
  padding: 20px 0;
}

.guest-result-card {
  background: var(--pure-white);
  border-radius: 12px;
  padding: 25px;
  border: 1px solid var(--sage-medium);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.guest-info h5 {
  font-size: 1.3rem;
  color: var(--sage-forest);
  margin-bottom: 5px;
}

.guest-info .status-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.status-attending {
  background: rgba(45, 70, 56, 0.1);
  color: var(--sage-dark);
  border: 1px solid rgba(45, 70, 56, 0.2);
}

.status-declined {
  background: rgba(217, 83, 79, 0.1);
  color: var(--coral-red);
  border: 1px solid rgba(217, 83, 79, 0.2);
}

.guest-meta-text {
  font-size: 0.85rem;
  color: var(--gray-medium);
  margin-top: 3px;
}

.guest-actions {
  display: flex;
  gap: 10px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.75rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition-quick);
}

.btn-sm-edit {
  background: var(--gold-light);
  color: var(--gold-dark);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.btn-sm-edit:hover {
  background: var(--champagne-gold);
  color: var(--ivory);
}

.btn-sm-delete {
  background: rgba(217, 83, 79, 0.08);
  color: var(--coral-red);
  border: 1px solid rgba(217, 83, 79, 0.3);
}

.btn-sm-delete:hover {
  background: var(--coral-red);
  color: var(--ivory);
}

/* ==========================================================================
   Native <dialog> RSVP Modal styling
   ========================================================================== */
dialog#rsvp-dialog {
  width: 90%;
  max-width: 650px;
  border: 1px solid var(--champagne-gold);
  border-radius: 16px;
  background: var(--ivory);
  box-shadow: var(--shadow-lg);
  padding: 0;
  margin: auto;
  outline: none;
}

/* Polyfill fallback combinations */
dialog#rsvp-dialog:is(:open, :popover-open, .\:popover-open) {
  display: block;
}

/* Animate Dialog Entrance */
dialog#rsvp-dialog[open] {
  animation: dialogShow 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

dialog#rsvp-dialog::backdrop {
  background-color: rgba(27, 45, 35, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: backdropFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 40px;
  border-bottom: 1px solid var(--sage-medium);
  background: var(--sage-light);
}

.dialog-header h3 {
  font-size: 2rem;
  font-style: italic;
}

.close-dialog-btn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--sage-dark);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-quick);
  padding: 5px;
}

.close-dialog-btn:hover {
  color: var(--champagne-gold);
  transform: rotate(90deg);
}

.dialog-body {
  padding: 40px;
  max-height: 75vh;
  overflow-y: auto;
}

/* Styled Form Controls */
.rsvp-form-group {
  margin-bottom: 25px;
  position: relative;
}

.rsvp-form-group.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rsvp-label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--sage-dark);
  margin-bottom: 8px;
}

.rsvp-input,
.rsvp-select,
.rsvp-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--sage-medium);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: var(--pure-white);
  color: var(--charcoal);
  outline: none;
  transition: var(--transition-quick);
}

.rsvp-input:focus,
.rsvp-select:focus,
.rsvp-textarea:focus {
  border-color: var(--champagne-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Form Validation Styling via :user-valid */
.rsvp-input:user-valid,
.rsvp-select:user-valid,
.rsvp-textarea:user-valid {
  border-color: var(--sage-dark);
}

.rsvp-input:invalid:focus,
.rsvp-select:invalid:focus {
  border-color: var(--coral-red);
  box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.15);
}

.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 5px;
}

.radio-option {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.95rem;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 1px solid var(--sage-medium);
  border-radius: 50%;
  margin-right: 10px;
  display: inline-block;
  position: relative;
  transition: var(--transition-quick);
  background: var(--pure-white);
}

.radio-option input[type="radio"]:checked ~ .radio-custom {
  border-color: var(--sage-dark);
}

.radio-custom::after {
  content: '';
  position: absolute;
  display: none;
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sage-dark);
}

.radio-option input[type="radio"]:checked ~ .radio-custom::after {
  display: block;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
  border-top: 1px solid var(--sage-medium);
  padding-top: 25px;
}

/* Toast Messages */
.toast-notification {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sage-forest);
  color: var(--ivory);
  border: 1px solid var(--champagne-gold);
  border-radius: 30px;
  padding: 14px 35px;
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
  pointer-events: none;
}

.toast-notification.show {
  bottom: 40px;
}

.toast-notification::before {
  content: '✓';
  color: var(--champagne-gold);
  font-weight: bold;
}

/* Loading Spinner Overlay inside Dialog */
.dialog-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 100;
  border-radius: 16px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top: 3px solid var(--champagne-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.loading-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--sage-forest);
  font-style: italic;
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.footer {
  background: var(--sage-forest);
  color: var(--ivory);
  padding: 80px 0 40px 0;
  text-align: center;
  border-top: 2px solid var(--champagne-gold);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 15px;
  font-style: italic;
}

.footer-logo span {
  color: var(--champagne-gold);
}

.footer-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--sage-medium);
  max-width: 600px;
  margin: 0 auto 40px auto;
  line-height: 1.4;
  font-weight: 300;
}

.footer-hashtag {
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--champagne-gold);
  margin-bottom: 40px;
  font-weight: 500;
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(250, 250, 247, 0.4);
  border-top: 1px solid rgba(250, 250, 247, 0.1);
  padding-top: 30px;
}

/* ==========================================================================
   Animations & Media Queries
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes dialogShow {
  from { transform: scale(0.9) translateY(40px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

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

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Scroll-Driven Reveal Animations --- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes scrollReveal {
      from {
        opacity: 0;
        transform: translateY(60px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .reveal-on-scroll {
      animation: scrollReveal auto linear forwards;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }
  }
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
  .section-title {
    font-size: 2.5rem;
  }
  
  .hero-names {
    font-size: 4rem;
  }
  
  .location-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .timeline::before {
    left: 40px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 80px;
    padding-right: 20px;
    text-align: left !important;
  }
  
  .timeline-item.left, 
  .timeline-item.right {
    float: none;
  }
  
  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot {
    left: 34px;
    right: auto;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .header.scrolled {
    height: 70px;
  }
  
  .menu-btn {
    display: block;
    z-index: 1100;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: var(--ivory);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 1050;
    transition: var(--transition-smooth);
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .nav-item a {
    font-size: 1.1rem;
  }
  
  .hero-names {
    font-size: 3.2rem;
  }
  
  .countdown-container {
    max-width: 380px;
    gap: 10px;
  }
  
  .countdown-number {
    font-size: 1.6rem;
  }
  
  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .dashboard-details-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .invitation-card {
    padding: 40px 20px;
  }
  
  .invitation-couple {
    font-size: 2.2rem;
  }
  
  .accommodation-card {
    flex-direction: column;
    text-align: center;
    padding: 25px;
  }
  
  .dialog-header {
    padding: 20px 30px;
  }
  
  .dialog-body {
    padding: 30px 20px;
  }
  
  .rsvp-form-group.row {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .guest-result-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .guest-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .hero-names {
    font-size: 2.6rem;
  }
  
  .hero-names span {
    font-size: 1.6rem;
  }
  
  .countdown-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .search-wrapper {
    flex-direction: column;
  }
  
  .search-wrapper .btn {
    width: 100%;
  }
  
  .form-actions {
    flex-direction: column-reverse;
  }
  
  .form-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Screening Gate Overlay Styles
   ========================================================================== */
.gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, var(--sage-forest) 0%, #111a14 100%);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.gate-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.gate-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  padding: 50px 40px;
  background: var(--ivory);
  border: 1px solid var(--champagne-gold);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: dialogShow 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.gate-title {
  font-size: 2.6rem;
  color: var(--sage-forest);
  margin-bottom: 5px;
}

.gate-subtitle {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-dark);
}

.gate-divider {
  width: 60px;
  height: 1px;
  background: var(--champagne-gold);
  margin: 20px auto;
}

.gate-instructions {
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 30px;
  font-weight: 300;
}

.gate-input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 30px;
  border: 1px solid var(--sage-medium);
  background: rgba(255, 255, 255, 0.95);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  text-align: center;
  margin-bottom: 15px;
  color: var(--charcoal);
  transition: var(--transition-quick);
}

.gate-input:focus {
  border-color: var(--champagne-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.gate-error-message {
  color: #f28b82;
  font-size: 0.85rem;
  margin-bottom: 15px;
  min-height: 20px;
  font-weight: 400;
  line-height: 1.4;
}

.gate-btn {
  width: 100%;
}

/* Disable body scroll when gate is active */
body.gate-active {
  overflow: hidden;
}

