:root {
  --sage: #597b64;       /* Premium Light Mint Green */
  --gold: #C5A059;
  --bg: #FFFFFF;
  --bg-soft: #F4F7F5;    /* Luxury ultra-faint mint cream to fill out empty space */
  --text: #333333;
  --radius-soft: 16px;   /* Organic rounded corners for cards and blocks */
  --radius-pill: 30px;   /* Perfectly rounded edges for buttons and navigation */
  
  /* Strict Typography Design Variables */
  --font-classy: 'Cormorant Garamond', serif;
  --font-clean: 'Montserrat', sans-serif;
}

html { scroll-behavior: smooth; }

/* GLOBAL FONTS RESET */
body, 
input, 
select, 
textarea, 
button, 
.sticky-nav a, 
.t-item span, 
.t-item p, 
.calendar-date, 
.hero-label,
.map-card-overlay span {
  font-family: var(--font-clean);
}

h1, h2, h3, h4, 
.section-title, 
.location-name, 
.quote-text,
.footer p {
  font-family: var(--font-classy);
}

body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
}

/* GLOBAL WRAPPER */
.timeless-wrapper {
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================================
   MODERN HIGH-PERFORMANCE PARALLAX CLIPPED ENGINE 
   ========================================================================== */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  clip-path: inset(0 0 0 0);
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.25)), 
              url('https://images.unsplash.com/photo-1519225421980-715cb0215aed?q=80&w=2000');
  background-size: cover;
  background-position: center;
  z-index: -1;
  will-change: transform;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden; 
}

.hero-label { letter-spacing: 5px; font-size: 0.8rem; }
.hero-section h1 { font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 500; margin: 15px 0; }
.gold-line { width: 60px; height: 1px; background: var(--gold); margin: 0 auto 20px; }

/* NAVIGATION SYSTEM LAYER (DESKTOP DEFAULT) */
.sticky-nav {
  position: sticky;
  top: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  padding: 15px 30px;
  z-index: 1000;
  max-width: 500px;
  margin: 0 auto;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(164, 195, 178, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  width: 100%;
}

.sticky-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.75rem;
  letter-spacing: 2px;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-nav a:hover {
  color: var(--sage);
}

.menu-toggle {
  display: none;
}

/* CONTENT LAYOUT & ALTERNATING SECTIONS */
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

.info-section { padding: 60px 0; text-align: center; background-color: var(--bg); }
.program-section { padding: 60px 0; text-align: center; background-color: var(--bg-soft); }
.location-section { padding: 60px 0; text-align: center; background-color: var(--bg); }
.rsvp-section { padding: 60px 0; text-align: center; background-color: var(--bg-soft); }

/* LUXURY H2 TYPOGRAPHY */
h2, .section-title { 
  font-size: 3.2rem;       
  font-weight: 500; 
  letter-spacing: 1.5px;   
  color: var(--sage); 
  margin-bottom: 25px; 
  line-height: 1.2;
}

.main-text { font-size: 1.1rem; line-height: 1.9; max-width: 630px; margin: 0 auto 50px; color: #555; }

/* ROMANTIC QUOTE BANNER */
.quote-banner {
  padding: 60px 20px;
  background: var(--bg-soft);
  text-align: center;
  border-top: 1px solid rgba(164, 195, 178, 0.15);
  border-bottom: 1px solid rgba(164, 195, 178, 0.15);
}

.quote-text {
  font-style: italic;
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--text);
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.6;
}

/* IMAGES */
.mid-photo { 
  width: 100%; 
  max-height: 550px; 
  object-fit: cover; 
  border-radius: var(--radius-soft); 
  box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}

/* HIGH-PERFORMANCE CLIPPED PARALLAX IMAGE DIVIDER */
.parallax-divider {
  position: relative;
  height: 55vh;
  clip-path: inset(0 0 0 0);
  overflow: hidden;
}

.parallax-divider::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url('https://raw.githubusercontent.com/petyonachev92/wedding_website/refs/heads/main/client/public/images/MPN03338.JPG');
  background-size: cover;
  background-position: center;
  z-index: -1;
  will-change: transform;
}

/* OPTICALLY BALANCED ASYMMETRIC TIMELINE */
.timeline-list { 
  margin-top: 40px; 
  background: white;
  padding: 10px;
  border-radius: var(--radius-soft);
  box-shadow: 0 10px 30px rgba(164, 195, 178, 0.08);
  max-width: 420px; 
  margin-left: auto;
  margin-right: auto;
  position: relative; 
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 29%; 
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(197, 160, 89, 0.25) 15%, rgba(197, 160, 89, 0.25) 85%, transparent);
  transform: translateX(-50%);
}

.t-item {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2; 
  padding: 16px 0;
}

.t-item span { 
  font-weight: 600; 
  color: var(--gold); 
  width: 28%; 
  text-align: right; 
  padding-right: 15px; 
  box-sizing: border-box;
  font-size: 1rem;
  line-height: 1;
}

.t-item p {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
  width: 72%; 
  text-align: left; 
  padding-left: 15px; 
  box-sizing: border-box;
  line-height: 1.3; 
}

/* CALENDAR SECTION INTERACTIVITY */
.calendar-section {
  padding: 60px 0;
  background-color: var(--bg);
  text-align: center;
}

.calendar-card {
  max-width: 350px;
  margin: 0 auto;
  background: white;
  padding: 35px 30px;
  border-radius: var(--radius-soft);
  box-shadow: 0 15px 40px rgba(164, 195, 178, 0.1);
  border: 1px solid #eef2ef;
  cursor: pointer; 
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.calendar-header h3 {
  font-family: var(--font-classy) !important;
  font-weight: 500;
  letter-spacing: 3px;
  font-size: 1.45rem;
  color: var(--text);
  margin-bottom: 25px;

  /* FORCES NUMBERS TO MATCH THE HEIGHT AND ALIGNMENT OF CYRILLIC LETTERS */
  font-variant-numeric: lining-nums;
  -moz-font-feature-settings: "lnum" 1;
  -webkit-font-feature-settings: "lnum" 1;
  font-feature-settings: "lnum" 1;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  max-width: 320px;
  margin: 0 auto;
}

.calendar-day-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--sage);
  margin-bottom: 10px;
}

.calendar-date-wrapper {
  position: relative;
  width: 100%;
  height: 40px; 
  display: flex;
  justify-content: center;
  align-items: center;
}

.calendar-date {
  font-size: 0.95rem;
  color: #777;
  z-index: 5;
  position: relative;
  line-height: 1; 
  pointer-events: none;
}

.heart-marker {
  position: absolute;
  top: 46%; 
  left: 50%;
  transform: translate(-50%, -43%) !important; 
  width: 60px;
  height: 60px;
  z-index: 2;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none !important;      /* Removes any trace of the old ring borders */
  background: none !important;  /* Clears any leftover circle backgrounds */
}

/* Premium vibrant red filling and shading adjustments */
.heart-svg {
  width: 100%;
  height: 100%;
  fill: var(--sage);                /* High-contrast romantic red fill color */
  stroke: #77b894;              /* Crisp matching border accent alignment */
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wedding-day {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.55rem !important;
}

.ring-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important; 
  width: 36px;
  height: 36px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
}

.diamond {
  position: absolute;
  top: -5px;
  left: calc(50% - 4px); 
  width: 6px;
  height: 6px;
  background: white;
  border: 2px solid var(--gold);
  transform: rotate(45deg);
  z-index: 3;
}

.empty { height: 35px; }

/* REBALANCED VISUAL WEIGHT LOCATION CARDS */
.location-name {
  font-size: 2.1rem;        
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--gold);       
  margin-bottom: 8px;
  line-height: 1.3;
}

.location-address {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 30px;
}

.location-instructions {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.9;
  max-width: 630px;
  margin: 0 auto 50px;
}

.map-image-card {
  position: relative;
  max-width: 800px;
  height: 400px;
  margin: 0 auto 30px;
  box-shadow: 0 15px 35px rgba(164, 195, 178, 0.15);
  border-radius: var(--radius-soft);
  overflow: hidden;
  cursor: pointer;
}

.map-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-card-overlay {
  position: absolute;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.12);
  
  display: flex;
  justify-content: center;
  align-items: flex-end;  /* Changed from 'center' to push the badge to the top edge */
  padding-bottom: 35px;        /* Adds elegant breathing room from the top border */
  box-sizing: border-box;   /* Prevents the padding from distorting the overlay size */
  
  z-index: 2;
  transition: background 0.4s ease;
}

.map-card-overlay span {
  color: white;
  font-size: 0.8rem;
  letter-spacing: 3px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-pill);
  transition: all 0.4s ease;
}

.map-image-card:hover .map-card-img { transform: scale(1.03); }
.map-image-card:hover .map-card-overlay { background: rgba(164, 195, 178, 0.3); }
.map-image-card:hover .map-card-overlay span { background: var(--sage); border-color: var(--sage); }

/* RSVP STACK ARCHITECTURE */
.rsvp-box { 
  background: white; 
  padding: 50px; 
  border-radius: var(--radius-soft); 
  box-shadow: 0 15px 45px rgba(164, 195, 178, 0.1); 
  display: flex;
  flex-direction: column;
  align-items: center;
}

.elegant-form { 
  display: flex; 
  flex-direction: column; 
  gap: 20px; 
  width: 100%;
  max-width: 550px; 
  margin: 30px auto 0; 
}

.guests-loop-container,
.elegant-form textarea,
.add-guest-action-btn,
.gold-btn {
  width: 100%;
  box-sizing: border-box; 
}

.guest-row-card {
  background: #fafbfa;
  border: 1px solid #eef2ef;
  border-left: 4px solid var(--sage);
  padding: 25px;
  border-radius: var(--radius-soft);
  text-align: left;
  box-sizing: border-box; 
}

.guest-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.guest-row-header h4 {
  margin: 0;
  font-size: 1.2rem; 
  letter-spacing: 0.5px;
  color: var(--text);
  font-weight: 500;
}

.remove-guest-btn {
  background: transparent;
  border: none;
  color: #c94a4a;
  font-size: 0.75rem;
  cursor: pointer;
  letter-spacing: 1px;
}

.guest-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 15px; 
  width: 100%;
  box-sizing: border-box;
}

.form-field-row {
  width: 100%;
  position: relative;
}

.guest-fields-stack input,
.guest-fields-stack select,
.elegant-form textarea {
  width: 100% !important;
  box-sizing: border-box;
  padding: 16px 20px; 
  border: 1px solid #e2e8e4;
  background-color: white;
  border-radius: 12px; 
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.guest-fields-stack input:focus, 
.guest-fields-stack select:focus, 
.elegant-form textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(164, 195, 178, 0.12);
}

.guest-fields-stack select {
  cursor: pointer;
  appearance: none; 
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px;
  padding-right: 45px; 
}

.add-guest-action-btn {
  background: transparent;
  border: 1px dashed var(--sage);
  color: var(--sage);
  padding: 15px; 
  font-size: 0.75rem;
  letter-spacing: 2px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 5px 0;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
}

.add-guest-action-btn:hover {
  background: rgba(164, 195, 178, 0.1); 
  border-color: var(--gold);
  color: var(--gold);
}

.gold-btn {
  background: var(--sage);
  color: white;
  border: none;
  padding: 18px;
  letter-spacing: 2px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-pill);
  box-shadow: 0 5px 20px rgba(164, 195, 178, 0.2);
}

.gold-btn:hover { 
  background: var(--gold); 
  box-shadow: 0 5px 20px rgba(197, 160, 89, 0.3);
}

/* FOOTER */
.footer {/* padding: 60px 0; */text-align: center;font-size: 1.8rem;letter-spacing: 2px;color: #777;}

/* ERROR CONTAINERS */
.error-message-box {
  background-color: #FDF4F4; 
  border-left: 4px solid #C94A4A; 
  padding: 15px 20px;
  border-radius: 12px;
  text-align: left;
  box-sizing: border-box;
  width: 100%;
}

.error-message-box p {
  margin: 0;
  color: #C94A4A;
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: 500;
}

/* SUCCESS TEXT LAYOUT PANELS */
.success-message-wrapper {
  text-align: center;
  padding: 30px 10px;
  position: relative; 
}

.success-message-wrapper h3 {
  font-size: 2.6rem;
  color: var(--sage);
  margin: 0 0 15px 0;
  font-weight: 500;
}

.welcome-message-text {
  font-family: var(--font-classy); 
  font-size: 1.6rem;
  color: var(--text);
  margin: 0;
  font-style: italic;
}

.welcome-message-text.neutral {
  font-family: var(--font-clean);
  font-size: 1rem;
  color: #777777;
  font-style: normal;
}

/* TRUE WINDOW VIEWPORT FIXED CONFETTI ENGINE */
.confetti-container {
  position: fixed; 
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none; 
  z-index: 9999; 
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  pointer-events: none;
}

/* ==========================================================================
   LARGE SCREEN & ULTRA-WIDE MONITOR OPTIMIZATIONS
   ========================================================================== */
@media (min-width: 1400px) {
  .hero-section::before,
  .parallax-divider::before {
    background-position: center 30% !important;
  }
}

@media (min-width: 2000px) {
  .hero-section::before {
    background-size: 100% auto !important;
    background-position: center center !important;
  }
  .main-text {
    max-width: 750px;
    font-size: 1.2rem;
  }
}

@media (max-height: 750px) and (min-width: 769px) {
  .hero-section h1 { font-size: 3.5rem; }
  .sticky-nav { top: 10px; padding: 10px 20px; }
}

/* ==========================================================================
   CRITICAL MOBILE SCREEN OVERHAUL RE-ENGINE
   ========================================================================== */
@media (max-width: 768px) {
  .guest-fields-stack input,
  .guest-fields-stack select,
  .elegant-form textarea {
    padding: 14px 16px;
  }
  
  h2, .section-title {
    font-size: clamp(2.1rem, 9vw, 2.6rem);
  }

  .location-name {
    font-size: 1.6rem; 
  }

  /* FIXED THE POSITION BUG: Smoothly scales the whole button wrapper container up when active */
  .sticky-nav {
    position: fixed !important;
    top: 20px; 
    right: 20px; 
    left: auto;
    width: 52px; 
    height: 52px;
    padding: 0; 
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 25px rgba(164, 195, 178, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow: hidden; /* Hides menu links cleanly while drawer is shut */
    transition: all 0.4s cubic-bezier(0.1, 0.8, 0.25, 1);
  }

  /* Opens up context mapping boundary rules so it floods the mobile view perfectly */
  .sticky-nav.mobile-nav-active {
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: none;
    overflow: visible;
  }

  /* Hamburger toggle switch mechanics */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px; 
    height: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10002;
    outline: none;
    position: absolute;
    transition: all 0.3s ease;
  }

  /* Keeps the toggle button perfectly pinned in the top-right corner when overlay is active */
  .sticky-nav.mobile-nav-active .menu-toggle {
    top: 38px;
    right: 35px;
  }

  .menu-toggle .bar {
    width: 100%; 
    height: 2px;
    background-color: var(--text);
    transition: transform 0.4s cubic-bezier(0.1, 0.8, 0.25, 1), opacity 0.3s ease, background-color 0.3s ease;
    transform-origin: left center;
  }

  .menu-toggle .bar.open:nth-child(1) {
    transform: rotate(45deg) translate(2px, -2px);
    background-color: #C94A4A; 
  }
  
  .menu-toggle .bar.open:nth-child(2) {
    opacity: 0; 
    transform: scaleX(0);
  }
  
  .menu-toggle .bar.open:nth-child(3) {
    transform: rotate(-45deg) translate(2px, 2px);
    background-color: #C94A4A;
  }

  /* Full screen vertical drawer menu option container styles */
  .nav-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  /* Reveals the links with an elegant fade-in once container handles expansion */
  .nav-links.show {
    opacity: 1;
    visibility: visible;
  }

  .sticky-nav a {
    font-family: var(--font-classy) !important; 
    font-size: 1.6rem;
    letter-spacing: 3px;
    color: var(--text);
    padding: 8px 40px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .sticky-nav a:hover {
    color: var(--sage);
  }
}