/**
 * Carrossel ULTRA PREMIUM - Funciona 100%
 * @package Mirasat_IPTV
 */

/* ============================================
   CARROSSEL ULTRA PREMIUM - Container
   ============================================ */
.mirasat-hero-carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
    margin-top: -80px;
    background: #171422;
}

/* Container interno */
.mirasat-hero-carousel .swiper,
.mirasat-hero-carousel .swiper-container,
.mirasat-hero-carousel .carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Wrapper dos slides */
.mirasat-hero-carousel .swiper-wrapper,
.mirasat-hero-carousel .slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ============================================
   SLIDES - Apenas 1 visível por vez
   ============================================ */
.mirasat-hero-carousel .swiper-slide,
.mirasat-hero-carousel .carousel-slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 1 !important;
}

/* APENAS slide ativo visível */
.mirasat-hero-carousel .swiper-slide.active,
.mirasat-hero-carousel .swiper-slide.swiper-slide-active {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
}

/* ULTRA PREMIUM: Overlay com gradiente cinematográfico */
.mirasat-hero-carousel .swiper-slide::before,
.mirasat-hero-carousel .carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(23, 20, 34, 0.95) 0%,
        rgba(23, 20, 34, 0.7) 30%,
        rgba(214, 17, 30, 0.2) 60%,
        rgba(221, 199, 109, 0.1) 80%,
        transparent 100%
    );
    z-index: 1;
}

/* ULTRA PREMIUM: Segundo overlay com partículas */
.mirasat-hero-carousel .swiper-slide::after,
.mirasat-hero-carousel .carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(214, 17, 30, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(221, 199, 109, 0.1) 0%, transparent 50%);
    z-index: 2;
    pointer-events: none;
}

/* ULTRA PREMIUM: Scanlines cinematográficas */
.mirasat-hero-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 100;
}

/* ULTRA PREMIUM: Vignette nas bordas */
.mirasat-hero-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.4) 100%
    );
    pointer-events: none;
    z-index: 99;
}

/* ============================================
   CONTEÚDO DO SLIDE - ULTRA PREMIUM
   ============================================ */
.carousel-slide-content {
    position: relative;
    z-index: 20;
    max-width: 750px;
    padding: 120px 60px 60px;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Subtítulo com efeito premium */
.carousel-slide-subtitle {
    font-family: var(--font-subheaders, 'Heebo');
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--second, #fd5800);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 0 20px rgba(221, 199, 109, 0.5);
    position: relative;
    display: inline-block;
}

/* Linha decorativa no subtítulo */
.carousel-slide-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--second, #fd5800), transparent);
}

/* Título ULTRA PREMIUM */
.carousel-slide-title {
    font-family: var(--font-headers, 'Heebo');
    font-size: 72px;
    font-weight: 900;
    line-height: 1.05;
    color: #fff;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(214, 17, 30, 0.3);
    position: relative;
}

/* Destaque em dourado */
.carousel-slide-title span {
    color: var(--second, #fd5800);
    text-shadow: 0 0 30px rgba(221, 199, 109, 0.5);
}

/* Texto descritivo */
.carousel-slide-text {
    font-size: 18px;
    line-height: 1.9;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 600px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Botões ULTRA PREMIUM */
.carousel-slide-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Botão Principal - Vermelho com Glow */
.carousel-slide-buttons .btn-main {
    background: linear-gradient(135deg, var(--main, #9302d9) 0%, #7002a3 100%);
    color: #fff !important;
    padding: 18px 40px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: 50px;
    box-shadow: 
        0 4px 20px rgba(147, 2, 217, 0.4),
        0 0 40px rgba(147, 2, 217, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.carousel-slide-buttons .btn-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.carousel-slide-buttons .btn-main:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 8px 30px rgba(214, 17, 30, 0.5),
        0 0 60px rgba(214, 17, 30, 0.3);
}

.carousel-slide-buttons .btn-main:hover::before {
    left: 100%;
}

/* Botão Secundário - Dourado com Borda */
.carousel-slide-buttons .btn-second {
    background: transparent;
    color: var(--second, #fd5800) !important;
    padding: 18px 40px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid var(--second, #fd5800);
    border-radius: 50px;
    box-shadow: 0 0 20px rgba(221, 199, 109, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide-buttons .btn-second:hover {
    background: var(--second, #fd5800);
    color: #171422 !important;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 8px 30px rgba(221, 199, 109, 0.4),
        0 0 40px rgba(221, 199, 109, 0.2);
}

/* Animação quando o slide está ativo */
.swiper-slide-active .carousel-slide-subtitle,
.swiper-slide-active .carousel-slide-title,
.swiper-slide-active .carousel-slide-text,
.swiper-slide-active .carousel-slide-buttons {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}

/* ============================================
   REGRAS DE VISIBILIDADE - SEM CONFLITOS
   ============================================ */

/* Slide ativo - conteúdo visível */
.swiper-slide.active .carousel-slide-content,
.swiper-slide.swiper-slide-active .carousel-slide-content {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Slides NÃO ativos - conteúdo escondido */
.swiper-slide:not(.active):not(.swiper-slide-active) .carousel-slide-content {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ============================================
   BOTÕES DE NAVEGAÇÃO - ULTRA PREMIUM
   ============================================ */
.swiper-button-prev,
.swiper-button-next {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: var(--main, #fd5800);
    border-color: var(--main, #fd5800);
    box-shadow: 0 0 40px rgba(214, 17, 30, 0.5);
    transform: scale(1.1);
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
}

/* ============================================
   PAGINAÇÃO - ULTRA PREMIUM
   ============================================ */
.swiper-pagination {
    bottom: 50px !important;
    z-index: 50;
}

.swiper-pagination-bullet,
.carousel-bullet,
.bullet {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.4);
    opacity: 1;
    transition: all 0.3s ease;
    border-radius: 50%;
    cursor: pointer;
    display: inline-block;
    margin: 0 5px;
}

.swiper-pagination-bullet-active,
.carousel-bullet.active,
.bullet.active {
    width: 35px;
    border-radius: 6px;
    background: var(--main, #fd5800);
}

/* ============================================
   RESPONSIVIDADE - ULTRA PREMIUM
   ============================================ */

/* Tablet */
@media (max-width: 991px) {
    .mirasat-hero-carousel {
        height: 85vh;
        min-height: 550px;
        margin-top: -80px;
    }

    .carousel-slide-content {
        max-width: 100%;
        padding: 100px 40px 40px;
    }

    .carousel-slide-title {
        font-size: 52px;
    }

    .carousel-slide-text {
        font-size: 16px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 55px;
        height: 55px;
    }

    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 18px;
    }
    
    .carousel-slide-buttons .btn-main,
    .carousel-slide-buttons .btn-second {
        padding: 15px 30px;
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .mirasat-hero-carousel {
        height: 100vh;
        min-height: 500px;
        max-height: none;
    }

    .carousel-slide-content {
        max-width: 100%;
        padding: 120px 25px 40px;
    }

    .carousel-slide-subtitle {
        font-size: 11px;
        letter-spacing: 3px;
        margin-bottom: 15px;
    }

    .carousel-slide-title {
        font-size: 36px;
        margin-bottom: 20px;
        line-height: 1.15;
    }

    .carousel-slide-text {
        font-size: 15px;
        margin-bottom: 30px;
        line-height: 1.7;
    }

    .carousel-slide-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .carousel-slide-buttons .btn-main,
    .carousel-slide-buttons .btn-second {
        width: 100%;
        text-align: center;
        padding: 16px 30px;
        font-size: 14px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 40px;
        height: 40px;
    }

    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 16px;
    }

    .swiper-pagination {
        bottom: 20px !important;
    }
}

/* Mobile pequeno */
@media (max-width: 479px) {
    .mirasat-hero-carousel {
        height: 100vh;
        min-height: 450px;
    }

    .carousel-slide-content {
        padding: 110px 20px 30px;
    }

    .carousel-slide-title {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .carousel-slide-text {
        font-size: 14px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        display: none;
    }
    
    .swiper-pagination,
    .carousel-bullet {
        bottom: 30px !important;
    }
    
    .carousel-slide-buttons .btn-main,
    .carousel-slide-buttons .btn-second {
        padding: 14px 25px;
        font-size: 13px;
    }
}

/* ============================================
   EFEITO TV SEM SINAL - Suave e Elegante
   ============================================ */

/* Scanlines - linhas horizontais de TV */
.carousel-slide-title {
    position: relative;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.1);
}

/* Efeito de interferência sutil */
.swiper-slide.active .carousel-slide-title,
.swiper-slide-active .carousel-slide-title {
    animation: tv-flicker 4s infinite;
}

/* Animação de flicker de TV */
@keyframes tv-flicker {
    0%, 100% {
        opacity: 1;
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.5),
            0 0 20px rgba(255, 255, 255, 0.3);
    }
    92% {
        opacity: 1;
    }
    93% {
        opacity: 0.8;
        text-shadow: 
            -2px 0 rgba(255, 0, 0, 0.5),
            2px 0 rgba(0, 255, 255, 0.5);
    }
    94% {
        opacity: 1;
    }
    96% {
        opacity: 0.9;
        text-shadow: 
            1px 0 rgba(255, 0, 0, 0.3),
            -1px 0 rgba(0, 255, 255, 0.3);
    }
    97% {
        opacity: 1;
    }
}

/* Linhas de scan da TV */
.carousel-slide-title.tv-glitch::selection,
.tv-glitch::selection {
    background: #ff0000;
    color: #fff;
}

/* Scanlines overlay no carrossel */
.mirasat-hero-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 5;
    opacity: 0.3;
}

/* Noise/static effect opcional */
.tv-noise::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)' opacity='0.1'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 4;
    animation: tv-noise 0.2s infinite;
}

@keyframes tv-noise {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-1%, -1%); }
    20% { transform: translate(1%, 1%); }
    30% { transform: translate(-1%, 1%); }
    40% { transform: translate(1%, -1%); }
    50% { transform: translate(-1%, 0); }
    60% { transform: translate(1%, 0); }
    70% { transform: translate(0, 1%); }
    80% { transform: translate(0, -1%); }
    90% { transform: translate(1%, 1%); }
}

/* ============================================
   Scroll Indicator
   ============================================ */
.carousel-scroll-indicator {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
}

.carousel-scroll-indicator i {
    font-size: 32px;
    color: rgba(255,255,255,0.7);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@media (max-width: 767px) {
    .carousel-scroll-indicator {
        display: none;
    }
}

/* ============================================
   Loading State
   ============================================ */
.mirasat-hero-carousel.loading {
    background: var(--black, #171422);
}

.mirasat-hero-carousel.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--main, #fd5800);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
