/* ============================================================
   1. VARIÁVEIS E RESET (DNA APPLE + OLIVA)
   ============================================================ */
:root {
    --oliva-deep: #4A5D23;
    --oliva-primary: #708238;
    --oliva-bg: #F8F9F5;
    --apple-black: #1d1d1f;
    --apple-text-secondary: #86868b;
    --glass-bg: rgba(255, 255, 255, 0.94);
}

* { 
    margin: 0; padding: 0; box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: #ffffff;
    color: var(--apple-black);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ============================================================
   2. NAVEGAÇÃO (GLASSMORPHISM)
   ============================================================ */
.main-nav {
    position: fixed; top: 0; width: 100%; height: 60px;
    background: var(--glass-bg); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); z-index: 999; /* Z-Index menor que o Modal */
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex; align-items: center;
}

.nav-content { 
    max-width: 980px; margin: 0 auto; width: 100%;
    display: flex; justify-content: space-between; align-items: center; padding: 0 20px; 
}

.nav-logo { 
    font-weight: 700; color: var(--oliva-deep); text-decoration: none;
    white-space: nowrap; font-size: 15px;
}

.nav-links a { 
    text-decoration: none; color: var(--apple-black); 
    font-size: 12px; font-weight: 600; margin-left: 15px;
}

/* ============================================================
   3. CARTÃO DE BUSCA (PRINCIPAL)
   ============================================================ */
.section-container { 
    padding: 120px 16px 60px; /* Mais espaço no topo */
    max-width: 600px; 
    margin: 0 auto; 
    min-height: 80vh; /* Garante que o footer fique embaixo */
}

.rsvp-card {
    background: var(--oliva-bg); 
    border-radius: 32px; 
    padding: 40px 24px;
    border: 1px solid rgba(112, 130, 56, 0.1); 
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

h1 { font-size: 28px; color: var(--oliva-deep); letter-spacing: -0.02em; margin-bottom: 8px; }
.hero-subtitle { color: var(--apple-text-secondary); margin-bottom: 30px; font-size: 15px; }

.badge { 
    font-size: 11px; font-weight: 700; color: var(--oliva-primary); 
    letter-spacing: 0.1em; display: block; margin-bottom: 10px; text-transform: uppercase;
}

/* ============================================================
   4. INPUTS E BOTÕES
   ============================================================ */
.apple-form { text-align: left; margin-top: 20px; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 12px; font-weight: 600; color: var(--apple-text-secondary); margin-bottom: 8px; text-transform: uppercase; }

input[type="text"], textarea {
    width: 100%; padding: 16px; border-radius: 14px;
    border: 1px solid #d2d2d7; font-size: 16px; outline: none;
    font-family: inherit; -webkit-appearance: none;
    background: #fff;
}
input:focus, textarea:focus { border-color: var(--oliva-primary); }

.search-wrapper { display: flex; flex-direction: column; gap: 10px; }

.cta-button {
    background: var(--oliva-deep); color: #fff; border: none;
    padding: 18px; border-radius: 16px; font-weight: 600;
    font-size: 16px; cursor: pointer; width: 100%;
    transition: transform 0.1s ease;
}
.cta-button:active { transform: scale(0.98); }

/* ============================================================
   5. POPUP / MODAL (O NOVO SISTEMA)
   ============================================================ */

/* Fundo Escuro */
#modal-overlay, #modal-sucesso {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px); /* Desfoque no fundo */
    z-index: 10000 !important; /* Acima de tudo */
    display: flex; justify-content: center; align-items: center;
    padding: 20px;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}

/* Estado Ativo do Modal */
#modal-overlay.active, #modal-sucesso.active {
    opacity: 1; visibility: visible;
}

/* A Caixa Branca do Popup */
.modal-content {
    background: #fff; width: 100%; max-width: 500px;
    border-radius: 24px; padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    max-height: 90vh; overflow-y: auto; /* Scroll se for muito grande */
}

#modal-overlay.active .modal-content, #modal-sucesso.active .modal-content {
    transform: scale(1);
}

/* Botão Fechar (X) */
.close-btn {
    position: absolute; top: 15px; right: 20px;
    font-size: 28px; font-weight: bold; color: #ccc;
    cursor: pointer; line-height: 1;
}
.close-btn:hover { color: #000; }

/* Lista Rolável dentro do Modal */
.scrollable-list {
    margin: 20px 0; max-height: 300px; overflow-y: auto;
    padding-right: 5px;
}

/* Checkbox LGPD no Modal */
.lgpd-box-modal {
    display: flex; gap: 10px; align-items: flex-start;
    margin: 20px 0; background: #f9f9f9; padding: 12px;
    border-radius: 12px; border: 1px solid #eee;
}
.lgpd-box-modal input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--oliva-primary); }
.lgpd-box-modal label { font-size: 13px; color: #666; line-height: 1.4; cursor: pointer; text-transform: none; margin: 0; }

/* Botões do Rodapé do Modal */
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }

.btn-ghost {
    background: transparent; color: #666;
    border: 1px solid #ddd; padding: 15px;
    border-radius: 14px; cursor: pointer;
    font-weight: 600; flex: 1; font-size: 16px;
}

.cta-button { flex: 2; }

/* ============================================================
   6. RODAPÉ E HELPERS
   ============================================================ */
.hidden { display: none !important; }

.success-icon { 
    font-size: 60px; color: var(--oliva-primary); 
    display: block; line-height: 1;
}

.apple-footer { padding: 40px 20px; background: var(--oliva-bg); border-top: 1px solid rgba(0,0,0,0.05); margin-top: auto; }
.footer-container { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.footer-logo-box { order: 2; } .footer-info { order: 1; }
.footer-names { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--oliva-deep); font-style: italic; }
.footer-date { font-size: 12px; letter-spacing: 0.2em; color: var(--apple-text-secondary); margin: 5px 0 15px; }
.footer-img { width: 120px; height: auto; opacity: 0.9; }

@media (min-width: 768px) {
    .search-wrapper { flex-direction: row; align-items: flex-end; }
    .cta-button.btn-search { width: auto; padding: 0 40px; height: 53px; }
    .footer-container { flex-direction: row; justify-content: space-between; text-align: left; max-width: 980px; margin: 0 auto; }
    .footer-info { order: 1; } .footer-logo-box { order: 2; }
}