/* bradescosaudeconvenio.com.br - estilo do site
   Cores: vinho do bradescosaudeconvenio.com + vermelho/cartões do site oficial. */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fontes/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fontes/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fontes/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fontes/poppins-700.woff2") format("woff2"); }

:root {
  --vinho: #77031a;
  --vinho-escuro: #4a0010;
  --vermelho: #cc092f;
  --texto: #1f2430;
  --suave: #5b6170;
  --linha: #e6e7eb;
  --fundo: #f4f4f6;
  --branco: #fff;
  --raio: 10px;
  --sombra: 0 2px 10px rgb(20 20 40 / 8%);
  --largura: 1180px;
  font-family: "Poppins", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  color: var(--texto);
  line-height: 1.65;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--branco); overflow-x: clip; }
img, svg { max-width: 100%; }
a { color: var(--vermelho); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.i { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }

.pular {
  position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: .6rem 1rem;
  background: var(--vinho); color: var(--branco); border-radius: 6px;
}
.pular:focus { top: 1rem; }

.visualmente-oculto {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Botões */
.botao {
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 6px; border: 2px solid var(--vermelho);
  background: var(--vermelho); color: var(--branco); font-weight: 700;
  text-decoration: none; text-transform: uppercase; font-size: .95rem; letter-spacing: .02em;
}
.botao:hover { background: var(--vinho); border-color: var(--vinho); }
.botao.contorno { background: transparent; color: var(--vermelho); }
.botao.contorno:hover { background: var(--vermelho); color: var(--branco); }
.botao.claro { background: var(--branco); color: var(--vinho); border-color: var(--branco); }

/* Atalhos de cotação (faixa de cima) */
.atalhos {
  display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem;
  padding: .35rem max(1rem, calc((100% - var(--largura)) / 2));
  background: #5c5f66; font-size: .875rem;
}
.atalhos ul { display: flex; gap: 1.2rem; }
.atalhos a { display: inline-block; padding: .35rem 0; color: var(--branco); text-decoration: none; }
.atalhos .telefone { font-weight: 700; font-size: .95rem; }

/* Cabeçalho */
.cabecalho {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem max(1rem, calc((100% - var(--largura)) / 2));
  background: var(--branco); box-shadow: 0 1px 0 var(--linha);
}
.marca { display: flex; flex-shrink: 0; align-items: center; text-decoration: none; }
.marca img { width: 150px; height: auto; }

.principal { display: flex; align-items: center; gap: 1.5rem; }
.menu { display: flex; gap: 1.2rem; }
.menu > li { position: relative; }
.menu a { display: inline-flex; align-items: center; gap: .2rem; padding: .6rem 0; color: var(--texto); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.menu a:hover { color: var(--vermelho); }
.menu .seta { width: .9em; height: .9em; }
.painel {
  display: none; position: absolute; top: 100%; left: -1rem; min-width: 230px;
  padding: .6rem 0; background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra);
}
.painel a { display: block; padding: .45rem 1rem; font-weight: 500; }
.menu > li:hover .painel, .menu > li:focus-within .painel { display: block; }

.abre-menu, .fecha-menu {
  display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--vinho); font-size: 1.6rem; cursor: pointer;
}
.menu-celular { border: 0; padding: 1.5rem; width: min(85vw, 340px); height: 100vh; margin: 0 0 0 auto; }
.menu-celular::backdrop { background: rgb(0 0 0 / 45%); }
.menu-celular ul { display: grid; gap: .2rem; margin-top: 1rem; }
.menu-celular a { display: block; padding: .6rem 0; color: var(--texto); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--linha); }
.menu-celular .fecha-menu { display: block; margin-left: auto; }

/* Seções */
main > section { padding: 4rem max(1rem, calc((100% - var(--largura)) / 2)); }
main > section > h2 {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 400;
  border-left: 4px solid var(--vermelho); padding-left: .7rem;
}
main > section > h2 strong { font-weight: 700; }
.intro { max-width: 760px; color: var(--suave); }
.centro { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2rem; }

/* Topo: imagem do .com com camada vinho por cima */
.topo {
  position: relative; isolation: isolate; overflow: hidden; color: var(--branco);
  background: var(--vinho-escuro);
  padding-top: 5.5rem !important; padding-bottom: 5.5rem !important;
}
.topo .fundo {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: right center;
}
.topo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(40 0 9 / 97%) 0%, rgb(74 0 16 / 92%) 45%, rgb(96 2 21 / 55%) 75%, rgb(96 2 21 / 35%) 100%);
}
/* Topo com banner: imagem atrás do texto, pessoa à direita, véu vinho só do lado do texto */
.topo-banner .fundo { object-position: right center; }
.topo-banner .fundo[src*="banner-ia-"] { object-position: right center; }
.topo-banner::before, .topo-pagina::before {
  background: linear-gradient(90deg, rgb(60 0 14 / 97%) 0%, rgb(119 3 26 / 93%) 35%, rgb(160 6 36 / 72%) 55%, rgb(204 9 47 / 35%) 78%, rgb(204 9 47 / 15%) 100%);
}
.topo-texto { max-width: 720px; }
.topo h1 { margin: 1rem 0 1.2rem; font-size: clamp(1.9rem, 3.8vw, 2.9rem); font-weight: 700; line-height: 1.15; }
.topo h1 .linha { display: block; }
.topo h1 .oferta { display: block; margin-top: .5rem; font-size: .72em; font-weight: 600; }
.topo h1 mark { background: none; color: #ffd84d; white-space: nowrap; }
.topo .selo {
  display: inline-block; padding: .25rem .8rem; border-radius: 99px;
  background: rgb(255 255 255 / 14%); font-size: .85rem; font-weight: 600; text-transform: uppercase;
}
.vantagens-topo { display: grid; gap: .4rem; margin: 1.2rem 0 1.6rem; }
.vantagens-topo li { display: flex; gap: .5rem; align-items: center; }
.acoes { display: flex; flex-wrap: wrap; gap: .8rem; }
.topo .botao.contorno { color: var(--branco); border-color: var(--branco); }
.topo .botao.contorno:hover { background: var(--branco); color: var(--vinho); }
.ans { margin-top: 1.5rem; font-size: .8rem; opacity: .85; }

/* Cartões de perfil (estilo do site oficial) */
.perfis { background: var(--fundo); padding-top: 0 !important; }
.cartoes { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: -2.5rem; }
.cartoes li {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 1.8rem 1.2rem; background: var(--branco); border-radius: 6px; box-shadow: var(--sombra);
}
.cartoes > li > .i { width: 2.6rem; height: 2.6rem; color: var(--vermelho); stroke-width: 1.5; margin-bottom: 1rem; }
.cartoes h3 { font-size: 1.05rem; }
.cartoes p { color: var(--suave); font-size: 1rem; flex: 1; }
.cartoes a, .cartoes-planos a, .servicos a { display: inline-flex; align-items: center; gap: .2rem; min-height: 44px; font-weight: 700; text-decoration: none; font-size: .95rem; }
.cartoes a .i, .cartoes-planos a .i, .servicos a .i { width: 1em; height: 1em; }

/* Planos */
.cartoes-planos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 2rem; }
.cartoes-planos > li {
  display: flex; flex-direction: column; padding: 1.6rem; border: 1px solid var(--linha);
  border-top: 4px solid var(--vinho); border-radius: var(--raio);
}
.cartoes-planos > li.destaque { background: var(--vinho); color: var(--branco); }
.cartoes-planos > li.destaque a { color: var(--branco); }
.cartoes-planos h3 { font-size: 1.15rem; }
.cartoes-planos p { flex: 1; font-size: 1rem; }
.cartoes-planos ul { display: grid; gap: .3rem; margin-bottom: 1rem; font-size: .95rem; }
.cartoes-planos ul li::before { content: "✓ "; color: var(--vermelho); font-weight: 700; }
.cartoes-planos .destaque ul li::before { color: var(--branco); }

/* Empresa */
.empresa { background: var(--fundo); }
.duas-colunas { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin-top: 1.5rem; }
.duas-colunas img { width: 100%; height: auto; border-radius: var(--raio); box-shadow: var(--sombra); }
.duas-colunas p { margin-bottom: 1.5rem; }
.lista-icones { display: grid; gap: .9rem; }
.lista-icones li { display: flex; gap: .7rem; align-items: center; font-weight: 600; }
.lista-icones .i { width: 1.6rem; height: 1.6rem; color: var(--vermelho); }

/* Família */
.familia { display: grid; grid-template-columns: 1fr 1.2fr; column-gap: 3rem; align-items: center; }
.familia-texto .lista-icones { margin-top: 1.2rem; }
.familia > h2, .familia > .cartoes-links { grid-column: 1 / -1; }
.foto-familia { grid-row: 2 / 3; width: 100%; height: auto; border-radius: var(--raio); box-shadow: var(--sombra); }
.cartoes-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.5rem; }
.cartoes-links a {
  display: flex; gap: .6rem; align-items: center; padding: 1rem 1.2rem; border-radius: var(--raio);
  background: var(--fundo); color: var(--vinho); font-weight: 700; text-decoration: none;
}
.cartoes-links a:hover { background: var(--vinho); color: var(--branco); }

/* Passos */
.passos ol { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 2rem; counter-reset: passo; }
.passos li { counter-increment: passo; padding: 1.4rem; border-radius: var(--raio); background: var(--fundo); }
.passos li::before {
  content: counter(passo); display: grid; place-items: center; width: 2.2rem; height: 2.2rem;
  margin-bottom: .8rem; border-radius: 50%; background: var(--vermelho); color: var(--branco); font-weight: 700;
}
.passos h3 { font-size: 1.05rem; }
.passos p { font-size: 1rem; color: var(--suave); margin: 0; }

/* Chamada */
.chamada { background: var(--vinho); color: var(--branco); text-align: center; }
.chamada > h2 { border: 0; padding: 0; font-weight: 700; }
.chamada p { max-width: 720px; margin-inline: auto; }

/* Rede credenciada */
.tipos-rede { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1.5rem 0; font-weight: 600; }
.tipos-rede .i { color: var(--vermelho); width: 1.5rem; height: 1.5rem; }
.estados { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.estados a {
  display: block; padding: .7rem .9rem; border-radius: 6px; background: var(--fundo);
  color: var(--texto); text-decoration: none; font-size: .95rem; font-weight: 600;
}
.estados a:hover { background: var(--vinho); color: var(--branco); }

/* Caixa sobre a rede referenciada */
.caixa-rede { max-width: 900px; margin: 1.5rem 0; padding: 1.4rem 1.6rem; border-left: 4px solid var(--vinho); background: var(--fundo); border-radius: 0 var(--raio) var(--raio) 0; }
.caixa-rede h3 { font-size: 1.15rem; }
.caixa-rede p { margin: 0; }

/* Clientes (estilo "Serviços para você" do site oficial) */
.clientes { background: var(--fundo); }
.servicos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1.5rem; margin-top: 2rem; }
.servicos li { display: grid; grid-template-columns: 3rem 1fr; column-gap: .8rem; }
.servicos > li > .i { grid-row: span 3; width: 2.4rem; height: 2.4rem; color: var(--vermelho); stroke-width: 1.5; }
.servicos h3 { font-size: 1.05rem; margin: 0 0 .3rem; }
.servicos p { font-size: 1rem; color: var(--suave); margin: 0 0 .2rem; }

/* Perguntas */
.perguntas > h2 { text-align: center; border: 0; padding: 0; font-weight: 600; }
.perguntas details { max-width: 900px; margin: 0 auto .7rem; padding: 0 1.3rem; border-radius: 8px; background: var(--fundo); }
.perguntas summary { min-height: 48px; padding: .9rem 0; cursor: pointer; font-weight: 600; font-size: 1.02rem; }
.perguntas details p { margin: 0; padding-bottom: 1.1rem; color: var(--suave); }

/* Cotação */
.cotacao { text-align: center; background: var(--fundo); }
.lista-cotacao { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.5rem 0 2rem; text-align: left; }
.lista-cotacao li { display: flex; gap: .6rem; align-items: center; padding: 1rem; background: var(--branco); border-radius: var(--raio); font-weight: 600; }
.lista-cotacao .i { width: 1.5rem; height: 1.5rem; color: var(--vermelho); }
.cotacao > h2 { border: 0; padding: 0; font-weight: 700; }

/* Rodapé */
/* Rodapé no desenho do .com: faixa cinza com chamada + corpo grafite com curva e filete vermelho */
.rodape { --lado: max(1rem, calc((100% - var(--largura)) / 2)); color: #e4e4e4; font-size: .95rem; }
.rodape-faixa { display: flex; align-items: center; justify-content: space-between; gap: 2rem; background: #757575; padding: 3.2rem var(--lado) calc(3.2rem + 100px); }
.rodape-faixa p { max-width: 620px; margin: 0; color: var(--branco); font-size: 1.06rem; font-weight: 300; line-height: 1.8; }
.rodape-faixa .botao { flex: none; background: #a30825; border-radius: 3px; box-shadow: 4px 5px 0 rgb(0 0 0 / 50%); text-transform: uppercase; font-weight: 700; padding: 1.05rem 2.4rem; }
.rodape-faixa .botao:hover { background: var(--vinho); color: var(--branco); }
.rodape-corpo { position: relative; margin-top: -100px; background: #4b4b4b; border-radius: 100px 100px 0 0; box-shadow: 0 -8px 0 #a30825; padding: 3.5rem var(--lado) 1.8rem; }
.rodape .colunas { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2.5rem; }
.rodape h2 { font-size: 1.35rem; font-weight: 700; color: var(--branco); margin: 0 0 1rem; }
.rodape section p { font-weight: 300; }
.rodape ul { display: grid; gap: 0; max-width: 240px; }
.rodape li { border-bottom: 1px solid rgb(255 255 255 / 10%); }
.rodape li:last-child { border-bottom: 0; }
.rodape li a, .rodape section a { display: inline-block; padding: .4rem 0; }
.rodape a { color: #e4e4e4; font-weight: 300; text-decoration: none; }
.rodape a:hover { color: var(--branco); text-decoration: underline; }
.rodape-legal { display: grid; grid-template-columns: 1fr auto; gap: .6rem 2rem; margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgb(209 209 209 / 14%); font-size: .875rem; font-weight: 300; line-height: 1.7; }
.rodape .aviso { grid-column: 1 / -1; margin: 0; text-align: justify; hyphens: auto; }
.rodape .empresa-dados { font-style: normal; margin: 0; }
.rodape .empresa-dados strong { font-weight: 600; color: var(--branco); }
.rodape .direitos { margin: 0; align-self: end; text-align: right; }
.rodape section p, .rodape-faixa p { text-align: justify; hyphens: auto; }

/* ===== Páginas internas (dobras) ===== */
.cinza { background: var(--fundo); }
.dobra h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; border-left: 4px solid var(--vermelho); padding-left: .7rem; }
.dobra h3 { font-weight: 600; }
.dobra .intro { max-width: 820px; }
.topo-pagina h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.topo-pagina .trilha { margin-bottom: 1rem; }
.trilha ol { display: flex; flex-wrap: wrap; gap: .3rem; font-size: .85rem; }
.trilha li + li::before { content: "\203A"; margin-right: .3rem; opacity: .7; }
.trilha a { color: var(--branco); }
.escuro { background: linear-gradient(135deg, var(--vinho-escuro), var(--vinho) 70%); color: var(--branco); }
.escuro h2 { border-color: var(--branco); }
.escuro p, .escuro .intro { color: rgb(255 255 255 / 88%); }
.escuro a { color: var(--branco); }

/* Lista com marcas */
.checks { display: grid; gap: .6rem; margin: 1rem 0 0; }
.checks li { display: flex; gap: .6rem; align-items: flex-start; }
.checks .i { color: var(--vermelho); margin-top: .2em; }
.checks.em-grade { grid-template-columns: 1fr 1fr; gap: .9rem 2.5rem; margin-top: 1.8rem; }

/* Texto + foto */
.texto-imagem .duas-colunas { grid-template-columns: 1.1fr 1fr; margin-top: 0; }
.texto-imagem.invertido .foto { order: -1; }
.texto-imagem .texto p { margin-bottom: 1rem; }
.duas-colunas .foto, .foto { width: 100%; height: auto; border-radius: var(--raio); box-shadow: 14px 14px 0 rgb(119 3 26 / 14%); }

/* Cartões */
.grade-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2rem; }
.grade-cards li { display: flex; flex-direction: column; padding: 1.6rem; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra); }
.dobra.cards:not(.cinza):not(.escuro) .grade-cards li { background: var(--fundo); box-shadow: none; }
.grade-cards > li > .i { width: 2.4rem; height: 2.4rem; color: var(--vermelho); stroke-width: 1.5; margin-bottom: .9rem; }
.grade-cards h3 { font-size: 1.1rem; }
.grade-cards p { color: var(--suave); margin: 0 0 .6rem; flex: 1; }
.grade-cards a { display: inline-flex; align-items: center; gap: .2rem; min-height: 44px; font-weight: 600; text-decoration: none; }
.escuro .grade-cards li { background: rgb(255 255 255 / 8%); border: 1px solid rgb(255 255 255 / 14%); box-shadow: none; }
.escuro .grade-cards > li > .i { color: var(--branco); }
.escuro .grade-cards p { color: rgb(255 255 255 / 85%); }
.cards.escuro > h2, .dobra.chamada h2 { border: 0; padding: 0; text-align: center; }
.cards.escuro > .intro { margin-inline: auto; text-align: center; }

/* Sanfona (linhas) */
.linhas .duas-colunas { align-items: start; }
.sanfona { display: grid; gap: .7rem; }
.sanfona details { padding: 0 1.1rem; border-radius: 8px; background: rgb(255 255 255 / 10%); }
.sanfona summary { display: flex; align-items: center; gap: .6rem; min-height: 48px; padding: .8rem 0; cursor: pointer; list-style: none; }
.sanfona summary::-webkit-details-marker { display: none; }
.sanfona summary h3 { margin: 0; font-size: 1rem; }
.sanfona details[open] summary .i { transform: rotate(180deg); }
.sanfona details p { font-size: .95rem; }

/* Passos (dobras) */
.dobra.passos ol { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.passos.cinza li { background: var(--branco); }

/* Tabela */
.dobra-tabela .tabela { margin-top: 1.5rem; }
.tabela { overflow-x: auto; margin-bottom: 1.5rem; }
.tabela table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--branco); }
.tabela caption { text-align: left; font-weight: 600; margin-bottom: .5rem; }
.tabela th, .tabela td { padding: .7rem .9rem; border-bottom: 1px solid var(--linha); text-align: left; }
.tabela thead th { background: var(--vinho); color: var(--branco); font-weight: 600; }
.tabela tbody tr:nth-child(even) { background: var(--fundo); }
.nota { max-width: 900px; padding: 1rem 1.2rem; border-left: 4px solid var(--vinho); background: var(--fundo); font-size: .95rem; border-radius: 0 var(--raio) var(--raio) 0; }
.cinza .nota { background: var(--branco); }
.grade-hospitais + .nota { margin-top: 1.5rem; }

/* Hospitais */
.grade-hospitais { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2rem; }
.grade-hospitais li { overflow: hidden; padding: 1.2rem 0 1rem; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra); }
.grade-hospitais li:has(img) { padding-top: 0; }
.grade-hospitais .foto { display: block; margin-bottom: 1rem; border-radius: 0; box-shadow: none; aspect-ratio: 16 / 10; object-fit: cover; }
.grade-hospitais h3, .grade-hospitais p { padding: 0 1.2rem; }
.grade-hospitais h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.grade-hospitais p { font-size: .95rem; color: var(--suave); }
.cidade { display: flex; align-items: center; gap: .3rem; margin-bottom: .5rem; font-weight: 500; }
.cidade .i { color: var(--vermelho); }
.linhas-hosp { font-size: .9rem !important; margin: 0; }
.grade-hospitais:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
.grade-hospitais:has(> li:only-child) { grid-template-columns: 1fr; }
.grade-hospitais > li:only-child:has(img) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; align-content: start; padding: 0; }
.grade-hospitais > li:only-child:has(img) .foto { grid-row: span 5; height: 100%; margin: 0; }
.grade-hospitais > li:only-child:has(img) h3 { margin-top: 1.5rem; }
.grade-hospitais > li:only-child h3, .grade-hospitais > li:only-child p { padding-left: 0; }

/* Chamada */
.chamada .botao.contorno { color: var(--branco); border-color: var(--branco); }
.chamada a:not(.botao) { color: var(--branco); }
.chamada .botao.contorno:hover { background: var(--branco); color: var(--vinho); }
/* Chamada com foto ao lado (home e páginas internas) */
.chamada.com-foto { text-align: left; }
.chamada.com-foto h2, .dobra.chamada.com-foto h2 { border: 0; padding: 0; font-weight: 600; font-size: clamp(1.5rem, 3vw, 2rem); text-align: left; margin-top: 0; }
.chamada.com-foto .duas-colunas { grid-template-columns: 1.15fr 1fr; margin-top: 0; }
.chamada.com-foto p { max-width: none; margin-inline: 0; text-align: justify; hyphens: auto; }
.chamada.com-foto .acoes { display: flex; flex-wrap: wrap; gap: .8rem; text-align: left; margin: 1.6rem 0 0; }
.chamada.com-foto .foto { box-shadow: 14px 14px 0 rgb(255 255 255 / 14%); }

/* Texto corrido + caixas */
.texto-corrido { max-width: 860px; }
.caixas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 1.8rem; }
.caixas section { padding: 1.4rem 1.6rem; border-top: 4px solid var(--vinho); border-radius: var(--raio); background: var(--fundo); }
.cinza .caixas section { background: var(--branco); }
.caixas h3 { font-size: 1.1rem; }
.caixas p:last-child { margin-bottom: 0; }

/* Rede por estado */
.estados a { display: flex; align-items: center; gap: .4rem; }
.estados .i { color: var(--vermelho); width: 1em; height: 1em; }
.estados a:hover .i { color: var(--branco); }
.cinza .estados a { background: var(--branco); }

/* Números */
.numeros dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin: 2rem 0 0; }
.numeros dl div { padding: 1.4rem; border-radius: var(--raio); background: var(--fundo); text-align: center; }
.numeros.cinza dl div { background: var(--branco); }
.numeros dt { font-size: 2rem; font-weight: 700; color: var(--vinho); line-height: 1.2; }
.numeros dd { margin: .3rem 0 0; color: var(--suave); }

.atualizado { margin-top: 1.5rem; font-size: .85rem; color: var(--suave); }
.relacionados { padding: 3rem max(1rem, calc((100% - var(--largura)) / 2)); }
.relacionados h2 { font-size: 1.5rem; border-left: 4px solid var(--vermelho); padding-left: .7rem; }
.relacionados ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1.2rem; }
.relacionados a {
  display: flex; gap: .4rem; align-items: center; min-height: 44px; padding: .8rem 1rem;
  border-radius: var(--raio); background: var(--fundo); color: var(--vinho); font-weight: 600; text-decoration: none;
}
.relacionados a:hover { background: var(--vinho); color: var(--branco); }

/* Tablet */
@media (max-width: 1400px) {
  .menu { gap: 1rem; }
  .menu a { font-size: .9rem; }
}

@media (max-width: 1080px) {
  .principal { display: none; }
  .abre-menu { display: block; margin-left: auto; }
}

@media (max-width: 1000px) {
  .cartoes, .cartoes-planos, .passos ol, .cartoes-links, .lista-cotacao { grid-template-columns: repeat(2, 1fr); }
  .servicos, .estados { grid-template-columns: repeat(2, 1fr); }
  .rodape .colunas { grid-template-columns: 1fr 1fr; }
  .rodape-faixa { flex-direction: column; text-align: center; }
  .rodape-corpo { border-radius: 60px 60px 0 0; }
  .rodape-legal { grid-template-columns: 1fr; }
  .rodape .direitos { text-align: left; }
  .relacionados ul, .grade-cards, .grade-hospitais, .numeros dl { grid-template-columns: 1fr 1fr; }
  .texto-imagem .duas-colunas, .linhas .duas-colunas, .chamada.com-foto .duas-colunas { grid-template-columns: 1fr; gap: 2rem; }
  .texto-imagem.invertido .foto { order: 0; }
}

/* Celular */
@media (max-width: 640px) {
  .atalhos ul { display: none; }
  .topo-banner .fundo, .topo-banner .fundo[src*="banner-ia-"] { object-position: 88% 25%; }
  .topo-banner::before, .topo-pagina::before { background: linear-gradient(180deg, rgb(90 0 20 / 86%) 0%, rgb(150 6 36 / 72%) 100%); }
  .atalhos { justify-content: center; }
  main > section { padding-top: 3rem; padding-bottom: 3rem; }
  .topo { padding-top: 3rem !important; padding-bottom: 3.5rem !important; }
  .cartoes { margin-top: -1.5rem; gap: .8rem; }
  .cartoes li { display: grid; grid-template-columns: 2.6rem 1fr; column-gap: 1rem; text-align: left; align-items: start; padding: 1.2rem; }
  .cartoes > li > .i { grid-row: span 3; margin: 0; width: 2.2rem; height: 2.2rem; }
  .cartoes h3, .cartoes p { margin-bottom: .3rem; }
  .lista-cotacao { grid-template-columns: 1fr; }
  .caixa-rede { padding: 1.2rem; }
  .relacionados ul { grid-template-columns: 1fr; }
  .grade-cards, .grade-hospitais, .grade-hospitais:has(> li:nth-child(2):last-child), .caixas, .checks.em-grade, .numeros dl { grid-template-columns: 1fr; }
  .grade-hospitais > li:only-child:has(img) { display: block; padding-bottom: 1rem; }
  .grade-hospitais > li:only-child:has(img) .foto { margin-bottom: 1rem; }
  .grade-hospitais > li:only-child h3, .grade-hospitais > li:only-child p { padding: 0 1.2rem; }
  .duas-colunas .foto, .foto { box-shadow: 8px 8px 0 rgb(119 3 26 / 14%); }
  .cartoes, .cartoes-planos, .passos ol, .cartoes-links, .servicos, .duas-colunas, .rodape .colunas, .familia { grid-template-columns: 1fr; }
  .foto-familia { grid-row: auto; margin-bottom: 1.5rem; }
  .marca img { width: 120px; }
  .estados { grid-template-columns: 1fr 1fr; }
  .duas-colunas { gap: 1.5rem; }
}

/* ===== Páginas de rede credenciada (layout próprio) ===== */
/* Topo da rede: texto no vinho à esquerda e a fachada num quadro nítido à direita */
.topo-rede {
  background:
    radial-gradient(circle at 88% 8%, rgb(204 9 47 / 55%) 0, transparent 42%),
    radial-gradient(circle at 70% 110%, rgb(204 9 47 / 30%) 0, transparent 40%),
    linear-gradient(120deg, #2e000a 0%, var(--vinho-escuro) 45%, var(--vinho) 100%);
  padding-bottom: 6.5rem !important;
}
.topo-rede::before { display: none; }
.topo-rede-grade { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3.5rem; align-items: center; }
.topo-rede .topo-texto { max-width: none; }
.topo-rede .topo-texto > p:not(.selo):not(.acoes) { opacity: .92; }
.foto-rede { position: relative; margin: 0; }
.foto-rede img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; box-shadow: 16px 16px 0 rgb(255 255 255 / 12%), 0 20px 40px rgb(0 0 0 / 35%); }
.foto-rede figcaption { position: absolute; left: 1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: .35rem; max-width: calc(100% - 2rem); padding: .4rem .8rem; border-radius: 99px; background: rgb(255 255 255 / 94%); color: var(--texto); font-size: .82rem; font-weight: 600; }
.foto-rede figcaption .i { color: var(--vermelho); }
.numeros-cartoes .cartoes { margin-top: -3.5rem; }
.numeros-cartoes .cartoes li { padding: 1.5rem 1.2rem; }
.numeros-cartoes .cartoes > li > .i { width: 2.2rem; height: 2.2rem; margin-bottom: .6rem; }
.numeros-cartoes .numero { margin: 0; font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--vinho); flex: none; }
.numeros-cartoes h3 { margin: .3rem 0 .2rem; }
.numeros-cartoes p:not(.numero) { font-size: .9rem; margin: 0 0 .4rem; }

/* PDFs oficiais */
.grade-pdfs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin: 2rem 0 1.5rem; }
.grade-pdfs li { display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid var(--linha); border-top: 4px solid var(--vermelho); border-radius: var(--raio); background: var(--branco); }
.grade-pdfs .pdf { width: 2.4rem; height: 2.4rem; color: var(--vermelho); stroke-width: 1.5; margin-bottom: .8rem; }
.grade-pdfs h3 { font-size: 1.1rem; }
.grade-pdfs p { flex: 1; color: var(--suave); font-size: .95rem; }
.grade-pdfs a, .tabela-pdfs a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-weight: 700; text-decoration: none; }
.grade-pdfs a + a { margin-top: -.4rem; }
.tabela-pdfs td a { min-height: 0; font-weight: 600; }

/* Principais hospitais */
.rede-destaques { background: var(--fundo); }
.grade-destaques { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; margin-top: 2rem; }
.grade-destaques > li { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra); }
.grade-destaques > li > img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.grade-destaques > li > .sem-foto { aspect-ratio: 16 / 9; min-height: 0; }
.sem-foto { display: grid; place-items: center; min-height: 160px; background: linear-gradient(135deg, var(--vinho-escuro), var(--vinho)); color: var(--branco); }
.sem-foto .i { width: 3rem; height: 3rem; stroke-width: 1.3; opacity: .8; }
.grade-destaques .corpo { padding: 1.3rem 1.4rem; }
.grade-destaques h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.grade-destaques h4 { margin: 1rem 0 .4rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--suave); }
.grade-destaques .descricao { margin: .8rem 0 0; font-size: .95rem; color: var(--suave); }
.etiquetas, .especialidades { display: flex; flex-wrap: wrap; gap: .35rem; }
.etiquetas li { padding: .15rem .6rem; border-radius: 99px; background: #f9e3e7; color: var(--vinho); font-size: .78rem; font-weight: 600; }
.especialidades li { padding: .15rem .6rem; border-radius: 6px; background: var(--fundo); font-size: .82rem; }
.linhas-plano { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem .5rem; font-size: .78rem; color: #9a9ea8; }
.linhas-plano li { display: flex; align-items: center; gap: .25rem; white-space: nowrap; }
.linhas-plano li.sim { color: var(--vermelho); font-weight: 600; }
.linhas-plano .i { width: .95em; height: .95em; }
.site-oficial { margin: .8rem 0 0; }
.site-oficial a { display: inline-flex; align-items: center; gap: .2rem; min-height: 44px; font-weight: 600; text-decoration: none; }

/* Lista completa por cidade */
.rede-lista details, .labs-capital { margin: .7rem 0; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--branco); }
.rede-lista summary, .labs-capital summary { display: flex; align-items: center; gap: .6rem; min-height: 52px; padding: .7rem 1.1rem; cursor: pointer; list-style: none; }
.rede-lista summary::-webkit-details-marker, .labs-capital summary::-webkit-details-marker { display: none; }
.rede-lista summary h3, .labs-capital summary h3 { margin: 0; font-size: 1.05rem; }
.rede-lista summary span, .labs-capital summary span { margin-left: auto; padding: .1rem .7rem; border-radius: 99px; background: var(--fundo); color: var(--vinho); font-size: .85rem; font-weight: 600; }
.rede-lista details[open] summary .i, .labs-capital[open] summary .i { transform: rotate(180deg); }
.rede-lista summary .i, .labs-capital summary .i { color: var(--vermelho); }
.tabela-rede { margin: 0 1rem 1rem; }
.tabela-rede table { font-size: .88rem; }
.tabela-rede thead th { font-size: .74rem; text-align: center; padding: .55rem .4rem; }
.tabela-rede thead th:first-child { text-align: left; }
.tabela-rede th[scope="row"] { min-width: 230px; font-weight: 600; }
.tabela-rede th small { display: block; font-weight: 400; color: var(--suave); font-size: .78rem; }
.tabela-rede td { text-align: center; padding: .5rem .4rem; }
.tabela-rede td .i { color: var(--vermelho); }

/* Rede regional e laboratórios */
.rede-regional { background: var(--fundo); }
.rede-regional .tabela { margin-top: 1.5rem; }
.rede-regional td { font-size: .92rem; }
.cidades-labs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; margin-top: 1.5rem; }
.cidades-labs li { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; border-radius: 8px; background: var(--fundo); font-size: .95rem; }
.cidades-labs .i { color: var(--vermelho); }
.cidades-labs strong { margin-left: auto; color: var(--vinho); }
.mais-cidades { margin-top: 1rem; color: var(--suave); }
.labs-capital { margin-top: 1.5rem; }
.labs-capital ul { columns: 3; column-gap: 2rem; padding: 0 1.1rem 1rem; font-size: .9rem; }
.labs-capital li { break-inside: avoid; padding: .3rem 0; border-bottom: 1px solid var(--linha); }
.labs-capital li span { display: block; font-size: .8rem; color: var(--suave); }
.labs-capital > p { padding: 0 1.1rem 1rem; font-size: .9rem; color: var(--suave); }

/* Estados com foto */
.estados-fotos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.5rem; }
.estados-fotos a { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra); color: var(--texto); text-decoration: none; }
.estados-fotos img, .estados-fotos .sem-foto { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; min-height: 0; }
.estados-fotos strong { padding: .7rem .9rem 0; color: var(--vinho); }
.estados-fotos span:last-child { padding: 0 .9rem .8rem; font-size: .82rem; color: var(--suave); }
.estados-fotos a:hover strong { color: var(--vermelho); }
.cinza .estados-fotos a { background: var(--branco); }

@media (max-width: 1000px) {
  .topo-rede-grade { grid-template-columns: 1fr; gap: 2rem; }
  .foto-rede { max-width: 620px; }
  .grade-destaques { grid-template-columns: 1fr; }
  .estados-fotos { grid-template-columns: repeat(3, 1fr); }
  .labs-capital ul { columns: 2; }
}
@media (max-width: 640px) {
  .numeros-cartoes .cartoes { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .numeros-cartoes .cartoes li { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; padding: 1.1rem .7rem; }
  .numeros-cartoes .cartoes > li > .i { display: none; }
  .numeros-cartoes .numero { font-size: 1.6rem; }
  .numeros-cartoes h3 { font-size: .95rem; overflow-wrap: anywhere; }
  .numeros-cartoes p:not(.numero) { font-size: .82rem; }
  .numeros-cartoes .cartoes a { font-size: .85rem; min-height: 40px; }
  .foto-rede img { box-shadow: 0 14px 30px rgb(0 0 0 / 35%); }
  .linhas-plano { grid-template-columns: repeat(2, 1fr); }
  .estados-fotos { grid-template-columns: 1fr 1fr; }
  .labs-capital ul { columns: 1; }
  .tabela-rede { margin: 0 .5rem .8rem; }
}
.tabela-rede td { font-size: 0; }
.tabela-rede td.sim::before { content: "✓"; font-size: 1rem; font-weight: 700; color: var(--vermelho); }


/* ===== Formulário de pedido (carta de permanência) ===== */
.pedido-grade { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3rem; align-items: start; }
.pedido-texto h2 { margin-top: 0; }
.pedido-texto p { text-align: justify; hyphens: auto; }
.form-pedido { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; padding: 2rem; background: var(--branco); border-top: 4px solid var(--vermelho); border-radius: var(--raio); box-shadow: 0 10px 30px rgb(20 20 40 / 10%); }
.form-pedido p { margin: 0; }
.form-pedido .inteiro { grid-column: 1 / -1; }
.form-pedido label { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 600; }
.form-pedido label small { font-weight: 400; color: var(--suave); }
.form-pedido input:not([type=checkbox]), .form-pedido select, .form-pedido textarea {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: .7rem .85rem; border: 1px solid #cfd2d9; border-radius: 8px;
  background: var(--branco); color: var(--texto); font: inherit; font-size: 1rem;
}
.form-pedido textarea { min-height: 90px; resize: vertical; }
.form-pedido input:focus, .form-pedido select:focus, .form-pedido textarea:focus { outline: 2px solid var(--vermelho); outline-offset: 1px; border-color: var(--vermelho); }
.form-pedido .consentimento { display: flex; gap: .6rem; align-items: flex-start; }
.form-pedido .consentimento input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; accent-color: var(--vermelho); flex: none; }
.form-pedido .consentimento label { margin: 0; font-weight: 400; font-size: .88rem; color: var(--suave); }
.form-pedido button { width: 100%; justify-content: center; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.form-pedido button:disabled { opacity: .6; cursor: wait; }
.form-pedido .armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-aviso { font-size: .92rem; }
.form-aviso:empty { display: none; }
.form-aviso.ok { padding: 1rem; border-radius: 8px; background: #e8f6ee; color: #135c34; font-weight: 600; }
.form-aviso.erro { color: #b00020; font-weight: 600; }
.form-pedido.enviado > p:not(.form-aviso) { display: none; }
@media (max-width: 1000px) {
  .pedido-grade { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .form-pedido { grid-template-columns: 1fr; padding: 1.4rem; }
}

/* Tabela de preços (dobra "precos") */
.precos-condicoes { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 1.4rem; }
.precos-condicoes li { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 99px; background: var(--branco); border: 1px solid var(--linha); font-size: .88rem; font-weight: 600; }
.precos-condicoes .i { color: var(--vermelho); }
.tabela-precos table { font-size: .9rem; }
.tabela-precos caption { font-size: 1.05rem; padding: .2rem 0 .6rem; }
.tabela-precos thead th { white-space: nowrap; text-align: right; vertical-align: bottom; }
.tabela-precos thead th:first-child, .tabela-precos tbody th { text-align: left; }
.tabela-precos thead small { display: block; font-weight: 400; font-size: .78rem; opacity: .85; }
.tabela-precos td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela-precos tbody th { white-space: nowrap; font-weight: 600; }
.tabela-precos tbody th, .tabela-precos thead th:first-child { position: sticky; left: 0; z-index: 1; }
.tabela-precos tbody th { background: inherit; }
.tabela-precos tbody tr:nth-child(odd) th { background: var(--branco); }
.tabela-precos tbody tr:nth-child(even) th { background: var(--fundo); }
.titulo-precos { margin: 1.6rem 0 .6rem; font-size: 1.1rem; }
.titulo-precos small { font-weight: 400; color: var(--suave); font-size: .85rem; }
.dica-rolar { display: none; margin: 0 0 .5rem; font-size: .82rem; color: var(--suave); }
@media (max-width: 760px) {
  .dica-rolar { display: block; }
  .titulo-precos small { display: block; }
}

/* ===== Simulador de coparticipação ===== */
.simulador { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: start; margin-top: 1.6rem; }
.sim-entrada { padding: 1.6rem; background: var(--branco); border-radius: var(--raio); box-shadow: 0 10px 30px rgb(20 20 40 / 8%); border-top: 4px solid var(--vermelho); }
.sim-entrada fieldset { border: 0; margin: 0 0 1.2rem; padding: 0; }
.sim-entrada legend { margin-bottom: .8rem; font-weight: 700; color: var(--vinho); }
.sim-entrada .campo { margin: 0 0 .9rem; }
.sim-entrada label { display: block; margin-bottom: .3rem; font-size: .92rem; font-weight: 600; }
.sim-entrada select { width: 100%; min-height: 48px; padding: .6rem .8rem; border: 1px solid #cfd2d9; border-radius: 8px; background: var(--branco); color: var(--texto); font: inherit; }
.contador { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--linha); }
.contador:last-child { border-bottom: 0; }
.contador label { margin: 0; }
.contador label small { display: block; font-weight: 400; font-size: .8rem; color: var(--suave); }
.contador .botoes { display: flex; align-items: center; flex: none; }
.contador button { width: 44px; height: 44px; border: 1px solid #cfd2d9; background: var(--fundo); color: var(--vinho); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.contador button:first-child { border-radius: 8px 0 0 8px; }
.contador button:last-child { border-radius: 0 8px 8px 0; }
.contador button:hover { background: var(--vinho); color: var(--branco); }
.contador input { width: 56px; height: 44px; border: 1px solid #cfd2d9; border-left: 0; border-right: 0; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.contador input::-webkit-outer-spin-button, .contador input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sim-resultado { position: sticky; top: 1rem; padding: 1.6rem; background: var(--vinho); color: var(--branco); border-radius: var(--raio); }
.sim-resultado h3 { margin: 0 0 1rem; font-size: 1.15rem; }
.sim-numeros { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 0 0 1rem; }
.sim-numeros div { padding: .8rem .9rem; border-radius: 8px; background: rgb(255 255 255 / 10%); }
.sim-numeros .destaque-sim { grid-column: 1 / -1; background: var(--branco); color: var(--texto); }
.sim-numeros dt { font-size: .82rem; opacity: .9; }
.sim-numeros dd { margin: .2rem 0 0; font-size: 1.3rem; font-weight: 700; }
.sim-numeros .destaque-sim dd { font-size: 1.9rem; color: var(--vinho); }
.sim-numeros .destaque-sim small { display: block; font-size: .85rem; font-weight: 400; color: var(--suave); }
.veredito { margin: 0 0 1rem; padding: .9rem 1rem; border-radius: 8px; font-size: .95rem; text-align: left; }
.veredito.bom { background: #e8f6ee; color: #135c34; }
.veredito.alerta { background: #fff4e0; color: #7a4a00; }
.sim-detalhe summary { cursor: pointer; font-weight: 600; margin-bottom: .6rem; }
.sim-detalhe .tabela { margin: 0 0 .8rem; }
.sim-detalhe table { color: var(--texto); font-size: .88rem; }
.sim-nota { margin: 0; font-size: .8rem; opacity: .85; text-align: justify; }
@media (max-width: 1000px) {
  .simulador { grid-template-columns: 1fr; }
  .sim-resultado { position: static; }
}
@media (max-width: 640px) {
  .sim-entrada, .sim-resultado { padding: 1.2rem; }
  .sim-numeros { grid-template-columns: 1fr; }
}
.sim-numeros div:last-child { grid-column: 1 / -1; }

/* Chat da Luiza (NC) — mesmo chat normal do bradescosaudeconvenio.com, sem IA */
  #crm-chatbot-toggle, #crm-chat-bubble, #crm-chatbot-window {
    --crm-cor: #77031a; --crm-cor-escura: #510000; --crm-texto-cor: #FFFFFF;
    --crm-texto: #1f2937; --crm-suave: #6b7280; --crm-borda: #e5e7eb; --crm-fundo: #f6f7f9; --crm-verde: #22c55e;
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; box-sizing: border-box;
  }
  #crm-chatbot-window *, #crm-chat-bubble * { box-sizing: border-box; }
  /* Blindagem contra o CSS do tema/Elementor do site: mesma tipografia em todos os sites */
  #crm-chatbot-toggle, #crm-chatbot-window button, #crm-chatbot-window input, #crm-chat-bubble button {
    font-family: inherit !important; letter-spacing: normal !important; text-transform: none !important;
    text-decoration: none !important; min-width: 0 !important; min-height: 0 !important; margin: 0;
    text-shadow: none !important;
  }
  #crm-chatbot-window p, #crm-chat-bubble p { margin: 0; }
  #crm-chatbot-toggle {
    position: fixed; right: 24px; bottom: 24px; z-index: 99999;
    width: 64px; height: 64px; padding: 0; border: 3px solid #fff; border-radius: 50%;
    background: var(--crm-cor); cursor: pointer; overflow: visible;
    box-shadow: 0 8px 24px rgb(17 24 39 / .28);
    transition: transform .2s ease, box-shadow .2s ease; animation: crmPulse 2.4s infinite;
  }
  #crm-chatbot-toggle img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
  #crm-chatbot-toggle:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 28px rgb(17 24 39 / .32); }
  #crm-chatbot-toggle .crm-online { position: absolute; right: 1px; bottom: 3px; }
  .crm-online { width: 14px; height: 14px; border-radius: 50%; background: var(--crm-verde); border: 2px solid #fff; display: block; }
  @keyframes crmPulse {
    0% { box-shadow: 0 0 0 0 #77031a73, 0 8px 24px rgb(17 24 39 / .28); }
    70% { box-shadow: 0 0 0 16px #77031a00, 0 8px 24px rgb(17 24 39 / .28); }
    100% { box-shadow: 0 0 0 0 #77031a00, 0 8px 24px rgb(17 24 39 / .28); }
  }

  #crm-chat-bubble {
    position: fixed; right: 24px; bottom: 100px; z-index: 99998;
    display: flex; align-items: flex-start; gap: 10px; max-width: 290px;
    padding: 14px 34px 14px 14px; background: #fff; color: var(--crm-texto);
    border-radius: 16px 16px 4px 16px; box-shadow: 0 10px 30px rgb(17 24 39 / .18);
    cursor: pointer; font-size: 14px !important; line-height: 1.45; animation: crmBubbleIn .35s ease;
  }
  #crm-chat-bubble[hidden] { display: none; }
  #crm-chat-bubble img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
  #crm-chat-bubble p { margin: 0; }
  #crm-chat-bubble strong { display: block; font-size: 13px; color: var(--crm-cor-escura); }
  #crm-chat-bubble .crm-bubble-close {
    position: absolute; top: 6px; right: 8px; width: 24px; height: 24px; padding: 0;
    background: none; border: 0; border-radius: 50%; color: #9ca3af; font-size: 18px; line-height: 1; cursor: pointer;
  }
  #crm-chat-bubble .crm-bubble-close:hover { background: var(--crm-fundo); color: var(--crm-texto); }
  @keyframes crmBubbleIn { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: none; } }

  #crm-chatbot-window {
    display: none; position: fixed; right: 24px; bottom: 100px; z-index: 99999;
    width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 128px);
    flex-direction: column; overflow: hidden; background: #fff; border-radius: 20px;
    box-shadow: 0 24px 64px rgb(17 24 39 / .28); animation: crmChatSlideUp .28s ease;
  }
  #crm-chatbot-window.open { display: flex; }
  @keyframes crmChatSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

  .crm-chat-header {
    display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px;
    background: linear-gradient(135deg, var(--crm-cor) 0%, var(--crm-cor-escura) 100%); color: var(--crm-texto-cor);
  }
  .crm-chat-header-avatar { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
  .crm-chat-header-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgb(255 255 255 / .85); display: block; }
  .crm-chat-header-avatar .crm-online { position: absolute; right: -1px; bottom: 0; width: 12px; height: 12px; }
  .crm-chat-header-info { min-width: 0; }
  .crm-chat-header-info strong { display: block; margin: 0; font-size: 16px !important; font-weight: 600; color: var(--crm-texto-cor) !important; line-height: 1.2; }
  .crm-chat-header-info span { display: block; margin-top: 2px; font-size: 12px !important; line-height: 1.3; color: var(--crm-texto-cor) !important; opacity: .9; }
  .crm-chat-close {
    margin-left: auto; width: 34px; height: 34px; padding: 0; flex-shrink: 0;
    background: rgb(255 255 255 / .15); border: 0; border-radius: 50%; color: var(--crm-texto-cor);
    font-size: 22px; line-height: 1; cursor: pointer; transition: background .2s;
  }
  .crm-chat-close:hover { background: rgb(255 255 255 / .3) !important; color: var(--crm-texto-cor) !important; }

  .crm-chat-messages {
    flex: 1; overflow-y: auto; padding: 18px 16px; background: var(--crm-fundo);
    display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth;
  }
  .crm-chat-msg {
    position: relative; max-width: 80%; padding: 10px 14px; border-radius: 16px;
    font-size: 14px !important; line-height: 1.5 !important; font-weight: 400; color: var(--crm-texto); word-wrap: break-word; animation: crmMsgIn .2s ease;
  }
  @keyframes crmMsgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
  .crm-chat-msg.bot {
    align-self: flex-start; margin-left: 34px; background: #fff; border: 1px solid var(--crm-borda);
    border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgb(17 24 39 / .04);
  }
  .crm-chat-msg.bot::before {
    content: ''; position: absolute; left: -34px; bottom: 0; width: 26px; height: 26px; border-radius: 50%;
    background: url(/assets/imagens/chat-avatar.webp) center / cover no-repeat;
  }
  .crm-chat-msg.user { align-self: flex-end; background: var(--crm-cor); color: var(--crm-texto-cor); border-bottom-right-radius: 4px; }
  .crm-chat-msg.typing { font-size: 0 !important; padding: 12px 16px; }
  .crm-chat-msg.typing::after {
    content: ''; display: block; width: 34px; height: 8px;
    background: radial-gradient(circle 4px, #9ca3af 95%, transparent) 0 50% / 8px 8px no-repeat,
      radial-gradient(circle 4px, #9ca3af 95%, transparent) 13px 50% / 8px 8px no-repeat,
      radial-gradient(circle 4px, #9ca3af 95%, transparent) 26px 50% / 8px 8px no-repeat;
    animation: crmTyping 1s infinite ease-in-out;
  }
  @keyframes crmTyping { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

  .crm-chat-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-self: stretch; margin-left: 34px; padding: 2px 0; }
  .crm-chat-option-btn {
    padding: 9px 10px; border: 1.5px solid var(--crm-cor); border-radius: 12px; background: #fff;
    color: var(--crm-cor-escura); font-size: 13px !important; font-weight: 500 !important; line-height: 1.3 !important;
    white-space: normal !important; word-break: normal; overflow-wrap: anywhere; width: auto; height: auto;
    box-shadow: none; text-align: center; cursor: pointer;
    transition: background .15s, color .15s, transform .15s;
  }
  .crm-chat-option-btn:hover, .crm-chat-option-btn:focus-visible { background: var(--crm-cor); color: var(--crm-texto-cor); transform: translateY(-1px); outline: none; }

  .crm-chat-input-area { display: flex; gap: 8px; padding: 12px 14px; background: #fff; border-top: 1px solid var(--crm-borda); }
  .crm-chat-input-area input {
    flex: 1; min-width: 0; height: auto; padding: 11px 16px; border: 1.5px solid var(--crm-borda); border-radius: 24px;
    font-size: 16px !important; line-height: 1.3 !important; box-shadow: none; color: var(--crm-texto); background: var(--crm-fundo); outline: none; transition: border-color .2s, background .2s;
  }
  .crm-chat-input-area input:focus { border-color: var(--crm-cor); background: #fff; }
  .crm-chat-input-area button {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
    background: var(--crm-cor); color: var(--crm-texto-cor); cursor: pointer;
    box-shadow: 0 4px 12px #77031a59; transition: background .2s, transform .2s;
  }
  .crm-chat-input-area button:hover { background: var(--crm-cor-escura); transform: scale(1.05); }
  .crm-chat-input-area button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

  .crm-chat-whatsapp { display: none; padding: 14px 16px; background: #fff; border-top: 1px solid var(--crm-borda); text-align: center; }
  .crm-chat-whatsapp a {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 12px 20px; border-radius: 24px; background: #25d366; color: #fff; text-decoration: none;
    font-weight: 600; font-size: 15px !important; box-shadow: 0 4px 12px rgb(37 211 102 / .35);
  }
  .crm-chat-whatsapp a:hover { background: #1ebe5a; }
  .crm-chat-legal { margin: 0; padding: 8px 14px 10px; background: #fff; color: var(--crm-suave); font-size: 11px !important; line-height: 1.4; text-align: center; }

  @media (max-width: 480px) {
    #crm-chatbot-window { right: 0; bottom: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
    #crm-chatbot-toggle { right: 16px; bottom: 16px; width: 58px; height: 58px; }
    #crm-chat-bubble { right: 16px; bottom: 88px; max-width: calc(100vw - 32px); }
  }
  @media (prefers-reduced-motion: reduce) {
    #crm-chatbot-toggle, #crm-chat-bubble, #crm-chatbot-window, .crm-chat-msg, .crm-chat-msg.typing::after { animation: none; }
  }
