/* ========== RESET ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ========== CSS VARIABLES (Design System) ========== */
:root {
  --bg: hsl(180, 20%, 99%);
  --fg: hsl(200, 25%, 15%);
  --card: hsl(0, 0%, 100%);
  --card-fg: hsl(200, 25%, 15%);
  --primary: hsl(175, 45%, 30%);
  --primary-fg: hsl(0, 0%, 100%);
  --primary-light: hsl(175, 45%, 30%, 0.1);
  --primary-light2: hsl(175, 45%, 30%, 0.2);
  --secondary: hsl(180, 15%, 95%);
  --muted: hsl(200, 10%, 45%);
  --accent: hsl(38, 70%, 55%);
  --accent-light: hsl(38, 70%, 55%, 0.2);
  --border: hsl(180, 15%, 88%);
  --section-alt: hsl(180, 20%, 97%);
  --whatsapp: hsl(142, 70%, 40%);
  --whatsapp-fg: hsl(0, 0%, 100%);
  --hero-overlay-start: hsl(175, 50%, 20%, 0.88);
  --hero-overlay-mid: hsl(175, 50%, 20%, 0.65);
  --hero-overlay-end: hsl(175, 50%, 20%, 0.4);
  --radius: 0.75rem;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow-elegant: 0 4px 30px hsl(175, 45%, 30%, 0.08), 0 1px 3px hsl(200, 25%, 15%, 0.05);
  --shadow-hover: 0 10px 40px hsl(175, 45%, 30%, 0.12), 0 2px 6px hsl(200, 25%, 15%, 0.06);
}

/* ========== BASE ========== */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ========== CONTAINER ========== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeUp { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { 0% { opacity: 0; transform: translateX(-40px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { 0% { opacity: 0; transform: translateX(40px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { 0% { opacity: 0; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(10px); } }
@keyframes popIn { 0% { transform: scale(0); } 80% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes slideDown { 0% { opacity: 0; max-height: 0; } 100% { opacity: 1; max-height: 500px; } }

.animate-fade-up { animation: fadeUp 0.9s ease-out both; }
.animate-fade-left { animation: fadeInLeft 0.8s ease-out both; }
.animate-fade-right { animation: fadeInRight 0.8s ease-out both; }
.animate-scale-in { animation: scaleIn 1s ease-out 0.3s both; }
.animate-pop-in { animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) 1s both; }

/* Reveal triggers */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ========== NAVBAR ========== */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1.25rem 0; transition: all 0.5s ease; }
.navbar.scrolled {
  background: hsl(180, 20%, 99%, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid hsl(180, 15%, 88%, 0.5);
  box-shadow: var(--shadow-elegant);
  padding: 0.75rem 0;
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { display: flex; flex-direction: column; line-height: 1.2; }
.navbar-brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--primary-fg); transition: color 0.3s; }
.navbar.scrolled .navbar-brand-name { color: var(--primary); }
.navbar-brand-sub { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: hsl(0, 0%, 100%, 0.7); transition: color 0.3s; }
.navbar.scrolled .navbar-brand-sub { color: var(--muted); }

.navbar-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.navbar-link { font-size: 0.875rem; font-weight: 500; color: hsl(0, 0%, 100%, 0.8); transition: all 0.3s; position: relative; }
.navbar-link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--primary-fg); transition: width 0.3s; }
.navbar-link:hover::after { width: 100%; }
.navbar-link:hover { color: var(--primary-fg); }
.navbar.scrolled .navbar-link { color: hsl(200, 25%, 15%, 0.7); }
.navbar.scrolled .navbar-link:hover { color: var(--primary); }
.navbar.scrolled .navbar-link::after { background: var(--primary); }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--whatsapp);
  color: var(--whatsapp-fg);
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}
.btn-whatsapp:hover { transform: scale(1.05); box-shadow: 0 4px 20px hsl(142, 70%, 40%, 0.3); }
.btn-whatsapp-lg { padding: 1rem 2rem; font-size: 1.125rem; }

.navbar-toggle { display: none; background: none; border: none; color: var(--primary-fg); cursor: pointer; padding: 0.5rem; font-size: 1.5rem; }
.navbar.scrolled .navbar-toggle { color: var(--fg); }
.navbar-mobile { display: none; background: var(--card); box-shadow: var(--shadow-elegant); overflow: hidden; animation: slideDown 0.3s ease-out; }
.navbar-mobile.open { display: block; }
.navbar-mobile-inner { padding: 1.5rem 2rem; display: flex; flex-direction: column; gap: 1rem; }
.navbar-mobile-link { color: hsl(200, 25%, 15%, 0.8); font-weight: 500; padding: 0.5rem 0; }

@media (max-width: 768px) { .navbar-links { display: none; } .navbar-toggle { display: block; } }

/* ========== HERO - VERSÃO FINAL COM BACKGROUND PROFISSIONAL ========== */
.hero { 
  position: relative; 
  min-height: 100vh; 
  display: flex; 
  align-items: center; 
  overflow: hidden; 
  background-color: #1a2a2d; /* Cor de fundo caso a internet falhe */
}

/* Fundo com imagem de consultório (Opção B - Unsplash) */
.hero-bg { 
  position: absolute; 
  inset: 0; 
  background-image: url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?auto=format&fit=crop&q=80&w=2070') !important; 
  background-size: cover; 
  background-position: center; 
  z-index: 0; 
}

/* Overlay esverdeado para dar o tom da marca e garantir leitura */
.hero-overlay { 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(
    135deg, 
    rgba(26, 42, 45, 0.9) 0%, 
    rgba(61, 122, 114, 0.7) 100%
  ) !important; 
  z-index: 1; 
}

/* Conteúdo da Hero (Texto e Botões) */
.hero-content { 
  position: relative; 
  z-index: 10 !important; /* Coloca o conteúdo à frente do fundo verde */
  padding: 8rem 0; 
  width: 100%;
}

.hero-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 3rem; 
  align-items: center; 
}

/* Títulos e Textos */
.hero-title { 
  font-size: 3.5rem; 
  font-weight: 700; 
  color: #ffffff !important; 
  line-height: 1.1; 
}

.hero-title-accent { 
  color: #ce9d53 !important; /* Tom dourado/laranja igual ao print */
  display: block;
}

.hero-text { 
  color: rgba(255, 255, 255, 0.9) !important; 
  max-width: 480px;
  font-size: 1.125rem;
  margin-bottom: 2rem;
}
/* ========== CORREÇÃO DA VISIBILIDADE DO CRM ========== */
.hero-crm { 
  color: #ffffff !important; /* Muda de cinza transparente para branco sólido */
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  margin-bottom: 2rem !important;
  display: block !important;
  opacity: 1 !important; /* Garante que não haja transparência */
}
/* ========== CORREÇÃO DO SUBTÍTULO (NEUROLOGISTA) ========== */
.hero-subtitle {
  color: #ffffff !important; /* Força o branco total */
  font-size: 0.875rem !important;
  letter-spacing: 0.3em !important;
  text-transform: uppercase !important;
  margin-bottom: 1rem !important;
  display: block !important;
  opacity: 1 !important; /* Remove qualquer transparência que o Copilot tenha colocado */
  font-weight: 500 !important;
}

/* ====== AJUSTE DA FOTO DA MÉDICA (QUADRO INCLINADO) ====== */
.hero-image-wrapper {
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-image-bg {
  position: absolute;
  inset: -1rem;
  background: rgba(206, 157, 83, 0.2); /* Brilho dourado suave atrás */
  border-radius: 2rem;
  transform: rotate(3deg);
}

.medica1 { 
  background-color: transparent !important; 
  background-image: none !important; 
  width: 380px; 
  height: 500px; 
  position: relative;
  z-index: 2;
}

.medica1 .hero-image { 
  opacity: 1 !important; /* AGORA A FOTO APARECE */
  width: 100% !important; 
  height: 100% !important; 
  object-fit: cover !important; 
  object-position: top !important; /* Não corta a cabeça */
  border-radius: 2rem; 
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
  /* Verifique se o nome na sua pasta é medica1.jpeg */
  content: url('../assets/images/medica1.jpeg') !important; 
}

/* Botões da Hero */
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-whatsapp-lg {
  background-color: #24d366 !important;
  color: white !important;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.3s;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}
.medica1 .hero-image { opacity: 0; }

.medica2 { 
  /* Ajustado para focar no topo da imagem e não cortar a cabeça */
  background-image: url('../assets/images/medica2.jpeg'); 
  background-size: cover; 
  background-position: top center !important; 
  border-radius: 2rem; 
  min-height: 500px; 
}
.medica2 .about-image { opacity: 0; }

.about-card.medica3 .about-card-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 0.75rem;
  color: var(--primary);
  display: block;
}

.hero-scroll { 
  position: absolute; 
  bottom: 2rem; 
  left: 50%; 
  transform: translateX(-50%); 
  z-index: 10; 
  color: hsl(0, 0%, 100%, 0.5); 
  animation: bounce 2s infinite; 
}

@media (max-width: 768px) { 
  .hero-grid { grid-template-columns: 1fr; text-align: center; } 
  .hero-image-wrapper { display: none; } 
  .hero-title { font-size: 2.5rem; } 
  .hero-buttons { justify-content: center; } 
}

/* ========== ABOUT ========== */
.about { padding: 6rem 0; background: var(--section-alt); }

.about-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 4rem; 
  align-items: center; /* Alinha o texto verticalmente com o centro da imagem */
}

.about-image-wrapper { position: relative; }

.about-image-bg { 
  position: absolute; 
  inset: -0.75rem; 
  background: var(--primary-light); 
  border-radius: 2rem; 
  transform: rotate(-2deg); 
}

.about-image { 
  position: relative; 
  border-radius: 2rem; 
  width: 100%; 
  height: 500px; 
  object-fit: cover; 
  /* Garante que o corte da imagem priorize o topo (rosto) */
  object-position: top !important; 
  box-shadow: var(--shadow-elegant); 
}

.section-label { 
  color: var(--primary); 
  font-size: 0.875rem; 
  letter-spacing: 0.2em; 
  text-transform: uppercase; 
  margin-bottom: 0.75rem; 
}

.section-title { 
  font-family: var(--font-display); 
  font-size: 2.25rem; 
  font-weight: 700; 
  color: var(--fg); 
  line-height: 1.2; 
  margin-bottom: 1.5rem; 
}

.text-gradient { 
  background: linear-gradient(135deg, hsl(175, 45%, 30%), hsl(175, 55%, 45%)); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  background-clip: text; 
}

.about-text { 
  color: var(--muted); 
  line-height: 1.8; 
  margin-bottom: 1.5rem; 
  font-size: 1.125rem; 
}

/* Ajustado para alinhar os quadrados perfeitamente */
.about-cards { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 1rem; 
  margin-top: 2rem; 
  /* Força todos os quadrados a terem a mesma altura */
  align-items: stretch !important; 
}

.about-card { 
  background: var(--card); 
  padding: 1.25rem; 
  border-radius: 0.75rem; 
  box-shadow: var(--shadow-elegant); 
  text-align: center; 
  transition: all 0.3s; 
  /* Garante que o conteúdo interno se organize para preencher o espaço */
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100% !important;
}

.about-card:hover { 
  box-shadow: var(--shadow-hover); 
  transform: translateY(-4px); 
}

.about-card-icon { 
  width: 28px; 
  height: 28px; 
  margin: 0;
}

@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } .about-cards { grid-template-columns: 1fr; } }

/* ========== SPECIALTIES ========== */
.specialties { padding: 6rem 0; }
.specialties-header { text-align: center; margin-bottom: 4rem; }
.specialties-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.specialty-card { background: var(--card); padding: 2rem; border-radius: 1rem; box-shadow: var(--shadow-elegant); border: 1px solid hsl(180, 15%, 88%, 0.5); transition: all 0.5s; }
.specialty-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-8px); }
.specialty-icon { width: 3.5rem; height: 3.5rem; background: var(--primary-light); border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.specialty-icon svg { width: 28px; height: 28px; color: var(--primary); }

@media (max-width: 1024px) { .specialties-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .specialties-grid { grid-template-columns: 1fr; } }

/* ========== ENMG ========== */
.enmg { padding: 6rem 0; background: var(--section-alt); }
.enmg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.enmg-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1rem; }
.enmg-card { background: var(--card); border-radius: 1rem; padding: 2rem; box-shadow: var(--shadow-elegant); border: 1px solid hsl(180, 15%, 88%, 0.5); }
.enmg-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.enmg-list li { display: flex; align-items: flex-start; gap: 0.75rem; color: hsl(200, 25%, 15%, 0.8); }
.enmg-check { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }

@media (max-width: 768px) { .enmg-grid { grid-template-columns: 1fr; } }

/* ========== RODAPÉ ORGANIZADO ========== */
.footer {
  background-color: #1a2a2d !important;
  color: #ffffff !important;
  padding: 80px 0 30px 0 !important;
}

.footer-grid {
  display: grid !important;
  grid-template-columns: 1.5fr 1fr 1fr !important; /* Define 3 colunas claras */
  gap: 4rem !important;
  align-items: start !important;
}

.footer-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  text-align: left !important;
}

.footer-title, .footer-subtitle {
  font-family: 'Playfair Display', serif !important;
  color: #ffffff !important;
  margin: 0 0 0.5rem 0 !important;
}

.footer-text, .footer-info-item span {
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Alinhamento dos itens com ícone */
.footer-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.2rem !important;
}

.footer-info-item {
  display: flex !important;
  align-items: center !important; /* Alinha ícone com centro da linha */
  gap: 12px !important;
}

.footer-info-item svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  color: #24d366 !important;
  flex-shrink: 0 !important;
}

/* Trava o ícone do Instagram */
.footer-social-link svg {
  width: 24px !important;
  height: 24px !important;
  color: #ffffff !important;
  margin-top: 10px !important;
}

.footer-bottom {
  margin-top: 60px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  text-align: center !important;
  font-size: 0.8rem !important;
  opacity: 0.6;
}

/* Responsivo para Celular */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
    text-align: center !important;
  }
  .footer-col {
    align-items: center !important;
  }
}

/* ========== WHATSAPP FAB ========== */
.whatsapp-fab { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 99; width: 4rem; height: 4rem; background: var(--whatsapp); color: var(--whatsapp-fg); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px hsl(142, 70%, 40%, 0.4); transition: transform 0.3s; animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) 1s both; }
.whatsapp-fab:hover { transform: scale(1.1); }
.whatsapp-fab svg { width: 28px; height: 28px; }

/* ========== UTILITY ========== */
.mt-8 { margin-top: 2rem; }
.text-lg { font-size: 1.125rem; }