
/* 1. CONFIGURAÇÕES GLOBAIS E VARIÁVEIS */
:root {
    --cor-primaria: #f7a463;
    --cor-secundaria: #fde8d7;
    --cor-texto-escuro: #333;
    --cor-texto-claro: #ffffff;
    --cor-fundo: linear-gradient(to bottom, #fde8d7, #e0b18e);
    --fonte-principal: 'Lato', sans-serif;
    --fonte-serif: 'Inria Serif', serif;
}

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

body {
    background: var(--cor-fundo);
    font-family: var(--fonte-principal);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    flex: 1;
}

/* 2. LAYOUT PRINCIPAL (HEADER, FOOTER) */

/* === HEADER === */
header {
    background-color: var(--cor-primaria);
    color: var(--cor-texto-claro);
    padding: 15px 0;
    position: relative;
    z-index: 100;
}

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

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--cor-texto-claro);
}

.logo-img {
    height: 50px;
    margin-right: 15px;
}

.logo-text {
    font-size: 1.2em;
    font-weight: 300;
    line-height: 1.1;
}

.logo-text .logo-d {
    font-weight: 700;
}

header nav ul {
    list-style: none;
    display: flex;
}

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

header nav ul li a {
    text-decoration: none;
    color: var(--cor-texto-claro);
    font-weight: 400;
    font-size: 1.1em;
    transition: color 0.3s;
    padding-bottom: 5px;
}

header nav ul li a:hover {
    color: var(--cor-secundaria);
}

/* Estilo para link ativo da navegação */
/* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo [href="..."] */
body.inicio nav a[href="index.php"],
body.sobre nav a[href="sobre.php"],
body.servicos nav a[href="servicos.php"],
body.galeria nav a[href="galeria.php"],
body.contato nav a[href="contato.php"],
body.detalhes-especialidade nav a[href="detalhes-especialidade.php"],
body.login nav a[href="login.php"],
body.admin-geral nav a[href="painel-admin.php"],
body.admin-inserir nav a[href="inserir-dados.php"] {
    font-weight: 700;
    border-bottom: 2px solid var(--cor-secundaria);
}

/* Botão do Menu Hambúrguer (invisível em telas grandes) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--cor-texto-claro);
    font-size: 1.8em;
    cursor: pointer;
}

/* === FOOTER === */
footer {
    background-color: var(--cor-primaria);
    color: var(--cor-texto-escuro);
    padding: 20px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.footer-content a {
    color: black;           /* muda a cor do link */
    text-decoration: none;  /* remove sublinhado */
    transition: color 0.3s; 
}

.footer-content a:hover {
    color: white;           /* cor ao passar o mouse */
}

.contato-info p {
    margin: 5px 0;
    font-size: 14px;
}

.social-icons a {
    margin: 0 10px;
    color: var(--cor-texto-escuro);
    font-size: 1.8em;
    text-decoration: none;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--cor-texto-claro);
}

.footer-content {
    display: flex;
    flex-direction: column; /* coloca tudo em coluna */
    align-items: center;    /* centraliza horizontalmente */
    text-align: center;     /* centraliza o texto */
    gap: 15px;              /* espaço entre os blocos */
}

.footer-content .contato-info,
.footer-content .social-icons,
.footer-content .copyright {
    width: 100%;
}

/* 3. ESTILOS ESPECÍFICOS POR PÁGINA */

/* 3.1. PÁGINA INICIAL */
.main-content {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 60px 0;
}

.info-column {
    flex: 1;
}

.info-column h1 {
    font-size: 2.5em;
    color: var(--cor-primaria);
    font-weight: 700;
    margin-bottom: 5px;
}

.info-column h2 {
    font-size: 1.8em;
    color: var(--cor-texto-escuro);
    font-weight: 400;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background-color: var(--cor-primaria);
    color: var(--cor-texto-claro);
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 700;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #e6934f;
}

.modalidades {
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: 400;
    color: var(--cor-texto-escuro);
}

.lei-texto {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.lei-texto p {
    font-size: 0.9em;
    line-height: 1.6;
    color: #555;
    margin-bottom: 10px;
}

.image-column {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-column img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 3.2. PÁGINA SOBRE MIM */
.sobre-mim-page .container {
    padding-top: 40px;
    padding-bottom: 60px;
}

.page-title {
    text-align: center;
    font-size: 2.5em;
    font-family: var(--fonte-serif);
    color: var(--cor-texto-escuro);
    margin-bottom: 40px;
    font-weight: 700;
}

.content-section {
    margin-bottom: 30px;
}

.section-title {
    color: var(--cor-primaria);
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 20px;
}

.experience-list {
    list-style: none;
    padding-left: 0;
}

.experience-list > li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 15px;
    line-height: 1.6;
}

.experience-list > li::before {
    content: '•';
    color: var(--cor-primaria);
    font-size: 1.5em;
    position: absolute;
    left: 0;
    top: -12px;
}

.nested-list {
    list-style: none;
    padding-left: 20px;
    margin-top: 15px;
}

.nested-list li {
    margin-bottom: 10px;
}

/* 3.3. PÁGINA SERVIÇOS (CARDS) */
.servicos-page .container {
    padding-top: 40px;
    padding-bottom: 60px;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    justify-items: center;
}

.card {
    background-color: #ffffff;
    width: 100%;
    max-width: 250px;
    height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.card img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
}

/* ALTERADO POR CARLOS: Estilo do link para a nova página de detalhes */
.card a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card h3 {
    font-size: 1.1em;
    margin-top: 15px;
    color: var(--cor-texto-escuro);
}

/* REMOVIDO POR CARLOS: Estilos da seção do modal, que não é mais usada */
/*
.modal-fundo { ... }
.modal-fundo.show { ... }
.modal-conteudo { ... }
.fechar { ... }
*/


/* 3.4. PÁGINA GALERIA */
.galeria-page main {
    padding: 60px 0;
}

.gallery-title {
    font-size: 3em;
    font-weight: 700;
    color: var(--cor-texto-escuro);
    margin-bottom: 40px;
    text-align: center;
    font-family:  var(--fonte-serif);
}

.gallery-title span {
    font-weight: 400;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.photo-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3.5. PÁGINA CONTATO */
.contato-page {
    padding: 60px 0;
}

.contato-page .container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

.info, .form {
    flex: 1 1 400px;
    max-width: 500px;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.info a {
     color: black;           /* muda a cor do link */
    text-decoration: none;  /* remove sublinhado */
    transition: color 0.3s; 
}

.info a:hover{
    color:#e65c00;
}

.info h1 {
    font-family: var(--fonte-serif);
    font-size: 2.5em;
    margin-top: 0;
    margin-bottom: 20px;
}

.info p {
    margin: 10px 0;
    line-height: 1.6;
}

.mapa {
    width: 100%;
    height: 200px;
    margin-top: 20px;
    border-radius: 6px;
    overflow: hidden;
}

.mapa iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

form label {
    font-weight: bold;
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
}

/* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background-color: #fff;
    font-family: var(--fonte-principal);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo */
input[type="submit"] {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background-color: #ff6a00;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

/* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo */
input[type="submit"]:hover {
    background-color: #e65c00;
}

.mensagem-status {
    padding: 12px;
    margin-top: 20px;
    border: 1px solid transparent;
    border-radius: 5px;
    display: none; /* Oculto por padrão */
}
.mensagem-sucesso { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.mensagem-erro { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }


/* ADICIONADO POR CARLOS: Estilos para a nova página de detalhes */
/* 3.6. PÁGINA DETALHES DA ESPECIALIDADE */
.detalhes-especialidade-page .container {
    padding-top: 40px;
    padding-bottom: 60px;
}

/* FEITO POR CARLOS: Ajuste para posicionar o botão dentro do box branco */
.detalhes-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative; 
}

/* ADICIONADO POR CARLOS: Estilo para o botão de fechar */
.fechar-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: var(--cor-texto-escuro);
    text-decoration: none;
    line-height: 1;
    transition: color 0.3s ease;
}

.fechar-btn:hover {
    color: #ff0000;
}

.detalhes-content img {
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detalhes-content p {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--cor-texto-escuro);
}

/* 4. SEÇÃO DE LOGIN E PAINEL ADM */

/* 4.1. PÁGINA LOGIN */
.page-login {
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.login-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
    max-width: 380px;
}

.login-container h1 {
    margin-bottom: 30px;
    color: #333;
}

/* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo */
.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo */
.login-container input[type="submit"] {
    background-color: #007BFF;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    margin-top: 10px;
}

/* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo */
.login-container input[type="submit"]:hover {
    background-color: #0056b3;
}

/* 4.2. PAINEL ADM GERAL */
.main.admin-panel {
    padding: 40px;
    background-color: #ecf0f1;
}

.main.admin-panel h1 {
    margin-bottom: 30px;
}
/* Em style.css, na seção 4.2. PAINEL ADM GERAL */

.option-box {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
    flex: 1 1 220px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none; /* Garante que não haja sublinhado */
    color: var(--cor-texto-escuro); /* Garante a cor correta do texto */
}

.options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.option-box {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
    flex: 1 1 220px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: var(--cor-texto-escuro);
}

.option-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.option-box i {
    font-size: 40px;
    margin-bottom: 15px;
    color: #3498db;
}

.option-box span {
    display: block;
    font-size: 18px;
    font-weight: bold;
}

/* 4.3. PAINEL ADM - INSERIR */
.admin-form-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    margin: 20px auto;
}

.admin-form-container h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
}

.admin-form-container label {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    display: block;
}

/* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo */
.admin-form-container input[type="text"],
.admin-form-container input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo */
.admin-form-container input[type="submit"] {
    padding: 12px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

/* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo */
.admin-form-container input[type="submit"]:hover {
    background-color: #218838;
}

.back-link {
    text-decoration: none;
    color: #007bff;
    margin-bottom: 20px;
    display: inline-block;
    font-size: 16px;
}

.back-link i {
    margin-right: 5px;
}


/* 5. RESPONSIVIDADE (MEDIA QUERIES) */

/* Telas de Tablet */
@media (max-width: 1024px) {
    .card-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
}

/* Telas de Celular e Tablet (Layout Principal) */
@media (max-width: 768px) {
    /* === HEADER RESPONSIVO === */
    .menu-toggle {
        display: block; /* Exibe o botão do menu hambúrguer */
        z-index: 1001;
    }

    nav#nav-menu {
        display: none;
        position: absolute;
        top: 80px; /* Altura do header */
        left: 0;
        width: 100%;
        background-color: var(--cor-primaria);
    }

    nav#nav-menu.active {
        display: block; /* Exibe o menu quando a classe 'active' está presente */
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
    }

    header nav ul li {
        margin: 0;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    header nav ul li a {
        display: block;
        padding: 15px 0;
    }
    
    /* CORREÇÃO (FEITA POR CARLOS): Utilizando colchetes para seletores de atributo */
    body.inicio nav a[href="index.php"],
    body.sobre nav a[href="sobre.php"],
    body.servicos nav a[href="servicos.php"],
    body.galeria nav a[href="galeria.php"],
    body.contato nav a[href="contato.php"],
    body.detalhes-especialidade nav a[href="detalhes-especialidade.php"],
    body.login nav a[href="login.php"],
    body.admin-geral nav a[href="painel-admin.php"],
    body.admin-inserir nav a[href="inserir-dados.php"] {
        border-bottom: none; /* Remove a borda no mobile */
        background-color: rgba(0,0,0,0.1); /* Destaca o item ativo */
    }

    /* === AJUSTES GERAIS === */
    .main-content {
        flex-direction: column-reverse; /* Imagem acima do texto */
        text-align: center;
        padding: 40px 0;
    }

    .info-column {
        margin-top: 30px;
    }

    /* CÓDIGO ADICIONADO PARA AJUSTAR A IMAGEM */
    .image-column img {
        max-width: 80%; /* Ajusta a largura máxima da imagem para 80% da tela */
    }

    /* Ajuste de fontes */
    .info-column h1 { font-size: 2em; }
    .info-column h2 { font-size: 1.5em; }
    .page-title { font-size: 2em; }
    .section-title { font-size: 1.3em; }
    .gallery-title { font-size: 2.5em; }

    /* === FOOTER RESPONSIVO === */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    /* === PÁGINA CONTATO RESPONSIVA === */
    .contato-page .container {
        padding: 20px;
    }

    /* === PÁGINA SERVIÇOS RESPONSIVA === */
    .card-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    /* --- INÍCIO DA ALTERAÇÃO (RESPONSIVIDADE) --- */
    /* === PÁGINA DETALHES RESPONSIVA (NOVA) === */
    .detalhes-especialidade-page .detalhes-content {
        padding: 20px;
    }
    .detalhes-especialidade-page .detalhes-content p {
        font-size: 1em;
    }
    /* NOVO: Ajusta o botão de fechar para telas menores */
    .fechar-btn {
        top: 5px; /* Ajusta ainda mais para dentro */
        right: 10px; /* Ajusta ainda mais para dentro */
        font-size: 20px; /* Reduz ainda mais o tamanho no mobile */
    }
    /* --- FIM DA ALTERAÇÃO --- */
}