/* --- VARIÁVEIS E RESET --- */
:root {
    --primary-color: #2E8B57; /* Verde da Logo */
    --secondary-color: #66CDAA; 
    --dark-green: #006400;
    --text-color: #333;
    --light-bg: #f9fdf9;
    --white: #ffffff;
    --gray-bg: #f0f4f0;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Open Sans', sans-serif; }
html { scroll-behavior: smooth; }
body { background-color: var(--light-bg); color: var(--text-color); line-height: 1.6; overflow-x: hidden; display: flex; flex-direction: column; min-height: 100vh; }
h1, h2, h3, h4 {  font-family: 'Montserrat', sans-serif; color: var(--dark-green); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- HEADER --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed; width: 100%; top: 0; z-index: 1000;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; text-align: center; }
.navbar { display: flex; justify-content: space-between; align-items: center; height: 80px; }
/* .logo-img { height: 110px; width: auto; } */

.nav-links { display: flex; gap: 25px; font-size: 14px;}
.nav-links a { font-weight: 600; transition: var(--transition); position: relative; }
.nav-links a:hover { color: var(--primary-color); }
.nav-links .active-link { color: var(--primary-color); }

.btn-cta-nav {
    background-color: var(--primary-color); color: var(--white) !important;
    padding: 10px 25px; border-radius: 25px; font-weight: 700 !important;
}
.btn-cta-nav:hover { background-color: var(--dark-green); transform: scale(1.05); }

/* Hamburguer Mobile */
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: var(--primary-color); transition: var(--transition); }

/* --- HERO SECTION (Padrão) --- */

/* Layout do Hero com 2 Colunas */
.hero-layout {
    display: flex;
    align-items: center; /* Centraliza texto e imagem verticalmente */
    justify-content: space-between;
    height: 100%;
    gap: 20px;
}

.hero-text {
    margin-top: 30px;
    flex: 1;
    text-align: left; /* Alinhado à esquerda para dar espaço à imagem */
}

.hero-doctor {
    flex: 1;
    display: flex;
    align-items: flex-end; /* Faz o doutor encostar no chão da seção */
    height: 100%;
}

.hero-doctor img {
    max-height: 100%; /* Ajusta o tamanho do doutor */
    width: auto;
    margin-bottom: -5px; /* Garante que não haja espaço embaixo */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); /* Sombra suave no recorte */
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards 0.8s;
}

/* Ajuste Responsivo: No celular o doutor some ou fica em segundo plano */
@media (max-width: 992px) {
    .hero-doctor img {
    max-height: 90%; /* Ajusta o tamanho do doutor */
    width: auto;
    margin-bottom: -5px; /* Garante que não haja espaço embaixo */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); /* Sombra suave no recorte */
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards 0.8s;
}

    .hero-text {
        text-align: left; /* Centraliza o texto quando não tem o doutor */
    }
}

@media (max-width: 650px) {
  .hero-doctor img {
    max-height: 90%; /* Ajusta o tamanho do doutor */
    width: auto;
    margin-bottom: -5px; /* Garante que não haja espaço embaixo */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); /* Sombra suave no recorte */
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards 0.8s;
}


@media (max-width: 769px) {
  .hero-doctor img {
    max-height: 90%; /* Ajusta o tamanho do doutor */
    width: auto;
    margin-bottom: -5px; /* Garante que não haja espaço embaixo */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); /* Sombra suave no recorte */
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards 0.8s;
}
}

@media (max-width: 969px) {
  .hero-doctor img {
    max-height: 90%; /* Ajusta o tamanho do doutor */
    width: auto;
    margin-bottom: -5px; /* Garante que não haja espaço embaixo */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); /* Sombra suave no recorte */
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards 0.8s;
}
}

    .hero-text {
        text-align: left; /* Centraliza o texto quando não tem o doutor */
    }
}

.hero {
    margin-top: 80px;
    background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.95)), url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover; background-position: center;
    height: 40vh; display: flex; align-items: center; text-align: center;
}
.hero-content { max-width: 800px; margin: 0 auto; }
.hero h1 { margin-top: 80px; font-size: 2.8rem; margin-bottom: 20px; line-height: 1.2; opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s ease forwards 0.2s; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; color: #555; opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s ease forwards 0.4s; }
.hero-btn-wrapper { opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s ease forwards 0.6s; }

/* --- HERO MENOR (Para páginas internas) --- */
.page-header {
    margin-top: 80px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.page-header h1 { color: var(--white); margin-bottom: 10px; }

@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.btn-main {
    display: inline-block;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--white); padding: 15px 40px; border-radius: 50px;
    font-size: 1.1rem; font-weight: 700; box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4);
    transition: var(--transition); cursor: pointer; border: none;
}
.btn-main:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(46, 139, 87, 0.6); }

/* --- GRIDS E CARDS --- */
.section-padding { margin-top: 45px; padding: 75px 0; }
.text-center { 
    text-align: center; 
    margin-bottom: 50px;
    
    /* Configuração da Animação */
    opacity: 0; 
    transform: translateY(30px); 
    transition: all 0.8s ease; /* Um pouco mais lento para ficar elegante */
}

/* Quando o JS ativar, ela fica visível */
.text-center.animate { 
    opacity: 1; 
    transform: translateY(0); 
}
.cards-grid { 
    display: grid; 
    /* Cria colunas automáticas. Mínimo 260px (para caber melhor lado a lado no tablet) */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
    gap: 25px; /* Espaço generoso entre os cards */
    width: 100%;
}
/* Estilo do Card de Serviço */
.service-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    /* Animação Scroll */
    opacity: 0; transform: translateX(-50px);
}
.service-card.animate { opacity: 1; transform: translateX(0); }

.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(46, 139, 87, 0.15); border-color: var(--secondary-color); }

.card-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 30px; text-align: center; color: var(--white);
}
.card-icon i { font-size: 3rem; }

.card-body { padding: 30px; text-align: center; }
.card-body h3 { margin-bottom: 15px; }
.card-body p { margin-bottom: 25px; color: #666; font-size: 0.95rem; }

.btn-card {
    color: var(--primary-color); font-weight: 700; border: 2px solid var(--primary-color);
    padding: 8px 20px; border-radius: 20px; transition: var(--transition); display: inline-block;
}
.btn-card:hover { background-color: var(--primary-color); color: var(--white); }

/* --- EQUIPE --- */
.team-card {
    background-color: var(--white); border-radius: 15px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); text-align: center;
    opacity: 0; transform: translateY(30px); transition: var(--transition);
}
.team-card.animate { opacity: 1; transform: translateY(0); }
.team-card:hover { transform: translateY(-5px); }

.team-img-wrapper { height: 300px; overflow: hidden; }
.team-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.team-card:hover .team-img-wrapper img { transform: scale(1.1); }

.team-info { padding: 25px; }
.team-info h3 { margin-bottom: 5px; font-size: 1.3rem; }
.team-info span { color: var(--primary-color); font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 15px; }

/* --- FOOTER (Fixo no fundo se a pag for pequena) --- */
/* --- NOVO FOOTER HORIZONTAL --- */
footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 60px 0 20px;
    margin-top: auto;
    border-top: 4px solid var(--primary-color);
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Alinha as colunas horizontalmente */
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}

.footer-box {
    flex: 1; /* Faz as colunas dividirem o espaço igualmente */
    min-width: 250px; /* Impede que fiquem muito apertadas */
}

.footer-box h4 {
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-size: 1.2rem;
    position: relative;
}

/* Linha embaixo do título da coluna */
.footer-box h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-box ul li {
    margin-bottom: 12px;
    list-style: none;
}

.footer-box li i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-box a {
    color: #ccc;
    transition: var(--transition);
}

.footer-box a:hover {
    color: var(--white);
    padding-left: 5px;
}

/* Rodapé final (Direitos Autorais) */
.ludnai-footer {
    display: flex;
    justify-content: space-between; /* Texto de um lado, marca do outro */
    align-items: center;
    padding-top: 20px;
    font-size: 0.85rem;
    color: #888;
}

.ludnai-footer span {
    color: var(--secondary-color);
    font-weight: bold;
    letter-spacing: 1px;
}

/* Ajuste Responsivo para o Footer */
@media (max-width: 768px) {
    .footer-grid {
        flex-direction: column; /* No mobile, volta a ser vertical */
        gap: 30px;
        text-align: center;
    }
    
    .footer-box h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .ludnai-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* --- WHATSAPP FLUTUANTE --- */
.float-btn {
    position: fixed; width: 60px; height: 60px; bottom: 25px; right: 25px;
    background-color: #25d366; color: #FFF; border-radius: 50px; text-align: center;
    font-size: 30px; box-shadow: 2px 2px 3px #999; z-index: 1000;
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.float-btn:hover { background-color: #128C7E; transform: scale(1.1); }

@media (max-width:768px) {
    .section-padding { margin-top: 75px;}
    .text-center.animate p { font-size: 21px;}
}

@media (max-width:300px) {
    .section-padding { margin-top: 75px;}
    .text-center.animate p { font-size: 21px;}
}

@media (max-width:560px) {
    .hero-btn-wrapper { 
        margin-top: 68px;
     }
}


@media (max-width:560px) {
    .hero p{ display: none;}
}

@media (max-width:560px) {
     .hero-layout { height: 100%; gap: 7px; }
}

@media (max-width:560px) {
     .hero-doctor { height: 90%;  }
}

@media (max-width:560px) {
    
    .navbar {
        height: 90px;
    }
   
}

@media (max-width:920px) {
    
    .navbar {
        height: 85px;
    }
   
}


/* --- RESPONSIVO --- */
@media (max-width: 768px) {
    .navbar { padding: 0 10px; }
    .hamburger { display: block; border: none; background: no-repeat; cursor: pointer; }
    .nav-links {
        position: fixed; left: -100%; top: 80px; gap: 0; flex-direction: column;
        background-color: var(--white); width: 100%; text-align: center; transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1); padding-bottom: 20px;
    }
    .nav-links.active { left: 0; }
    .nav-links li { margin: 16px 0; }
    .hero h1 { margin-top: 165px; font-size: 30px; }
}

@media (max-width: 380px) {
    
.hero {
    margin-top: 20px;
    background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.95)),  url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    height: 40vh;
    display: flex;
    align-items: center;
    text-align: center;
}
}
@media (max-width: 789px) {
    
.hero {
    margin-top: 26px;
    background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.95)),  url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    height: 42vh;
    display: flex;
    align-items: center;
    text-align: center;
}
}

@media (max-width: 667px) {
    .hero-layout { height: 100%; gap: 0px;  }
    }
    @media (max-width: 967px) {
    .hero-layout { height: 100%; gap: 0px;  }
    }

@media (max-width: 600px) {
    .text-center { margin-bottom: 25px;}
    }

@media (max-width: 600px) {
    .hero-text h1 { font-size: 27px; line-height: 38px;}
    }

/* Atualize esta classe no seu style.css */
.logo-img {
    margin-top: -5px;   
    height: 132px; /* Tamanho visual na tela */
    width: auto;
    image-rendering: crisp-edges ; /* Firefox */
    /* image-rendering: pixelated;   Chrome, Edge  Mantém a proporção */
    
    /* TRUQUES PARA NITIDEZ */
    object-fit: contain; /* Garante que a imagem não corte nem estique */
    
    /* Melhora a renderização no Chrome/Safari */
    /* image-rendering: -webkit-optimize-contrast;  */
    
    /* Evita bugs visuais no mobile */
    transform: translateZ(0); 
    backface-visibility: hidden;
}

/* Ajuste para celular (opcional, se quiser a logo menor no mobile) */
@media (max-width: 400px) {
    .logo-img {
        margin-top: 34px;
        
    width: auto;
    height: 146px;
    image-rendering: crisp-edges;
    object-fit: contain;
    /* image-rendering: -webkit-optimize-contrast; */
    transform: translateZ(0);
    backface-visibility: hidden;
    }
}

@media (max-width: 969px) {
    .logo-img {
    margin-top: -10px;
    height: 140px;
    image-rendering: crisp-edges;
    object-fit: contain;
    /* image-rendering: -webkit-optimize-contrast; */
    transform: translateZ(0);
    backface-visibility: hidden;
    }
}


@media (max-width: 600px) {
    .section-padding {
        margin-top: 30px;
    }
    .section-padding h2 {
        font-size: 22px;
    }
     .section-padding p {
        display: none;    }

}

@media (max-width: 600px) {
    .btn-main {
    font-size: 17px;
    display: ruby-text;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 13px 18px;
    border-radius: 18px;
    /* font-size: 1.1rem; */
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    /* align-items: center; */
}
}

@media (max-width: 600px) {
    .cards-grid { 
        grid-template-columns: repeat(2, 1fr); /* Mantém 2 colunas */
        gap: 15px; /* Gap um pouco menor no celular */
    }
    .service-card h3 {
        font-size: 0.9rem; /* Título um pouco menor para caber */
    }
    .service-card p {
        display: none; /* Esconde descrição no mobile para ficar limpo com 15 itens */
    }
}


/* --- ESTILOS DA PÁGINA CLÍNICA (Carrossel e Mapa) --- */

/* Carrossel Container */
.carousel-section {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* O segredo do deslizamento suave no mobile */
    gap: 15px;
    padding-bottom: 20px; /* Espaço para scrollbar não cobrir */
    scrollbar-width: none; /* Esconde scrollbar no Firefox */
}

.carousel-container::-webkit-scrollbar {
    display: none; /* Esconde scrollbar no Chrome/Safari */
}

.carousel-item {
    flex: 0 0 100%; /* Cada foto ocupa 100% da largura do container */
    scroll-snap-align: center; /* A foto sempre para no meio */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.carousel-item img {
    width: 100%;
    height: 400px; /* Altura fixa profissional */
    object-fit: cover;
    display: block;
}

/* Botões do Carrossel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.prev-btn { left: 30px; }
.next-btn { right: 30px; }

/* Estilo do Mapa */
.map-frame-wrapper {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 4px solid #fff;
}

/* RESPONSIVIDADE DO CARROSSEL */
@media (max-width: 768px) {
    .carousel-item img {
        height: 250px; /* Altura menor no celular */
    }
    
    .carousel-btn {
        width: 40px; height: 40px; font-size: 1rem;
        background-color: rgba(255,255,255,0.9); /* Mais visível no mobile */
    }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
}

/* --- PÁGINA EQUIPE / DENTISTAS (Minimalista) --- */

.team-grid-text {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Colunas no PC */
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.team-card-minimal {
    background: #fff;
    padding: 40px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Sombra bem leve e moderna */
    border-top: 5px solid #006400; /* Detalhe verde no topo para dar cor */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card-minimal:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* Ícone no lugar da foto */
.icon-header {
    font-size: 3rem;
    color: #2E8B57; /* Verde SeaGreen */
    margin-bottom: 20px;
    background: #f0fdf4;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.team-card-minimal h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Linha separadora pequena */
.separator {
    width: 40px;
    height: 3px;
    background-color: #ddd;
    margin: 0 auto 20px auto;
}

.specialties-list {
    list-style: none;
    padding: 0;
}

.specialties-list li {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

/* RESPONSIVIDADE */
@media (max-width: 900px) {
    .team-grid-text {
        grid-template-columns: repeat(2, 1fr); /* 2 por linha no Tablet */
    }
}

@media (max-width: 600px) {
    .team-grid-text {
        grid-template-columns: 1fr; /* Um embaixo do outro no Celular */
    }
    
    .team-card-minimal {
        padding: 30px 15px;
    }
}