/* ==========================================================================
   MARCO & ELISA - WEDDING LANDING PAGE DESIGN SYSTEM
   Color Palette extracted directly from the Botanical Watercolor Invitation
   Fonts: Cormorant Garamond (Serif) & Shelly Script / Calligraphy Cursive
   ========================================================================== */

/* --- Font Face & Fallback for Shelly Script --- */
@font-face {
  font-family: 'Shelly Script';
  src: local('Shelly Script'), local('Shelley Script'), local('Shelley Allegro Script'), local('ShelleyAndanteScript'), local('ShelleyVolanteScript');
  font-display: swap;
}

/* --- CSS Variables / Design Tokens --- */
:root {
  /* Colors extracted from the invitation */
  --color-forest-dark: #27382b;       /* Dark botanical green for headings and script text */
  --color-forest: #36513d;            /* Primary wedding green */
  --color-forest-light: #52735a;      /* Medium olive sage */
  --color-sage: #7f9f87;              /* Soft sage */
  --color-sage-pale: #eef3ef;         /* Light sage background tint */
  --color-sage-border: #d4e0d7;       /* Border accent */

  /* Wildflower Watercolor Accents */
  --color-cornflower: #5c82ba;        /* Soft blue floral */
  --color-lavender: #8c6fa8;          /* Meadow lilac */
  --color-rose: #e59eaf;              /* Blush pink */
  --color-rose-light: #fdf1f4;
  --color-gold: #c4a46c;              /* Soft warm champagne gold */
  --color-gold-light: #f9f5ed;
  --color-buttercup: #ebbf5c;         /* Wildflower yellow */

  /* Neutrals & Paper Textures */
  --color-paper: #fbf9f5;             /* Luxurious cotton paper */
  --color-paper-card: #ffffff;        /* Pure card surface */
  --color-paper-warm: #f5efe6;        /* Warm parchment background */
  --color-text-main: #2b332c;         /* Deep graphite / charcoal green */
  --color-text-muted: #626c64;        /* Soft paragraph text */
  --color-text-subtle: #8e9990;

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Shelly Script', 'Pinyon Script', 'Alex Brush', 'Great Vibes', 'Italianno', cursive;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows & Elevation */
  --shadow-sm: 0 2px 8px rgba(43, 51, 44, 0.04);
  --shadow-md: 0 8px 24px rgba(43, 51, 44, 0.07);
  --shadow-lg: 0 16px 36px rgba(43, 51, 44, 0.1);
  --shadow-card: 0 10px 30px -5px rgba(54, 81, 61, 0.07);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-serif);
  background-color: var(--color-paper);
  color: var(--color-text-main);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Typography Helpers */
.script-font {
  font-family: var(--font-script);
  font-weight: normal;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-forest-dark);
  font-weight: 500;
  letter-spacing: 0.03em;
}

p {
  font-size: 1.12rem;
  color: var(--color-text-muted);
}

a {
  color: var(--color-forest);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-forest-dark);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Section Dividers & Tags --- */
.section {
  padding: 4.8rem 0;
  position: relative;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-forest-light);
  background: var(--color-sage-pale);
  padding: 0.3rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.65rem;
  border: 1px solid var(--color-sage-border);
}

.section-title {
  font-size: 2.3rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--color-forest-dark);
}

.section-subtitle {
  font-size: 1.12rem;
  color: var(--color-text-muted);
  max-width: 580px;
  margin: 0 auto;
}

.divider-olive {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-forest-light), transparent);
  margin: 1.2rem auto 2.2rem;
  position: relative;
}

.divider-olive::after {
  content: '✤';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-paper);
  padding: 0 0.4rem;
  font-size: 0.75rem;
  color: var(--color-forest-light);
}

/* --- Buttons & UI Elements --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background-color: var(--color-forest);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(54, 81, 61, 0.22);
}

.btn-primary:hover {
  background-color: var(--color-forest-dark);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(54, 81, 61, 0.32);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--color-forest);
  border: 1px solid var(--color-sage-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--color-sage-pale);
  border-color: var(--color-forest-light);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background-color: var(--color-sage-pale);
  border-color: var(--color-forest);
}

.btn-sm {
  padding: 0.5rem 1.05rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.95rem 2.1rem;
  font-size: 0.96rem;
}

.btn-block {
  width: 100%;
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-backdrop-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-custom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.96) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(251, 249, 245, 0.85) 0%,
    rgba(251, 249, 245, 0.90) 45%,
    rgba(251, 249, 245, 0.98) 100%
  );
  backdrop-filter: blur(1.5px);
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 740px;
  margin: 0 auto;
}

/* Exact Monogram M E with Olive Branch */
.monogram-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  color: var(--color-forest-dark);
}

.mono-letter {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.mono-olive-branch {
  width: 40px;
  height: 52px;
  color: var(--color-forest);
  transform: translateY(-1px);
}

/* Couple Names - Shelly Script */
.couple-names {
  font-family: var(--font-script);
  font-size: clamp(3.4rem, 9.5vw, 6rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-forest-dark);
  margin-bottom: 1.15rem;
}

.announcement-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(0.92rem, 2.4vw, 1.2rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  line-height: 1.85;
  text-transform: uppercase;
  color: var(--color-forest-dark);
  margin-bottom: 1.6rem;
}

.announcement-strong {
  font-weight: 600;
  letter-spacing: 0.2em;
  display: block;
}

.wedding-date-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--color-forest);
  margin-bottom: 1.85rem;
  padding: 0.35rem 1.25rem;
  border-top: 1px solid var(--color-sage-border);
  border-bottom: 1px solid var(--color-sage-border);
}

.date-city {
  font-style: normal;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Countdown Card with Save the date */
.countdown-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 224, 215, 0.9);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.8rem;
  box-shadow: var(--shadow-card);
  max-width: 520px;
  margin: 0 auto 1.85rem;
}

.countdown-header {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-forest-light);
  margin-bottom: 0.75rem;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.countdown-number {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  color: var(--color-forest-dark);
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
}

.countdown-divider {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--color-sage);
  line-height: 1;
  margin-bottom: 0.9rem;
}

/* Hero Single Action: Add to Calendar */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.scroll-down-indicator {
  display: inline-block;
  color: var(--color-forest-light);
  font-size: 1.15rem;
  margin-top: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-7px); }
  60% { transform: translateY(-3px); }
}

/* --- Vertical Timeline / Roadmap Section --- */
.timeline-section {
  background: var(--color-paper);
}

.timeline-roadmap {
  position: relative;
  max-width: 760px;
  margin: 2.5rem auto 0.5rem;
  padding: 0.5rem 0;
}

.timeline-line {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 50%;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--color-sage-border) 0%,
    var(--color-forest-light) 20%,
    var(--color-forest-light) 80%,
    var(--color-sage-border) 100%
  );
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.8rem;
  display: flex;
  align-items: flex-start;
  z-index: 2;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--color-forest);
  color: var(--color-forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  box-shadow: 0 4px 10px rgba(54, 81, 61, 0.12);
  z-index: 3;
  transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
  background: var(--color-forest);
  color: #ffffff;
  transform: translateX(-50%) scale(1.08);
}

.timeline-card {
  width: calc(50% - 44px);
  background: #ffffff;
  padding: 1.5rem 1.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-sage-border);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-sage);
}

.timeline-item:not(.timeline-item-alt) .timeline-card {
  margin-right: auto;
  text-align: right;
}

.timeline-item.timeline-item-alt {
  justify-content: flex-end;
}

.timeline-item.timeline-item-alt .timeline-card {
  margin-left: auto;
  text-align: left;
}

.timeline-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-forest);
  background: var(--color-sage-pale);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.6rem;
}

.timeline-title {
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-forest-dark);
}

.timeline-place {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--color-text-main);
  line-height: 1.5;
}

.timeline-actions {
  margin-top: 0.85rem;
}

.btn-link-map {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-forest);
  border-bottom: 1px dashed var(--color-forest-light);
  padding-bottom: 2px;
}

.btn-link-map:hover {
  color: var(--color-forest-dark);
  border-bottom-style: solid;
}

/* --- Locations Details Section --- */
.locations-section {
  background: var(--color-paper);
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
  margin-top: 2rem;
}

.location-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-sage-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.location-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.loc-card-header {
  background: linear-gradient(135deg, var(--color-sage-pale) 0%, #ffffff 100%);
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--color-sage-border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.loc-header-alt {
  background: linear-gradient(135deg, var(--color-rose-light) 0%, #ffffff 100%);
}

.loc-icon-bubble {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--color-sage-border);
  color: var(--color-forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.loc-type {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-forest-light);
  display: block;
}

.loc-name {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-forest-dark);
}

.loc-card-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.loc-info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.loc-info-row > i {
  color: var(--color-forest-light);
  font-size: 1rem;
  margin-top: 0.2rem;
  width: 18px;
  text-align: center;
}

.loc-info-row strong {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--color-forest-dark);
  display: block;
}

.loc-info-row p {
  font-size: 0.98rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin: 0;
}

.map-embed-wrapper {
  margin: 0.85rem 0 1.2rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-sage-border);
  background: var(--color-sage-pale);
  height: 180px;
  position: relative;
}

.map-embed-wrapper iframe {
  width: 100%;
  height: 320px;
  margin-top: -50px;
  border: 0;
  pointer-events: none;
}

.loc-card-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

/* --- Minimal & Synthetic RSVP Section --- */
.rsvp-section {
  background: var(--color-paper);
}

.rsvp-wrapper {
  max-width: 540px;
  margin: 0 auto;
  background: #ffffff;
  padding: 2.5rem 2.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-sage-border);
  box-shadow: var(--shadow-card);
}

.rsvp-form {
  margin-top: 1.6rem;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-forest-dark);
  margin-bottom: 0.4rem;
}

.form-label .required {
  color: #c94a4a;
}

.form-control {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-sage-border);
  background-color: var(--color-paper);
  color: var(--color-text-main);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-forest);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(54, 81, 61, 0.1);
}

textarea.form-control {
  resize: vertical;
  line-height: 1.5;
}

/* Minimal Presence Switch */
.presence-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}

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

.presence-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-sage-border);
  background: var(--color-paper);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.presence-option input[type="radio"]:checked + .presence-box {
  border-color: var(--color-forest);
  background: var(--color-sage-pale);
  color: var(--color-forest-dark);
  font-weight: 600;
}

.presence-option.presence-no input[type="radio"]:checked + .presence-box {
  border-color: #c94a4a;
  background: #fdf4f4;
  color: #a33232;
}

/* Submit Actions */
.form-submit-wrapper {
  margin-top: 1.8rem;
  text-align: center;
}

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

.success-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-sage-pale);
  color: var(--color-forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.2rem;
}

/* Variante della stessa bolla per lo stato di errore del modulo RSVP */
.success-icon-error {
  background: #fdf1f4;
  color: #b4566d;
}

.rsvp-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.success-title {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--color-forest-dark);
}

.success-msg {
  font-size: 1.08rem;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

.mt-4 {
  margin-top: 1.5rem;
}

/* --- Gift / IBAN Section --- */
.gift-section {
  background: var(--color-paper);
}

.gift-card {
  max-width: 580px;
  margin: 0 auto;
  background: #ffffff;
  padding: 2.8rem 2.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-sage-border);
  box-shadow: var(--shadow-card);
}

.gift-text {
  font-size: 1.12rem;
  line-height: 1.75;
  margin-bottom: 1.8rem;
}

.iban-card {
  background: var(--color-paper);
  border: 1px solid var(--color-sage-border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  text-align: left;
}

.iban-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
}

.iban-label {
  font-weight: 600;
  color: var(--color-forest);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.iban-beneficiary {
  color: var(--color-text-muted);
}

.iban-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-sage-border);
  margin-bottom: 0.75rem;
}

.iban-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-forest-dark);
  word-break: break-all;
}

.btn-copy {
  background: var(--color-forest);
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-copy:hover {
  background: var(--color-forest-dark);
}

.iban-footer {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--color-text-subtle);
  text-align: center;
}

/* --- Photos / Memories Section --- */
.photos-section {
  background: var(--color-paper);
}

/* --- Footer --- */
.footer {
  background: var(--color-paper);
  border-top: 1px solid var(--color-sage-border);
  padding: 3rem 1.5rem 2.5rem;
}

.footer-names {
  font-size: 2.8rem;
  color: var(--color-forest-dark);
}

.footer-date {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-forest-light);
  margin-top: 0.35rem;
}

/* --- Toast Notification System --- */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  background: #ffffff;
  border: 1px solid var(--color-sage-border);
  border-left: 4px solid var(--color-forest);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-forest-dark);
  transform: translateY(150%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s ease;
  pointer-events: none;
}

.toast-notification.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--color-forest);
  font-size: 1.15rem;
}

/* --- Scorciatoia flottante al modulo RSVP --- */
.floating-rsvp {
  position: fixed;
  left: 50%;
  bottom: 1.15rem;
  z-index: 900;              /* sotto il toast, che ha 2000 */
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--color-forest);
  color: var(--color-paper);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 26px rgba(39, 56, 43, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 160%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, background 0.25s ease;
}

.floating-rsvp.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.floating-rsvp:hover,
.floating-rsvp:focus-visible {
  background: var(--color-forest-dark);
}

@media (prefers-reduced-motion: reduce) {
  .floating-rsvp {
    transition: opacity 0.2s linear;
    transform: translate(-50%, 0);
  }
}

/* --- Lista persone del modulo RSVP (una scheda = una riga nel foglio) --- */
.guest-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.guest-card {
  border: 1px solid var(--color-sage-border);
  border-radius: var(--radius-md);
  background: var(--color-paper);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.guest-card.is-open {
  border-color: var(--color-sage);
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(39, 56, 43, 0.07);
}

.guest-card.has-error {
  border-color: #c94a4a;
}

.guest-head {
  display: flex;
  align-items: stretch;
}

/* Intestazione cliccabile: apre e chiude la scheda */
.guest-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  color: var(--color-forest-dark);
  min-height: 52px;               /* area di tocco comoda su telefono */
}

.guest-chevron {
  flex: 0 0 auto;
  font-size: 0.75rem;
  color: var(--color-sage);
  transition: transform 0.25s ease;
}

.guest-card.is-open .guest-chevron {
  transform: rotate(180deg);
}

.guest-heading {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.guest-title {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guest-summary {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guest-summary.is-absent {
  color: #a33232;
}

.guest-summary.is-incomplete {
  color: #b07d2a;
}

.guest-remove {
  flex: 0 0 auto;
  width: 46px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-subtle);
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.guest-remove:hover,
.guest-remove:focus-visible {
  color: #c94a4a;
  background: #fdf4f4;
}

.guest-body {
  padding: 0.25rem 1rem 1rem;
  border-top: 1px solid var(--color-sage-border);
}

/* Dentro la scheda gli spazi sono piu' compatti: sul telefono conta ogni pixel.
   Le due regole grid-template-columns servono a battere per specificita' le
   media query globali, che sotto i 540px/860px metterebbero in colonna sia le
   due scelte di presenza sia Nome/Cognome, raddoppiando l'altezza del modulo
   proprio dove lo spazio scarseggia. */
.guest-body .presence-options {
  grid-template-columns: 1fr 1fr;
  margin: 0.85rem 0 0.9rem;
  gap: 0.5rem;
}

.guest-body .presence-box {
  padding: 0.7rem 0.5rem;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.guest-body .form-row {
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

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

.guest-body .form-group:last-child {
  margin-bottom: 0;
}

.guest-body .form-label {
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.guest-body .form-control {
  padding: 0.65rem 0.8rem;
}

/* --- Pulsante "Conferma per un'altra persona" --- */
.btn-add-guest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.85rem 1rem;
  border: 1.5px dashed var(--color-sage-border);
  border-radius: var(--radius-md);
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-forest);
  transition: var(--transition);
}

.btn-add-guest:hover,
.btn-add-guest:focus-visible {
  border-color: var(--color-forest);
  border-style: solid;
  background: var(--color-sage-pale);
}

.btn-add-guest[hidden] {
  display: none;
}

/* --- Responsive Media Queries --- */
@media (max-width: 860px) {
  .timeline-line {
    left: 20px;
  }

  .timeline-dot {
    left: 20px;
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .timeline-card {
    width: calc(100% - 56px);
    margin-left: 56px !important;
    text-align: left !important;
  }

  .timeline-item.timeline-item-alt {
    justify-content: flex-start;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .static-side-floral {
    width: 30px;
    opacity: 0.2;
  }
}

@media (max-width: 540px) {
  .section {
    padding: 3.5rem 0;
  }

  .rsvp-wrapper, .gift-card {
    padding: 1.8rem 1.15rem;
  }

  .countdown-grid {
    gap: 0.35rem;
  }

  .countdown-item {
    min-width: 48px;
  }

  .presence-options {
    grid-template-columns: 1fr;
  }

  .iban-code-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .btn-copy {
    justify-content: center;
  }

  .toast-notification {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}
