/* Clínica do Coração — site institucional */

:root {
  --verm: #9e1b32;
  --verm-esc: #7d1426;
  --verm-cl: #fbeef0;
  --tinta: #1c2430;
  --tinta-2: #4b5563;
  --tinta-3: #6b7280;
  --cinza: #f4f5f7;
  --linha: #e3e6ea;
  --branco: #fff;
  --zap: #1e8e57;
  --fonte: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --larg: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--branco); color: var(--tinta); font: 400 16.5px/1.6 var(--fonte); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--verm); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.015em; }
p { margin: 0; }
button { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pular { position: absolute; left: -999px; top: 8px; background: var(--tinta); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 60; }
.pular:focus { left: 8px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Botões */
.bt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 8px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15.5px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.bt-pri { background: var(--verm); color: #fff; }
.bt-pri:hover { background: var(--verm-esc); }
.bt-linha { border-color: var(--linha); background: #fff; color: var(--tinta); }
.bt-linha:hover { border-color: var(--tinta); }
.bt-branco { background: #fff; color: var(--verm); }
.bt-largo { width: 100%; }

/* Faixa de contato */
.faixa { background: var(--tinta); color: #d5dae1; font-size: 13.5px; }
.faixa-in { max-width: var(--larg); margin: 0 auto; padding: 8px 24px; display: flex; justify-content: space-between; gap: 16px; }
.faixa-item { display: inline-flex; align-items: center; gap: 7px; color: inherit; text-decoration: none; }
.faixa-item .ic { width: 16px; height: 16px; }
a.faixa-item:hover { color: #fff; }

/* Topo */
.topo { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--linha); }
.topo-in { max-width: var(--larg); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 32px; }
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--tinta); margin-right: auto; }
.marca span { display: flex; flex-direction: column; line-height: 1.2; }
.marca strong { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.marca small { font-size: 13px; color: var(--tinta-3); }
.menu { display: flex; gap: 28px; }
.menu a { color: var(--tinta-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 6px 0; }
.menu a:hover { color: var(--verm); }
.bt-menu { display: none; }

/* Abertura */
.abre { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 560px; background: #f7f6f5; }
.abre-tx { padding: 64px 56px 56px max(24px, calc((100vw - var(--larg)) / 2 + 24px)); display: flex; flex-direction: column; justify-content: center; }
.abre h1 { font-size: clamp(34px, 4.2vw, 54px); font-weight: 800; letter-spacing: -.03em; max-width: 12ch; }
.abre-sub { font-size: 18.5px; color: var(--tinta-2); margin-top: 18px; max-width: 32em; }
.abre-foto { position: relative; overflow: hidden; }
.abre-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }

.rapido { margin-top: 32px; background: #fff; border: 1px solid var(--linha); border-radius: 12px; padding: 20px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -18px rgba(16, 24, 40, .25); max-width: 520px; }
.rapido-tit { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.rapido-linha { display: flex; gap: 10px; }
.rapido-linha select { flex: 1; min-width: 0; }
.rapido-nota { font-size: 13.5px; color: var(--tinta-3); margin-top: 10px; }

select, input {
  font: inherit; font-size: 16px; color: var(--tinta); width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1.5px solid var(--linha); border-radius: 8px; background: #fff;
}
select { appearance: none; padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center / 18px no-repeat; }
select:focus, input:focus { outline: none; border-color: var(--verm); box-shadow: 0 0 0 3px var(--verm-cl); }

.medica-mini { display: flex; gap: 32px; margin: 28px 0 0; font-size: 14px; }
.medica-mini dt { color: var(--tinta-3); }
.medica-mini dd { margin: 2px 0 0; font-weight: 600; }

/* Atalhos */
.atalhos { max-width: var(--larg); margin: -1px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--linha); }
.atalhos > * {
  display: flex; align-items: center; gap: 14px; padding: 22px 24px; text-align: left;
  background: none; border: 0; border-right: 1px solid var(--linha); color: var(--tinta); text-decoration: none; cursor: pointer;
  transition: background .15s;
}
.atalhos > *:last-child { border-right: 0; }
.atalhos > *:hover { background: var(--cinza); }
.atalhos .ic { width: 28px; height: 28px; color: var(--verm); }
.atalhos span { display: flex; flex-direction: column; line-height: 1.3; }
.atalhos b { font-weight: 700; font-size: 15.5px; }
.atalhos small { color: var(--tinta-3); font-size: 13.5px; }

/* Blocos */
.bloco { padding: 80px 24px; }
.bloco-cinza { background: var(--cinza); }
.bloco-in { max-width: var(--larg); margin: 0 auto; }
.bloco-cab { max-width: 620px; margin-bottom: 36px; }
.bloco h2 { font-size: clamp(28px, 3vw, 38px); font-weight: 800; letter-spacing: -.025em; }
.bloco-cab p { color: var(--tinta-2); margin-top: 10px; font-size: 17px; }

/* Exames (abas) */
.exames { display: grid; grid-template-columns: 300px 1fr; border: 1px solid var(--linha); border-radius: 12px; overflow: hidden; background: #fff; }
.exames-lista { display: flex; flex-direction: column; background: var(--cinza); border-right: 1px solid var(--linha); }
.exames-lista button {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left;
  padding: 18px 20px; border: 0; border-bottom: 1px solid var(--linha); background: none; cursor: pointer;
  font-weight: 600; font-size: 15.5px; color: var(--tinta-2); position: relative;
}
.exames-lista button small { font-weight: 500; font-size: 12.5px; color: var(--tinta-3); }
.exames-lista button:hover { color: var(--tinta); background: #eceef1; }
.exames-lista button[aria-selected="true"] { background: #fff; color: var(--verm); margin-right: -1px; }
.exames-lista button[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--verm); }
.exame { display: grid; grid-template-columns: 1fr 1.15fr; min-height: 440px; }
.exame[hidden] { display: none; }
.exame > img { width: 100%; height: 100%; object-fit: cover; }
.exame-tx { padding: 32px 36px; display: flex; flex-direction: column; gap: 14px; }
.exame h3 { font-size: 26px; font-weight: 800; }
.exame p { color: var(--tinta-2); }
.exame-dados { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0; }
.exame-dados div { background: var(--cinza); border-radius: 8px; padding: 10px 14px; }
.exame-dados dt { font-size: 12.5px; color: var(--tinta-3); font-weight: 500; }
.exame-dados dd { margin: 0; font-weight: 600; font-size: 14.5px; }
.exame h4 { font-size: 15px; font-weight: 700; margin-top: 4px; }
.exame ul { margin: -6px 0 6px; padding-left: 18px; color: var(--tinta-2); font-size: 15.5px; }
.exame li + li { margin-top: 4px; }
.exame .bt { align-self: flex-start; margin-top: auto; }

/* Médica */
.medica { display: grid; grid-template-columns: 380px 1fr; gap: 64px; align-items: center; }
.foto-vaga {
  aspect-ratio: 4 / 5; border-radius: 12px; border: 2px dashed #c9ced6; background: #eceef1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #8a919c;
}
.foto-vaga svg { width: 72px; height: 72px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.foto-vaga span { font-size: 14px; font-weight: 500; }
.medica-esp { color: var(--verm); font-weight: 600; margin: 8px 0 18px; }
.medica-tx > p:not(.medica-esp) { color: var(--tinta-2); font-size: 17px; max-width: 38em; }
.cv { width: 100%; border-collapse: collapse; margin: 26px 0 30px; font-size: 15.5px; }
.cv th, .cv td { text-align: left; vertical-align: top; padding: 14px 0; border-top: 1px solid var(--linha); }
.cv tr:last-child th, .cv tr:last-child td { border-bottom: 1px solid var(--linha); }
.cv th { width: 150px; color: var(--tinta-3); font-weight: 500; padding-right: 16px; }

/* Antes de vir */
.levar { display: grid; grid-template-columns: 1fr 1fr .9fr; gap: 24px; }
.levar-col { border: 1px solid var(--linha); border-radius: 12px; padding: 26px; }
.levar h3 { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--tinta-2); font-size: 15.5px; }
.check li { position: relative; padding-left: 28px; }
.check li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--verm-cl);
}
.check li::after {
  content: ""; position: absolute; left: 6px; top: 7px; width: 5px; height: 8px; border: solid var(--verm); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.levar-urg { background: var(--verm); color: #fff; border-radius: 12px; padding: 26px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.levar-urg strong { font-size: 19px; }
.levar-urg p { color: #f6dfe3; font-size: 15.5px; margin-bottom: 6px; }

/* Dúvidas */
.duvidas { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: start; }
.faq details { background: #fff; border: 1px solid var(--linha); border-radius: 10px; margin-bottom: 10px; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 600; font-size: 16.5px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: var(--verm); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 18px; color: var(--tinta-2); }

/* Contato */
.contato { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: stretch; }
.ficha { margin: 24px 0 28px; }
.ficha div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--linha); }
.ficha div:last-child { border-bottom: 1px solid var(--linha); }
.ficha dt { color: var(--tinta-3); font-size: 15px; }
.ficha dd { margin: 0; font-weight: 600; }
.contato-bts { display: flex; gap: 10px; flex-wrap: wrap; }
.mapa { border-radius: 12px; overflow: hidden; border: 1px solid var(--linha); min-height: 380px; background: var(--cinza); }
.mapa iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* Rodapé */
.rodape { background: var(--tinta); color: #aeb5bf; padding: 36px 24px; font-size: 14px; }
.rodape-in { max-width: var(--larg); margin: 0 auto; display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.rodape-marca { display: flex; gap: 12px; align-items: center; }
.rodape-marca div { display: grid; }
.rodape-marca strong { color: #fff; font-size: 16px; }
.rodape-legal { display: grid; gap: 2px; text-align: right; }

/* WhatsApp fixo */
.zap-fixo {
  position: fixed; right: 20px; bottom: 20px; z-index: 25; width: 58px; height: 58px; border-radius: 50%;
  background: var(--zap); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .35);
}
.zap-fixo svg { width: 30px; height: 30px; }

/* Agendamento */
.ag { padding: 0; border: 0; border-radius: 16px; width: min(520px, calc(100vw - 32px)); max-height: min(720px, calc(100dvh - 32px)); color: var(--tinta); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
.ag::backdrop { background: rgba(17, 24, 39, .55); }
.ag-caixa { display: flex; flex-direction: column; max-height: inherit; }
.ag-cab { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 14px; }
.ag-cab > div { flex: 1; }
.ag-passo { font-size: 13px; color: var(--tinta-3); font-weight: 500; }
.ag-cab h2 { font-size: 22px; font-weight: 800; margin-top: 2px; }
.ag-voltar, .ag-fechar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cinza); display: grid; place-items: center; cursor: pointer; flex: none; }
.ag-voltar svg, .ag-fechar svg { width: 20px; height: 20px; fill: none; stroke: var(--tinta); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ag-barra { height: 3px; background: var(--linha); margin: 0 20px; border-radius: 2px; overflow: hidden; }
.ag-barra span { display: block; height: 100%; background: var(--verm); width: 25%; transition: width .25s; }
.ag-etapa { padding: 18px 20px 4px; overflow-y: auto; }
.ag-opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ag-opcoes label, .ag-chips label { cursor: pointer; }
.ag-opcoes input, .ag-chips input { position: absolute; opacity: 0; pointer-events: none; }
.ag-opcoes span { display: flex; flex-direction: column; border: 1.5px solid var(--linha); border-radius: 10px; padding: 12px 14px; height: 100%; transition: border-color .12s, background .12s; }
.ag-opcoes b { font-size: 15px; }
.ag-opcoes small { font-size: 12.5px; color: var(--tinta-3); }
.ag-opcoes input:checked + span, .ag-chips input:checked + span { border-color: var(--verm); background: var(--verm-cl); }
.ag-opcoes input:checked + span b { color: var(--verm-esc); }
.ag-opcoes input:focus-visible + span, .ag-chips input:focus-visible + span { box-shadow: 0 0 0 3px var(--verm-cl); }
.ag-rot { font-weight: 600; font-size: 14.5px; margin: 6px 0 8px; }
.ag-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ag-chips span { display: inline-flex; flex-direction: column; align-items: center; border: 1.5px solid var(--linha); border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 14.5px; min-width: 64px; }
.ag-chips span small { font-weight: 500; font-size: 12px; color: var(--tinta-3); }
.ag-campo { display: grid; gap: 6px; margin-bottom: 14px; }
.ag-campo label { font-weight: 600; font-size: 14.5px; }
.ag-campo[hidden] { display: none; }
.ag-dica { font-size: 13.5px; color: var(--tinta-3); margin: 10px 0 6px; }
.ag-resumo { border: 1px solid var(--linha); border-radius: 10px; overflow: hidden; }
.ag-resumo div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--linha); font-size: 15px; }
.ag-resumo div:last-child { border-bottom: 0; }
.ag-resumo dt { color: var(--tinta-3); }
.ag-resumo dd { margin: 0; font-weight: 600; }
.ag-erro { color: #b42318; font-size: 14px; font-weight: 500; padding: 0 20px; }
.ag-pe { padding: 14px 20px 20px; }
.ag-pe .bt svg { width: 20px; height: 20px; }

/* Tablet */
@media (max-width: 1000px) {
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; padding: 8px 24px 16px; border-bottom: 1px solid var(--linha); box-shadow: 0 16px 24px -16px rgba(0, 0, 0, .2); }
  .menu.aberto { display: flex; }
  .menu a { padding: 12px 0; border-bottom: 1px solid var(--linha); font-size: 16px; }
  .bt-menu { display: grid; gap: 4px; width: 44px; height: 44px; place-content: center; border: 1px solid var(--linha); border-radius: 8px; background: #fff; cursor: pointer; }
  .bt-menu span { width: 18px; height: 2px; background: var(--tinta); border-radius: 1px; }
  .topo-in { gap: 12px; }
  .abre { grid-template-columns: 1fr; }
  .abre-tx { padding: 40px 24px; }
  .abre-foto { height: 300px; order: -1; }
  .abre-foto img { object-position: 50% 45%; }
  .atalhos { grid-template-columns: 1fr 1fr; }
  .atalhos > *:nth-child(2) { border-right: 0; }
  .atalhos > *:nth-child(-n+2) { border-bottom: 1px solid var(--linha); }
  .exames { grid-template-columns: 1fr; }
  .exames-lista { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--linha); scrollbar-width: none; }
  .exames-lista::-webkit-scrollbar { display: none; }
  .exames-lista button { flex: none; border-bottom: 0; border-right: 1px solid var(--linha); padding: 14px 18px; }
  .exames-lista button small { display: none; }
  .exames-lista button[aria-selected="true"] { margin: 0 0 -1px; }
  .exames-lista button[aria-selected="true"]::before { top: auto; width: auto; right: 0; height: 3px; }
  .medica { grid-template-columns: 1fr; gap: 32px; }
  .medica-foto { max-width: 300px; }
  .levar { grid-template-columns: 1fr 1fr; }
  .levar-urg { grid-column: 1 / -1; }
  .duvidas, .contato { grid-template-columns: 1fr; gap: 28px; }
}

/* Celular */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .faixa-item:first-child { display: none; }
  .faixa-in { justify-content: center; padding: 7px 16px; }
  .topo-in { padding: 10px 16px; }
  .marca img { width: 38px; height: 38px; }
  .marca strong { font-size: 17px; }
  .marca small { font-size: 12px; }
  .bt-agendar { min-height: 40px; padding: 0 14px; font-size: 14.5px; }
  .abre-foto { height: 200px; }
  .abre-tx { padding: 28px 16px 32px; }
  .abre-sub { font-size: 16.5px; }
  .rapido { padding: 16px; margin-top: 24px; }
  .rapido-linha { flex-direction: column; }
  .medica-mini { gap: 20px; flex-wrap: wrap; }
  .atalhos > * { padding: 16px; gap: 10px; }
  .atalhos .ic { width: 24px; height: 24px; }
  .atalhos b { font-size: 14.5px; }
  .atalhos small { font-size: 12.5px; }
  .bloco { padding: 56px 16px; }
  .exame { grid-template-columns: 1fr; min-height: 0; }
  .exame > img { height: 180px; }
  .exame-tx { padding: 22px 18px 24px; }
  .exame h3 { font-size: 22px; }
  .exame .bt { align-self: stretch; }
  .levar { grid-template-columns: 1fr; }
  .levar-col, .levar-urg { padding: 22px; }
  .cv th { width: 110px; }
  .ficha div { grid-template-columns: 100px 1fr; }
  .contato-bts .bt { flex: 1; }
  .mapa, .mapa iframe { min-height: 300px; }
  .rodape-legal { text-align: left; }
  .zap-fixo { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  .ag { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .ag-opcoes { grid-template-columns: 1fr 1fr; }
}
