/* ==========================================================================
   Página do Convidado (RSVP Landing Page)
   Design Sofisticado, Mobile-First e Acolhedor
   ========================================================================== */

/* Barra de Navegação Flutuante */
.guest-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-normal);
}

.guest-navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 0.7rem 1.5rem;
}

.nav-monogram {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--gold-600);
  font-weight: bold;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn-nav-rsvp {
  padding: 0.6rem 1.3rem;
  font-size: 0.85rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 3rem;
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  color: #ffffff;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-section {
    background-attachment: fixed;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 14, 0.42) 0%, rgba(20, 16, 14, 0.68) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.hero-tagline {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--gold-300);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-names {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hero-names .ampersand {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: var(--gold-400);
  text-transform: none;
  display: inline-block;
  margin: 0 0.4rem;
}

.hero-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-100);
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero-details span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Contagem Regressiva Viva (Countdown Timer) */
.countdown-wrapper {
  margin-top: 1.5rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  max-width: 480px;
  margin: 0 auto;
}

.countdown-item {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-number {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
}

.countdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-200);
  margin-top: 0.3rem;
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--gold-200);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  animation: bounceSlow 2s infinite ease-in-out;
}

@keyframes bounceSlow {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ==========================================================================
   Seções Gerais
   ========================================================================== */
.section {
  padding: 5rem 1.5rem;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-subtitle {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--gold-600);
  line-height: 1.1;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 0.2rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: 0.8rem;
}

/* ==========================================================================
   História dos Noivos & Mensagem
   ========================================================================== */
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 860px) {
  .story-grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

.story-image-wrap {
  position: relative;
}

.story-image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid #ffffff;
}

.story-image-frame img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.story-image-frame:hover img {
  transform: scale(1.03);
}

.story-badge {
  position: absolute;
  bottom: -18px;
  right: 20px;
  background: var(--gold-gradient);
  color: #ffffff;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-full);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  box-shadow: var(--shadow-gold);
}

.story-text-content {
  padding: 1rem 0;
}

.story-quote {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-primary);
  border-left: 3px solid var(--gold-500);
  padding-left: 1.5rem;
  margin-bottom: 1.8rem;
}

.story-body {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Cerimônia & Local
   ========================================================================== */
.venue-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .venue-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.venue-card {
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.venue-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold-100);
  color: var(--gold-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.venue-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.venue-time {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-600);
  margin-bottom: 1rem;
}

.venue-address {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.8rem;
  flex-grow: 1;
}

.venue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  width: 100%;
}

/* ==========================================================================
   Cronograma do Grande Dia (Timeline)
   ========================================================================== */
.timeline-list {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold-400), var(--gold-200));
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}

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

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--gold-500);
  box-shadow: 0 0 10px rgba(197, 168, 128, 0.4);
}

.timeline-time {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-600);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 0.2rem 0;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Catálogo de Presentes & Mimos
   ========================================================================== */
.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.gift-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.gift-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-400);
}

.gift-card-img-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  background: #f1ede6;
}

.gift-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gift-card:hover .gift-card-img-wrap img {
  transform: scale(1.05);
}

.gift-price-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: var(--gold-700);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

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

.gift-card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.gift-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.btn-gift-card {
  width: 100%;
  padding: 0.8rem 1.2rem;
  font-size: 0.9rem;
}

/* Card de Valor Livre */
.gift-card-custom {
  background: linear-gradient(135deg, #fbf7f0 0%, #f4eee2 100%);
  border: 2px dashed var(--gold-400);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.8rem;
}

.gift-custom-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-gold);
}

/* Modal do Presente (<dialog id="giftModal">) - Design Responsivo Fluido e Sem Cortes */
.gift-modal-dialog {
  border: none;
  background: transparent;
  padding: 0.5rem;
  margin: auto;
  max-width: 640px;
  width: 95%;
  max-height: 92vh;
  outline: none;
  overflow: visible;
}

.gift-modal-dialog::backdrop {
  background: rgba(24, 19, 16, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gift-modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-close-gift-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 20;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-close-gift-modal:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.08);
}

.gift-modal-header-img {
  width: 100%;
  height: 180px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: #f8fafc;
}

.gift-modal-header-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-modal-body {
  flex: 1;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Em telas Desktop e Tablets */
@media (min-width: 620px) {
  .gift-modal-content {
    flex-direction: row;
    align-items: stretch;
  }

  .gift-modal-header-img {
    width: 38%;
    min-width: 220px;
    height: auto;
  }

  .gift-modal-body {
    width: 62%;
    padding: 1.5rem 1.6rem;
  }
}

  .gift-modal-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
    line-height: 1.2;
  }

  .gift-modal-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold-700);
    margin-bottom: 0.35rem;
  }

  .gift-modal-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.7rem;
    max-width: 320px;
  }

  .gift-modal-qr-wrap {
    width: 124px;
    height: 124px;
    margin: 0 auto 0.6rem;
    padding: 5px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .gift-modal-qr-wrap img {
    width: 114px;
    height: 114px;
    display: block;
  }

  .gift-modal-code-box {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.7rem;
    margin-bottom: 0.7rem;
    font-family: monospace;
    font-size: 0.72rem;
    color: var(--text-secondary);
    word-break: break-all;
    max-height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    max-width: 310px;
    flex-shrink: 0;
  }

  .gift-modal-body .btn {
    width: 100%;
    max-width: 310px;
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    flex-shrink: 0;
  }
}

/* Em telas Mobile (< 620px): Layout Vertical Compacto Sem Rolagem */
@media (max-width: 619px) {
  .gift-modal-content {
    max-height: 92vh;
    overflow-y: auto;
  }

  .gift-modal-header-img {
    height: 115px;
    width: 100%;
    flex-shrink: 0;
  }

  .gift-modal-header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .gift-modal-body {
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .gift-modal-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.1rem;
  }

  .gift-modal-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold-700);
    margin-bottom: 0.3rem;
  }

  .gift-modal-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.35;
    margin-bottom: 0.6rem;
  }

  .gift-modal-qr-wrap {
    width: 110px;
    height: 110px;
    margin: 0 auto 0.5rem;
    padding: 4px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-300);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gift-modal-qr-wrap img {
    width: 102px;
    height: 102px;
    display: block;
  }

  .gift-modal-code-box {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.6rem;
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--text-secondary);
    word-break: break-all;
    max-height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    width: 100%;
  }

  .gift-modal-body .btn {
    width: 100%;
    padding: 0.65rem;
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   Formulário de RSVP
   ========================================================================== */
.rsvp-card {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

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

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.form-control {
  width: 100%;
  padding: 0.95rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(197, 168, 128, 0.2);
}

/* Seletores de Presença (Radio Cards) */
.attendance-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 480px) {
  .attendance-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

.attendance-card {
  position: relative;
  cursor: pointer;
}

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

.attendance-card-content {
  padding: 1.4rem 1rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
  background: #ffffff;
  text-align: center;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.attendance-card-content .icon {
  font-size: 1.6rem;
}

.attendance-card-content .label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.attendance-card input[type="radio"]:checked + .attendance-card-content {
  border-color: var(--gold-500);
  background: var(--gold-50);
  box-shadow: 0 4px 15px rgba(197, 168, 128, 0.25);
}

/* Accordion de Acompanhantes */
.companions-accordion {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, margin 0.3s ease;
  margin-top: 0;
}

.companions-accordion.is-open {
  max-height: 800px;
  opacity: 1;
  margin-top: 1.8rem;
}

.companion-inputs-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

/* Tags Rápidas de Restrição Alimentar */
.diet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.diet-chip {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-soft);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.diet-chip.active {
  background: var(--sage-500);
  border-color: var(--sage-500);
  color: #ffffff;
}

.btn-submit-rsvp {
  width: 100%;
  padding: 1.1rem;
  font-size: 1.05rem;
  margin-top: 1.2rem;
}

/* Modal de Confirmação */
.modal-dialog {
  border: none;
  background: transparent;
  padding: 1rem;
  margin: auto;
  max-width: 520px;
  width: 95%;
  outline: none;
}

.modal-dialog::backdrop {
  background: rgba(28, 23, 20, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-icon-celebration {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.modal-message {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Canvas de Confete */
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100000;
}

/* Rodapé */
.guest-footer {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.guest-footer .names {
  font-family: var(--font-script);
  font-size: 2.6rem;
  color: var(--gold-600);
  margin-bottom: 0.5rem;
}
