/* ===== VARIÁVEIS ===== */
:root {
  --azul:           #2B6CB0;
  --azul-dark:      #1E4E8C;
  --lilas:          #9F7AEA;
  --lilas-dark:     #7C3AED;
  --azul-claro:     #EBF4FF;
  --lilas-claro:    #E9D8FD;
  --texto:          #1A202C;
  --texto-suave:    #4A5568;
  --branco:         #FFFFFF;
  --cinza-claro:    #F7FAFC;
  --borda:          #E2E8F0;
  --radius:         10px;
  --sombra:         0 2px 12px rgba(0,0,0,.08);
  --sombra-md:      0 4px 20px rgba(0,0,0,.12);
  --verde-whatsapp: #25D366;
}

/* ===== RESET / BASE ===== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--texto);
  background: var(--branco);
}

h1, h2, h3, h4, h5 {
  font-weight: 700;
  color: var(--texto);
}

a { color: var(--azul); text-decoration: none; }
a:hover { color: var(--azul-dark); }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--branco);
  border-bottom: 1px solid var(--borda);
  padding: 1rem 0;
  box-shadow: var(--sombra);
}

.navbar-brand {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--azul) !important;
  letter-spacing: -0.5px;
}

.navbar-brand span {
  color: var(--lilas);
}

.nav-link {
  color: var(--texto-suave) !important;
  font-weight: 500;
  padding: 0.4rem 0.9rem !important;
  border-radius: var(--radius);
  transition: all .2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--azul) !important;
  background: var(--azul-claro);
}

.btn-agendar-nav {
  background: var(--azul);
  color: var(--branco) !important;
  border-radius: 50px;
  padding: 0.4rem 1.2rem !important;
  font-weight: 600;
  transition: all .2s;
}

.btn-agendar-nav:hover {
  background: var(--azul-dark);
  transform: translateY(-1px);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--azul-claro) 0%, var(--lilas-claro) 100%);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(159,122,234,.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-badge {
  display: inline-block;
  background: var(--lilas-claro);
  color: var(--lilas-dark);
  font-size: .8rem;
  font-weight: 600;
  padding: .3rem .9rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
  letter-spacing: .5px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  color: var(--texto);
}

.hero h1 span {
  color: var(--azul);
}

.hero p.lead {
  color: var(--texto-suave);
  font-size: 1.15rem;
  max-width: 540px;
}

.texto-metrica {
  color: var(--texto-suave);
  font-size: .85rem;
}

/* ===== BOTÕES ===== */
.btn-primario {
  background: var(--azul);
  color: var(--branco);
  border: none;
  padding: .75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all .25s;
  display: inline-block;
}

.btn-primario:hover {
  background: var(--azul-dark);
  color: var(--branco);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43,108,176,.35);
}

.btn-secundario {
  background: transparent;
  color: var(--azul);
  border: 2px solid var(--azul);
  padding: .7rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all .25s;
  display: inline-block;
}

.btn-secundario:hover {
  background: var(--azul);
  color: var(--branco);
  transform: translateY(-2px);
}

/* ===== SEÇÕES ===== */
.secao-titulo {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: .5rem;
}

.secao-subtitulo {
  color: var(--texto-suave);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.secao-badge {
  display: inline-block;
  background: var(--azul-claro);
  color: var(--azul);
  font-size: .82rem;
  font-weight: 700;
  padding: .25rem .8rem;
  border-radius: 50px;
  margin-bottom: .8rem;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ===== CARDS DE ESPECIALIDADE ===== */
.card-especialidade {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all .25s;
  height: 100%;
}

.card-especialidade:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-md);
  border-color: var(--azul);
}

.card-especialidade .icone-wrap {
  width: 64px; height: 64px;
  background: var(--azul-claro);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.2rem;
  font-size: 1.6rem;
  color: var(--azul);
  transition: all .25s;
}

.card-especialidade:hover .icone-wrap {
  background: var(--azul);
  color: var(--branco);
}

.card-especialidade h5 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.card-especialidade p {
  color: var(--texto-suave);
  font-size: .9rem;
  margin: 0;
}

/* ===== CARDS DE DIFERENCIAL ===== */
.card-diferencial {
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.cards-diferenciais > .col-6:nth-child(even) {
  margin-top: 1.5rem;
}

/* ===== CARDS DE MÉDICO ===== */
.card-medico {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
  height: 100%;
}

.card-medico:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-md);
}

.card-medico .foto-wrap {
  background: linear-gradient(135deg, var(--azul-claro), var(--lilas-claro));
  height: 200px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.card-medico .foto-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.card-medico .foto-placeholder {
  font-size: 4rem;
  color: var(--azul);
  opacity: .5;
}

.card-medico .corpo {
  padding: 1.4rem;
}

.card-medico h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .2rem;
}

.card-medico .crm {
  font-size: .8rem;
  color: var(--texto-suave);
  margin-bottom: .4rem;
}

.card-medico .especialidade-tag {
  display: inline-block;
  background: var(--azul-claro);
  color: var(--azul);
  font-size: .75rem;
  font-weight: 600;
  padding: .15rem .6rem;
  border-radius: 50px;
  margin-bottom: .8rem;
}

.card-medico p {
  color: var(--texto-suave);
  font-size: .88rem;
  margin: 0;
  line-height: 1.5;
}

/* ===== CONVÊNIOS ===== */
.card-convenio {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all .2s;
}

.card-convenio:hover {
  box-shadow: var(--sombra);
  border-color: var(--azul);
}

.card-convenio img {
  max-height: 60px;
  object-fit: contain;
}

.card-convenio .nome-convenio {
  font-weight: 600;
  font-size: 1rem;
  color: var(--texto-suave);
  margin-top: .5rem;
}

/* ===== FORMULÁRIO DE CONTATO ===== */
.form-control, .form-select {
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: .7rem 1rem;
  font-size: .95rem;
  transition: border-color .2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(43,108,176,.15);
}

.form-label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--texto);
  margin-bottom: .4rem;
}

/* ===== BLOG ===== */
.card-post {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-post:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-md);
}

.card-post .capa {
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--azul-claro), var(--lilas-claro));
  display: flex; align-items: center; justify-content: center;
}

.card-post .capa img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.card-post:hover .capa img {
  transform: scale(1.05);
}

.card-post .corpo {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-post .categoria-tag {
  display: inline-block;
  background: var(--azul-claro);
  color: var(--azul);
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .6rem;
  border-radius: 50px;
  margin-bottom: .7rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.card-post h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.4;
}

.card-post .resumo {
  color: var(--texto-suave);
  font-size: .88rem;
  line-height: 1.5;
  flex: 1;
}

.card-post .rodape {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: .8rem;
  border-top: 1px solid var(--borda);
  font-size: .8rem;
  color: var(--texto-suave);
}

/* ===== PAINEL DA CLÍNICA ===== */
.painel-topbar {
  background: var(--azul);
  color: white;
  padding: .6rem 0;
  font-size: .88rem;
  margin-bottom: 0;
}
.painel-topbar a { color: rgba(255,255,255,.75); text-decoration: none; }
.painel-topbar a:hover { color: white; }

/* ===== SIDEBAR ===== */
.sidebar-widget {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget h6 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--azul);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--azul-claro);
}

.sidebar-post {
  display: flex;
  gap: .8rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--borda);
}

.sidebar-post:last-child { border-bottom: none; }

.sidebar-post img {
  width: 60px; height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.sidebar-post .img-placeholder {
  width: 60px; height: 60px;
  background: var(--azul-claro);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--azul);
}

.sidebar-post .info h6 {
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: .2rem;
  color: var(--texto);
  border: none;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}

.sidebar-post .info small {
  color: var(--texto-suave);
}

.tag-cloud .tag-item {
  display: inline-block;
  background: var(--cinza-claro);
  color: var(--texto-suave);
  font-size: .8rem;
  padding: .25rem .7rem;
  border-radius: 50px;
  margin: .2rem;
  border: 1px solid var(--borda);
  transition: all .2s;
}

.tag-cloud .tag-item:hover {
  background: var(--azul-claro);
  color: var(--azul);
  border-color: var(--azul);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--texto);
  color: rgba(255,255,255,.75);
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
}

.footer h6 {
  color: var(--branco);
  font-weight: 700;
  margin-bottom: 1.2rem;
  font-size: .95rem;
}

.footer a {
  color: rgba(255,255,255,.65);
  display: block;
  margin-bottom: .4rem;
  transition: color .2s;
  font-size: .9rem;
}

.footer a:hover { color: var(--branco); }

.footer p {
  font-size: .9rem;
  line-height: 1.6;
  color: rgba(255,255,255,.75);
}

.footer .copy a {
  color: rgba(255,255,255,.4);
  display: inline;
  margin: 0;
  font-size: inherit;
}

.footer .logo-footer {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--branco);
  margin-bottom: .5rem;
}

.footer .logo-footer span { color: var(--lilas); }

.footer .divider {
  border-color: rgba(255,255,255,.1);
  margin: 2rem 0 1rem;
}

.footer .copy {
  font-size: .82rem;
  color: rgba(255,255,255,.4);
}

.footer .social-icons a {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  margin-right: .4rem;
  color: rgba(255,255,255,.7) !important;
  transition: all .2s;
  font-size: 1rem;
}

.footer .social-icons a:hover {
  background: var(--azul);
  color: var(--branco) !important;
}

/* ===== WHATSAPP FLUTUANTE ===== */
.whatsapp-float {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 9999;
  width: 58px; height: 58px;
  background: var(--verde-whatsapp);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.5);
  transition: all .25s;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,.6);
}

.whatsapp-float svg {
  width: 30px; height: 30px;
  fill: white;
}

/* ===== SEÇÃO CTA ===== */
.secao-cta {
  background: linear-gradient(135deg, var(--azul) 0%, var(--lilas-dark) 100%);
  padding: 4rem 0;
  color: white;
}

.secao-cta h2 { color: white; }

.secao-cta p { color: rgba(255,255,255,.85); }

.btn-cta-branco {
  background: white;
  color: var(--azul);
  padding: .75rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  transition: all .25s;
  display: inline-block;
  border: 2px solid white;
}

.btn-cta-branco:hover {
  background: transparent;
  color: white;
  transform: translateY(-2px);
}

.btn-cta-outline {
  background: transparent;
  color: white;
  padding: .75rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,.6);
  display: inline-block;
  transition: all .25s;
}

.btn-cta-outline:hover {
  background: rgba(255,255,255,.15);
  color: white;
  border-color: white;
  transform: translateY(-2px);
}

/* ===== PARALLAX ===== */
.secao-parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 5rem 0;
}

.secao-parallax::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.secao-parallax .parallax-conteudo {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  max-width: 700px;
  padding: 0 1.5rem;
}

.secao-parallax .parallax-conteudo p {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 600;
  line-height: 1.4;
  color: white;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

@media (max-width: 768px) {
  .secao-parallax { background-attachment: scroll; min-height: 300px; }
}

/* ===== PÁGINA SOBRE ===== */
.sobre-highlight {
  background: var(--azul-claro);
  border-left: 4px solid var(--azul);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}

.numero-destaque {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--azul);
  line-height: 1;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-humana {
  background: var(--cinza-claro);
  padding: .75rem 0;
  border-bottom: 1px solid var(--borda);
  font-size: .88rem;
}

.breadcrumb-humana .breadcrumb { margin: 0; }

.breadcrumb-item a { color: var(--azul); }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, var(--azul-claro) 0%, var(--lilas-claro) 100%);
  padding: 3rem 0 2.5rem;
}

.page-header h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }

/* ===== ALERTAS ===== */
.alert-humana-sucesso {
  background: #F0FFF4;
  border: 1px solid #9AE6B4;
  color: #276749;
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
}

/* ===== UTILS ===== */
.bg-azul-claro   { background: var(--azul-claro); }
.bg-lilas-claro  { background: var(--lilas-claro); }
.bg-cinza-claro  { background: var(--cinza-claro); }
.text-azul  { color: var(--azul); }
.text-lilas { color: var(--lilas); }
.text-suave { color: var(--texto-suave); }

section { padding: 4rem 0; }

.rounded-humana { border-radius: var(--radius); }

/* ===== RESPONSIVIDADE MOBILE ===== */
@media (max-width: 768px) {
  .hero .d-flex { flex-direction: column; }
  .card-post .capa { height: 160px; }
  .page-header { padding: 2rem 0 1.5rem; }
  .cards-diferenciais > .col-6:nth-child(even) { margin-top: 0; }
}

@media (max-width: 576px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero p.lead { max-width: 100%; }
  .secao-titulo { font-size: 1.5rem; }
  section { padding: 2.5rem 0; }
  .secao-cta { padding: 2.5rem 0; }
  .whatsapp-float { bottom: 16px; right: 16px; width: 50px; height: 50px; }
  .whatsapp-float svg { width: 24px; height: 24px; }
  .footer { padding: 2.5rem 0 1rem; }
  .btn-primario, .btn-secundario { padding: .65rem 1.5rem; font-size: .93rem; }
  .card-especialidade { padding: 1.4rem 1rem; }
  .card-diferencial { padding: 1.2rem .8rem; }
  .numero-destaque { font-size: 1.8rem; }
  iframe[src*="google.com/maps"] { height: 240px; }
}

/* ===== PAGINAÇÃO ===== */
.pagination .page-link {
  color: var(--azul);
  border-color: var(--borda);
  min-width: 38px;
  text-align: center;
}

.pagination .page-item.active .page-link {
  background-color: var(--azul);
  border-color: var(--azul);
}

.pagination .page-link:hover {
  background-color: var(--azul-claro);
  color: var(--azul);
}

/* ===== MESSAGES (Django) ===== */
.alert-success { background: #F0FFF4; border-color: #9AE6B4; color: #276749; }
.alert-error, .alert-danger { background: #FFF5F5; border-color: #FEB2B2; color: #742A2A; }
