/* --- SEÇÃO HERO (Banner Principal) --- */
.hero-section {
    position: relative;
    background-color: var(--bagauto-green-dark);
    /* Usando sua variável de cor */
    min-height: 600px;
    padding-top: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bagauto-white);
    /* Usando sua variável para texto */
    background-image: linear-gradient(rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.03));
}

/* garante que o conteúdo fique sobre as camadas */
.hero-section .container {
    position: relative;
    z-index: 2;
}

/* tipografia / aparência do texto */
.hero-section h1.display-4 {
    color: var(--bagauto-white);
    font-weight: 800;
    font-size: clamp(2rem, 4.5vw, 4rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.02);
    font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
}

/* parágrafo secundário */
.hero-section p.lead {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.puzzle-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 3rem auto 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* O wrapper que contém UMA peça */
.puzzle-wrapper {
    display: grid;
    place-items: center;
    width: 50%;
    height: 100%;
    position: relative;
    cursor: pointer;
    /* Remover 'filter' daqui, vamos aplicar só na peça SVG */
    transition: transform 0.3s ease, filter 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
    /* Garante que as peças estejam acima do fundo */
}

/* O SVG da peça */
.puzzle-shape {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    transition: filter 0.5s ease;
    z-index: 2;
    /* Garante que o SVG esteja acima do tooltip ANTES do hover */
}

/* ✅ NOVO: Estilo do Tooltip "Card Flutuante" */
.puzzle-tooltip-glass {
    position: absolute;
    top: 50%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    /* Increased the gap for better spacing */

    width: 220px;
    padding: 1.5rem;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    opacity: 0;
    /* pointer-events: none; */
    /* Linha removida */
    /* Added a delay to the transition for a smoother feel */
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) 0.2s;
    z-index: 0;
}

/* ✅ CORRIGIDO: Posicionamento e animação do card BAGAUTO */
#bagauto-piece .puzzle-tooltip-glass {
    right: 50%;
    /* Ponto de referência inicial */
    transform: translateY(-50%) translateX(calc(100% + 20px));
    /* Desloca totalmente para fora da peça, mais 20px de espaçamento */
}

/* ✅ CORRIGIDO: Posicionamento e animação do card GOBO */
#gobo-piece .puzzle-tooltip-glass {
    left: 50%;
    /* Ponto de referência inicial */
    transform: translateY(-50%) translateX(calc(-100% - 20px));
    /* Desloca totalmente para fora da peça, mais 20px de espaçamento */
}

.puzzle-tooltip-glass img {
    max-width: 90px;
    height: auto;
    border-radius: 8px;
}

/* New styles for the scroll indicator */
.scroll-indicator {
    color: var(--bagauto-white);
    font-size: 1.25rem;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

/* Bouncing animation for the chevron icon */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* --- ANIMAÇÕES DE HOVER --- */

/* Quando uma peça está ativa, desfoca a outra que não está ativa */
.puzzle-container.is-interacting>.puzzle-wrapper:not(.is-active) .puzzle-shape {
    filter: blur(4px) brightness(0.7) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

/* A peça ativa permanece em foco */
.puzzle-wrapper.is-active .puzzle-shape {
    filter: blur(0) brightness(1) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

/* Mostra o card do BAGAUTO quando sua peça está ativa */
#bagauto-piece.is-active .puzzle-tooltip-glass {
    opacity: 1;
    transform: translateY(-35%) translateX(-95%);
    /* Move para a esquerda da peça */
    z-index: 3;
}

/* Mostra o card do GOBO quando sua peça está ativa */
#gobo-piece.is-active .puzzle-tooltip-glass {
    opacity: 1;
    transform: translateY(-50%) translateX(calc(100% + 30px));
    /* Move para a direita da peça */
    z-index: 3;
}

/* --- CORES E AJUSTES ESPECÍFICOS --- */

#bagauto-piece .puzzle-shape {
    fill: var(--bagauto-green-light);
    /* ALTERADO para o verde claro para contrastar */
}

/* PEÇA GOBO (sem alterações, apenas para referência) */
#gobo-piece .puzzle-shape {
    fill: var(--gobo-primary);
}

/* Ajuste fino para encaixar as duas peças (pode precisar de um pequeno ajuste) */
#bagauto-piece {
    margin-right: -154px;
}

#gobo-piece {
    margin-top: 90px;
}

/* --- SEÇÃO BAGAUTO --- */
#bagauto-section .custom-btn-hover {
    color: #fff;
}

/* --- SEÇÃO BAGAUTO - Imagens nas Feature Boxes --- */
#bagauto-section .feature-img {
    max-width: 150px;
    /* ALTERADO: Aumenta a largura máxima para as imagens */
    height: auto;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    /* Mantenha se quiser a sombra */
}

/* --- AJUSTES PARA DISPOSITIVOS MÓVEIS --- */

/* Esconde os botões de CTA por padrão (em telas grandes) */
.mobile-cta-buttons {
    display: none;
}

@media (max-width: 768px) {

    /* Esconde o container do quebra-cabeça em telas pequenas */
    .puzzle-container {
        display: none;
    }

    /* Mostra os botões de CTA em telas pequenas */
    .mobile-cta-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 2rem;
    }


    .hero-section {
        padding-top: 60px;
        min-height: 420px;
    }

    .hero-section .container {
        padding: 0 1rem;
    }
}