/* Estilos para a Landing Page */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

section {
    padding: 60px 0;
}

.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

/* ========================================= */
/* === ESTILOS DO CERTIFICADO ============== */
/* ========================================= */

#certificate-to-print {
    border: 10px solid #004085; /* Borda sólida e azul escura */
    background-color: #f8f9fa; /* Fundo levemente acinzentado */
    padding: 2rem;
    font-family: 'Times New Roman', serif; /* Fonte mais clássica para certificados */
    position: relative;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.certificate-header {
    text-align: center;
    margin-bottom: 2rem;
}

.certificate-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #004085;
}

.certificate-header p {
    font-size: 1.2rem;
    color: #6c757d;
    letter-spacing: 1px;
}

.certificate-body {
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 3rem 0;
}

.certificate-body strong {
    color: #0d6efd; /* Destaque em azul para nomes */
}

.certificate-signatures {
    margin-top: 4rem;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.signature-block {
    width: 40%;
}

.signature-line {
    border-bottom: 1px solid #333;
    margin-bottom: 0.5rem;
}

.signature-block .title {
    font-weight: bold;
}

.signature-block .subtitle {
    font-size: 0.9rem;
    color: #6c757d;
}

.certificate-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.program-content {
    margin-top: 2rem;
    text-align: left;
    font-size: 1rem;
}

.program-content ul {
    list-style-type: disc;
    padding-left: 20px;
}

.certificate-subtitle {
    font-size: 1rem;
    color: #6c757d;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

/* Estilos Globais e Landing Page */
:root {
    --bs-primary-rgb: 13, 110, 253; /* Mantendo o azul padrão do Bootstrap como primário */
}

html {
    scroll-behavior: smooth;
}

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    padding: 80px 0;
}

section {
    padding: 60px 0;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

/* Footer */
footer a:hover {
    text-decoration: underline !important;
}


/* Banner de Cookies */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #212529; /* bg-dark */
    color: white;
    padding: 15px;
    z-index: 1050;
    text-align: center;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
}

.cookie-banner p {
    margin: 0;
    display: inline;
    margin-right: 15px;
}

.cookie-banner a {
    color: #0d6efd; /* Azul primário */
    text-decoration: underline;
}

/* ========================================= */
/* === ESTILOS DO CERTIFICADO ============== */
/* ========================================= */
#certificate-to-print {
    border: 10px solid #004085;
    background-color: #f8f9fa;
    padding: 2rem;
    font-family: 'Times New Roman', serif;
    position: relative;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}
.certificate-header { text-align: center; margin-bottom: 2rem; }
.certificate-header h1 { font-size: 2.5rem; font-weight: bold; color: #004085; }
.certificate-header p { font-size: 1.2rem; color: #6c757d; letter-spacing: 1px; }
.certificate-body { text-align: center; font-size: 1.2rem; line-height: 1.8; margin: 3rem 0; }
.certificate-body strong { color: #0d6efd; }
.certificate-signatures { margin-top: 4rem; display: flex; justify-content: space-around; text-align: center; }
.signature-block { width: 40%; }
.signature-line { border-bottom: 1px solid #333; margin-bottom: 0.5rem; }
.signature-block .title { font-weight: bold; }
.signature-block .subtitle { font-size: 0.9rem; color: #6c757d; }
.certificate-footer { text-align: center; margin-top: 2rem; font-size: 0.8rem; color: #6c757d; }
.program-content { margin-top: 2rem; text-align: left; font-size: 1rem; }
.program-content ul { list-style-type: disc; padding-left: 20px; }
.certificate-subtitle { font-size: 1rem; color: #6c757d; margin-top: -1rem; margin-bottom: 1.5rem; }

/* Estilos para Páginas de Conteúdo (Políticas, etc.) */
.content-page-header {
    background-color: #f8f9fa; /* bg-light */
    padding: 4rem 0;
}

.content-page-section {
    padding: 60px 0;
}
.content-page-section h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Adicionar ao final do style.css */

/* Estilos para listas nas páginas de conteúdo */
.content-page-section ul {
    list-style: none;
    padding-left: 0;
}
.content-page-section ul li {
    padding-left: 1.8rem;
    position: relative;
    margin-bottom: 0.75rem;
}
.content-page-section ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--bs-primary);
    font-weight: bold;
    font-size: 1.2rem;
    top: -2px;
}

/* CSS para a nova área de importação estilo planilha */

/* O container principal que vai segurar a tabela e a área de texto */
.spreadsheet-paste-area {
    position: relative; /* Essencial para o posicionamento do textarea */
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden; /* Garante que as bordas fiquem arredondadas */
    background-color: #fff;
}

/* A área de texto real, que ficará invisível por cima da tabela */
.spreadsheet-paste-area textarea {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Totalmente transparente */
    cursor: cell; /* Mostra um cursor de célula, melhorando a UX */
    border: none;
    resize: none; /* Impede que o usuário redimensione */
}

/* A tabela que será visível para o usuário */
.spreadsheet-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Garante que as colunas tenham larguras iguais */
}

/* Estilo das células da tabela */
.spreadsheet-table td {
    border: 1px solid #e9ecef;
    padding: 0.5rem;
    white-space: nowrap; /* Impede que o texto quebre a linha */
    overflow: hidden;
    text-overflow: ellipsis; /* Adiciona "..." se o texto for muito longo */
    height: 38px; /* Altura fixa para cada linha */
}

/* Estilo para a mensagem de placeholder quando a tabela está vazia */
.spreadsheet-table .placeholder-cell {
    color: #6c757d;
    text-align: center;
    font-style: italic;
    background-color: #f8f9fa;
}

/* ========================================= */
/* === ESTILOS DE IMPRESSÃO GERAIS ========= */
/* ========================================= */

@media print {
    @page {
        size: auto;  /* Permite ao usuário escolher Retrato ou Paisagem na hora de imprimir */
        margin: 0.5cm;
    }

    /* 1. LIMPEZA GERAL: Esconde elementos da interface */
    .no-print, 
    .navbar, 
    #sidebar, 
    .btn, 
    .nav-tabs, 
    .modal,
    footer,
    .cookie-banner {
        display: none !important;
    }

    /* Reseta estilos para usar a folha toda */
    body, html, .container-fluid, .container, .paper-container, #main-content {
        background-color: white !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        overflow: visible !important;
    }

    /* Força impressão de cores de fundo e bordas exatas */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* ================================================== */
    /* === CORREÇÃO DO GRID DO BOOTSTRAP (DASHBOARD) ==== */
    /* ================================================== */
    /* Isso faz os gráficos ficarem lado a lado em vez de um embaixo do outro */
    
    .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    /* Força as larguras das colunas na impressão */
    .col-md-3, .col-3 {
        width: 25% !important;
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
    
    .col-md-4, .col-4 {
        width: 33.3333% !important;
        flex: 0 0 33.3333% !important;
        max-width: 33.3333% !important;
    }
    
    .col-md-6, .col-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .col-md-8, .col-8 {
        width: 66.6666% !important;
        flex: 0 0 66.6666% !important;
        max-width: 66.6666% !important;
    }

    /* Ajustes para Gráficos (Chart.js) e Cards */
    canvas {
        max-width: 100% !important;
        max-height: 100% !important;
    }

    .card {
        border: 1px solid #ddd !important;
        break-inside: avoid;      /* Tenta não quebrar o card no meio da página */
        page-break-inside: avoid; /* Compatibilidade */
        box-shadow: none !important;
        margin-bottom: 15px !important;
    }

    .card-header {
        background-color: #f0f0f0 !important;
        border-bottom: 1px solid #ccc !important;
        color: #000 !important;
    }

    /* Exibe o cabeçalho da empresa no relatório do Dashboard */
    .d-print-block {
        display: block !important;
    }

    /* ================================================== */
    /* === ESTILOS DO FORMULÁRIO DE AVALIAÇÃO =========== */
    /* ================================================== */

    /* Cabeçalho do Formulário */
    .form-header {
        display: block !important;
        visibility: visible !important;
        border: 2px solid #000 !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
    }

    .company-title {
        font-size: 22px !important;
        font-weight: bold !important;
        color: #000 !important;
        text-align: center !important;
        margin-bottom: 5px !important;
        display: block !important;
    }

    .company-cnpj {
        font-size: 14px !important;
        color: #000 !important;
        text-align: center !important;
        margin-bottom: 10px !important;
        display: block !important;
    }

    /* Tabelas de Avaliação */
    .eval-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 11px !important;
    }

    .eval-table th {
        background-color: #ddd !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        text-align: center !important;
        white-space: nowrap;
    }

    .eval-table td {
        border: 1px solid #000 !important;
        padding: 5px !important;
    }

    .factor-col {
        width: 30% !important; 
        font-weight: bold !important;
    }

    .grade-col {
        width: 14% !important;
        text-align: center !important;
    }

    /* Inputs Radio (Bolinhas personalizadas para impressão nítida) */
    input[type="radio"] {
        appearance: none;
        -webkit-appearance: none;
        width: 14px;
        height: 14px;
        border: 1px solid #000;
        border-radius: 50%;
        display: inline-block;
        vertical-align: middle;
    }

    input[type="radio"]:checked {
        background-color: #000;
        border: 1px solid #000;
        box-shadow: inset 0 0 0 2px #fff; /* Cria um efeito de anel */
    }
    
    /* Inputs de Texto e Textarea (Parecer texto puro) */
    input[type="text"], textarea {
        border: none !important;
        border-bottom: 1px solid #ccc !important;
        width: 100%;
        font-family: inherit;
        color: #000 !important;
        resize: none;
        background: transparent !important;
    }

    /* Assinaturas */
    .signature-line {
        border-top: 1px solid #000 !important;
        margin-top: 40px !important;
        padding-top: 5px !important;
        color: #000 !important;
    }
}

/* Efeito de destaque para quando a prova for liberada */
.prova-liberada {
    background-color: #fff3cd !important; /* Amarelo suave */
    border: 2px solid #ffc107 !important;
    animation: pulse-yellow 2s infinite;
    font-weight: bold;
}

@keyframes pulse-yellow {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

.btn-xs {
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
}