/* Configurações Globais */
:root {
    --primary-color: #5d9cec; /* Azul Bebé */
    --secondary-color: #ff9f43; /* Laranja Suave */
    --text-color: #333;
    --light-bg: #f4f7f6;
    --dark-bg: #fff;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-bg);
    /* CHAVE: REMOVIDO o scroll-padding-top. A âncora invisível fará o ajuste. */
}

/* NOVO ESTILO: Para criar o espaço para o cabeçalho fixo */
.section-anchor {
    display: block;
    /* Move a âncora para uma posição onde o topo do header a cobriria */
    position: relative;
    /* Desktop: Valor negativo suficiente para compensar o cabeçalho (aprox. 160px) */
    top: -160px;
    /* Altura zero para não ocupar espaço na disposição */
    height: 0;
    visibility: hidden; /* Torna-o invisível */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Tipografia */
h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

h2 {
    font-size: 2.5em;
}

h3 {
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 40px;
}

p {
    margin-bottom: 20px;
}

/* Cabeçalho (Header) */
header {
    background-color: var(--dark-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* CHAVE: Garante que os dois blocos (header-info e nav) fiquem lado a lado */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

header h1 {
    color: var(--text-color);
    font-size: 1.5em;
    margin: 0;
    /* CHAVE: Garante que o Logotipo e o Nome ficam na mesma linha */
    display: flex;
    align-items: center;
}

/* NOVO ESTILO: Bloco que agrupa Logo, Nome e Credenciais, empilhando-os verticalmente */
.header-info {
    display: flex;
    flex-direction: column; /* Coloca o H1 em cima das Credenciais */
    align-items: flex-start; /* Alinha todo o bloco à esquerda */
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    padding: 10px 15px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Botão CTA (Call to Action) */
.btn-cta {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s;
    border: none; /* Para usar em <button> */
    cursor: pointer;
}

.btn-cta:hover {
    background-color: #4578b9;
}

/* Seção Hero */
.hero {
    background: var(--light-bg);
    text-align: center;
    /* REINTRODUZIDO o padding superior */
    padding: 30px 0 100px 0;
    border-bottom: 5px solid var(--primary-color);
}

.hero h2 {
    color: var(--text-color);
    font-size: 3em;
    margin-bottom: 0px;
}

/* OTIMIZADO: Reduz a margem superior e inferior do primeiro parágrafo logo após o H2. */
.hero > .container > p:first-of-type {
    margin-top: 5px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #666;
}

/* NOVO ESTILO: Para a informação de localização no Hero */
.location-info {
    font-size: 1.1em;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 40px;
    text-shadow: 0 0 1px rgba(0,0,0,0.05);
}

/* Seções de Conteúdo */
.content-section {
    padding: 80px 0;
}

.light-bg {
    background-color: var(--light-bg);
}

.content-section p {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid de Benefícios */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: center;
    margin-top: 20px;
}

.card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-top: 3px solid var(--secondary-color);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h4 {
    color: var(--primary-color);
    font-size: 1.3em;
}

.card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.card ul li {
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

.card ul li:last-child {
    border-bottom: none;
}

/* Formulário de Contato */
#contacto form {
    max-width: 500px;
    margin: 0 auto 30px auto;
    display: flex;
    flex-direction: column;
    padding: 30px;
    background-color: var(--dark-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

#contacto label {
    margin-bottom: 5px;
    font-weight: 600;
}

#contacto input, #contacto textarea {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 1em;
}

#contacto textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-info {
    text-align: center;
    font-size: 1.1em;
}

/* Rodapé (Footer) */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
}

footer p {
    margin: 0;
}

/* Media Queries (Responsividade) */
@media (max-width: 768px) {
    /* CHAVE: REMOVIDO o scroll-padding-top aqui */
   
    /* NOVO AJUSTE MOBILE: O cabeçalho é mais compacto. */
    .section-anchor {
        top: -130px; /* Ajusta o valor negativo para a altura do header mobile */
    }

    header .container {
        flex-direction: column;
        text-align: center;
        padding: 10px 0;
    }

    nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li a {
        padding: 5px 10px;
    }

    .hero {
        padding: 5px 0; /* Último ajuste para aproximar ao máximo no mobile */
    }

    .hero h2 {
        font-size: 2em;
    }
}

/* Estilo para a imagem na secção Hero */
.hero-image {
    margin-top: 40px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Ajuste para responsividade da imagem */
@media (max-width: 768px) {
    .hero-image {
        margin-top: 30px;
        margin-bottom: 30px;
        max-width: 90%;
    }
}

/* Estilo para o Logotipo no Header */
.logo {
    height: 70px;
    vertical-align: middle;
    margin-right: 10px;
}

/* Ajustes para ecrãs mais pequenos, se necessário */
@media (max-width: 768px) {
    .logo {
        height: 45px;
        margin-right: 5px;
    }

    header h1 {
        font-size: 1.3em;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* O logotipo e as credenciais */
    .header-info {
        align-items: center;
        text-align: center;
        margin-bottom: 5px;
    }
}

/* Estilo para as credenciais no cabeçalho */
.credentials p {
    font-size: 0.8em;
    color: #666;
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: 400;
    text-align: left;
}

/* Media Queries (Responsividade) */
@media (max-width: 768px) {
    /* As credenciais (os números) */
    .credentials p {
        text-align: center;
        font-size: 0.7em;
        margin-top: 0;
        margin-bottom: 5px;
        line-height: 1.2;
    }

    /* A Navegação (Início, Especialidade, etc.) */
    nav ul {
        margin-top: 5px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

 