/* Configurações Globais */
:root {
    --primary-color: #005A9C; 
    --secondary-color: #FDB813;
    --text-color: #333;
    --header-bg: rgba(255, 255, 255, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

body {
    color: var(--text-color);
    overflow-x: hidden;
    background-color: #f0f0f0; /* Fundo padrão neutro */
}

/* Fundo Fixo com Opacidade (Aparece após a intro) */
#fixed-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.15; /* Opacidade sutil para leitura */
    z-index: -1;
    display: none; 
}

/* Tela de Abertura */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 1.5s ease-out;
}

#book-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none; 
}

/* Container para o Logo e Frase de Clique */
#click-prompt-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    height: 80%;
    background-image: url('img/logo-inicio.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    animation: pulse 2s infinite;
}

#click-prompt {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    padding: 20px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 10px;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Cabeçalho */
#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--header-bg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 1.5s ease-in;
}

.logo-container img {
    height: 60px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
}

/* Player Flutuante */
#floating-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 250px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 900;
    opacity: 0;
    transition: opacity 1.5s ease-in;
}

#floating-player video {
    width: 100%;
    display: block;
}

/* Efeito de Letras Infantis (Fonte Balão) */
.palavra-animada {
    font-family: 'Chewy', cursive;
    font-size: 1.3em;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.15);
    display: inline-block;
}

.palavra-animada span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.palavra-animada span:hover {
    transform: translateY(-5px) scale(1.1);
}

/* Seções e Layout */
#main-content {
    margin-top: 120px;
    padding: 20px;
    padding-right: 290px; /* ALERTA DE MUDANÇA: Recuo para não sobrepor o vídeo */
    display: none;
}

section {
    min-height: 70vh;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Grid para Equipe e Liderança */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.team-member {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.4s ease;
}

.team-member:hover {
    transform: translateY(-10px);
}

/* ALERTA DE MUDANÇA: Novo estilo para Fotos em Retrato */
.image-wrapper {
    position: relative;
    width: 180px;
    height: 250px; /* Alterado de 180px para 250px (Retrato) */
    margin: 0 auto 20px;
    border-radius: 15px; /* Deixou de ser círculo 50% para ter cantos arredondados */
    border: 5px solid var(--secondary-color);
    overflow: hidden; 
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.6s ease-in-out; 
}

.foto-uniforme {
    opacity: 0; 
}

.team-member:hover .foto-normal {
    opacity: 0;
}

.team-member:hover .foto-uniforme {
    opacity: 1;
}

/* Botões */
.btn-primary, .btn-secondary {
    padding: 15px 35px;
    border: none;
    border-radius: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
    display: inline-block;
    margin: 15px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-secondary {
    background-color: var(--primary-color);
    color: white;
}

/* Animações de Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVIDADE (Telas menores e celulares) */
@media (max-width: 900px) {
    #main-content {
        padding-right: 20px; /* Restaura o recuo no celular */
        padding-bottom: 250px; /* Adiciona espaço no final da página para o vídeo não cobrir o rodapé */
    }
    #floating-player {
        width: 130px; /* Diminui o vídeo no celular para não roubar a tela inteira */
    }
    nav ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* =========================================
   PÁGINA DE INSCRIÇÃO E MEMBROS ESPALHADOS
   ========================================= */

.pagina-inscricao {
    position: relative;
    overflow-x: hidden;
}

.container-inscricao {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    position: relative;
    z-index: 10; 
}

/* Informações do Clube */
.info-clube {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.box-informacoes {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 20px;
    border-radius: 15px;
    margin-top: 25px;
    text-align: left;
}

.box-informacoes h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Formulário */
.formulario-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.formulario-box h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
}

.formulario-box p {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

.form-inscricao {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-color);
}

.input-group input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Os Membros Espalhados */
.membro-animado {
    position: absolute;
    z-index: 5;
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: flutuar 4s ease-in-out infinite;
}

.membro-animado img {
    width: 100px; /* Largura fixa */
    height: 100px; /* Altura fixa (igual à largura para ficar quadrado) */
    object-fit: cover; /* Recorta a foto sem amassar o rosto */
    border-radius: 50%; /* Transforma o quadrado em círculo perfeito */
    border: 4px solid var(--secondary-color); /* Borda amarela */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.membro-animado:hover {
    transform: scale(1.1);
    animation-play-state: paused;
}

/* O balão indicando o Cargo (Tooltip) */
.cargo-tooltip {
    position: absolute;
    bottom: 100%; /* Coloca acima da imagem */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    pointer-events: none;
}

/* Setinha do balão */
.cargo-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
}

/* Mostra o balão no Hover */
.membro-animado:hover .cargo-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* Animação de flutuação para dar vida aos membros soltos na tela */
@keyframes flutuar {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Oculta os membros espalhados em telas muito pequenas para não atrapalhar o form */
@media (max-width: 1100px) {
    .membro-animado {
        display: none;
    }
}

/* =========================================
   PÁGINA DO JOGO DA MEMÓRIA
   ========================================= */

.pagina-jogo {
    position: relative;
    overflow-x: hidden;
}

.container-jogo {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.info-jogo {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Tabuleiro */
.memory-game {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 colunas */
    gap: 15px;
    perspective: 1000px; /* Dá o efeito 3D ao virar a carta */
    max-width: 500px;
    margin: 0 auto;
}

/* Cartas */
.memory-card {
    width: 100%;
    aspect-ratio: 1 / 1; /* Mantém quadrada */
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
    cursor: pointer;
}

.memory-card:active {
    transform: scale(0.95);
    transition: transform 0.2s;
}

.memory-card.flip {
    transform: rotateY(180deg);
}

/* Correção do Layout das Cartas (Imagem + Cargo) */
.front-face, .back-face {
    width: 100%;
    height: 100%;
    position: absolute;
    border-radius: 15px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column; /* Coloca a imagem em cima e o texto embaixo */
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.front-face {
    background-color: white;
    transform: rotateY(180deg);
    border: 4px solid var(--primary-color);
    padding: 5px;
}

.back-face {
    background-color: var(--secondary-color);
    color: white;
    font-size: 3rem;
    border: 4px solid #fff;
}

/* Centralizando e ajustando o tamanho do Jogo para caber no quadro branco */
.memory-game {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px;
    perspective: 1000px; 
    max-width: 550px;
    margin: 30px auto 0 auto; /* Empurra um pouco para baixo do texto e centraliza */
}