/* ========================================================
   VARIÁVEIS DE COR E FUNDO TECH (DOTS GRID)
======================================================== */
:root {
    --bg-fundo: #f8fafc; 
    --cor-pontos: #cbd5e1; 
    --bg-topo-cartao: #ffffff;
    /* Nova variável com 85% de opacidade para o vidro claro */
    --bg-topo-transparente: rgba(255, 255, 255, 0.85); 
    --cor-titulo: #2b2b2b;
    --cor-texto: #666666;
    --cor-borda: #eaeaea;
    --cor-marca: #06b6d4; 
    --cor-marca-hover: #0891b2;
}

body.dark-mode {
    --bg-fundo: #090e17; 
    --cor-pontos: #1e293b; 
    --bg-topo-cartao: #111827; 
    /* Nova variável com 85% de opacidade para o vidro escuro */
    --bg-topo-transparente: rgba(17, 24, 39, 0.85); 
    --cor-titulo: #f8fafc; 
    --cor-texto: #94a3b8; 
    --cor-borda: #334155; 
}

/* --- ESTILOS GERAIS COM O NOVO FUNDO --- */
body {
    background-color: var(--bg-fundo); 
    background-image: radial-gradient(var(--cor-pontos) 2px, transparent 2px);
    background-size: 40px 40px; 
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0; 
    transition: background-color 0.4s ease; 
}

h1, h2, h3 {
    color: var(--cor-titulo);
}

h1 {
    margin-top: 50px;
}

p {
    color: var(--cor-texto);
}

/* ========================================================
   ESTILOS DO TOPO DO SITE (FIXO E COM EFEITO VIDRO)
======================================================== */
.topo-site {
    background-color: var(--bg-topo-transparente); /* Usa a cor transparente */
    
    /* A MÁGICA DO VIDRO FOSCO */
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); /* Para funcionar em iPhones/Macs */
    
    padding: 4px 20px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    border-bottom: 2px solid var(--cor-borda); 
    position: sticky; 
    top: 0;           
    z-index: 1000;    
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.logo-secundaria {
    position: absolute; 
    left: 20px; 
    height: 50px; 
    width: auto;
}

.logo {
    text-align: center;
}

.imagem-logo {
    height: 65px; 
    width: auto;
    display: block;
    margin: 0 auto;
}

/* Controles de Idioma e Tema */
.controles-topo {
    position: absolute;
    right: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

#btn-tema {
    background-color: transparent;
    border: 2px solid var(--cor-borda);
    border-radius: 50%;
    width: 35px; 
    height: 35px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

#btn-tema:hover {
    border-color: var(--cor-marca);
    transform: scale(1.1);
}

.estilo-seletor {
    position: relative;
}

#seletor-idioma {
    appearance: none; 
    background-color: transparent;
    border: 2px solid var(--cor-borda);
    color: var(--cor-titulo);
    padding: 6px 25px 6px 12px; 
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#seletor-idioma:hover {
    border-color: var(--cor-marca);
}

.estilo-seletor::after {
    content: "▼";
    font-size: 10px;
    color: var(--cor-texto);
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* --- BANNER PRINCIPAL --- */
.banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('fundo.png');
    background-size: cover; 
    background-position: center; 
    color: white; 
    padding: 80px 20px; 
    text-align: center;
}

.banner h2 {
    font-size: 38px;
    margin-bottom: 15px;
    margin-top: 0;
    color: white; 
}

.banner h2 span {
    color: var(--cor-marca); 
}

.banner p {
    color: #cccccc; 
    font-size: 16px;
    max-width: 600px; 
    margin: 0 auto 30px auto; 
    line-height: 1.5; 
}

.caixa-pesquisa input {
    width: 100%;
    max-width: 400px; 
    padding: 15px 20px;
    border-radius: 30px; 
    border: none;
    outline: none; 
    font-size: 16px;
    margin-bottom: 20px;
    background-color: white; 
    color: #2b2b2b;
}

.filtros {
    display: flex;
    justify-content: center;
    gap: 15px; 
    flex-wrap: wrap; 
}

.btn-filtro {
    background-color: transparent;
    color: white;
    border: 2px solid var(--cor-marca);
    padding: 8px 20px;
    border-radius: 30px; 
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filtro:hover {
    background-color: rgba(6, 182, 212, 0.2); 
}

.btn-filtro.ativo {
    background-color: var(--cor-marca); 
    color: white;
}

/* --- GRADE DE PROJETOS E BOTÃO DE CARREGAR MAIS --- */
.grade-projetos {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px; 
    padding: 20px; 
    max-width: 1000px; 
    margin: 0 auto; 
}

.area-carregar-mais {
    text-align: center;
    margin: 20px 0 50px 0;
    width: 100%;
}

.btn-carregar {
    background-color: var(--bg-topo-cartao);
    color: var(--cor-titulo);
    border: 1px solid var(--cor-borda);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-carregar:hover {
    border-color: var(--cor-marca);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
}

/* --- ESTILOS DO CARTÃO --- */
.cartao {
    background-color: var(--bg-topo-cartao);
    border-radius: 12px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    overflow: hidden; 
    text-align: left; 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, background-color 0.4s ease;
    position: relative;
    z-index: 1; 
}

.cartao:hover {
    transform: translateY(-12px); 
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.2); 
    z-index: 2; 
}

.cartao img, .cartao video {
    width: 100%; 
    height: auto;
    transition: transform 0.6s ease;
}

.cartao:hover video {
    transform: scale(1.08); 
}

.etiqueta-gratis {
    color: #10b981; 
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 15px 0 0 15px; 
}

.etiqueta-gratis::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); 
}

.cartao h3 {
    margin: 10px 15px 5px 15px;
}

.cartao p {
    margin: 0 15px 20px 15px;
    font-size: 14px;
}

.botao-baixar {
    display: block;
    background-color: var(--cor-marca); 
    color: white;
    text-align: center;
    text-decoration: none; 
    padding: 12px;
    font-weight: bold;
}

.botao-baixar:hover {
    background-color: var(--cor-marca-hover); 
}

/* --- PÁGINA DE DETALHES DO PROJETO --- */
.container-projeto {
    max-width: 800px; 
    margin: 40px auto; 
    background-color: var(--bg-topo-cartao);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: left;
    transition: background-color 0.4s ease;
}

.link-voltar {
    text-decoration: none;
    color: var(--cor-texto);
    font-size: 14px;
}

.link-voltar:hover {
    color: var(--cor-marca);
}

.titulo-projeto {
    color: var(--cor-titulo);
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-gratis {
    color: #10b981;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-gratis::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); 
}

.imagem-destaque {
    width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}

.estatisticas {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.box-estatistica {
    flex: 1; 
    border: 1px solid var(--cor-borda);
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.box-estatistica strong {
    font-size: 18px;
    color: var(--cor-titulo);
}

.box-estatistica span {
    font-size: 12px;
    color: var(--cor-texto);
    text-transform: uppercase;
    margin-top: 5px;
}

.btn-principal {
    display: block;
    text-decoration: none;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    transition: 0.3s;
    background-color: var(--cor-marca);
    color: white;
}

.btn-principal:hover { 
    background-color: var(--cor-marca-hover); 
}

/* --- ANIMAÇÃO DE CLIQUE NOS LIKES --- */
.btn-interativo {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    user-select: none;
}

.btn-interativo:hover {
    transform: scale(1.05);
    border-color: var(--cor-marca); 
}

/* --- ADAPTAÇÃO PARA CELULAR --- */
@media (max-width: 768px) {
    .topo-site {
        flex-direction: column; 
        padding: 10px 20px;
        gap: 10px;
    }
    .controles-topo {
        position: static; 
        justify-content: center;
    }
    .logo-secundaria {
        top: 10px; 
        height: 35px; 
    }
    .imagem-logo {
        height: 45px; 
    }
    .filtros {
        gap: 10px; 
    }
    .btn-filtro {
        padding: 6px 15px; 
        font-size: 12px;
    }
}