/* style.css */

html {
  scroll-behavior: smooth;
  box-sizing: border-box; /* Adiciona a melhor prática ao elemento raiz */
}

/* Faz com que todos os elementos herdem essa prática */
*, *::before, *::after {
  box-sizing: inherit;
}

:root {
    --cor-primaria: #bb86fc;
    --cor-destaque: #990000;
    --cor-fundo: #121212;
    --cor-fundo-rodape: #1f1f1f;
}

/* Reset básico e tema principal */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    text-align: center;
    overflow-x: hidden; /* <-- ADICIONE ESTA LINHA MÁGICA */
}

/* Seção Hero (Tela Inicial) */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-image: url('../images/Piscina.jpg');
}

.hero-overlay {
    background-color: rgba(0, 0, 0, 0.6);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    /* Mínimo, Preferido, Máximo */
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-section p {
    font-size: 1.5rem;
    margin-top: 10px;
    font-weight: 300;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    font-weight: 300;
    animation: bounce 2s infinite;
}

.scroll-indicator .arrow {
    font-size: 1.5rem;
    margin-top: 5px;
}

/* Container principal para as seções */
main {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

section {
    opacity: 0;
    /* Começa invisível para animar com JS */
    transform: translateY(20px);
    /* Começa um pouco abaixo para animar */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}


h2 {
    font-size: clamp(2rem, 7vw, 2.5rem);
    /* Mínimo, Preferido, Máximo */
    color: var(--cor-primaria);
    /* Use a variável que definimos */
    border-bottom: 2px solid var(--cor-primaria);
    padding-bottom: 10px;
    display: inline-block;
}

/* Rodapé */
footer {
    padding: 20px;
    margin-top: 40px;
    background-color: #1f1f1f;
}

.heart {
    color: #bb86fc;
    display: inline-block;
    animation: pulse 1s infinite;
}

.timeline-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

/* A linha central da timeline */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--cor-primaria);
    transform: translateX(-50%);
}

.timeline-event {
    position: relative;
    width: 45%;
    /* Metade da largura, com um espaço no meio */
    margin-bottom: 50px;
    opacity: 0;
    /* Começa invisível para animar */
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.timeline-event.visible {
    /* Classe adicionada pelo JS */
    opacity: 1;
    transform: translateY(0);
}

/* Posiciona os eventos da ESQUERDA */
.timeline-event:nth-child(odd) {
    left: 0;
    padding-right: 2.5%;
    /* Espaçamento da linha central */
    text-align: right;
}

/* Posiciona os eventos da DIREITA */
.timeline-event:nth-child(even) {
    left: 55%;
    /* Move para o lado direito */
    text-align: left;
}

/* O ponto (círculo) na linha central */
.timeline-event::after {
    content: '';
    position: absolute;
    top: 20px;
    width: 16px;
    height: 16px;
    background: var(--cor-fundo);
    border: 3px solid var(--cor-primaria);
    border-radius: 50%;
    z-index: 1;
}

.timeline-event:nth-child(odd)::after {
    right: -8px;
    /* Posiciona o ponto na linha */
    transform: translateX(50%);
}

.timeline-event:nth-child(even)::after {
    left: -8px;
    /* Posiciona o ponto na linha */
    transform: translateX(-50%);
}

.timeline-date {
    font-weight: bold;
    color: var(--cor-primaria);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.timeline-content {
    background: var(--cor-fundo-rodape);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    /* Indica que o elemento é clicável */
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: scale(1.03);
    /* Efeito sutil ao passar o mouse */
}

.timeline-content img {
    max-width: 100%;
    border-radius: 6px;
    margin-bottom: 10px;
}

.timeline-content h3 {
    margin: 0 0 10px 0;
    color: #fff;
}

.map-wrapper {
    display: none;
}

.map-wrapper.map-visible {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
    /* Animação de entrada */
}

.map-instruction {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 30px;
}

/* --- Responsividade para Celulares --- */
@media screen and (max-width: 768px) {
    main {
        gap: 3rem;
    }

    .hero-section p {
        font-size: 1.2rem;
    }

    .timeline-container::before {
        left: 8px;
    }

    .timeline-container::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 3px;
        /* De roxo para vermelho */
        background: linear-gradient(to bottom, var(--cor-primaria), var(--cor-destaque));
        transform: translateX(-50%);
    }

    /* A linha vai para a esquerda */
    .timeline-container::before {
        left: 8px;
    }

    /* Todos os eventos ficam do mesmo lado */
    .timeline-event {
        width: 100%;
        left: 0 !important;
        /* !important para sobrescrever as regras de odd/even */
        padding-left: 40px;
        text-align: left !important;
    }

    /* Posiciona os pontos na nova linha */
    .timeline-event::after {
        left: 0;
        /* Coloca o ponto na linha da esquerda */
    }

    /* Regra adicionada para corrigir o menu */
    #main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

.cta-button {
    display: inline-block;
    margin-top: 40px;
    /* Espaçamento do conteúdo acima */
    padding: 12px 25px;
    background-color: var(--cor-primaria);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    background-color: var(--cor-destaque);
    /* Muda para a cor vermelha no hover */
}

/* Animações */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slideshow-container {
    position: relative;
    /* Essencial para posicionar as setas */
    width: 100%;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    /* Garante que as imagens não passem da borda arredondada */
}

/* Estilo para cada imagem do slide */
.slide {
    display: none;
    /* Esconde todas as imagens por padrão */
    width: 100%;
    vertical-align: middle;
    /* Remove pequenos espaços em branco abaixo da imagem */
}

/* Mostra apenas a imagem que tiver a classe 'active' */
.slide.active {
    display: block;
    animation: slideFadeIn 0.5s ease;
}

/* Animação de entrada suave */
@keyframes slideFadeIn {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
    }
}

/* Estilo geral para as setas */
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    font-weight: bold;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 0 3px 3px 0;
    user-select: none;
    /* Impede que o texto da seta seja selecionado */
    opacity: 0;
    /* As setas ficam invisíveis por padrão */
    transition: opacity 0.3s ease;
}

/* Mostra as setas quando o mouse está sobre o slideshow */
.slideshow-container:hover .slide-arrow {
    opacity: 1;
}

/* Posicionamento específico para cada seta */
.prev-arrow {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.next-arrow {
    right: 0;
}

#motivos {
    background-color: var(--cor-fundo-rodape);
    padding: 40px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.quote-container {
    min-height: 100px;
    /* Garante uma altura mínima mesmo antes da primeira frase */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 20px 0;
    border-left: 5px solid var(--cor-primaria);
    background-color: rgba(0, 0, 0, 0.2);
}

#quote-display {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 300;
    color: #f0f0f0;
    transition: opacity 0.5s ease;
}

/* Classe para animar a troca de frase */
#quote-display.fade-out {
    opacity: 0;
}

#generate-quote-btn {
    margin-top: 0;
}

.counters-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Garante que quebre a linha em telas menores */
    margin-top: 20px;
}
.counter-box {
    background-color: var(--cor-fundo-rodape);
    padding: 20px 30px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}
.counter-number {
    font-size: clamp(2.5rem, 8vw, 3rem);
    font-weight: 700;
    color: var(--cor-primaria);
}
.counter-label {
    font-size: 1rem;
    font-weight: 300;
    text-transform: uppercase;
}

/* Estilos para o Easter Egg */
.hidden {
    display: none !important; /* !important para garantir que esteja escondido */
}
#easter-egg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex; /* Para centralizar o conteúdo */
    justify-content: center;
    align-items: center;
}
.easter-egg-content {
    background-color: var(--cor-fundo);
    padding: 40px;
    border-radius: 15px;
    border: 2px solid var(--cor-primaria);
    text-align: center;
    position: relative;
}
.easter-egg-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}
.easter-egg-heart {
    font-size: 60px;
    color: var(--cor-destaque);
    animation: pulse 1.5s infinite;
}

@keyframes button-glow {
    0% {
        box-shadow: 0 0 5px var(--cor-primaria), 0 0 10px var(--cor-primaria);
    }

    50% {
        box-shadow: 0 0 20px var(--cor-primaria), 0 0 30px var(--cor-primaria);
    }

    100% {
        box-shadow: 0 0 5px var(--cor-primaria), 0 0 10px var(--cor-primaria);
    }
}

/* Aplique a animação ao botão */
#generate-quote-btn {
    margin-top: 0;
    animation: button-glow 4s infinite;
    /* A mágica acontece aqui */
}

/* --- Estilos da Galeria em Tela Cheia --- */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.98);
    z-index: 1000;
    display: none; /* Começa escondida */
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow-y: auto; /* Permite rolar se tiver muitas fotos */
    padding: 20px;
    box-sizing: border-box;
}

.gallery-overlay.visible {
    display: block;
    opacity: 1;
}

.gallery-close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 45px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding-top: 60px; /* Espaço para o título e botão de fechar */

    /* ADICIONE AS 2 LINHAS ABAIXO PARA CENTRALIZAR */
    max-width: 1200px; /* Define uma largura máxima para o grid não ficar gigante em telas grandes */
    margin: 0 auto;    /* A mágica que centraliza o grid na horizontal */
}

.gallery-overlay h2 {
    text-align: center;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

#final-letter {
    background-color: var(--cor-fundo); /* Fundo um pouco diferente */
    padding: 60px 20px;
}
.letter-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
    font-size: 1.2rem;
    line-height: 1.8;
}
.letter-content h2 {
    text-align: center;
    border: none; /* Sem a linha embaixo para um estilo diferente */
}
.letter-content p {
    margin-bottom: 25px;
}
.signature {
    text-align: right;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--cor-primaria);
}

/* Estilos para o Menu de Navegação */
#main-nav {
    position: static; /* Faz o menu voltar ao fluxo normal da página */
    box-shadow: none; /* Remove a sombra que não faz mais sentido */
    background-color: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(10px); /* Efeito de vidro fosco no fundo */
    z-index: 999;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
#main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}
.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 700;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.nav-link:hover {
    background-color: var(--cor-fundo-rodape);
}
/* Estilo do link da seção que está visível na tela */
.nav-link.active {
    color: var(--cor-primaria);
    text-shadow: 0 0 10px var(--cor-primaria);
}

#proposal-box, #success-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.proposal-content {
    background-color: var(--cor-fundo-rodape);
    padding: 30px 40px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--cor-primaria);
    box-shadow: 0 0 30px rgba(187, 134, 252, 0.3);
    max-width: 450px;
    position: relative; /* Essencial para o botão "Não" */
}

.proposal-content h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 15px;
}

.proposal-buttons {
    margin-top: 30px;
    height: 50px; /* Garante espaço para o botão se mover */
    position: relative;
}

#yes-btn {
    /* O botão SIM usa o estilo padrão .cta-button */
    margin: 0 10px;
}

#no-btn {
    /* O botão NÃO tem um estilo especial */
    padding: 12px 25px;
    background-color: #333;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    border: 1px solid #555;
    cursor: pointer;
    position: absolute; /* A MÁGICA! */
    bottom: 0;
    left: 60%; /* Posição inicial */
    transition: all 0.2s ease-out; /* Efeito suave na movimentação */
}

#close-success-btn {
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
}