/* =========================================
   IMPORTAÇÃO DE FONTE (Para visual Sci-Fi)
   ========================================= */
   
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&display=swap');

/* =========================================
   VARIÁVEIS DE COR E GLOBAIS
   ========================================= */
:root {
    --cyan: #00e5ff;
    --cyan-glow: rgba(0, 229, 255, 0.4);
    --bg-dark: #070b14;
    --card-bg: rgba(12, 18, 30, 0.6);
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --font-main: 'Rajdhani', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Estilo do container do link */
.btn-img-play {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
    vertical-align: middle;
    /* Remove sombras ou bordas padrão de links em alguns browsers */
    outline: none;
}

/* Estilo da imagem dentro do botão */
.btn-img-play img {
    display: block;
    max-width: 50%; /* Garante que não ultrapasse o container */
    height: auto;    /* Mantém a proporção */
    
    /* Filtro leve para dar profundidade (opcional) */
    filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.3));
    transition: filter 0.3s ease;
}

/* --- EFEITOS DE INTERAÇÃO --- */

/* Quando o mouse passa por cima (Hover) */
.btn-img-play:hover {
    transform: scale(1.05); /* Aumenta levemente o tamanho */
}

.btn-img-play:hover img {
    filter: drop-shadow(0px 6px 12px rgba(0, 0, 0, 0.5)) brightness(1.1);
    /* Aumenta a sombra e o brilho para parecer que "acendeu" */
}

/* Quando o usuário clica (Active) */
.btn-img-play:active {
    transform: scale(0.98); /* Dá a sensação de clique físico */
}
/* =========================================
   SESSÃO PRINCIPAL E BACKGROUND
   ========================================= */
.video-overlay.section {
    background-color: var(--bg-dark);
    /* Substitua a URL abaixo pela imagem da caverna com cristais */
    background-image: linear-gradient(to right, rgba(7,11,20,0.9) 0%, rgba(7,11,20,0.4) 100%), url('../images/background.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.4);
    background-blend-mode: darken;

    /* Spacing */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    
    /* Aumente o padding-top para descer o conteúdo */
    padding-top: 150px; 
    padding-bottom: 100px;
    padding-left: 20px;
    padding-right: 20px;
}

.video-book {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* =========================================
   TOPO: INFORMAÇÕES E PLAYER PRINCIPAL
   ========================================= */
.news-top-row {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-bottom: 50px;
}

.video-left {
    flex: 1;
    max-width: 35%;
}

.video-badge {
    display: inline-block;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    padding: 4px 15px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--cyan-glow) inset;
}

h2#mainTitle {
    font-size: 3.5rem;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}

h2#mainTitle span {
    display: block;
    color: var(--cyan);
    text-shadow: 0 0 15px var(--cyan-glow);
}

p#mainDesc {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    font-family: Arial, Helvetica, sans-serif; /* Fonte mais limpa para leitura */
}

/* Botão JOGAR AGORA */
.btn-play-now {
    background: linear-gradient(90deg, rgba(0, 100, 255, 0.2) 0%, rgba(0, 229, 255, 0.4) 100%);
    border: 1px solid var(--cyan);
    color: var(--text-main);
    padding: 15px 35px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 4px;
    box-shadow: 0 0 15px var(--cyan-glow);
    transition: all 0.3s ease;
}

.btn-play-now:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 25px var(--cyan);
}

.btn-play-now svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Moldura Futurista do Player Principal */
.video-main-wrap {
    flex: 1.5;
    position: relative;
    padding: 10px;
    background: rgba(0, 229, 255, 0.05);
    border: 2px solid rgba(0, 229, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.1) inset, 0 0 20px rgba(0, 229, 255, 0.1);
}

/* Efeito de cantos luminosos na moldura */
.video-main-wrap::before, .video-main-wrap::after {
    content: '';
    position: absolute;
    width: 30px; height: 30px;
    border: 2px solid var(--cyan);
    z-index: 2;
    pointer-events: none;
}
.video-main-wrap::before {
    top: -2px; left: -2px;
    border-right: none; border-bottom: none;
}
.video-main-wrap::after {
    bottom: -2px; right: -2px;
    border-left: none; border-top: none;
}

.video-main2 {
    position: relative;
    padding-bottom: 56.25%; /* Mantém a proporção 16:9 */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 4px;
}

.video-main2 iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* =========================================
   CATEGORIAS (Abas)
   ========================================= */
/* =========================================
   MOLDURA PRINCIPAL (Container de baixo)
   ========================================= */
.news-bottom-row {
    background: rgba(0, 0, 0, 0.5); /* Um pouco mais escuro para destacar o neon */
    padding: 30px 20px;
    border: 1px solid rgba(0, 229, 255, 0.3);
    position: relative;
    
    /* Corte das bordas estilo octógono */
    clip-path: polygon(
        20px 0%, 100% 0%, 
        100% calc(100% - 20px), 
        calc(100% - 20px) 100%, 
        0% 100%, 0% 20px
    );
}

/* =========================================
   CATEGORIAS (Abas Estilizadas)
   ========================================= */
.video-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 0;
    border-bottom: none;
}

.cat-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: var(--font-main);
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 25px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    
    /* Formato das abas estilo trapézio */
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
}

.cat-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    color: #fff;
}

.cat-btn.active {
    background: rgba(0, 229, 255, 0.2);
    color: var(--cyan);
    border-left: 2px solid var(--cyan);
    text-shadow: 0 0 10px var(--cyan-glow);
}

.cat-btn.active .cat-icon {
    fill: var(--cyan);
    filter: drop-shadow(0 0 5px var(--cyan-glow));
}

.cat-btn.active::after { display: none; }

/* =========================================
   CARROSSEL E CARDS (CORRIGIDO)
   ========================================= */
.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.carousel-btn {
    z-index: 100; /* Sempre no topo */
    position: relative;
    background: rgba(7, 11, 20, 0.9);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.carousel-btn:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 15px var(--cyan);
}

.video-list {
    flex: 1;
    overflow: hidden; /* Mantém os cards dentro da área visível */
    padding: 20px 5px;
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}
#thumbContainer { /* Este é o carousel-track */
    display: flex;
    gap: 16px;
    transition: transform 0.3s ease-in-out;
}

/* O CARD */
.video-card {
    position: relative;
    flex: 0 0 300px; /* Largura fixa para não esmagar */
    height: 150px;
    background: #0a0e17;
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    z-index: 10; /* Garante que está acima de fundos */
    transition: 0.3s;
}

.video-card.active {
    border-color: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.video-card:hover, .video-card.active {
    border-color: var(--cyan);
    background: rgba(0, 229, 255, 0.05);
    box-shadow: 0 0 15px var(--cyan-glow);
}
.video-card:hover .card-thumb {
    transform: scale(1.05); /* Pequeno zoom na imagem ao passar o mouse */
    transition: transform 0.5s ease;
}
/* A IMAGEM */
.card-image-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1; /* Atrás do texto */
}

.video-card:hover .card-image-bg {
    transform: scale(1.1);
}

/* OVERLAY (O segredo para o clique passar) */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #0a0e17 30%, transparent 100%);
    z-index: 2;
    pointer-events: none; /* ISSO faz o clique atravessar para o card */
}

/* TEXTO */
.card-content {
    position: relative;
    z-index: 3;
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none; /* O clique passa por aqui também */
}

/* Área da Thumbnail (Direita - ADICIONADO) */
.card-thumb {
    width: 50%; /* Ocupa a metade direita do card */
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
    
    /* Faz a imagem de fundo preencher o espaço */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Efeito de fade/máscara lateral para misturar com o fundo escuro à esquerda */
    mask-image: linear-gradient(to left, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 80%, transparent 100%);
}


/* Badges e Textos */
.video-card .badge {
    align-self: flex-start;
    padding: 2px 10px;
    font-size: 10px;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: #fff;
    clip-path: polygon(5px 0%, 100% 0%, calc(100% - 5px) 100%, 0% 100%);
}

.video-card .badge.news { background: #0093a8; }
.video-card .badge.tutorial { background: #6a2a8c; }
.video-card .badge.events { background: #a87600; }

.video-card h4 {
    font-size: 1rem;
    color: #fff;
    margin: 0 0 5px 0;
    text-transform: uppercase;
}

.video-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.2;
    margin: 0;
}

/* =========================================
   RESPONSIVIDADE (Mobile & Tablet)
   ========================================= */
@media (max-width: 1100px) {
    .video-card { flex: 0 0 calc(33.333% - 11px); } /* 3 itens */
}

@media (max-width: 900px) {
    .news-top-row {
        flex-direction: column;
    }
    .video-left {
        max-width: 100%;
        text-align: center;
    }
    .btn-play-now {
        margin: 0 auto;
        justify-content: center;
    }
    h2#mainTitle span {
        display: inline; /* Texto na mesma linha em mobile */
    }
    .video-card { flex: 0 0 calc(50% - 8px); } /* 2 itens */
}

@media (max-width: 600px) {
    .video-categories { gap: 15px; justify-content: space-between; }
    .cat-btn { font-size: 0.9rem; }
    h2#mainTitle { font-size: 2.5rem; }
    .video-card { flex: 0 0 calc(100%); } /* 1 item */
}

.cat-btn {
    display: flex;          /* Alinha ícone e texto lado a lado */
    align-items: center;    /* Centraliza verticalmente */
    gap: 10px;              /* Espaço entre ícone e texto */
    padding: 10px 20px;
    /* ... seu estilo de clip-path e background aqui ... */
}

.cat-icon {
    width: 18px;            /* Tamanho do ícone */
    height: 18px;
    fill: var(--text-muted); /* Cor padrão (igual ao texto) */
    transition: 0.3s;
}

/* Quando o botão estiver ativo, o ícone brilha em Ciano */
.cat-btn.active .cat-icon {
    fill: var(--cyan);
    filter: drop-shadow(0 0 5px var(--cyan-glow));
}

/* Quando passar o mouse, o ícone clareia */
.cat-btn:hover .cat-icon {
    fill: #ffffff;
}