/* ==========================================================================
   1. CONFIGURAÇÕES GERAIS
   ========================================================================== */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden; /* Impede o balanço lateral da página toda */
}

/* 2. BACKGROUND */
body {
    background: url('Imagens/pesca_2.jpg') no-repeat center center fixed;
    background-size: cover;
    display: block;
}

/* 3. CONTAINERS */
.container { 
    max-width: 1280px; 
    margin: 60px auto; 
    padding: 20px; 
    position: relative; 
    z-index: 2; 
}

.main-card { 
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(5px);
    border-radius: 20px; 
    padding: 30px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
}

/* ==========================================================================
   4. TABELA E WRAPPER RESPONSIVO (CORRIGIDO)
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* Scroll apenas horizontal se a tabela for larga */
    overflow-y: visible !important; 
    
    /* REMOVIDOS os paddings e margens negativas que causavam a barra dupla */
    padding-top: 0;    
    padding-bottom: 0; 
    margin-top: 0;    
    
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

/* Garante que o body não tenha scroll duplo */
html, body {
    height: auto; 
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   5. COMPONENTES VISUAIS (ZOOM RESTAURADO)
   ========================================================================== */
.sexo-badge { 
    background: #f0f0f0; 
    padding: 5px 12px; 
    border-radius: 50px; 
    font-size: 11px; 
    font-weight: bold; 
    color: #666; 
}

.foto-zoom { 
    width: 50px; /* Aumentei ligeiramente o tamanho base */
    height: 50px; 
    object-fit: cover; 
    border-radius: 6px; 
    border: 1px solid #ddd;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
    margin: 0 auto;
}

/* O EFEITO QUE "SALTA" FORA DA TABELA */
.foto-zoom:hover { 
    transform: scale(5); /* Aumenta 5 vezes */
    z-index: 999999 !important; /* Valor máximo para ficar por cima de tudo */
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    border: 1px solid #fff;
    outline: none;
}

/* ==========================================================================
   6. BOTÕES
   ========================================================================== */
.btn-editar { 
    font-size: 26px; 
    text-decoration: none; 
    display: inline-block; 
    transition: transform 0.2s; 
    cursor: pointer;
}
.btn-editar:hover { transform: scale(1.3); }

.btn-registar { 
    background: #28a745; 
    color: white; 
    padding: 12px 25px; 
    border-radius: 30px; 
    text-decoration: none; 
    float: right; 
    font-weight: bold; 
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* ==========================================================================
   7. MAPAS
   ========================================================================== */
/*#mapaEditar, #mapaNova { 
   /*height: 500px; 
    width: 100%; 
    background: #f0f0f0; 
    border-radius: 15px;
    position: relative;
    margin: 0 auto;
    border: 2px solid #003366;
}
/* O #miniMapa foi removido daqui porque agora é controlado pelo main1.php */

/* Removido o filtro vermelho se quiseres o padrão azul, 
   ou mantido caso precises em alguma parte específica */
.red-marker { 
    filter: hue-rotate(140deg) brightness(90%) saturate(500%); 
}

/* ==========================================================================
   8. AJUSTES ESPECÍFICOS PARA TELEMÓVEL (Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 10px;
    }

    .main-card {
        padding: 15px;
    }

    .btn-registar {
        float: none;
        display: block;
        text-align: center;
        margin-bottom: 20px;
    }

    #miniMapa, #mapaEditar, #mapaNova {
        height: 350px; 
    }

    h2 {
        font-size: 1.4rem;
        text-align: center;
    }
    
    /* Reduz o zoom no mobile para não sair do ecrã */
    .foto-zoom:hover {
        transform: scale(3);
    }
}