/**
 * BANNER CAROUSEL - Sistema de Carrossel de Banners da Home
 * CGBookStore v3
 *
 * Funcionalidades:
 * - Carrossel responsivo e fluido
 * - Transições suaves entre banners
 * - Controles de navegação intuitivos
 * - Auto-play com controle manual
 * - Indicadores de progresso
 * - Overlay para legibilidade do texto
 */

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */

.banner-carousel-container {
    width: 100%;
    margin-bottom: 0;
    /* Removido para permitir sobreposição */
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* Banner fica atrás das seções */
}

.banner-carousel {
    position: relative;
    width: 100%;
    height: 700px;
    /* Aumentado de 600px para 700px - estilo Crunchyroll */
    background: var(--card-bg);
}

/* ============================================
   SLIDES
   ============================================ */

.banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
}

.banner-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.banner-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.banner-link:hover .banner-image {
    transform: scale(1.05);
}

/* ============================================
   IMAGEM DO BANNER
   ============================================ */

.banner-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

/* Overlay para melhorar legibilidade do texto */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

/* ============================================
   CONTEÚDO DO BANNER
   ============================================ */

.banner-content {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    z-index: 2;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    padding: 2rem;
}

.banner-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.banner-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.banner-description {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    max-width: 700px;
    line-height: 1.6;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.banner-cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff !important;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.8s both;
    text-decoration: none !important;
}

.banner-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.banner-cta-button:active {
    transform: translateY(-1px);
}

/* ============================================
   CONTROLES DE NAVEGAÇÃO
   ============================================ */

.banner-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    transition: all 0.3s ease;
    z-index: 100;
    font-size: 1.5rem;
    pointer-events: auto !important;
}

.banner-control:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.banner-control-prev {
    left: 2rem;
}

.banner-control-next {
    right: 2rem;
}

/* ============================================
   INDICADORES
   ============================================ */

.banner-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 10;
}

.banner-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.banner-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.banner-indicator.active {
    background: #fff;
    width: 32px;
    border-radius: 6px;
}

/* ============================================
   BOTÃO DE AUTO-PLAY
   ============================================ */

.banner-autoplay-toggle {
    position: absolute;
    bottom: 10rem;
    left: 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    transition: all 0.3s ease;
    z-index: 100;
    font-size: 1.2rem;
    pointer-events: auto !important;
}

.banner-autoplay-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.banner-autoplay-toggle.paused {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ============================================
   RESPONSIVIDADE
   ============================================ */

/* Tablets */
@media (max-width: 992px) {
    .banner-carousel {
        height: 600px;
        /* Aumentado de 500px para 600px */
    }

    .banner-title {
        font-size: 2.5rem;
    }

    .banner-subtitle {
        font-size: 1.5rem;
    }

    .banner-description {
        font-size: 1rem;
    }

    .banner-control {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .banner-control-prev {
        left: 1rem;
    }

    .banner-control-next {
        right: 1rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .banner-carousel {
        height: 400px;
        /* Reduzido de 500px para 400px em mobile */
    }

    .banner-content {
        padding: 1.5rem;
    }

    .banner-title {
        font-size: 2rem;
    }

    .banner-subtitle {
        font-size: 1.2rem;
    }

    .banner-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .banner-cta-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .banner-control {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .banner-control-prev {
        left: 0.5rem;
    }

    .banner-control-next {
        right: 0.5rem;
    }

    .banner-indicators {
        bottom: 1rem;
        gap: 0.5rem;
    }

    .banner-indicator {
        width: 10px;
        height: 10px;
    }

    .banner-indicator.active {
        width: 24px;
    }

    /* Ocultar indicadores em mobile */
    .banner-indicators {
        display: none;
    }

    .banner-autoplay-toggle {
        width: 40px;
        height: 40px;
        bottom: 7rem;
        left: 1rem;
        font-size: 1rem;
    }

    /* Overlay mais escuro em mobile para melhor legibilidade */
    .banner-overlay {
        background: linear-gradient(to top,
                rgba(0, 0, 0, 0.8) 0%,
                rgba(0, 0, 0, 0.5) 50%,
                rgba(0, 0, 0, 0.3) 100%);
    }
}

/* Mobile pequeno */
@media (max-width: 576px) {
    .banner-carousel {
        height: 320px;
        /* Reduzido de 450px para 320px em mobile pequeno */
    }

    .banner-title {
        font-size: 1.5rem;
    }

    .banner-subtitle {
        font-size: 1rem;
    }

    .banner-description {
        font-size: 0.85rem;
        display: none;
        /* Oculta descrição em telas muito pequenas */
    }
}

/* ============================================
   GRADIENT TRANSPARENTE ESTILO CRUNCHYROLL
   Fade para transparente na parte inferior
   Permite que as seções flutuem sobre o banner
   ============================================ */

.banner-gradient-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    /* Aumentado de 40% para 50% - fade mais suave */
    background: linear-gradient(to top,
            var(--body-bg) 0%,
            rgba(var(--body-bg-rgb, 255, 255, 255), 0.98) 5%,
            rgba(var(--body-bg-rgb, 255, 255, 255), 0.85) 20%,
            rgba(var(--body-bg-rgb, 255, 255, 255), 0.5) 40%,
            transparent 100%);
    z-index: 3;
    /* Acima do overlay mas abaixo do conteúdo */
    pointer-events: none;
}

/* Versão dark mode */
[data-theme="dark"] .banner-gradient-fade {
    background: linear-gradient(to top,
            rgb(18, 18, 18) 0%,
            rgba(18, 18, 18, 0.98) 5%,
            rgba(18, 18, 18, 0.85) 20%,
            rgba(18, 18, 18, 0.5) 40%,
            transparent 100%);
}

/* ============================================
   DESFOQUE NAS BORDAS (Controlável pelo Admin)
   Aplica desfoque gradual nas bordas superior e inferior
   ============================================ */

.banner-blur-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    /* Valor padrão, substituído por inline style */
    background: linear-gradient(to bottom,
            var(--body-bg) 0%,
            rgba(var(--body-bg-rgb, 255, 255, 255), 0.95) 10%,
            rgba(var(--body-bg-rgb, 255, 255, 255), 0.8) 30%,
            rgba(var(--body-bg-rgb, 255, 255, 255), 0.5) 60%,
            transparent 100%);
    z-index: 4;
    /* Acima de tudo */
    pointer-events: none;
}

.banner-blur-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    /* Valor padrão, substituído por inline style */
    background: linear-gradient(to top,
            var(--body-bg) 0%,
            rgba(var(--body-bg-rgb, 255, 255, 255), 0.95) 10%,
            rgba(var(--body-bg-rgb, 255, 255, 255), 0.8) 30%,
            rgba(var(--body-bg-rgb, 255, 255, 255), 0.5) 60%,
            transparent 100%);
    z-index: 4;
    /* Acima de tudo */
    pointer-events: none;
}

/* Versões dark mode */
[data-theme="dark"] .banner-blur-top {
    background: linear-gradient(to bottom,
            rgb(18, 18, 18) 0%,
            rgba(18, 18, 18, 0.95) 10%,
            rgba(18, 18, 18, 0.8) 30%,
            rgba(18, 18, 18, 0.5) 60%,
            transparent 100%);
}

[data-theme="dark"] .banner-blur-bottom {
    background: linear-gradient(to top,
            rgb(18, 18, 18) 0%,
            rgba(18, 18, 18, 0.95) 10%,
            rgba(18, 18, 18, 0.8) 30%,
            rgba(18, 18, 18, 0.5) 60%,
            transparent 100%);
}