/* --- Variáveis e Tema --- */
:root {
    /* Paleta Pastel Claro (Default) */
    --bg-color: #FDFBF7; /* Creme suave */
    --bg-alt: #F2EFE9;   /* Bege um pouco mais escuro para seções alternadas */
    --card-bg: #FFFFFF;
    
    --primary-color: #88B3C8; /* Azul Pastel */
    --primary-hover: #6DA0B8;
    
    --secondary-color: #E6B8B8; /* Rosé Pastel */
    --secondary-hover: #D99E9E;
    
    --accent-color: #A8D5BA; /* Verde Pastel */
    
    --text-color: #4A4A4A;
    --text-light: #757575;
    --border-color: #E0E0E0;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --radius: 12px;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Modo Escuro (Tons pastéis sobre fundo escuro) */
body.dark-mode {
    --bg-color: #1A2634; /* Azul Petróleo Escuro */
    --bg-alt: #151F2B;
    --card-bg: #243447;
    
    --primary-color: #A8D0E6; /* Azul Pastel mais claro para contraste */
    --primary-hover: #8ABBD6;
    
    --secondary-color: #F2C6C6; /* Rosé mais claro */
    --secondary-hover: #E6B0B0;
    
    --text-color: #F0F0F0;
    --text-light: #B0B0B0;
    --border-color: #384B60;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* --- Reset e Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

/* --- Utilitários --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.bg-alt {
    background-color: var(--bg-alt);
}

.hidden {
    display: none !important;
}

.full-width {
    width: 100%;
}

.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* --- Botões --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    /* Contraste melhor em light mode se o texto for branco */
}
body.light-mode .btn-primary {
    color: #fff; 
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}
.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    padding: 0;
}

.center-btn {
    text-align: center;
    width: 100%;
}

/* --- Header --- */
.header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color 0.3s;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}
.highlight {
    color: var(--primary-color);
}

.nav-links {
    display: none; /* Mobile first hidden */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.nav-links.active {
    display: flex;
}

.nav-link {
    display: block;
    padding: 1rem;
    color: var(--text-color);
    font-weight: 500;
}
.nav-link:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: block;
    width: 30px;
}
.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: 0.3s;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}
.icon-moon { display: none; }
body.dark-mode .icon-sun { display: none; }
body.dark-mode .icon-moon { display: block; }

.hidden-mobile {
    display: none;
}

/* --- Hero --- */
.hero {
    margin-top: 80px; /* Offset fixed header */
    padding: 3rem 0;
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.hero-text {
    text-align: center;
}

.hero-text h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.badge {
    background-color: var(--bg-alt);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.cta-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.hero-image img {
    border-radius: 50% 50% 40% 60% / 60% 50% 50% 40%; /* Organic shape */
    border: 8px solid var(--bg-alt);
    max-width: 300px;
    margin: 0 auto;
}

/* --- About --- */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-list {
    margin-top: 1rem;
}
.about-list li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* --- Cards (Services, Blog, Testimonials) --- */
.grid-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    border: 1px solid var(--bg-alt);
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.service-details {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
    animation: fadeIn 0.5s;
}

/* --- IMC Calculator --- */
.imc-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.imc-calculator form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
}

input, select, textarea {
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.imc-result {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-alt);
    border-radius: 8px;
    text-align: center;
    border-left: 5px solid var(--primary-color);
    animation: slideDown 0.4s ease-out;
}

.imc-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.imc-category {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* --- Blog Specific --- */
.blog-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
}
.blog-content {
    padding: 1.5rem;
}
.blog-card {
    padding: 0; 
    overflow: hidden;
}

/* --- Testimonials --- */
.testimonial-card {
    border-left: 4px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
}
.tags .tag {
    background-color: var(--bg-alt);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-light);
}

/* --- Contact --- */
.contact-container {
    display: grid;
    gap: 2rem;
}
.contact-methods {
    margin-top: 2rem;
}
.method {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}
.form-footer {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 1rem;
}

/* --- Footer --- */
.footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}
.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.social-links a {
    color: #fff;
    margin: 0 10px;
    font-weight: 600;
}

#desenvolvedor {
    font-weight: bold;
}

#desenvolvedor:hover {
    color: var(--accent-color);
    transition:  ease-in-out 0.3s;
}

/* --- Chatbot --- */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.8rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s;
}
.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    height: 400px;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.chatbot-header {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chatbot-header button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background-color: var(--bg-color);
}

.message {
    max-width: 80%;
    padding: 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bot-msg {
    background-color: var(--bg-alt);
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.user-msg {
    background-color: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chatbot-input-area {
    padding: 0.8rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    background-color: var(--card-bg);
}
.chatbot-input-area input {
    flex: 1;
    padding: 0.5rem;
}
.chatbot-input-area button {
    background-color: var(--secondary-color);
    border: none;
    color: white;
    padding: 0 1rem;
    border-radius: 8px;
    cursor: pointer;
}

/* --- Media Queries (Tablet & Desktop) --- */
@media (min-width: 768px) {
    .section { padding: 6rem 0; }
    
    .hidden-mobile { display: inline-block; }
    
    .mobile-menu-btn { display: none; }
    
    .nav-links {
        display: flex;
        position: static;
        flex-direction: row;
        width: auto;
        background: none;
        box-shadow: none;
        gap: 1.5rem;
        padding: 0;
    }
    
    .hero-content {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }
    
    .hero-text {
        max-width: 50%;
        text-align: left;
    }
    
    .hero-badges { justify-content: flex-start; }
    
    .hero-image img { max-width: 450px; }
    
    .cta-group {
        flex-direction: row;
        width: auto;
    }
    
    .about-grid {
        flex-direction: row;
        align-items: center;
        gap: 4rem;
    }
    
    .grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-container {
        grid-template-columns: 1fr 1.5fr;
    }
    
    .imc-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 4rem;
    }
    .imc-content, .imc-calculator { flex: 1; }
}

@media (min-width: 1024px) {
    .grid-cards {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for services/blog */
    }
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}