﻿/* css/style.css */

/* --- Reset e Variáveis Globais --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --dark-bg: #333;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 4px 8px rgba(0,0,0,0.1);
}

html {
    scroll-behavior: smooth; /* Rolagem suave para links âncora */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--light-bg);
    color: var(--text-color);
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Animação de Fade-in para elementos --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Cabeçalho e Navegação --- */
header {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.8rem;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

header nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Botão do Menu Mobile (Hambúrguer) --- */
.mobile-menu-toggle {
    display: none; /* Escondido por padrão em desktops */
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Conteúdo Principal --- */
main {
    padding-top: 0; /* Header é sticky, então não precisa de padding extra */
}

/* --- Seção Hero com Imagem de Fundo --- */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/maxresdefault.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding: 120px 20px;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}
/* --- Animação de Pulsar para os Botões --- */
@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7); /* Sombra azul */
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 123, 255, 0); /* Sombra se expande e some */
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

@keyframes pulse-border-green {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); /* Sombra verde */
  }
  70% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* --- Botões CTA Atualizados --- */
.cta-button {
    display: inline-block;
    background-color: #0056b3; /* Azul mais forte e chamativo */
    color: var(--white);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    /* Adiciona a animação de pulsar azul */
    animation: pulse-border 2s infinite;
}

.cta-button:hover {
    background-color: #004085; /* Azul mais escuro no hover */
    transform: translateY(-2px); /* Leve elevação no hover */
}

/* Nova classe para botões de download/bônus (verdes) */
.cta-button-green {
    display: inline-block;
    background-color: #28a745; /* Verde vibrante */
    color: var(--white);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    /* Adiciona a animação de pulsar verde */
    animation: pulse-border-green 2s infinite;
}

.cta-button-green:hover {
    background-color: #218838; /* Verde mais escuro no hover */
    transform: translateY(-2px); /* Leve elevação no hover */
}

/* --- Lista de Guias (Cards) --- */
.guide-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.guide-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.guide-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.guide-card img {
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.guide-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.guide-card a  {
    display: inline-block;
    background-color: #218838; /* Verde mais escuro no hover */
    color: var(--white);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    /* Adiciona a animação de pulsar azul */
    animation: pulse-border 2s infinite;
}

/* --- Estilos para Anúncios --- */
.ad-container {
    margin: 2em 0;
    padding: 1em;
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
}

/* --- Rodapé --- */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: var(--dark-bg);
    color: var(--white);
}

footer nav {
    margin-top: 10px;
}

footer nav a {
    color: #ccc;
    margin: 0 10px;
    text-decoration: none;
}

footer nav a:hover {
    text-decoration: underline;
}

/* --- Estilos para a Calculadora (mantidos para outras páginas) --- */
.calculator-form {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

#results {
    margin-top: 20px;
    padding: 20px;
    background-color: #e9f7ef;
    border: 1px solid #4caf50;
    border-radius: 8px;
}


/* --- Media Queries para Responsividade --- */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block; /* Mostra o botão hambúrguer */
    }

    header nav ul {
        display: none; /* Esconde o menu por padrão */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--dark-bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
    }

    /* Classe que o JS vai adicionar para mostrar o menu */
    header nav ul.active {
        display: flex;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* --- Botão Flutuante do WhatsApp (FAB) --- */
.whatsapp-fab {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease-in-out;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
    color: #fff;
}

/* --- Bloco de Compartilhamento e Ganha de Bônus --- */
.share-and-earn {
    background-color: #e9f7ef;
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin-top: 2em;
    text-align: center;
}

.share-and-earn h3 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.share-button {
    display: inline-block;
    background-color: #25d366;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.3s;
}
.share-button:hover {
    background-color: #128c7e;
    color: white;
}

/* --- Estilo para o Sumário do Artigo --- */
.table-of-contents {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 5px solid var(--primary-color);
    padding: 20px;
    margin-bottom: 2em;
    border-radius: 8px;
}

.table-of-contents h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-color);
}

.table-of-contents ul {
    list-style-type: none;
    padding-left: 0;
}

.table-of-contents ul li {
    margin-bottom: 8px;
}

.table-of-contents ul li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.table-of-contents ul li a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* --- Estilo para o Aviso de Terceiros (Box de Conversão) ---*/
.conversion-box {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 25px;
    margin-top: 2em;
    text-align: center;
}
.conversion-box h2 {
    color: #856404;
    margin-bottom: 15px;
}
.conversion-box p {
    margin-bottom: 20px;
}

/* --- Estilo para Blocos de Código com Botão de Copiar --- */
.code-block {
    position: relative;
    background-color: #2d2d2d; /* Fundo escuro estilo "código" */
    color: #f8f8f2;
    padding: 15px;
    border-radius: 8px;
    margin: 1.5em 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto; /* Para códigos longos */
    white-space: pre-wrap; /* Para quebrar linha corretamente */
}

.code-block pre {
    margin: 0;
    background: none;
    padding: 0;
}

.code-block code {
    background: none;
    padding: 0;
}

.copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-button:hover {
    background-color: #0056b3;
}

.copy-button:active {
    transform: scale(0.95);
}

/* Mensagem de "copiado" */
.copy-feedback {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #28a745;
    color: white;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Para não bloquear cliques */
}