/* style.css - VERSÃO FINAL COMPLETA (Index + Lista com Progresso) */

/* 1. IMPORTAÇÃO DE FONTES */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Lato:wght@300;400;700&display=swap');

/* 2. VARIÁVEIS DE COR */
:root {
    --verde-texto: #536d67;  
    --flor-escuro: #b77861;  /* Rosa Terra Escuro */
    --flor-medio: #d98267;   /* Rosa Médio */
    --flor-claro: #fed7c4;   /* Rosa Claro */
    --papel-bg: #fdfbf7;     
}

/* 3. TELA DE INTRODUÇÃO (PRELOADER) */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--papel-bg);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    z-index: 9999; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease-out, visibility 1s;
}

#intro-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-nomes {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    color: var(--verde-texto);
    margin: 0;
    animation: pulse 2s infinite;
    padding: 0 20px;
    text-align: center;
}

.intro-contador {
    font-family: 'Lato', sans-serif;
    font-size: 1.2rem;
    color: var(--flor-escuro);
    margin-top: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: bold;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 4. ESTRUTURA GERAL (BODY & BACKGROUND) */
body {
    font-family: 'Lato', sans-serif;
    background-color: var(--papel-bg);
    
    /* Configuração do Fundo: Flores (Imagem) + Papel (Textura) */
    background-image: 
        url('flores_a4.png'), 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    
    background-repeat: no-repeat, repeat;
    background-attachment: fixed, scroll;
    background-position: center center, top left;
    background-size: cover, auto; /* Cover garante tela cheia */

    color: var(--verde-texto);
    margin: 0;
    padding: 0;
    text-align: center;
    overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Great Vibes', cursive; font-weight: 400; }
a { text-decoration: none; }

/* 5. ANIMAÇÃO DE FOLHAS CAINDO */
#folhas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; 
    height: 100vh; 
    pointer-events: none;
    z-index: 999; 
    overflow: hidden;
}

.folha {
    position: absolute;
    top: -50px; 
    width: 20px; 
    height: 20px;
    background-color: var(--flor-claro);
    border-radius: 20px 0px;
    opacity: 0.8; 
    animation: cair linear infinite;
}
.folha:nth-child(2n) { background-color: var(--flor-medio); }
.folha:nth-child(3n) { background-color: var(--verde-texto); }

@keyframes cair {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    20% { opacity: 0.8; }
    100% { transform: translate(100px, 110vh) rotate(360deg); opacity: 0; }
}

/* 6. CONTEÚDO PRINCIPAL (HERO) */
.hero { 
    /* Padding maior em cima para não sobrepor a flor do background */
    padding: 110px 20px 10px 20px; 
    position: relative;
    z-index: 20;
}

.versiculo { 
    font-style: italic; 
    font-size: 0.95rem; 
    max-width: 600px; 
    margin: 0 auto 20px auto; 
    color: var(--flor-medio); 
    padding: 0 15px;
    line-height: 1.5;
}

.nomes-noivos { 
    font-size: 4.5rem; 
    color: var(--verde-texto); 
    margin: 5px 0; 
    line-height: 1; 
}

.data-casamento { 
    font-size: 1.8rem; 
    letter-spacing: 4px; 
    margin-top: 15px; 
    margin-bottom: 5px; 
    color: var(--flor-escuro); 
    font-weight: bold; 
}

/* Cronômetro Subtil (Linha Única) */
#cronometro-subtil {
    font-size: 1rem;
    color: var(--verde-texto);
    font-weight: 300; 
    margin-bottom: 10px;
    opacity: 0.9;
}

.hora-casamento {
    font-size: 1rem;
    letter-spacing: 2px;
    margin-top: 5px;
    font-weight: bold;
    color: var(--verde-texto);
}

/* 7. BOTÕES E AÇÕES GERAIS */
.botoes-acao, .local-info, .mural { position: relative; z-index: 20; }
.botoes-acao { display: flex; justify-content: center; gap: 20px; margin: 30px 20px; flex-wrap: wrap; }

.btn-principal {
    background-color: var(--verde-texto); 
    color: white; 
    padding: 16px 38px; 
    border: none; 
    border-radius: 50px;
    font-family: 'Lato', sans-serif; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-size: 0.9rem;
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 10px rgba(83, 109, 103, 0.2);
}

.btn-principal:hover { 
    background-color: var(--flor-escuro); 
    transform: translateY(-2px); 
    box-shadow: 0 6px 15px rgba(183, 120, 97, 0.3); 
}

/* 8. MAPA E LOCAL */
.local-info { 
    margin: 40px 0; 
    padding: 30px 20px; 
    background: rgba(255,255,255,0.75); 
    border-radius: 10px; 
    backdrop-filter: blur(2px); 
}
.local-info h3 { font-size: 2.5rem; margin-bottom: 10px; color: var(--flor-escuro); }

.mapa-ilustrado {
    width: 100%;
    max-width: 400px; 
    height: auto;
    margin: 20px auto;
    display: block;
}

/* Botões do Mapa (Tons de Rosa) */
.btn-mapa { 
    display: inline-block; 
    padding: 12px 24px; 
    margin: 10px 5px; 
    color: white; 
    border-radius: 8px; 
    font-weight: bold; 
    font-size: 0.9rem; 
    transition: transform 0.2s; 
}
.btn-google { background-color: var(--flor-escuro); } /* Rosa Escuro */
.btn-waze { background-color: var(--flor-medio); }    /* Rosa Médio */

.btn-mapa:hover { transform: scale(1.05); opacity: 0.95; }

/* 9. MURAL DE MENSAGENS */
.mural { margin: 40px auto; max-width: 800px; padding: 0 20px; }
.mensagem-card { 
    background: white; 
    padding: 20px; 
    margin: 15px 0; 
    border-radius: 10px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); 
    border-left: 4px solid var(--flor-medio); 
    text-align: left; 
}

/* 10. ESTILOS ESPECÍFICOS: LISTA DE PRESENTES */

/* Botão de Voltar */
.btn-voltar {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 30;
    color: var(--verde-texto);
    font-size: 1.1rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 15px;
    border-radius: 30px;
    transition: all 0.3s;
}
.btn-voltar:hover { background: var(--flor-escuro); color: white; }

/* Grid de Presentes */
.lista-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 20px auto 60px auto;
    padding: 0 20px;
    position: relative;
    z-index: 20;
}

/* Cartão do Presente */
.item-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    min-height: 280px;
}
.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(183, 120, 97, 0.2);
    border-color: var(--flor-claro);
}

.item-emoji { font-size: 3rem; margin-bottom: 10px; }
.item-titulo {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--verde-texto);
    margin: 5px 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-desc { font-size: 0.9rem; color: #666; margin-bottom: 15px; font-style: italic; }

/* Barra de Progresso (Card) */
.barra-container { width: 100%; margin: 15px 0; text-align: left; }
.barra-fundo {
    width: 100%; height: 12px; background-color: #eee; border-radius: 10px;
    overflow: hidden; border: 1px solid #ddd;
}
.barra-progresso {
    height: 100%; background-color: var(--verde-texto); width: 0%; 
    transition: width 1.5s ease-in-out; border-radius: 10px 0 0 10px;
}
.texto-meta { font-size: 0.8rem; color: #888; margin-top: 5px; display: flex; justify-content: space-between; }

.btn-presentear {
    background-color: var(--verde-texto); color: white; padding: 10px 25px; border: none; 
    border-radius: 20px; font-weight: bold; cursor: pointer; width: 100%; transition: background 0.3s;
}
.item-card:hover .btn-presentear { background-color: var(--flor-escuro); }

/* --- ITENS DENTRO DO MODAL DE PAGAMENTO --- */

/* Input Valor */
.input-valor-group { margin: 20px 0; text-align: left; }
.input-valor {
    width: 100%; padding: 15px; font-size: 1.2rem; border: 2px solid var(--verde-texto);
    border-radius: 8px; color: var(--flor-escuro); font-weight: bold; outline: none;
}

/* Info Banco */
.info-banco {
    background-color: #fff8f0; border-left: 4px solid var(--flor-medio);
    padding: 15px; margin: 15px 0; font-size: 0.9rem; text-align: left; color: #555;
}

/* Botão Confirmar PIX */
.btn-confirmar-pix {
    background-color: var(--flor-escuro); color: white; padding: 15px; width: 100%;
    border: none; border-radius: 8px; font-weight: bold; font-size: 1rem;
    cursor: pointer; margin-top: 15px;
}
.btn-confirmar-pix:hover { background-color: var(--verde-texto); }

/* Caixa PIX no Modal */
.pix-box {
    background: #f4f4f4; padding: 15px; border-radius: 8px; display: flex;
    align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 10px; border: 1px dashed var(--verde-texto);
}
#chave-pix { font-family: monospace; font-size: 1rem; color: #333; word-break: break-all; text-align: left; }
.btn-copiar {
    background: var(--verde-texto); color: white; border: none; padding: 8px 12px;
    border-radius: 5px; cursor: pointer; font-size: 0.9rem; white-space: nowrap;
}
.btn-copiar:hover { background: var(--flor-escuro); }

/* 11. MODAIS (GERAL) */
.modal { 
    display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%;
    overflow: auto; background-color: rgba(83, 109, 103, 0.7); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; 
}
.modal.open { display: flex; opacity: 1; }

.modal-content { 
    background-color: var(--papel-bg); margin: auto; padding: 30px; border: 1px solid var(--flor-claro);
    width: 90%; max-width: 450px; border-radius: 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    position: relative; text-align: center; transform: scale(0.8); transition: transform 0.3s ease; 
}
.modal.open .modal-content { transform: scale(1); }

.close-btn { 
    color: #999; position: absolute; top: 10px; right: 15px; font-size: 30px;
    font-weight: bold; cursor: pointer; line-height: 20px; 
}
.close-btn:hover { color: var(--flor-escuro); }

/* Elementos do Formulário de RSVP */
form { text-align: left; margin-top: 10px; }
label { display: block; margin-top: 15px; font-weight: bold; font-size: 0.9rem; }
input, select, textarea { 
    width: 100%; padding: 12px; margin-top: 5px; border: 1px solid #ccc; border-radius: 5px;
    background: #fff; font-family: 'Lato', sans-serif; box-sizing: border-box; 
}
input:focus, textarea:focus { outline: none; border-color: var(--verde-texto); box-shadow: 0 0 5px rgba(83, 109, 103, 0.3); }
button[type="submit"] { 
    margin-top: 25px; width: 100%; padding: 15px; background-color: var(--verde-texto);
    color: white; border: none; border-radius: 8px; font-size: 1.1rem; cursor: pointer;
    font-family: 'Great Vibes', cursive; transition: background 0.3s; 
}
button[type="submit"]:hover { background-color: var(--flor-escuro); }

/* 12. TOAST (NOTIFICAÇÃO) */
#toast { 
    visibility: hidden; min-width: 280px; background-color: var(--verde-texto); color: #fff;
    text-align: center; border-radius: 50px; padding: 15px 25px; position: fixed; z-index: 10001;
    left: 50%; bottom: 30px; transform: translateX(-50%); font-size: 0.95rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; gap: 10px; 
}
#toast.show { visibility: visible; animation: fadein 0.5s, fadeout 0.5s 4.5s; }
@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }

/* 13. RESPONSIVIDADE (MOBILE) */
@media (max-width: 600px) {
    .nomes-noivos { font-size: 3.5rem; }
    .data-casamento { font-size: 1.5rem; letter-spacing: 2px; }
    .hero { padding: 90px 15px 10px 15px; } 
    .botoes-acao { flex-direction: column; align-items: center; gap: 15px; }
    .btn-principal { width: 100%; max-width: 300px; }
    .modal-content { width: 85%; padding: 20px; }
    .intro-nomes { font-size: 2.5rem; } 
    
    /* Ajuste Cronômetro Mobile */
    #cronometro-subtil { font-size: 0.85rem; padding: 0 10px; }

    /* Ajuste Lista de Presentes Mobile */
    .btn-voltar { top: 10px; left: 10px; font-size: 0.9rem; padding: 8px 12px; }
    .lista-container { grid-template-columns: 1fr; padding: 0 15px; }
    .pix-box { flex-direction: column; text-align: center; }
    #chave-pix { margin-bottom: 10px; text-align: center; }
    .btn-copiar { width: 100%; }
}