/* ============================================================
   HOME – Carrossel + Vídeo de Fundo
   Padrão: posicionamento absoluto via classes CSS + JS
   ============================================================ */


/* ---------- 1. RESET DA PÁGINA HOME ------------------------- */
body.home-page {
    overflow: hidden;
}

body.home-page #site-main {
    padding-top: 0;
    height: 100vh;
    overflow: hidden;
}

body.home-page #main-footer {
    display: none;
}


/* ---------- 2. HERO CONTAINER -------------------------------- */
#home-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 0 50px;
    justify-content: center;
    overflow: hidden;
}

/* ---------- 3. VÍDEO DE FUNDO -------------------------------- */
#home-video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

#home-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.25) 0%,
            rgba(0, 0, 0, 0.10) 35%,
            rgba(0, 0, 0, 0.60) 100%);
    z-index: 1;
}


/* ---------- 4. WRAPPER DO SLIDER ----------------------------- */
#home-slider-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}


/* ---------- 5. CAROUSEL CONTAINER + TRACK ------------------- */
.carousel-container {
    width: 100%;
    height: 440px;
    position: relative;
    perspective: 1000px;
}

.carousel-track {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transform-style: preserve-3d;
    /* Cursor de arrasto */
    cursor: grab;
    user-select: none;
}

.carousel-track.is-dragging {
    cursor: grabbing;
}

@media(max-width: 991px) {
    div#carousel-track {
        transform: scale(1.2);
    }
}

/* ---------- 6. CARDS ---------------------------------------- */
.carousel-card {
    position: absolute;
    width: 280px;
    height: 400px;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    /* Sem transition — o transform do skew é aplicado via JS
       e deve responder imediatamente ao mouse, sem lag CSS */
}

/* --- Glare (reflexo) sobre o card ativo ---- */
.glare-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    border-radius: inherit;
    z-index: 2;
}

.glare {
    position: absolute;
    left: 100%;
    /* começa fora do card; JS posiciona conforme o mouse */
    bottom: -50%;
    width: 150%;
    height: 150%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.13) 0%,
            rgba(255, 255, 255, 0) 20%);
    transform: rotateZ(35deg);
    pointer-events: none;
    filter: blur(4px);
    transition: left 0.12s ease;
}

/* --- Posições dos cards (desktop: 3 de cada lado) --- */

.carousel-card.center {
    z-index: 10;
    transform: scale(1.08) translateZ(0);
    opacity: 1;
}

.carousel-card.left-1 {
    z-index: 7;
    transform: translateX(-230px) scale(0.88) translateZ(-80px);
    opacity: 1;
}

.carousel-card.left-2 {
    z-index: 4;
    transform: translateX(-430px) scale(0.76) translateZ(-180px);
    opacity: 1;
}

.carousel-card.left-3 {
    z-index: 1;
    transform: translateX(-590px) scale(0.65) translateZ(-280px);
    opacity: 1;
}

.carousel-card.right-1 {
    z-index: 7;
    transform: translateX(230px) scale(0.88) translateZ(-80px);
    opacity: 1;
}

.carousel-card.right-2 {
    z-index: 4;
    transform: translateX(430px) scale(0.76) translateZ(-180px);
    opacity: 1;
}

.carousel-card.right-3 {
    z-index: 1;
    transform: translateX(590px) scale(0.65) translateZ(-280px);
    opacity: 1;
}

/* Cards além de 3 posições ficam ocultos */
.carousel-card.hidden {
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

/* Setas de navegação — presentes no DOM mas invisíveis ao usuário */
.carousel-nav {
    display: none !important;
}


/* ---------- 7. LEGENDA -------------------------------------- */
#home-slide-caption {
    text-align: center;
    color: #ffffff;
    min-height: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: -90px;
    padding: 0 24px;
}

#home-slide-caption .caption-title {
    font-family: 'Mona Sans', sans-serif;
    font-size: 42px;
    font-weight: 300;
    line-height: 1;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    height: 55px;
    display: flex;
    align-items: flex-end;
}

#home-slide-caption .caption-subtitle {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.80);
    margin: 0;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease 0.07s, transform 0.4s ease 0.07s;
}

#home-slide-caption.is-visible .caption-title,
#home-slide-caption.is-visible .caption-subtitle {
    opacity: 1;
    transform: translateY(0);
}


/* ---------- 8. MOBILE (3 cards: center + 1 de cada lado) ---- */
@media (max-width: 991px) {

    body.home-page #site-main {
        height: 100dvh;
    }

    #home-hero {
        height: 100dvh;
    }

    .carousel-container {
        height: 340px;
    }

    .carousel-card {
        width: 200px;
        height: 280px;
    }

    /* No mobile mostramos apenas center + left-1 + right-1 */
    .carousel-card.left-1 {
        transform: translateX(-130px) scale(0.85) translateZ(-60px);
    }

    .carousel-card.right-1 {
        transform: translateX(130px) scale(0.85) translateZ(-60px);
    }

    /* left-2, left-3, right-2, right-3 ficam ocultos */
    .carousel-card.left-2,
    .carousel-card.left-3,
    .carousel-card.right-2,
    .carousel-card.right-3 {
        opacity: 0;
        pointer-events: none;
    }

    #home-slider-wrap {
        padding-bottom: 36px;
        gap: 18px;
    }

    #home-slide-caption .caption-title {
        font-size: 1.4rem;
    }

    #home-slide-caption .caption-subtitle {
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .carousel-card {
        width: 165px;
        height: 235px;
    }

    .carousel-card.left-1 {
        transform: translateX(-108px) scale(0.82) translateZ(-60px);
    }

    .carousel-card.right-1 {
        transform: translateX(108px) scale(0.82) translateZ(-60px);
    }
    
    #home-slide-caption {
        padding: 0 10px;
        margin: 0;
    }

    #home-slide-caption .caption-title {
        font-size: 30px;
        height: 50px;
        align-items: center;
    }

}