/* ============================================================
   Carrossel hero da homepage
   Desktop: 2 banners lado a lado | Mobile: 1 banner por vez
   ============================================================ */

.hero-carousel-section {
    min-height: unset;
    padding-top: 58px; /* igual à altura da navbar */
    padding-bottom: 0;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-carousel {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 3.5rem;  /* espaço reservado para os botões */
    overflow: hidden;
}

/* Track */
.hero-carousel-track {
    display: flex;
    gap: 1.2rem;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Desktop: 2 slides lado a lado, proporção 16:9 */
.hero-carousel-slide {
    flex: 0 0 calc(50% - 0.6rem);
    min-width: calc(50% - 0.6rem);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    background: rgba(50, 0, 80, 0.4);
    box-shadow: 0 8px 32px rgba(42, 7, 68, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-carousel-track {
    display: flex;
    gap: 1.2rem;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Efeito de vidro nos slides fora do foco (não visíveis) */
.hero-carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 0, 25, 0.52);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-radius: inherit;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
    opacity: 1;
}

/* Slide visível: remove o overlay */
.hero-carousel-slide.is-active::after {
    opacity: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.hero-carousel-slide:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(42, 7, 68, 0.65);
}

.hero-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.hero-slide-no-link {
    cursor: default;
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder quando não há imagem */
.hero-slide-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(106,0,179,.5), rgba(74,0,118,.5));
    color: #f3eaff;
    font-family: 'PP Neue Machina', sans-serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    padding: 2rem;
    text-align: center;
}

/* Botões prev / next */
.hero-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    touch-action: manipulation; /* evita que o touch no botão acione pan do carousel-pai */
}

.hero-carousel-btn:hover {
    background: rgba(255,255,255,0.35);
}

.hero-carousel-prev { left: 0.4rem; }
.hero-carousel-next { right: 0.4rem; }

/* Dots */
.hero-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.2rem;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.35);
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* ---- Tablet (768px – 1023px): 1 banner 16:9 em tela cheia ---- */
@media (max-width: 1023px) and (min-width: 769px) {
    .hero-carousel-section {
        padding-top: 58px;
        padding-bottom: 1rem;
    }

    .hero-carousel {
        padding: 0 3rem;
    }

    .hero-carousel-slide {
        flex: 0 0 100%;
        min-width: 100%;
        aspect-ratio: 16 / 9;
        border-radius: 14px;
    }

    .hero-carousel-slide:hover {
        transform: none; /* sem lift no tablet */
    }

    .hero-carousel-track {
        gap: 0;
    }

    .hero-carousel-prev { left: 0.5rem; }
    .hero-carousel-next { right: 0.5rem; }
}

/* ---- Mobile: formato story (9:16) ---- */
@media (max-width: 768px) {
    .hero-carousel-section {
        min-height: auto;
        padding-top: 86px;
        padding-bottom: 1rem;
        align-items: center;
        justify-content: center;
    }

    .hero-carousel {
        padding: 0 3.2rem;
        height: auto;
        margin-top: 0;
        display: block;
        /* limita largura para manter proporção de story sem ocupar tela toda */
        max-width: min(85vw, 360px);
        margin-left: auto;
        margin-right: auto;
    }

    /* Track horizontal */
    .hero-carousel-track {
        flex-direction: row;
        gap: 0;
        flex: unset;
    }

    .hero-carousel-slide {
        flex: 0 0 100%;
        min-width: 100%;
        width: 100%;
        height: auto;
        aspect-ratio: 9 / 16;
        border-radius: 16px;
    }

    /* Botões laterais */
    .hero-carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1.4rem;
        top: 50%;
        transform: translateY(-50%);
        rotate: 0deg;
    }

    .hero-carousel-prev { left: 0.2rem; right: auto; bottom: auto; }
    .hero-carousel-next { right: 0.2rem; left: auto; bottom: auto; }

    /* Dots centrados abaixo */
    .hero-carousel-dots {
        position: static;
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.8rem;
        margin-bottom: 0;
        transform: none;
        top: auto;
        right: auto;
        left: auto;
    }
}
