/* Cores baseadas no Crato e imagens do Figma */
:root {
    --primary-bg: #1a3328; /* Verde escuro inspirado na Floresta Nacional do Araripe */
    --timeline-color: #f1c40f; /* Amarelo-dourado */
    --marker-bg: #f5f0e1; /* Bege claro */
    --marker-color: #c0392b; /* Vermelho-terroso */
    --modal-bg: #c0392b; /* Vermelho-terroso para o modal */
    --modal-text: #ffffff; /* Texto branco para o modal */
    --modal-close: #f1c40f; /* Amarelo-dourado para o botão fechar */
    --text-color: #ffffff; /* Texto branco */
    --photo-frame: #ffffff; /* Branco para o quadro da foto */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #121212;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

hr {
    border: 0; /* Remove a borda padrão */
    height: 2px; /* Define a espessura da linha */
    background: #ffcc00; /* Cor da linha, usando o amarelo da paleta */
    margin: 20px 0; /* Espaçamento em cima e embaixo da linha */
    opacity: 0.6; /* Deixa a linha um pouco translúcida */
    width: 80%; /* Ajusta a largura da linha */
    margin-left: auto;
    margin-right: auto; /* Centraliza a linha */
}

.background-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-image: url('../public/praca-img.jpg'); /* Substituir pelo fundo real do Crato */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 51, 40, 0.8); /* Verde escuro com transparência */
}

.main-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.textos-iniciais {
    margin-bottom: 5rem;
    width: 100%;
}

.textos-iniciais h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-align: center;
}

.textos-iniciais p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: 15rem;
    text-align: center;
}

/* Timeline */
.timeline-container {
    position: relative;
    width: 100%;
    padding: 2rem 0;
}

.timeline-center {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Linha da timeline com z-index corrigido */
.timeline-line {
    position: absolute;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--timeline-color);
}


.timeline-item {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 8rem; /* Espaçamento aumentado entre os itens */
    opacity: 0;
    transform: translateY(50px);
}

.timeline-item.animate {
    animation: fadeIn 1s forwards;
}

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

.timeline-item.left {
    justify-content: flex-start;
}

.timeline-item.right {
    justify-content: flex-end;
}

.timeline-item__final.right{
    justify-content: flex-end;
}

/* Marcador com z-index aumentado e posicionamento corrigido */
.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background-color: var(--marker-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; /* Valor aumentado significativamente */
    border: 3px solid var(--timeline-color);
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.5);
    transition: transform 0.3s ease;
}

.timeline-marker i {
    color: var(--marker-color);
    font-size: 1.8rem; /* Ícone maior */
    position: relative;
    z-index: 11; /* Garantir que o ícone fique acima */
}

.timeline-content {
    width: 45%;
    padding: 0;
    position: relative;
    z-index: 2; /* Conteúdo acima da linha mas abaixo dos marcadores */
}

.timeline-item.left .timeline-content {
    margin-right: 5%;
    text-align: right;
}

.timeline-item.right .timeline-content {
    margin-left: 5%;
    text-align: left;
}

.timeline-photo-wrapper {
    padding: 15px;
    background-color: var(--photo-frame);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.timeline-photo-wrapper:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.timeline-photo {
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.timeline-photo p{
    color: black;
    text-align: center;
    margin-top: 1rem;
}

.timeline-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.spot-title {
    font-size: 1.5rem;
    margin-top: 1rem;
    color: var(--text-color);
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.visible {
    opacity: 1;
}

.modal-content {
    background-color: var(--modal-bg);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 800px;
    width: 80%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.modal.visible .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--modal-close);
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-image {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-image img {
    width: 100%;
    height: auto;
    display: block;
}

#modalTitle {
    color: var(--modal-text);
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--timeline-color);
    padding-bottom: 0.5rem;
}

#modalDescription {
    color: var(--modal-text);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Efeitos de animação para cada ponto na timeline */
.timeline-item:nth-child(1) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.6s;
}

.timeline-item:nth-child(3) {
    animation-delay: 1s;
}

.timeline-item:nth-child(4) {
    animation-delay: 1.4s;
}

/* Responsividade */
@media (max-width: 992px) {
    .timeline-content {
        width: 42%;
    }
}

@media (max-width: 768px) {
    .textos-iniciais {
        text-align: center;
    }
    
    .textos-iniciais p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .timeline-line {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        margin-bottom: 5rem;
    }
    
    .timeline-item.left,
    .timeline-item.right {
        justify-content: flex-start;
    }
    
    .timeline-marker {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 60px !important;
        margin-right: 0 !important;
        text-align: left !important;
    }
    
    .modal-content {
        width: 90%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .textos-iniciais h1 {
        font-size: 2.5rem;
    }
    
    .timeline-marker {
        width: 50px;
        height: 50px;
    }
    
    .timeline-marker i {
        font-size: 1.5rem;
    }
    
    .timeline-photo-wrapper {
        padding: 10px;
    }
    
    .spot-title {
        font-size: 1.3rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.2rem;
    }
    
    #modalTitle {
        font-size: 1.8rem;
    }
    
    #modalDescription {
        font-size: 1rem;
    }
}