/* PROJETO: CDA LISTA 
   DESENVOLVEDOR: Márcio Oliveira (RAZGO)
   TEMA: Full Black & Grid 4 Colunas (Janelas Corrigidas)
*/

/* --- 1. RESET E CONFIGURAÇÕES GERAIS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    overflow-x: hidden;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- 2. CABEÇALHO --- */
header {
    background: #ffffff;
    padding: 20px 0;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #ddd;
}

.logo-cabecalho {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
}

header h1 {
    font-size: 1.8rem;
    color: #1e40af;
    margin-bottom: 5px;
}

.btn-menu-app {
    display: none;
    position: absolute;
    left: 20px;
    top: 30px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}

/* --- 3. MENU DE CATEGORIAS (BLACK) --- */
#sideMenu {
    background: #000000;
    width: 100%;
    z-index: 1100;
}

.side-menu-header { display: none; }

.side-menu-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 15px 10%;
    flex-wrap: wrap;
    background: #000000;
}

.menu-btn {
    padding: 10px 20px;
    border: 1px solid #333;
    background: #111;
    color: #ffffff;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s ease;
}

.menu-btn:hover {
    background: #1e40af;
    border-color: #1e40af;
}

/* --- 4. BUSCA --- */
.busca-wrapper { padding: 25px 20px; display: flex; justify-content: center; }
.busca-container {
    background: #fff; padding: 12px 25px; border-radius: 30px;
    display: flex; align-items: center; width: 100%; max-width: 550px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
#inputBusca { border: none; outline: none; width: 100%; margin-left: 12px; font-size: 1.1rem; }

/* --- 5. GRID DE EMPRESAS (4 COLUNAS) --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 20px 10%;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
}

.card-empresa {
    background: #ffffff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: 0.3s ease;
    cursor: pointer; border: 1px solid #eee;
}
.card-empresa:hover { transform: translateY(-8px); }
.card-img-container img { width: 100%; height: 170px; object-fit: cover; }
.card-info { padding: 15px; text-align: center; }

/* --- 6. BOTÃO WHATSAPP FLUTUANTE (TRAVADO EM 65PX) --- */
.btn-zap-flutuante { 
    position: fixed; bottom: 30px; right: 30px; 
    width: 65px; height: 65px; z-index: 1000; 
    display: block; /* Garante que o link ocupe o espaço */
}
.btn-zap-flutuante img { 
    width: 100%; height: 100%; 
    display: block; /* Remove espaços brancos abaixo da imagem */
}

/* --- 7. MODAL (JANELA DE DADOS - A CORREÇÃO ESTÁ AQUI) --- */
.modal-overlay {
    display: none; /* JS controla isso */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 2500;
    
    /* Centraliza o modal perfeitamente na tela */
    justify-content: center;
    align-items: center;
    padding: 20px; /* Margem de segurança para mobile */
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    width: 100%; /* Ocupa a largura do padding */
    max-width: 420px; /* NUNCA MAIS GIGANTE, LARGURA MÁXIMA CONTROLADA */
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden; /* Garante que nada transborde */
}

.modal-logo {
    width: 100px;
    height: 100px;
    object-fit: contain; /* Mantém a logo na proporção certa */
    margin-bottom: 20px;
    border-radius: 10px;
}

.btn-zap { display: block; background: #25d366; color: #fff; padding: 15px; border-radius: 12px; text-decoration: none; font-weight: bold; margin-top: 20px; }

/* --- 8. RODAPÉ (BLACK) --- */
footer {
    background: #000000; color: #ffffff; padding: 40px 20px; text-align: center; margin-top: 50px;
}
.footer-dev a { color: #3b82f6; text-decoration: none; font-weight: bold; }

/* --- 9. RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 768px) {
    #sideMenu { position: fixed; top: 0; left: -300px; width: 280px; height: 100%; transition: 0.4s; padding: 25px; }
    .side-menu-header { display: flex; justify-content: space-between; color: #fff; margin-bottom: 30px; }
    .side-menu-nav { flex-direction: column; align-items: flex-start; padding: 0; }
    .menu-btn { width: 100%; background: #1a1a1a; }
    .btn-menu-app { display: block; }
    .grid-container { grid-template-columns: repeat(2, 1fr); padding: 15px; gap: 15px; }
    
    /* Ajustes específicos para o Modal no mobile */
    .modal-content { padding: 20px; max-width: 350px; }
    .modal-logo { width: 80px; height: 80px; }
}
@media (max-width: 480px) { .grid-container { grid-template-columns: 1fr; } }