/* ======== 1. CONFIGURAÇÕES GLOBAIS E VARIÁVEIS ======== */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Montserrat:wght@300;400;600&display=swap');

:root {
    --primary-color: #5d7b6f;   /* Verde Sálvia */
    --secondary-color: #b9aA9c; /* Bege/Terra */
    --light-color: #ffffff; 
    --bg-light: #f8f9fa; 
    --text-color: #333333; 
    --text-light: #555555; 
    
    --font-heading: 'Merriweather', serif;
    --font-body: 'Montserrat', sans-serif;

    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.1);
    
    --header-height: 70px; /* Variável para altura do header */
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--light-color);
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

main {
    flex-grow: 1; 
    /* Adiciona padding no topo para compensar o header fixo */
    padding-top: var(--header-height);
}

/* ======== 2. CLASSES UTILITÁRIAS (Container, Botões) ======== */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px; /* Padding lateral global */
}

.section {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.bg-light {
    background-color: var(--bg-light);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--light-color); 
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* ======== 3. HEADER (CABEÇALHO - GLOBAL) ======== */

header {
    background-color: var(--light-color);
    width: 100%;
    /* ATUALIZADO: position: sticky; para o menu ficar fixo */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    height: var(--header-height);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    z-index: 1001; /* Para ficar acima do menu mobile */
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

.nav-menu li a:hover::after {
    width: 100%;
}

.nav-menu li a.active {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu li a.active::after {
    width: 100%;
}


/* ======== 4. SEÇÃO HOME (HERO) - Apenas index.html ======== */

.hero {
    /* O main já tem padding-top, então podemos descontar */
    height: calc(90vh - var(--header-height)); 
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-color);
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://img.cancaonova.com/cnimages/canais/uploads/sites/6/2024/08/formacao_1920x1080_1816512208-600x338.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efeito Parallax para PC */
}

.hero-content {
    max-width: 700px;
    /* Adiciona padding para garantir que não cole na borda em telas menores */
    padding: 0 20px; 
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 30px;
}

/* ======== 5. SEÇÃO SOBRE (Layout de 2 colunas) ======== */

.sobre-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.sobre-img {
    flex: 1;
}

.sobre-img img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.sobre-texto {
    flex: 1.2;
    font-size: 1.05rem;
}

.sobre-texto p {
    margin-bottom: 15px;
}

/* ======== 6. CARTÕES (Terapias e Equipe) ======== */
/* ... (Nenhuma mudança nesta seção) ... */
.card { background-color: var(--light-color); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-content { padding: 25px; }
.card-content h3 { font-family: var(--font-heading); font-size: 1.4rem; color: var(--primary-color); margin-bottom: 10px; }
.card-profile { background-color: var(--light-color); border-radius: 10px; box-shadow: var(--shadow); padding: 30px; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card-profile:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.profile-img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; border: 4px solid var(--bg-light); }
.card-profile h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--primary-color); }
.profile-title { font-size: 0.9rem; font-weight: 600; color: var(--secondary-color); margin-bottom: 10px; }


/* ======== 7. SEÇÃO CONTATO (Formulário e Info) ======== */
/* ... (Nenhuma mudança nesta seção) ... */
.contato-wrapper { display: flex; gap: 40px; }
.contato-form { flex: 2; }
.contato-info { flex: 1; }
form label { display: block; margin-bottom: 5px; font-weight: 600; }
form input, form textarea { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 5px; font-family: var(--font-body); font-size: 1rem; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
form input:focus, form textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 5px rgba(93, 123, 111, 0.3); }
.contato-info h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--primary-color); margin-bottom: 15px; }
.contato-info p { margin-bottom: 20px; }
.contato-info ul { list-style: none; line-height: 2; }
.contato-info ul li { color: var(--text-light); }
.mapa { margin-top: 20px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }


/* ======== 8. RODAPÉ (GLOBAL) ======== */
/* ... (Nenhuma mudança nesta seção) ... */
footer { background-color: var(--primary-color); color: var(--bg-light); text-align: center; padding: 30px 0; width: 100%; margin-top: auto; }
footer p { font-size: 0.9rem; }


/* ======== 9. ANIMAÇÕES ======== */
/* ... (Nenhuma mudança nesta seção) ... */
@keyframes fadeIn-Up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn-Left { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn-Right { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
.animate-fade-in-up { animation: fadeIn-Up 0.8s ease-out forwards; }
.animate-fade-in-left { animation: fadeIn-Left 0.8s ease-out forwards; }
.animate-fade-in-right { animation: fadeIn-Right 0.8s ease-out forwards; }


/* ======== 10. ESTILOS DE PÁGINA INTERNA ======== */

.page-header {
    padding: 60px 0;
    background-color: var(--bg-light);
    text-align: center;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--primary-color);
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 10px auto 0;
}

/* ATUALIZADO: Garante padding lateral no .content-wrapper */
.content-wrapper {
    max-width: 900px;
    margin: 0 auto; /* Removido margin-top/bottom, será controlado pela .section */
    padding: 0 20px; /* Garante padding lateral */
}

.content-wrapper h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
}
/* O primeiro h2 não precisa de margem no topo */
.content-wrapper h2:first-child {
    margin-top: 0;
}

.content-wrapper p, .content-wrapper li {
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.content-wrapper ul {
    list-style: disc;
    list-style-position: inside;
    padding-left: 10px;
}

.terapia-item {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}
.terapia-item:last-child { border-bottom: none; }
.terapia-img { flex: 1; }
.terapia-img img { width: 100%; height: 250px; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); }
.terapia-desc { flex: 2; }
.terapia-desc h3 { font-family: var(--font-heading); font-size: 1.6rem; color: var(--primary-color); margin-bottom: 10px; }


/* ======== 11. MENU HAMBÚRGUER E RESPONSIVIDADE (MOBILE) ======== */

/* Esconde o checkbox e o botão de fechar por padrão */
.nav-toggle-checkbox {
    display: none;
}

/* Estilo do botão hambúrguer (o 'label') */
.nav-toggle-label {
    display: none; /* Só aparece no mobile */
    cursor: pointer;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1001; /* Para ficar acima do menu */
}

/* As 3 linhas do hambúrguer */
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background-color: var(--primary-color);
    height: 3px;
    width: 100%;
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.nav-toggle-label span {
    top: 13px; /* Posição da linha do meio */
}

.nav-toggle-label span::before {
    content: '';
    top: -10px; /* Posição da linha de cima */
}

.nav-toggle-label span::after {
    content: '';
    top: 10px; /* Posição da linha de baixo */
}

/* Animação do Hambúrguer para "X" (fechar) quando o menu está aberto */
.nav-toggle-checkbox:checked ~ .nav-toggle-label span {
    background-color: transparent; /* Linha do meio some */
}

.nav-toggle-checkbox:checked ~ .nav-toggle-label span::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle-checkbox:checked ~ .nav-toggle-label span::after {
    transform: rotate(-45deg);
    top: 0;
}


/* Media Query para telas de celular (max-width: 768px) */
@media (max-width: 768px) {
    
    /* Reduz o padding das seções no mobile */
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* --- CORREÇÃO DO MENU --- */
    
    /* Mostra o botão hambúrguer */
    .nav-toggle-label {
        display: block;
    }
    
    /* Esconde o menu desktop */
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: var(--header-height); /* Começa abaixo do header */
        left: 0;
        width: 100%;
        background-color: var(--light-color);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        padding: 10px 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu li a {
        display: block; /* Faz o link ocupar o <li> inteiro */
        padding: 15px 20px;
        text-align: center;
        width: 100%;
    }
    
    /* Desativa a linha animada no mobile */
    .nav-menu li a::after {
        display: none;
    }
    
    .nav-menu li a:hover {
        background-color: var(--bg-light);
    }
    
    /* A MÁGICA: Mostra o menu quando o checkbox está marcado */
    .nav-toggle-checkbox:checked ~ .nav-menu {
        display: flex;
    }
    
    
    /* --- CORREÇÃO DO HERO --- */
    
    .hero {
        height: 70vh;
        /* CORREÇÃO: Desativa o parallax 'fixed' no mobile */
        background-attachment: scroll; 
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* --- CORREÇÃO DE LAYOUTS --- */

    /* Coloca os itens em coluna (Sobre, Contato, Terapias) */
    .sobre-content, 
    .contato-wrapper, 
    .terapia-item {
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }
    
    /* Garante que o container dentro do page-header tenha padding */
    .page-header .container {
        padding: 0 20px;
    }
}