/* === Resets Básicos e Variáveis Globais === */
:root {
    --primary-color: #001f3f; /* Azul Marinho */
    --secondary-color: #D4AF37; /* Dourado */
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #343a40;
    --text-color: #333;
    --white-color: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lora', serif;
    --transition-speed: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base para REM */
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white-color);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: #b8860b; /* Dourado mais escuro */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
}

.bg-light {
    background-color: var(--light-gray);
}
.bg-dark-accent {
    background-color: var(--primary-color);
    color: var(--white-color);
}
.bg-dark-accent .section-title,
.bg-dark-accent h3,
.bg-dark-accent p,
.bg-dark-accent label {
    color: var(--white-color);
}
.bg-dark-accent .section-title::after {
    background-color: var(--white-color);
}


/* === Cabeçalho e Navegação === */
#navbar {
    background-color: rgba(0, 31, 63, 0.9); /* Azul Marinho com transparência */
    color: var(--white-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color var(--transition-speed), padding var(--transition-speed);
}

#navbar.scrolled {
    background-color: var(--primary-color); /* Totalmente opaco ao rolar */
    padding: 0.7rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#navbar .logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white-color);
}

#navbar nav ul {
    display: flex;
}

#navbar nav ul li {
    margin-left: 25px;
}

#navbar nav ul li a {
    color: var(--white-color);
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
}

#navbar nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-speed);
}

#navbar nav ul li a:hover::after,
#navbar nav ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* Oculto por padrão */
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 2rem;
    cursor: pointer;
}


/* === Seção Início (Hero) === */
.hero-section {
    background: url('images/dr-ricardo-almeida.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: var(--white-color);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 31, 63, 0.6); /* Overlay escuro para contraste */
}

.content-on-top {
    position: relative; /* Para ficar acima do overlay */
    z-index: 1;
}

.hero-section h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-family: var(--font-body);
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 15px 30px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 5px;
    text-transform: uppercase;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #b8860b; /* Dourado mais escuro */
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* === Seção Sobre === */
.sobre-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.sobre-imagem {
    flex: 0 0 300px; /* Não cresce, não encolhe, base de 300px */
}

.sobre-imagem img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.sobre-texto {
    flex: 1;
}

.sobre-texto h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}
.sobre-texto h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 10px;
}
.sobre-texto ul {
    list-style: disc;
    margin-left: 20px;
}
.sobre-texto ul li {
    margin-bottom: 5px;
}

/* === Seção Serviços === */
.servicos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.servico-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.servico-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.servico-icon-placeholder {
    font-size: 3rem; /* Tamanho do ícone placeholder */
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.servico-card h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.servico-card p {
    font-size: 0.95rem;
}

/* === Seção Depoimentos === */
.depoimentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.depoimento-card {
    background-color: var(--light-gray);
    padding: 25px;
    border-left: 5px solid var(--secondary-color);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.depoimento-card p {
    font-style: italic;
    margin-bottom: 15px;
    color: #555;
}

.depoimento-card h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1rem;
    text-align: right;
}

/* === Seção Contato === */
.contato-flex {
    display: flex;
    gap: 40px;
    align-items: flex-start; /* Alinha os itens no topo */
}

.contato-info {
    flex: 1;
}
.contato-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}
.contato-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.contato-form {
    flex: 1.5;
    background-color: rgba(255, 255, 255, 0.1); /* Leve destaque no fundo escuro */
    padding: 30px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-family: var(--font-heading);
    font-weight: 400;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd; /* Para o tema escuro, poderia ser um cinza mais claro */
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--white-color);
    color: var(--text-color);
}
.bg-dark-accent .form-group input[type="text"],
.bg-dark-accent .form-group input[type="tel"],
.bg-dark-accent .form-group textarea {
    border-color: var(--medium-gray);
}


.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.contato-form .cta-button {
    width: 100%;
    background-color: var(--secondary-color);
    color: var(--primary-color);
}
.contato-form .cta-button:hover {
    background-color: #b8860b;
}


/* === Footer === */
footer {
    background-color: var(--dark-gray);
    color: var(--light-gray);
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
}
footer p {
    margin-bottom: 5px;
}


/* === Botão Fixo WhatsApp === */
.whatsapp-fixed {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25D366; /* Cor oficial do WhatsApp */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform var(--transition-speed);
}
.whatsapp-fixed svg {
    width: 30px;
    height: 30px;
}

.whatsapp-fixed:hover {
    transform: scale(1.1);
    color: white; /* Manter cor do ícone no hover */
}

/* === Animações === */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay para elementos em sequência */
.fade-in:nth-child(2) { transition-delay: 0.2s; }
.fade-in:nth-child(3) { transition-delay: 0.4s; }
/* Adicione mais se necessário para cards, etc. */
.servico-card.fade-in:nth-child(1) { transition-delay: 0s; }
.servico-card.fade-in:nth-child(2) { transition-delay: 0.1s; }
.servico-card.fade-in:nth-child(3) { transition-delay: 0.2s; }
.servico-card.fade-in:nth-child(4) { transition-delay: 0.3s; }
.servico-card.fade-in:nth-child(5) { transition-delay: 0.4s; }

.depoimento-card.fade-in:nth-child(1) { transition-delay: 0s; }
.depoimento-card.fade-in:nth-child(2) { transition-delay: 0.15s; }
.depoimento-card.fade-in:nth-child(3) { transition-delay: 0.3s; }


/* === Responsividade === */
@media (max-width: 768px) {
    html {
        font-size: 14px; /* Ajusta base para telas menores */
    }

    #navbar .container {
        flex-wrap: wrap; /* Permite que o menu vá para baixo */
    }

    #navbar nav {
        display: none; /* Esconde o menu por padrão */
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
    }
    #navbar nav.active {
        display: block; /* Mostra o menu */
        max-height: 300px; /* Altura suficiente para os itens */
    }

    #navbar nav ul {
        flex-direction: column;
        align-items: center;
        padding-top: 1rem;
    }

    #navbar nav ul li {
        margin-left: 0;
        margin-bottom: 1rem;
        width: 100%;
        text-align: center;
    }
    #navbar nav ul li a {
        display: block;
        padding: 10px;
    }
    #navbar nav ul li a::after {
        display: none; /* Remover sublinhado no mobile menu */
    }


    .menu-toggle {
        display: block; /* Mostra o botão hamburger */
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section p {
        font-size: 1.2rem;
    }

    .sobre-content {
        flex-direction: column;
        text-align: center;
    }
    .sobre-imagem {
        margin-bottom: 30px;
        max-width: 250px; /* Ajusta tamanho da foto */
        margin-left: auto;
        margin-right: auto;
    }
    .sobre-texto ul {
        text-align: left;
        display: inline-block; /* Para centralizar a lista */
    }

    .servicos-grid, .depoimentos-grid {
        grid-template-columns: 1fr; /* Uma coluna em telas menores */
    }

    .contato-flex {
        flex-direction: column;
    }
    .contato-form {
        margin-top: 30px;
    }
}