/* =============================================== */
/* ESTILOS GLOBAIS E TEMA BASE                     */
/* =============================================== */
:root {
    /* Cores para o tema claro (interno) */
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --primary-color: #bfa888; /* Dourado suave */
    --primary-hover-color: #a8916f;
    --border-color: #dee2e6;
    --text-muted-color: #6c757d;

    /* Cores para o tema escuro (homepage) */
    --text-color-light: #ffffff;
    --text-muted-light: rgba(255, 255, 255, 0.8);
    --border-light: rgba(255, 255, 255, 0.2);
}

body {
    box-sizing: border-box;
    background-color: var(--bg-color);
    color: var(--text-color);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
.font-cormorant { font-family: "Cormorant Garamond", serif; }
.font-montserrat { font-family: "Montserrat", sans-serif; }

/* =============================================== */
/* ESTILOS DA HOMEPAGE (TEMA ESCURO COM FONTE BRANCA) */
/* =============================================== */

/* --- ANIMAÇÃO DE CORAÇÕES FLUTUANTES --- */
.hearts-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2; /* Acima do slide e do gradiente, mas abaixo do conteúdo rolável */
    pointer-events: none; /* Permite clicar através dos corações */
}
.heart {
    position: absolute;
    bottom: -50px;
    animation: hearts 15s linear infinite;
    font-size: 20px;
    color: rgba(226, 35, 28, 0.805);
}
.heart::before { content: '💖'; }
.heart:nth-child(1) { left: 10%; animation-delay: 0s; font-size: 25px; }
.heart:nth-child(2) { left: 20%; animation-delay: 2s; font-size: 15px; }
.heart:nth-child(3) { left: 30%; animation-delay: 4s; font-size: 22px; }
.heart:nth-child(4) { left: 40%; animation-delay: 6s; font-size: 18px; }
.heart:nth-child(5) { left: 50%; animation-delay: 8s; font-size: 28px; }
.heart:nth-child(6) { left: 60%; animation-delay: 10s; font-size: 16px; }
.heart:nth-child(7) { left: 70%; animation-delay: 12s; font-size: 24px; }
.heart:nth-child(8) { left: 80%; animation-delay: 14s; font-size: 19px; }
.heart:nth-child(9) { left: 90%; animation-delay: 1s; font-size: 21px; }
.heart:nth-child(10) { left: 5%; animation-delay: 5s; font-size: 17px; }
@keyframes hearts {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-100vh); opacity: 0; }
}

/* --- Estilos do Slideshow (FIXO) --- */
.slideshow-container.fixed-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  perspective: 1500px;
  z-index: -1; /* Fica no fundo */
}
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  filter: brightness(0.7); /* Escurece um pouco as fotos */
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
}
.slide.active { opacity: 1; z-index: 2; }
.slide.turning {
  animation: pageTurn 1.9s ease-in-out forwards;
  z-index: 3;
  opacity: 1;
}
@keyframes pageTurn {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(-180deg); opacity: 0; }
}

/* --- Overlays e Conteúdo Principal --- */
.gradient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%);
  pointer-events: none;
  z-index: 0; /* Acima do slide, abaixo dos corações */
}

/* --- SEÇÃO INICIAL (HERO) --- */
.hero-section {
    position: relative;
    height: 100vh; /* Ocupa a altura total da tela */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-color-light); /* Texto branco */
    z-index: 10; /* Acima de tudo */
    padding: 2rem 1.5rem;
}
.hero-content {
    margin-bottom: 4rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Sombra para legibilidade */
}
.hero-content h1 {
    font-weight: 500;
}
.scroll-down-arrow {
    position: absolute;
    bottom: 2rem;
    color: var(--text-color-light);
    animation: bounce 2s infinite;
    font-size: 2rem;
    text-decoration: none;
    z-index: 11;
}
.scroll-down-arrow svg {
    width: 3rem;
    height: 3rem;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* --- SEÇÃO DE CONTEÚDO ROLÁVEL --- */
.scrollable-content-section {
    background-color: var(--bg-color); /* Fundo branco para a seção rolável */
    color: var(--text-color); /* Texto preto para a seção rolável */
    position: relative;
    z-index: 10; /* Fica acima dos corações e do slide fixo */
    padding-top: 4rem;
    padding-bottom: 4rem;
    min-height: 100vh;
}
.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 1.5rem;
}
/* Ajustes de texto para a seção rolável (tema claro) */
.scrollable-content-section h1,
.scrollable-content-section h2,
.scrollable-content-section p {
    text-shadow: none; /* Remove sombra de texto nesta seção */
    color: var(--text-color);
}
.scrollable-content-section .hearts-decoration path { fill: rgba(255, 0, 0, 0.797); }
.scrollable-content-section .divider { background: linear-gradient(90deg, transparent, var(--border-color), transparent); }
.scrollable-content-section .ampersand { color: var(--text-color); }


/* --- Botões de Ação (dentro da seção rolável) --- */
/* ESTES ESTILOS SÃO APLICADOS APENAS AOS BOTÕES DE LOCALIZAÇÃO, PRESENTE E CONFIRMAÇÃO */
/* POIS SÃO OS ÚNICOS ELEMENTOS COM A CLASSE .icon-btn NO SEU HTML ATUAL */
.icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 1rem;
  background: white; /* FUNDO BRANCO */
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color); /* BORDA DE 1PX */
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-color); /* TEXTO PRETO NO ESTADO NORMAL */
  width: 90px;
  height: 100px;
  flex-shrink: 0;
}
.icon-btn:hover {
  background: var(--primary-color); /* FUNDO DOURADO NO HOVER */
  border-color: var(--primary-color); /* BORDA DOURADA NO HOVER */
  color: white; /* TEXTO BRANCO NO HOVER */
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.icon-btn svg {
  width: 36px;
  height: 36px;
  /* IMPORTANTE: Os atributos fill="black" e stroke="black" nos SVGs do HTML
     em 'index.ejs' farão com que os ícones permaneçam pretos
     mesmo no estado hover, pois esses atributos têm precedência sobre
     a propriedade 'color' do CSS.
     Se você quiser que os ícones mudem de cor no hover,
     precisaria remover os atributos fill/stroke dos SVGs no HTML.
  */
  flex-shrink: 0;
}
.icon-btn span {
  font-size: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.2;
  width: 100%;
}

/* --- Botões de Navegação do Slideshow --- */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-light);
  color: var(--text-color-light);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.5rem;
}
.nav-btn:hover { background: rgba(0, 0, 0, 0.5); }

/* --- Elementos Decorativos (na hero-section) --- */
/* Os corações decorativos aqui são os pequenos que aparecem na hero-section,
   não a animação de corações flutuantes global. */
.hearts-decoration {
  opacity: 0.6;
  margin-bottom: 1rem;
}
.hearts-decoration path { fill: rgba(255, 0, 0, 0.797); }
@keyframes float {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}
.float-animation { animation: float 3s ease-in-out infinite; }
.divider {
  width: 60px;
  height: 1px;
  background: rgba(255, 0, 0, 0.797);
  margin: 1rem auto;
}
.ampersand { font-size: 2rem; opacity: 0.7; margin: 0 0.5rem; }

/* =============================================== */
/* ESTILOS DAS PÁGINAS INTERNAS (TEMA CLARO)       */
/* =============================================== */

/* --- Estilos do Formulário de RSVP --- */
.rsvp-form-container {
    background: white;
    border: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}
/* Estilos para campos de formulário */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #495057;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(191, 168, 136, 0.25);
    outline: none;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted-color);
    font-size: 0.8rem;
}
.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.add-companion-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    color: var(--text-muted-color);
    border: 1px dashed var(--border-color);
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.add-companion-btn:hover {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}
#acompanhantes-container input { margin-bottom: 0.75rem; }
.confirm-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}
.confirm-btn:hover { background-color: var(--primary-hover-color); }

/* --- Página de Confirmação --- */
.confirmation-card {
    background-color: white;
    color: #333;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.detail-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
    margin-bottom: 0.25rem;
}
.detail-info {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.divider-dark { height: 1px; background-color: #eee; width: 100%; }
.info-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; }
.info-row:last-child { border-bottom: none; }
.info-label { font-weight: 500; color: #555; }
.info-value { color: #333; text-align: right; }
.footer-message { background-color: #f8f9fa; padding: 1rem; border-radius: 0.5rem; color: #666; font-size: 0.9rem; }

/* --- Seção de Detalhes do Evento --- */
.event-details-container { display: flex; flex-direction: column; gap: 2rem; }
.event-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}
.map-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.2s ease;
}
.map-link-btn:hover { border-color: var(--primary-color); background-color: white; color: var(--primary-color); }

/* --- PÁGINA DE SUCESSO --- */
.success-card {
    background-color: white;
    color: var(--text-color);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.success-card .text-muted { color: var(--text-muted-color); }
.success-card svg { color: var(--primary-color); }
.qr-code-image {
    border: 6px solid white;
    outline: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}
@media (min-width: 768px) { .action-btn { width: auto; } }
.action-btn { background-color: var(--primary-color); color: white; border: 1px solid var(--primary-color); }
.action-btn:hover { background-color: var(--primary-hover-color); border-color: var(--primary-hover-color); }
.action-btn.secondary { background-color: transparent; color: var(--text-muted-color); border: 1px solid var(--border-color); }
.action-btn.secondary:hover { border-color: var(--primary-color); color: var(--primary-color); background-color: #fff; }

/* --- Responsividade Geral --- */
@media (min-width: 768px) {
  .icon-btn { width: 110px; height: 115px; padding: 1.25rem; }
  .icon-btn svg { width: 42px; height: 42px; }
  .icon-btn span { font-size: 0.6rem; }
}

/* =============================================== */
/* ESTILOS DO PAINEL ADMINISTRATIVO                */
/* =============================================== */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}
@media (min-width: 768px) { .admin-container { padding: 2rem; } }
.admin-header h1 { font-weight: 700; }
.admin-header p { color: #525252; }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.admin-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.admin-btn, .admin-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.admin-btn { background-color: #212529; color: white; }
.admin-btn:hover { background-color: #424649; }
.admin-btn-secondary { background-color: #fff; color: #495057; border-color: #d1d5db; }
.admin-btn-secondary:hover { background-color: #f9fafb; }

/* --- SEÇÃO DE MÉTRICAS --- */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (min-width: 640px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .metrics-grid { grid-template-columns: repeat(3, 1fr); } }
.metric-card {
    background-color: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.07);
    border: 1px solid #e5e7eb;
}
.metric-icon-wrapper {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.metric-icon-wrapper svg { width: 1.5rem; height: 1.5rem; }
.metric-icon-wrapper.green { background-color: #d1fae5; color: #065f46; }
.metric-icon-wrapper.blue { background-color: #dbeafe; color: #1e40af; }
.metric-icon-wrapper.orange { background-color: #ffedd5; color: #9a3412; }
.metric-content { line-height: 1.2; }
.metric-value { font-size: 2.25rem; font-weight: 700; color: #1f2937; }
.metric-label { font-size: 0.875rem; color: #6b7280; font-weight: 500; }

/* --- Estilos da Tabela do Admin --- */
.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background-color: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 1rem 1.25rem; text-align: left; vertical-align: middle; }
.admin-table thead { background-color: #f8f9fa; border-bottom: 1px solid #dee2e6; }
.admin-table th { font-size: 0.75rem; font-weight: 700; color: #4b5563; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-table tbody tr { border-bottom: 1px solid #e9ecef; }
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background-color: #f8f9fa; }
.guest-name-cell { font-weight: 600; color: #1f2937; }
.contact-cell { display: flex; flex-direction: column; font-size: 0.875rem; color: #4b5563; }
.companion-details { display: flex; flex-direction: column; gap: 0.1rem; }
.companion-count { font-weight: 600; font-size: 1rem; color: #1f2937; }
.companion-names-list { font-size: 0.8rem; color: #4b5563; white-space: normal; line-height: 1.4; }
.no-companions { display: block; text-align: center; width: 100%; font-style: normal; color: #6b7280; }
.status { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; text-transform: uppercase; }
.status.confirmado { background-color: #d1e7dd; color: #0a3622; }
.status.cancelado { background-color: #f8d7da; color: #58151c; }
.status.pendente { background-color: #fff3cd; color: #664d03; }
.actions-cell { display: flex; gap: 1rem; justify-content: flex-end; }
.actions-header { text-align: right !important; }
.action-link { color: #adb5bd; transition: color 0.2s ease; }
.action-link:hover { color: #bfa888; }
.action-link-delete:hover { color: #dc2626; }

/* --- ESTILOS PARA A PÁGINA DO SCANNER --- */
.scanner-container { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 1000px; margin: 0 auto; }
@media (min-width: 768px) { .scanner-container { grid-template-columns: 1fr 1fr; } }
.scanner-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    margin-bottom: -0.5rem;
}
.user-info { color: #4b5563; }
.logout-btn {
    background-color: #f3f4f6;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}
.logout-btn:hover { background-color: #e5e7eb; }
.scanner-box, .results-box { background-color: #fff; padding: 1.5rem; border-radius: 0.75rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07); }
#qr-reader { border: 1px solid #e5e7eb; border-radius: 0.5rem; }
.scanner-status-text { text-align: center; margin-top: 1rem; color: #6b7280; font-weight: 500; }
.status-success { color: #059669; }
.status-error { color: #dc2626; }
.placeholder-text { color: #9ca3af; text-align: center; padding: 3rem 1rem; }
.info-item { padding: 0.75rem 0; border-bottom: 1px solid #f3f4f6; font-size: 1rem; }
.info-item strong { color: #374151; margin-right: 0.5rem; }
.checkin-btn, .reset-btn { width: 100%; padding: 0.875rem; border: none; border-radius: 0.5rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s; margin-top: 1.5rem; }
.checkin-btn { background-color: #10b981; color: white; }
.checkin-btn:hover { background-color: #059669; }
.reset-btn { background-color: #e5e7eb; color: #4b5563; }
.reset-btn:hover { background-color: #d1d5db; }
.feedback-final { text-align: center; padding: 2rem 1rem; }
.feedback-final h3 { font-family: 'Cormorant Garamond', serif; font-size: 2rem; margin-bottom: 0.5rem; }
.feedback-final.success h3 { color: #059669; }
.feedback-final.error h3 { color: #b91c1c; }

/* --- Layout Responsivo da Tabela do Admin --- */
@media screen and (max-width: 768px) {
    .admin-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
    .admin-table tr { margin-bottom: 1rem; border: 1px solid #dee2e6; border-radius: 0.5rem; overflow: hidden; }
    .admin-table td { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; text-align: right; border-bottom: 1px solid #f3f4f6; }
    .admin-table td:last-child { border-bottom: none; }
    .admin-table td::before { content: attr(data-label); font-weight: 600; text-align: left; margin-right: 1rem; color: #374151; }
    .actions-cell { justify-content: flex-start; }
    .no-companions { text-align: right; }
}
