/* ==========================================================================
   TERMOS.HTML - Termos de Uso e Políticas de Privacidade
   ========================================================================== */

body {
    background-color: #ffffff !important; /* Força o fundo a ser inteiramente branco */
}

/* --- CABEÇALHO DA PÁGINA (Page Header) --- */
/* Mantém o padrão exato do visao-missao.html, garantindo o texto branco e contrastado */
.page-header {
    background: linear-gradient(rgba(0, 51, 102, 0.85), rgba(0, 34, 68, 0.95)), url('../img/page-header.jpg') center center no-repeat;
    background-size: cover;
    background-color: #003366; 
    padding: 40px 0 !important; 
    margin-bottom: 30px !important; /* Alinhamento preciso e eliminação de vãos em branco */
    border-bottom: 4px solid #ffcc00; 
}

/* Texto perfeitamente contrastado no cabeçalho */
.page-header h1, 
.page-header h3 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
}

.page-header a {
    color: rgba(255, 255, 255, 0.75) !important;
    transition: color 0.2s ease;
}

.page-header a:hover {
    color: #ffffff !important;
    text-decoration: none;
}

/* --- BLOCO DE CONTEÚDO LEGAL (Isolado do Cabeçalho) --- */
.legal-container {
    max-width: 800px; /* Limita a largura para tornar a leitura de textos longos confortável */
    margin: 50px auto 80px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

/* Títulos das Grandes Secções (Privacidade, Termos, FAQs) */
.legal-container h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b !important; /* Mesma cor .section-title do original (Cinza-Grafite) */
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
}

/* Remove a margem superior caso seja o primeiríssimo título do bloco */
.legal-container h2:first-of-type,
.legal-container section:first-of-type h2 {
    margin-top: 0 !important;
}

/* Numerações, Subcláusulas e Perguntas das FAQs */
.legal-container h4,
.legal-container h5,
.legal-container strong {
    color: #0f172a !important; /* Mesma cor .section-title-card (Preto/Cinza Profundo) */
    font-weight: 600;
}

/* Parágrafos de texto corrido internos */
.legal-container p {
    color: #475569 !important; /* Mesma cor .lead-text (Cinza-carvão) */
    line-height: 1.75;
    font-size: 0.95rem;
    margin-bottom: 20px;
    text-align: justify;
}

/* Listas de itens ou tópicos de suporte */
.legal-container ul {
    margin-bottom: 25px;
    padding-left: 20px;
}

.legal-container li {
    color: #475569 !important;
    line-height: 1.75;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

/* Links no corpo do texto (ex: emails de contacto) */
.legal-container a {
    color: #003366 !important; /* Tom azul corporativo do CDL */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.legal-container a:hover {
    color: #002244 !important;
    text-decoration: underline !important;
}

/* Data de última atualização no topo */
.legal-date {
    font-size: 0.85rem;
    color: #94a3b8 !important;
    margin-bottom: 30px;
    display: block;
    font-style: italic;
}

/* --- BOTÃO FLUTUANTE "VOLTAR AO TOPO" --- */
#backToTop,
.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #003366 !important;
    border: none;
    transition: all 0.3s ease;
}

#backToTop:hover,
.back-to-top:hover {
    background-color: #002244 !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* --- RESPONSIVIDADE PORTÁTIL --- */
@media (max-width: 768px) {
    .legal-container {
        margin: 30px 15px 60px 15px;
        padding: 25px 20px;
    }
    .legal-container h2 {
        font-size: 1.4rem;
    }
}