/* === Estilos Globais === */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    /* ALTERAÇÃO: Imagem de fundo para o body */
    background-image: url('../imagens/fundo-ferramenta.jpg'); /* Caminho relativo da pasta /css/ para /imagens/ */
    background-size: cover; /* Faz a imagem cobrir toda a área */
    background-position: center center; /* Centraliza a imagem */
    background-repeat: no-repeat; /* Evita que a imagem se repita */
    background-attachment: fixed; /* Mantém a imagem de fundo fixa durante o scroll */
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    padding: 20px;
    flex-grow: 1;
}

h1, h2, h3 {
    color: #2c3e50;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === CABEÇALHO PADRÃO PARA TODAS AS FERRAMENTAS === */
.header-compact {
/*    background-color: #5DADE2;   */
    background-color: #4169E1;
    color: white;
    text-align: center;
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1000;
    /* Adicionando uma leve transparência para integrar melhor com o fundo, se desejado */
    /* background-color: rgba(93, 173, 226, 0.95); */
}

.header-compact-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 960px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.header-logo {
    max-width: 60px;
    height: auto;
}

.header-compact-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.header-compact-text h1 {
    color: white;
    margin: 0;
    font-size: 1.6em;
    line-height: 1.2;
}

.header-compact-text p {
    color: yellow;
    margin: 0;
    font-size: 0.9em;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .header-compact-content {
        flex-direction: column;
        gap: 8px;
    }
    .header-logo {
        max-width: 50px;
    }
    .header-compact-text h1 {
        font-size: 1.4em;
    }
    .header-compact-text p {
        font-size: 0.8em;
    }
}
/* === FIM CABEÇALHO PADRÃO === */


/* === Seção de Boas Vindas (Homepage - index.html da raiz) === */
#welcome-box {
    background-image: linear-gradient(to bottom right, #5dade2, #2e86c1);
    color: #ffffff;
    padding: 5px 10px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    border: none;
}

#welcome-box h2 {
    color: #ffffff;
    font-size: 2.4em;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

#welcome-box p {
    font-size: 1.2em;
    color: #f8f9f9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}


/* === Seções de Categorias (Homepage) === */
.category-section {
    padding: 30px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* Para categorias na homepage, manter o fundo delas, ou torná-las transparentes para ver a imagem do body */
    /* Exemplo: background-color: rgba(255, 240, 246, 0.9); /* Rosa claro com transparência */
}

/* Mantenha os estilos específicos de .category-health, .category-travel etc., ajustando a opacidade se desejar */
.category-health { background-color: #fff0f6; border-left: 5px solid #ff7eb9; }
.category-health h2 { border-bottom-color: #ff7eb9; color: #d63031; }
.category-health h2 .fas { color: #d63031; }

.category-travel { background-color: #ebf5fb; border-left: 5px solid #74b9ff; }
.category-travel h2 { border-bottom-color: #74b9ff; color: #0984e3; }
.category-travel h2 .fas { color: #0984e3; }

.category-work { background-color: #fef9e7; border-left: 5px solid #ffeaa7; }
.category-work h2 { border-bottom-color: #ffeaa7; color: #e17055; }
.category-work h2 .fas { color: #e17055; }

.category-finance { background-color: #e8f5e9; border-left: 5px solid #66bb6a; }
.category-finance h2 { border-bottom-color: #66bb6a; color: #388e3c; }
.category-finance h2 .fas { color: #388e3c; }

.category-other { background-color: #f3e5f5; border-left: 5px solid #ba68c8; }
.category-other h2 { border-bottom-color: #ba68c8; color: #8e44ad; }
.category-other h2 .fas { color: #8e44ad; }


/* Container dos Cards - FLEXBOX */
#cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}


/* === Estilos dos Cards (Homepage) === */
.card {
    background-color: #fff; /* Cards mantêm fundo branco */
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    width: 260px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.card a.card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background-color: #f8f9fa;
    display: block;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.card-body {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.15em;
    margin-top: 0;
    margin-bottom: 10px;
    color: 	#00008B;
    font-weight: 600;
}

.card-text {
    font-size: 0.9em;
    color: #555;
    flex-grow: 1;
    line-height: 1.5;
}

/* === Página da Ferramenta (Estilos específicos) === */
.container-ferramenta {
    max-width: 850px;
    margin: 30px auto;
    padding: 30px;
    /* ALTERAÇÃO: Cor de papel para o container da ferramenta */
	
   /* background-color: #FAF0E6;  Cor "Linen" - um bege claro/cor de papel */
   
	background-color: #fdf5e6; /* Tom de OldLace, parecido com papel antigo */
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.container-ferramenta h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 2em;
    color: #3498db;
    font-weight: 600;
}

.container-ferramenta .tool-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
    background-color: #f8f8f8; /* Mantém um fundo claro para a imagem, caso ela tenha transparência */
    display: block;
    margin: 25px auto 30px auto;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.container-ferramenta p {
    line-height: 1.7;
    margin-bottom: 18px;
    color: #444;
    text-align: justify;
}

.container-ferramenta b,
.container-ferramenta strong {
    color: #333;
    font-weight: 600;
}

.container-ferramenta h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #ddd; /* Um pouco mais escuro que #eee para contraste com o fundo papel */
    padding-bottom: 8px;
    font-size: 1.4em;
    font-weight: 500;
}

.container-ferramenta ul,
.container-ferramenta ol {
    margin-bottom: 20px;
    padding-left: 0;
    list-style: none;
}

.container-ferramenta li {
    margin-bottom: 10px;
    padding: 12px 15px 12px 25px;
    background-color: #FDF5E6; /* Um tom ligeiramente mais claro ou diferente de "papel" para itens de lista */
                                /* Ou pode ser #fff (branco) se preferir */
    border-left: 5px solid #3498db;
    border-radius: 5px;
    position: relative;
}

.container-ferramenta .btn {
    display: block;
    width: fit-content;
    margin: 30px auto 0 auto;
    padding: 12px 30px;
    background-color: #2ecc71;
    color: white;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.container-ferramenta .btn:hover {
    background-color: #27ae60;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* === Seção AdSense (Geral e Específica da Index) === */
.adsense, .adsense-index {
    margin: 40px auto 20px auto;
    padding: 20px 0;
    max-width: 90%;
    width: 100%;
    /* border-top: 1px solid #e0e0e0;  Pode remover ou suavizar a borda se o fundo for uma imagem */
    text-align: center;
    min-height: 100px;
    box-sizing: border-box;
    /* background-color: rgba(255, 255, 255, 0.7); /* Fundo semi-transparente para adsense, opcional */
    /* border-radius: 8px; /* Opcional */
}

.adsense p, .adsense-index p {
    color: #666; /* Cor um pouco mais escura para melhor leitura sobre a imagem de fundo */
    font-size: 0.8em;
    margin-top: 5px;
}

/* Responsividade Básica */
@media (max-width: 768px) {
    .card {
        width: calc(50% - 20px);
    }
    .container-ferramenta {
        padding: 20px;
        margin: 20px auto; /* Menor margem em telas menores */
    }
     .category-section h2 {
        font-size: 1.6em;
    }
     #welcome-box h2 {
        font-size: 2em;
    }
     #welcome-box p {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    body {
        background-image: none; /* Opcional: Remover imagem de fundo em telas muito pequenas se ficar poluído */
        background-color: #e9e9e9; /* Um fundo sólido simples se a imagem for removida */
    }
    .card {
        width: calc(100% - 20px);
    }
     .category-section h2 {
        font-size: 1.4em;
    }
    .container-ferramenta {
        padding: 15px;
        margin: 15px auto;
    }
    .container-ferramenta h1 {
        font-size: 1.6em;
    }
}