.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #FAFAF5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
    pointer-events: all;
    /* Blocks clicks when visible */
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Allows clicks on page when hidden */
}

.mandala-loader {
    width: 150px;
    height: 150px;
}


.path-ring {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawCircle 2s ease-out forwards, spin 8s linear infinite;
    transform-origin: center;
}

.path-trunk {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 2s ease-out 0.5s forwards;
}

.path-leaves path {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawLine 1.5s ease-out 1.5s forwards;
}

.leaf-dot {
    opacity: 0;
    animation: fadeIn 1s ease 2.5s forwards;
}

.loader-text {
    margin-top: 20px;
    font-family: 'Playfair Display', serif;
    color: #2A5C55;
    font-size: 1.2rem;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeInUp 1s ease 1s forwards;
}

@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajuste para o tronco e galhos terem tempos diferentes */
.path-trunk path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: drawLine 3s ease-out forwards;
}

.path-branches path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 3.5s ease-out 0.8s forwards;
    /* Começa logo após o tronco */
}

/* Removed duplicate #loading-overlay block */

.logo-stack {
    position: absolute;
    width: 256px;
    /* Ajuste conforme o tamanho real das imagens */
    height: 150px;
}

.part {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    /* Começam invisíveis */
    animation: fadeInPart 4s ease-in-out forwards infinite;
}

/* Delays Sequenciais: cada peça aparece 0.4s após a anterior */
.p1 {
    animation-delay: 0.1s;
}

.p2 {
    animation-delay: 0.5s;
}

.p3 {
    animation-delay: 0.9s;
}

.p4 {
    animation-delay: 1.3s;
}

.p5 {
    animation-delay: 1.7s;
}

.p6 {
    animation-delay: 2.1s;
}

@keyframes fadeInPart {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }

    15%,
    85% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
    }

    /* Desaparece no final para reiniciar o loop */
}

.loading-text {
    margin-top: 30px;
    font-family: 'Playfair Display', serif;
    /* Fonte do seu site */
    color: #2A5C55;
    animation: pulseText 2s infinite;
}