/* --- Variáveis e Reset --- */
:root {
    --primary-gold: #c5a059;
    --primary-gold-dark: #a08040;
    --bg-color: #ffffff;
    --bg-secondary: #f9f9f9;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --black: #1a1a1a;
    --card-shadow: 0 4px 6px rgba(0,0,0,0.05);
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
}

body.dark-mode {
    --bg-color: #121212;
    --bg-secondary: #1e1e1e;
    --text-color: #e0e0e0;
    --text-light: #aaaaaa;
    --border-color: #333333;
    --card-shadow: 0 4px 6px rgba(0,0,0,0.3);
    --white: #1e1e1e; /* Invertido para cards */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    color: var(--text-color);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Utilitários --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-secondary);
}

.text-gold {
    color: var(--primary-gold);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Botões --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-gold);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-gold-dark);
}

.btn-outline {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-gold);
    color: #fff;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* --- Header --- */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
}

.logo-subtitle {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--primary-gold);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Theme Toggle */
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
}

.dark-mode #theme-toggle .icon-sun { display: block; }
.dark-mode #theme-toggle .icon-moon { display: none; }
body:not(.dark-mode) #theme-toggle .icon-sun { display: none; }
body:not(.dark-mode) #theme-toggle .icon-moon { display: block; }

/* Menu */
.nav-list {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link:hover {
    color: var(--primary-gold);
}

.nav-cta {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Mobile Menu Button */
#mobile-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    position: relative;
    transition: 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Menu Ativo Mobile */
#mobile-btn.active .hamburger { background: transparent; }
#mobile-btn.active .hamburger::before { top: 0; transform: rotate(45deg); }
#mobile-btn.active .hamburger::after { top: 0; transform: rotate(-45deg); }

/* --- Hero Section --- */
#hero {
    height: 100vh;
    min-height: 600px;
    background-image: url('https://picsum.photos/1920/1080?grayscale');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 0; /* Header is fixed, but we handle via padding or structure */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff; /* Força branco no hero */
}

.hero-content .subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-highlights {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--primary-gold);
    font-weight: 700;
}

/* --- Sobre --- */
.sobre-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sobre-img-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.sobre-img {
    border-radius: 4px;
    box-shadow: var(--card-shadow);
}

.oab-badge {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background-color: var(--primary-gold);
    color: #fff;
    padding: 10px 20px;
    font-weight: 700;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.sobre-list {
    margin-top: 1.5rem;
}

.sobre-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.sobre-list li::before {
    content: '•';
    color: var(--primary-gold);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* --- Áreas de Atuação --- */
.grid-areas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.card-area {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
    border-top: 3px solid transparent;
}

.card-area:hover {
    transform: translateY(-5px);
    border-top: 3px solid var(--primary-gold);
}

.icon-area {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.link-gold {
    color: var(--primary-gold);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 15px;
    display: inline-block;
}

.cta-center {
    text-align: center;
    margin-top: 40px;
}

/* --- Depoimentos --- */
.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-track-container {
    height: 250px;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.current-slide {
    opacity: 1;
    z-index: 1;
}

.quote-card {
    text-align: center;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    width: 100%;
}

.quote-text {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 20px;
}

.quote-author {
    font-weight: 700;
    color: var(--primary-gold);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 2;
}

.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }

/* --- Artigos --- */
.grid-articles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.article-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.article-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.link-read-more {
    color: var(--primary-gold);
    font-weight: 700;
    margin-top: 10px;
    display: inline-block;
}

/* --- Contato --- */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-info {
    flex: 1;
}

.info-item {
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 3px solid var(--primary-gold);
}

.contact-form {
    flex: 1;
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--white);
    color: var(--text-color);
    font-family: inherit;
}

.full-width {
    width: 100%;
}

/* --- Footer --- */
footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-gold);
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    margin: 0 10px;
    color: #ccc;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-gold);
}

.copyright {
    font-size: 0.8rem;
    color: #666;
}

/* --- Chatbot --- */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-gold);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-toggle:hover {
    transform: scale(1.1);
}

#chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    height: 400px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#chat-window.hidden {
    display: none;
}

.chat-header {
    background-color: var(--primary-gold);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

#close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

#chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--bg-secondary);
}

.message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.bot-msg {
    background-color: #e0e0e0;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.user-msg {
    background-color: var(--primary-gold);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.chat-input-area {
    padding: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 5px;
    background-color: var(--white);
}

#chat-input {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    background-color: var(--bg-color);
}

#send-btn {
    padding: 8px 12px;
    background-color: var(--primary-gold);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* --- Responsive Media Queries --- */

/* Tablets (>= 768px) */
@media (min-width: 768px) {
    .container {
        width: 85%;
    }

    /* Hero */
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    /* Sobre */
    .sobre-grid {
        flex-direction: row;
        align-items: center;
    }
    
    .sobre-img-wrapper {
        flex: 1;
    }
    
    .sobre-text {
        flex: 1;
    }

    /* Grid */
    .grid-areas, .grid-articles {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Contato */
    .contact-wrapper {
        flex-direction: row;
    }
}

/* Desktops (>= 1024px) */
@media (min-width: 1024px) {
    #mobile-btn {
        display: none;
    }
    
    #nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: none;
        padding: 0;
        box-shadow: none;
    }

    .nav-list {
        flex-direction: row;
    }

    .grid-areas {
        grid-template-columns: repeat(4, 1fr);
    }

    .grid-articles {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Nav Logic (Visual) */
@media (max-width: 1023px) {
    #mobile-btn {
        display: block;
    }

    #nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background-color: var(--bg-color);
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: 0.4s;
        padding: 40px 20px;
        display: block; /* Garante que existe, mas está escondido via 'right' */
    }

    #nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }

    .nav-link {
        font-size: 1.1rem;
    }
    
    .carousel-track-container {
        height: 300px;
    }

    /* Chatbot full width on tiny screens */
    #chat-window {
        width: 90vw;
        right: 0;
        bottom: 70px; /* Above header/toggle */
    }
}