/* --- RESET E VARIÁVEIS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #ffffff;
    --accent-color: #ccff00;
    --text-secondary: #aaaaaa;
}

body {   
    display: block; /* Volta ao padrão do navegador */
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- HEADER / MENU --- */
header {
    background-color: #000;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-superior {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.menu-superior a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.menu-superior a:hover {
    color: var(--accent-color);
}

/* --- PERFIL HERO --- */
.hero-profile {
    text-align: left;
    padding: 40px 20px;
}

.profile-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    object-fit: cover;
}

.profile-info h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.profile-info .subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- ESTRUTURA GERAL --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- SEÇÕES DE VÍDEO --- */
.section-videos {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 1.2rem;
    text-transform: uppercase;
}

.divider {
    color: var(--text-secondary);
    margin: 0 10px;
}

.subtitle-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

.btn-ver-mais {
    background-color: #fff;
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
}

/* --- GRID DE VÍDEOS HORIZONTAIS --- */
.videos-grid-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); 
    gap: 20px;
}

/* --- ESTILO DO CARTÃO (CARD PADRÃO) --- */
/* Nota: Este card tem overflow visible, então o tooltip lateral funciona aqui */
.card {
    position: relative;
    z-index: 1;
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible; 
    transition: transform 0.3s, z-index 0s;
}

.card:hover {
    transform: translateY(-5px);
    z-index: 100;
}

/* --- ESTILO DAS CAPAS (THUMBNAILS) --- */
.video-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    cursor: pointer;
    background-color: #000;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.video-cover.vertical {
    width: 120px;
    height: 200px;
    margin-right: 20px;
    flex-shrink: 0;
}

/* --- ÍCONE DE PLAY (OVERLAY) --- */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(204, 255, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(204, 255, 0, 0.5);
    transition: transform 0.3s ease, background-color 0.3s;
}

.play-overlay i {
    color: #000;
    font-size: 1.2rem;
    margin-left: 4px;
}

/* --- EFEITOS DE HOVER --- */
.card:hover .thumb-img {
    transform: scale(1.1);
    opacity: 1;
}

.card:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.2);
    background-color: rgba(204, 255, 0, 1);
}

/* --- TAGS E BOTOES --- */
.tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tag {
    background-color: var(--accent-color);
    color: #000;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
    align-items: center;
}

.btn-action {
    width: 100%;
    background-color: #fff;
    border: none;
    padding: 8px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 5;
}

.card-footer {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- GRID DE VÍDEOS VERTICAIS (Card antigo da home) --- */
.videos-grid-vertical {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.card-vertical {
    flex-direction: row;
    align-items: flex-start;
}

.video-placeholder.vertical {
    width: 120px;
    height: 200px;
    margin-bottom: 0;
    margin-right: 20px;
    flex-shrink: 0;
}

.card-vertical .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    min-width: 0;
    padding-left: 10px;
}

.card-vertical .btn-action {
    width: 100%;
    font-size: 0.9rem;
    padding: 6px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-vertical .tags {
    flex-wrap: wrap;
    gap: 5px;
}

.card-vertical .tag {
    font-size: 0.6rem;
    padding: 3px 8px;
}

/* --- SOBRE MIM E FOOTER --- */
.about-section {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 60px 0;
    border-top: 1px solid #333;
}

.about-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    object-fit: cover;
}

.about-text h3 {
    margin-bottom: 20px;
    color: #fff;
}

.about-text p {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 10px;
}

footer {
    background-color: #0e0e0e;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 1px solid #222;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.social-buttons {
    display: flex;
    gap: 15px;
}

.social-btn {
    background-color: var(--accent-color);
    color: #000;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- MODAL (LIGHTBOX) --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-content-box {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
}

.modal-video-container {
    width: 100%;
    height: 400px;
    background-color: #fff;
    color: #000;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.modal-video-container h3 { font-size: 3rem; }
.modal-info { margin-bottom: 30px; }
.modal-tags-container { justify-content: center; margin-bottom: 10px; }

.modal-actions-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    border-top: 1px solid #333;
    padding-top: 25px;
}

.modal-actions-row .btn-action {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
}

/* --- MODAL VERTICAL --- */
.modal-content-box.vertical-mode {
    max-width: 900px;
    width: 95%;
    padding: 30px;
    background-color: #1a1a1a;
}

.modal-flex-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
}

.modal-video-vertical {
    width: 350px;
    height: 620px;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.modal-side-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding-top: 10px;
}

.modal-side-info h2 {
    font-size: 2rem;
    line-height: 1.2;
    color: #fff;
    text-transform: uppercase;
}

.vertical-buttons-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

/* --- TOOLTIPS (CONFIGURAÇÃO GERAL) --- */
.btn-wrapper {
    position: relative;
    width: 90%;
    margin-bottom: 10px;
}

.btn-wrapper:hover .btn-action {
    background-color: #000;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    transform: scale(1.1);
    z-index: 10;
}

/* Configuração Padrão (Para Card Horizontal e Vertical da Home) */
.tooltip-box {
    position: absolute;
    left: 105%; 
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    background-color: #fff;
    color: #000;
    width: 220px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
    pointer-events: none;
}

/* Setinha Padrão (Esquerda) */
.tooltip-box::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
}

.btn-wrapper:hover .tooltip-box {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.tooltip-box h4 {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.tooltip-box p {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #333;
}

.tooltip-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-dark {
    background-color: #000;
    color: #fff;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
}

/* --- ESTILOS DA PÁGINA DE VÍDEOS/POSTS --- */
.gallery-header { text-align: center; padding: 40px 0; }
.filter-container { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn { background: transparent; border: 1px solid #333; color: #888; padding: 8px 20px; border-radius: 20px; cursor: pointer; text-transform: uppercase; font-weight: bold; font-size: 0.8rem; transition: all 0.3s ease; }
.filter-btn:hover, .filter-btn.active { border-color: var(--accent-color); color: var(--accent-color); background-color: rgba(204, 255, 0, 0.05); }
.gallery-grid { grid-template-columns: repeat(3, 1fr) !important; }

/* --- CONTROLE DE ABAS --- */
.format-toggle-container { display: flex; justify-content: center; gap: 20px; margin: 30px 0 20px 0; }
.format-btn { background: transparent; border: 2px solid #333; color: #aaa; padding: 12px 25px; font-size: 1.1rem; font-weight: bold; cursor: pointer; border-radius: 50px; transition: all 0.3s ease; display: flex; align-items: center; gap: 10px; }
.format-btn:hover { border-color: #ccff00; color: #fff; }
.format-btn.active { background-color: #ccff00; color: #000; border-color: #ccff00; box-shadow: 0 0 15px rgba(204, 255, 0, 0.3); }
.hidden-view { display: none !important; }
.active-view { display: block !important; animation: fadeIn 0.5s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ESTILOS PARA POSTS (CARD-POST) --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* --- NOVO: Grid Mais Largo (Para Thumbnails) --- */
.posts-grid.wide {
    /* Quanto maior esse número, maiores ficam as thumbnails */
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); 
}

/* Ajuste para celular (Para não quebrar em telas pequenas) */
@media (max-width: 600px) {
    .posts-grid.wide {
        grid-template-columns: 1fr; /* No celular ocupa a largura toda */
    }
}

/* IMPORTANTE: Aqui está o overflow: hidden que cortava o tooltip antes */
.card-post {
    aspect-ratio: 9 / 16;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden; 
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #222;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.card-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(204, 255, 0, 0.15);
    border-color: #ccff00;
}

.card-post .thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

.card-post:hover .thumb-img {
    transform: scale(1.05);
    opacity: 0.3;
}

.card-post .card-content {
    position: relative;
    z-index: 2;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-post:hover .card-content { opacity: 1; }

.card-post.landscape { aspect-ratio: 16 / 9 !important; }

/* AJUSTES FINAIS DE MODAL */
.modal-video-vertical.post-mode { aspect-ratio: 9 / 16; width: auto; height: 85vh; max-width: 100%; }
.modal-video-vertical.landscape-mode { aspect-ratio: 16 / 9 !important; width: 90%; max-width: 1000px; height: auto; }

.page-maintenance {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* Calculamos a altura: 100% da tela menos a altura do seu header e footer */
    /* Se não souber a altura exata, 80vh é um bom começo */
    min-height: calc(100vh - 150px); 
    padding: 20px;
}

/* ========================================================= */
/* CORREÇÃO DO BALÃOZINHO (TOOLTIP) APENAS NOS POSTS         */
/* ========================================================= */

/* Reposiciona o balão para CIMA (em vez da direita) apenas no .card-post */
.card-post .btn-wrapper:hover .tooltip-box {
    left: 50%;
    top: auto;
    bottom: 120%; /* Fica acima do botão */
    transform: translateX(-50%); /* Centraliza */
}

/* Ajusta a setinha para apontar para BAIXO */
.card-post .tooltip-box::before {
    left: 50%;
    top: 100%; /* Seta embaixo do balão */
    transform: translateX(-50%);
    
    /* Triângulo apontando para baixo */
    border-width: 8px 8px 0 8px; 
    border-color: #fff transparent transparent transparent;
}

/* Garante tamanho e alinhamento */
.card-post .tooltip-box {
    width: 180px;
    text-align: center;
    /* Valores iniciais para transição */
    left: 50%;
    bottom: 100%;
}

/* --- RESPONSIVIDADE FINAL --- */
@media (max-width: 1024px) { .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important; } }
@media (max-width: 850px) { .modal-flex-row { flex-direction: column; align-items: center; } .modal-side-info { width: 100%; text-align: center; } .vertical-buttons-list { margin: 0 auto; } }
@media (max-width: 768px) { .menu-superior { flex-wrap: wrap; } .about-section { flex-direction: column; text-align: center; }.footer-content
{ flex-direction: column; gap: 20px; } .card-vertical { flex-direction: column; } .video-placeholder.vertical
{ width: 100%; margin-right: 0; margin-bottom: 15px; } .modal-video-container { height: 250px; } .modal-video-container h3 { font-size: 2rem; } .modal-actions-row
{ flex-direction: column; } .tooltip-box { display: none; } }

/* ================================================================ */
/* CORREÇÃO FINAL: MODAL PARA THUMBNAILS (LANDSCAPE)                */
/* ================================================================ */

/* Quando a classe .landscape-mode é adicionada pelo Javascript: */
.modal-video-vertical.landscape-mode {
    /* 1. Destrava o tamanho fixo de celular */
    width: 600px !important;  /* Fica bem mais largo */
    height: auto !important;  /* A altura se ajusta sozinha (não fica mais 620px) */
    
    /* 2. Garante a proporção de cinema */
    aspect-ratio: 16 / 9 !important;
    
    /* 3. Ajustes visuais */
    background-color: transparent; /* Remove o fundo preto se a imagem cobrir tudo */
    box-shadow: none; /* Opcional: remove a sombra da caixa se quiser */
}

/* Ajuste para quando a tela for menor (Tablets/Notebooks pequenos) */
@media (max-width: 1100px) {
    .modal-video-vertical.landscape-mode {
        width: 450px !important;
    }
}

/* Ajuste para Celular (Fica 100% da largura) */
@media (max-width: 850px) {
    .modal-video-vertical.landscape-mode {
        width: 100% !important;
        height: auto !important;
    }
}

/* ================================================================ */
/* AJUSTE PARA THUMBNAILS: INFORMAÇÕES EMBAIXO DA IMAGEM            */
/* ================================================================ */

/* 1. Muda a direção para Coluna (Um em cima do outro) */
.modal-content-box.landscape-layout .modal-flex-row {
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Espaço entre a imagem e o texto */
}

/* 2. Ajusta a imagem para ocupar a largura disponível */
.modal-content-box.landscape-layout .modal-video-vertical.landscape-mode {
    width: 100% !important;
    max-width: 900px; /* Limite máximo para não ficar gigante em telas ultra-wide */
    height: auto !important;
    aspect-ratio: 16 / 9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* 3. Centraliza as informações e botões */
.modal-content-box.landscape-layout .modal-side-info {
    width: 100%;
    text-align: center; /* Centraliza Título e Descrição */
    padding-top: 0;
}

/* 4. Organiza os botões em linha (lado a lado) para ficar bonito embaixo */
.modal-content-box.landscape-layout .vertical-buttons-list {
    flex-direction: row; /* Botões lado a lado */
    justify-content: center;
    flex-wrap: wrap; /* Se não couber, quebra linha */
    max-width: 100%; /* Usa a largura total */
    margin-top: 15px;
}

/* 5. Ajuste fino nos botões quando estiverem embaixo */
.modal-content-box.landscape-layout .btn-wrapper {
    width: auto; /* O botão ocupa só o tamanho dele */
    min-width: 150px; /* Tamanho mínimo para não ficar espremido */
}

/* Responsividade para celular (Mantém tudo empilhado) */
@media (max-width: 600px) {
    .modal-content-box.landscape-layout .vertical-buttons-list {
        flex-direction: column; /* No celular volta a ser um embaixo do outro */
        align-items: center;
    }
}

/* Regra específica para a página de anúncios */
.page-anuncios {
    display: flex;
    flex-direction: column;
    /* Garante que o main ocupe o espaço entre o header e o footer */
    min-height: calc(100vh - 70px - 140px); 
}

/* Centraliza o conteúdo das seções de vídeo se estiverem vazias ou curtas */
.page-anuncios .videos-section.active-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centraliza verticalmente o grid no espaço que sobrar */
}