/* ============================================================
   QuadraMed — visual moderno (referência: medixbrasil.com.br)
   Cores da marca: marinho #142438 · azul #3D6FA0 · teal #3EA2B5
   Poppins, cantos arredondados, botões em pílula, blocos de cor.
   ============================================================ */

/* Poppins hospedada no próprio site (sem Google Fonts: o visitante não é enviado a terceiros).
   Licença SIL OFL 1.1, em assets/fonts/OFL.txt. Só o subconjunto latino, que cobre o português. */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }

:root {
  --navy: #142438;
  --navy-deep: #0e1b2b;
  --blue: #3d6fa0;
  --teal: #3ea2b5;
  --sky: #7fc4d2;
  --ice: #e8f4f7;
  --soft: #f4f6f8;
  --white: #ffffff;
  --ink: #142438;
  --text: #475463;
  --muted: #5f6b79;
  --teal-text: #277a8a; /* teal para texto pequeno em fundo claro (contraste AA) */
  --line: #e2e8ee;
  --wa: #1fa855;
  --danger: #c2413a;

  --grad: linear-gradient(120deg, #142438 0%, #1e3d63 48%, #3d6fa0 78%, #3ea2b5 100%);
  --grad-teal: linear-gradient(120deg, #3d6fa0 0%, #3ea2b5 100%);

  --font: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --pill: 999px;
  --shadow: 0 18px 50px -24px rgba(20, 36, 56, 0.35);
  --shadow-sm: 0 8px 24px -14px rgba(20, 36, 56, 0.3);

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 9vw, 112px);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: contents; } /* o <picture> (WebP com JPEG de reserva) não altera o layout */
a { color: var(--blue); }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: 860px; }
.sprite { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--white); color: var(--navy); padding: 8px 16px; border-radius: var(--pill); }
.skip-link:focus { top: 12px; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Tipos auxiliares ---------- */
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal-text);
}
.eyebrow-light { color: var(--sky); }
.head { margin-bottom: clamp(36px, 5vw, 56px); max-width: 720px; }
.head.center { margin-inline: auto; text-align: center; }
.sub { margin-top: 16px; font-size: 1.05rem; color: var(--muted); }
.head.center .sub { margin-inline: auto; max-width: 56ch; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  font: 600 1rem/1 var(--font); letter-spacing: -0.005em;
  border: 2px solid transparent; border-radius: var(--pill);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 0.93rem; }
.btn-primary { background: var(--navy); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--blue); color: var(--white); }
.btn-accent { background: var(--teal); color: var(--navy); box-shadow: 0 10px 28px -12px rgba(62, 162, 181, 0.8); }
.btn-accent:hover { background: var(--sky); color: var(--navy); }
.btn-white { background: var(--white); color: var(--navy); box-shadow: var(--shadow-sm); }
.btn-white:hover { background: var(--ice); color: var(--navy); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-light { background: rgba(255, 255, 255, 0.06); color: var(--white); border-color: rgba(255, 255, 255, 0.45); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-soft { background: var(--ice); color: var(--navy); }
.btn-soft:hover { background: var(--sky); }
.btn-link { background: none; color: var(--blue); padding-inline: 12px; }
.btn-link:hover { color: var(--navy); transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.93rem; color: var(--blue); text-decoration: none; }
.more .ic { width: 16px; height: 16px; transition: transform .2s; }
.more:hover .ic { transform: translateX(4px); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.45); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { width: 170px; }
.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a:not(.btn) { color: rgba(255, 255, 255, 0.82); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color .2s; }
.nav a:not(.btn):hover { color: var(--white); }
.nav-toggle { display: none; }

/* Botão "Compre online" (loja própria) */
.header-actions { display: flex; align-items: center; gap: 10px; }
.shop-btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 6px 20px 6px 14px; border-radius: var(--pill);
  border: 2px solid rgba(255, 255, 255, 0.6); color: var(--white); text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.shop-btn:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.shop-btn .ic { width: 24px; height: 24px; }
.shop-text { display: flex; flex-direction: column; line-height: 1.15; }
.shop-text strong { font-size: 0.9rem; font-weight: 700; }
.shop-text small { font-size: 0.74rem; font-weight: 500; opacity: 0.8; }
.shop-btn.is-soon small { color: var(--sky); opacity: 1; }
.shop-btn.is-soon:hover small { color: var(--blue); }

@media (max-width: 480px) {
  .shop-btn { padding: 0; width: 46px; min-height: 46px; justify-content: center; }
  .shop-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand img { width: 150px; }
}

.shop-text { white-space: nowrap; }
@media (max-width: 1280px) {
  .nav { gap: 20px; }
  .brand img { width: 150px; }
}

@media (max-width: 1200px) {
  .nav-toggle { display: grid; place-content: center; gap: 6px; width: 46px; height: 46px; background: rgba(255,255,255,.08); border: 0; border-radius: 50%; cursor: pointer; }
  .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .2s; }
  .nav-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); padding: 8px var(--gutter) 28px;
    border-top: 1px solid rgba(255,255,255,.08);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 1.05rem; }
  .nav-cta { margin-top: 20px; min-height: 52px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: rgba(255, 255, 255, 0.82); padding-block: clamp(48px, 7vw, 88px) clamp(96px, 11vw, 140px); }
.hero-bg { position: absolute; inset: 0; background: var(--grad); z-index: -2; }
.hero-bg::before, .hero-bg::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero-bg::before { width: 620px; height: 620px; right: -160px; top: -220px; background: radial-gradient(circle, rgba(127,196,210,.35), transparent 65%); }
.hero-bg::after { width: 520px; height: 520px; left: -200px; bottom: -300px; background: radial-gradient(circle, rgba(61,111,160,.5), transparent 65%); }

.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(40px, 5vw, 72px); align-items: center; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.85rem; font-weight: 500; color: var(--white);
}
.eyebrow-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(62,162,181,.3); }
.hero h1 { color: var(--white); margin-top: 22px; max-width: 22ch; font-size: clamp(2rem, 3.9vw, 3.1rem); line-height: 1.12; text-wrap: balance; }
.hl { color: var(--sky); }
.lede { margin-top: 22px; font-size: clamp(1.02rem, 1.3vw, 1.15rem); max-width: 50ch; }

.hero-media { position: relative; justify-self: end; width: 100%; max-width: 480px; }
.hero-media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%;
  border-radius: 200px 200px var(--r-xl) var(--r-xl);
  border: 6px solid rgba(255, 255, 255, 0.12);
}
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px; border-radius: var(--r-md);
  background: var(--white); color: var(--navy); box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.float-card strong { display: block; font-size: 0.95rem; line-height: 1.2; }
.float-card small { display: block; font-size: 0.8rem; color: var(--muted); }
.fc-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-content: center; background: var(--ice); color: var(--blue); }
.fc-top { left: -48px; top: 22%; }
.fc-bottom { right: -24px; bottom: 12%; animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { justify-self: center; max-width: 420px; margin-top: 8px; }
  .fc-top { left: -8px; }
  .fc-bottom { right: -8px; }
}
@media (max-width: 480px) {
  .hero .actions .btn { width: 100%; }
  .float-card { padding: 10px 14px 10px 10px; }
  .fc-icon { width: 36px; height: 36px; }
}

/* ---------- Barra de confiança ---------- */
.trust {
  position: relative; z-index: 2; margin: -64px 0 0; padding: 12px; list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.trust li { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.trust li + li { border-left: 1px solid var(--line); }
.t-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-content: center; background: var(--grad-teal); color: var(--white); }
.trust strong { display: block; color: var(--navy); font-size: 0.95rem; line-height: 1.3; }
.trust span:not(.t-icon) { font-size: 0.84rem; color: var(--muted); line-height: 1.4; }

@media (max-width: 1000px) {
  .trust { grid-template-columns: 1fr 1fr; }
  .trust li:nth-child(3) { border-left: 0; }
  .trust li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .trust { grid-template-columns: 1fr; }
  .trust li + li { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Seções ---------- */
.section { padding-block: var(--section); }
.section.soft { background: var(--soft); }
.section.pt-0 { padding-top: 0; }

/* ---------- Segmentos (cards com pílula) ---------- */
.seg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.seg { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--muted); }
.seg-img { width: 100%; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.seg-img img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; transition: transform .5s; }
.seg:hover .seg-img img { transform: scale(1.06); }
.seg-img img[src$="estetica.jpg"] { object-position: center 20%; } /* mantém a seringa no recorte */
.seg-pill {
  margin-top: -26px; position: relative;
  padding: 14px 26px; min-width: 70%; border-radius: var(--pill);
  background: var(--grad-teal); color: var(--white); font-weight: 600; font-size: 1rem; line-height: 1.25;
  box-shadow: 0 10px 24px -10px rgba(61, 111, 160, 0.7);
  transition: transform .2s;
}
.seg:hover .seg-pill { transform: translateY(-3px); }
.seg p { margin-top: 14px; font-size: 0.92rem; max-width: 26ch; }

@media (max-width: 1000px) { .seg-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; } }
@media (max-width: 480px) { .seg-grid { grid-template-columns: 1fr; } .seg-img img { aspect-ratio: 16 / 10; } }

/* ---------- Portfólio ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; margin-bottom: clamp(48px, 6vw, 72px); }
.stack { position: relative; min-height: 420px; }
.stack img { position: absolute; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.stack-a { width: 72%; height: 78%; left: 0; top: 0; }
.stack-b { width: 56%; height: 62%; right: 0; bottom: 0; border: 6px solid var(--soft); }
.stack-badge {
  position: absolute; left: 8%; bottom: 6%;
  display: flex; align-items: center; gap: 10px; padding: 10px 20px 10px 10px;
  border-radius: var(--pill); background: var(--white); box-shadow: var(--shadow);
  font-weight: 600; color: var(--navy); font-size: 0.93rem;
}
.stack-badge strong { width: 40px; height: 40px; border-radius: 50%; display: grid; place-content: center; background: var(--navy); color: var(--white); }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 500; }
.checks .ic { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--ice); color: var(--blue); stroke-width: 2.5; }
.checks-light li { color: var(--white); }
.checks-light .ic { background: rgba(255,255,255,.14); color: var(--sky); }

.catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat {
  background: var(--white); border-radius: var(--r-lg); padding: 26px;
  display: flex; flex-direction: column; gap: 16px;
  border: 1px solid var(--line); transition: box-shadow .25s, transform .25s;
}
.cat:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.cat header { display: flex; align-items: center; gap: 14px; }
.c-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-content: center; background: var(--ice); color: var(--blue); flex: none; }
.c-icon .ic { width: 24px; height: 24px; }
.cat p { font-size: 0.92rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 6px 14px;
  font: 500 0.86rem/1.2 var(--font); color: var(--navy);
  background: var(--soft); border: 1.5px solid transparent; border-radius: var(--pill);
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
  text-align: left;
}
.chip::before { content: "+"; font-weight: 700; color: var(--teal); }
.chip:hover { border-color: var(--teal); background: var(--white); }
.chip[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.chip[aria-pressed="true"]::before { content: "✓"; color: var(--sky); }

/* Catálogo: busca, filtros por área e "ver mais" */
.cat-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.cat-search { position: relative; flex: 1 1 320px; max-width: 460px; }
.cat-search .ic { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.cat-search input {
  width: 100%; min-height: 54px; padding: 12px 20px 12px 50px;
  font: 400 0.98rem/1.4 var(--font); color: var(--navy);
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--pill);
}
.cat-search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(62, 162, 181, 0.18); }
.cat-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-filter {
  min-height: 44px; padding: 0 18px; border-radius: var(--pill);
  border: 1.5px solid var(--line); background: var(--white);
  font: 600 0.9rem/1 var(--font); color: var(--navy); cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.cat-filter:hover { border-color: var(--teal); }
.cat-filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.cat-empty { margin-bottom: 20px; padding: 24px; border-radius: var(--r-md); background: var(--white); color: var(--muted); text-align: center; }
.cat[hidden], .chip[hidden], .cat-empty[hidden] { display: none; }
.c-count {
  margin-left: auto; min-width: 30px; height: 26px; padding: 0 9px; border-radius: var(--pill);
  display: grid; place-content: center; background: var(--soft); color: var(--muted); font-size: 0.78rem; font-weight: 600;
}
.catalog:not(.is-searching) .cat.is-collapsed .chip-extra { display: none; }
.chip-more { align-self: flex-start; padding: 2px 0; background: none; border: 0; font: 600 0.88rem/1.4 var(--font); color: var(--blue); cursor: pointer; }
.chip-more:hover { color: var(--navy); text-decoration: underline; }
.is-searching .chip-more { display: none; }
.stack-badge strong { width: auto; min-width: 40px; padding: 0 10px; border-radius: var(--pill); }

@media (max-width: 640px) {
  .cat-search { max-width: none; }
  .cat-filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .cat-filter { flex: none; }
}

@media (max-width: 1000px) { .catalog { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .stack { min-height: 340px; } }
@media (max-width: 600px) { .catalog { grid-template-columns: 1fr; } .stack { min-height: 280px; } }

/* ---------- Equipamentos (home) ---------- */
.equip-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin-bottom: clamp(32px, 4vw, 48px); }
.equip-head .head { margin-bottom: 0; }
.equip-head .actions { margin-top: 0; }
.equip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.equip {
  display: flex; flex-direction: column; gap: 12px; padding: 32px 28px;
  border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line);
}
.e-icon { width: 60px; height: 60px; margin-bottom: 6px; border-radius: 18px; display: grid; place-content: center; background: var(--grad); color: var(--white); }
.e-icon .ic { width: 30px; height: 30px; }
.equip h3 { font-size: 1.35rem; }
.equip > p { color: var(--muted); font-size: 0.95rem; }
.equip ul { list-style: none; margin: 6px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.equip li { display: flex; gap: 10px; align-items: flex-start; color: var(--navy); font-size: 0.93rem; font-weight: 500; line-height: 1.4; }
.equip li .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--teal); stroke-width: 2.4; }
.equip .more { margin-top: auto; padding-top: 10px; }
.equip-notes { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 28px; color: var(--muted); font-size: 0.9rem; }
.equip-notes span { display: inline-flex; gap: 8px; align-items: center; }
.equip-notes .ic { width: 18px; height: 18px; color: var(--teal); }
@media (max-width: 960px) { .equip-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .equip-head .actions .btn { width: 100%; } }

/* ---------- Cotação ---------- */
.quote-sec { background: var(--grad); color: rgba(255,255,255,.82); position: relative; overflow: hidden; }
.quote-sec h2 { color: var(--white); }
.quote-sec .sub { color: rgba(255,255,255,.78); }
.quote-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.quote-intro { position: sticky; top: calc(var(--header-h) + 32px); }

.quote-form { background: var(--white); border-radius: var(--r-xl); padding: clamp(24px, 4vw, 40px); box-shadow: 0 30px 70px -30px rgba(0,0,0,.55); color: var(--text); }
fieldset { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 16px; font-weight: 600; font-size: 1.05rem; color: var(--navy); }
.step { width: 30px; height: 30px; border-radius: 50%; display: grid; place-content: center; background: var(--grad-teal); color: var(--white); font-size: 0.9rem; }

.quote-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quote-item {
  display: grid; grid-template-columns: 1fr 10rem 40px; gap: 10px; align-items: center;
  padding: 8px 8px 8px 16px; background: var(--soft); border-radius: var(--r-md);
}
.quote-item-name { color: var(--navy); font-weight: 500; font-size: 0.92rem; line-height: 1.35; }
.quote-item input { min-height: 40px; background: var(--white); }
.quote-item-rm { width: 40px; height: 40px; display: grid; place-content: center; background: none; border: 0; border-radius: 50%; color: var(--muted); cursor: pointer; }
.quote-item-rm:hover { background: var(--white); color: var(--danger); }
.quote-item-rm .ic { width: 16px; height: 16px; }
.quote-empty { padding: 18px 20px; background: var(--soft); border-radius: var(--r-md); color: var(--muted); font-size: 0.93rem; }
.add-item { display: flex; gap: 8px; margin-top: 12px; }
.add-item input { flex: 1; min-width: 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 0.86rem; font-weight: 500; color: var(--navy); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  font: 400 0.98rem/1.4 var(--font); color: var(--navy);
  background: var(--soft); border: 1.5px solid transparent; border-radius: var(--r-sm);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 100px; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 44px;
}
input:focus, select:focus, textarea:focus { outline: none; background-color: var(--white); border-color: var(--teal); box-shadow: 0 0 0 4px rgba(62, 162, 181, 0.18); }
::placeholder { color: #98a2ad; }

.form-error { margin-bottom: 16px; padding: 12px 16px; border-radius: var(--r-sm); background: #fdeeed; color: #8a2a24; font-size: 0.93rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

@media (max-width: 900px) { .quote-grid { grid-template-columns: 1fr; } .quote-intro { position: static; } }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .quote-item { grid-template-columns: 1fr 40px; }
  .quote-item input { grid-column: 1; grid-row: 2; }
  .quote-item-rm { grid-column: 2; grid-row: 1 / span 2; }
  .form-actions .btn-primary { width: 100%; }
  .add-item { flex-direction: column; }
}

/* ---------- Como funciona ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 32px; left: 12%; right: 12%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--sky) 0 8px, transparent 8px 16px);
}
.steps li { position: relative; text-align: center; padding: 0 8px; }
.s-num {
  position: relative; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-content: center; font-size: 1.4rem; font-weight: 700; color: var(--white);
  background: var(--grad-teal); box-shadow: 0 0 0 8px var(--white), 0 12px 28px -10px rgba(61,111,160,.7);
}
.steps h3 { margin-bottom: 8px; }
.steps p { font-size: 0.93rem; color: var(--muted); }

@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; gap: 40px 24px; } .steps::before { display: none; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Dores ---------- */
.pain-block {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 64px);
  padding: clamp(28px, 5vw, 64px); border-radius: var(--r-xl);
  background: var(--navy); color: rgba(255,255,255,.78);
  position: relative; overflow: hidden;
}
.pain-block::after { content: ""; position: absolute; width: 480px; height: 480px; right: -180px; bottom: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(62,162,181,.35), transparent 65%); pointer-events: none; }
.pain-head h2 { color: var(--white); }
.pain-head p { margin-top: 16px; }
.pain-head img { margin-top: 28px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-lg); }
.pain-list { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: center; }
.pain-list li { padding: 20px; border-radius: var(--r-md); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); transition: background-color .2s; }
.pain-list li:hover { background: rgba(255,255,255,.1); }
.pain { color: var(--white); font-weight: 600; font-size: 0.98rem; line-height: 1.4; }
.answer { margin-top: 10px; font-size: 0.88rem; color: var(--sky); line-height: 1.5; }

.new-clinic {
  margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px clamp(24px, 4vw, 44px); border-radius: var(--r-lg); background: var(--ice);
}
.new-clinic h3 { font-size: 1.3rem; }
.new-clinic p { margin-top: 6px; color: var(--muted); max-width: 60ch; }

@media (max-width: 960px) { .pain-block { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .pain-list { grid-template-columns: 1fr; }
  .new-clinic { flex-direction: column; align-items: flex-start; }
  .new-clinic .btn { width: 100%; }
}

/* ---------- Procedência ---------- */
.docs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.doc { background: var(--white); border-radius: var(--r-lg); padding: 28px 24px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); }
.d-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-content: center; background: var(--grad-teal); color: var(--white); margin-bottom: 10px; }
.d-icon .ic { width: 24px; height: 24px; }
.d-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.d-num { font-size: 1.12rem; font-weight: 700; color: var(--navy); letter-spacing: 0; }
.doc p { font-size: 0.9rem; color: var(--muted); }
.doc .more { margin-top: auto; padding-top: 8px; }

.promise {
  margin-top: 24px; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg);
  background: var(--white); box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 0.8fr 1.4fr auto; gap: 32px; align-items: center;
}
.promise h3 { font-size: 1.35rem; }
.promise > div p { margin-top: 6px; color: var(--muted); }
.promise ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.promise li { display: flex; gap: 12px; align-items: flex-start; color: var(--navy); font-size: 0.95rem; }
.x { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-content: center; background: #fdeeed; color: var(--danger); margin-top: 1px; }
.x .ic { width: 13px; height: 13px; stroke-width: 2.6; }

@media (max-width: 1100px) { .promise { grid-template-columns: 1fr 1.4fr; } .promise .btn { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 1000px) { .docs-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .promise { grid-template-columns: 1fr; } .promise .btn { white-space: normal; text-align: center; } }
@media (max-width: 560px) { .docs-grid { grid-template-columns: 1fr; } }

/* ---------- Licitações ---------- */
#licitacoes { padding-top: calc(var(--section) + 40px); }
.gov {
  position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center;
  padding: clamp(32px, 5vw, 64px); border-radius: var(--r-xl);
  background: var(--grad-teal); color: rgba(255,255,255,.88);
}
.gov h2 { color: var(--white); }
.gov-copy > p { margin-top: 16px; max-width: 54ch; }
.gov-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gov-list li { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--r-md); background: rgba(255,255,255,.14); color: var(--white); font-size: 0.9rem; font-weight: 500; line-height: 1.35; }
.gov-list .ic { flex: none; color: var(--white); stroke-width: 2.5; }

@media (max-width: 960px) {
  #licitacoes { padding-top: var(--section); }
  .gov { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .gov-list { grid-template-columns: 1fr; } .gov .btn { width: 100%; white-space: normal; text-align: center; } }

/* ---------- Variações sem foto ("Por que a QuadraMed" e Setor público) ---------- */
.pain-block.no-photo { grid-template-columns: 1fr; gap: 40px; }
.pain-block.no-photo .pain-head { max-width: 760px; }
.pain-block.no-photo .pain-list { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .pain-block.no-photo .pain-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .pain-block.no-photo .pain-list { grid-template-columns: 1fr; } }

#licitacoes.plain { padding-top: var(--section); }
.gov.no-photo { grid-template-columns: 1.05fr 0.95fr; align-items: center; overflow: hidden; }
.gov.no-photo::after {
  content: ""; position: absolute; right: -50px; bottom: -70px; width: 340px; height: 320px;
  background: url("../img/simbolo-branco.png") no-repeat center / contain; opacity: 0.08; pointer-events: none;
}
.gov.no-photo .gov-copy, .gov.no-photo .gov-list { position: relative; z-index: 1; }
.gov.no-photo .gov-list { grid-template-columns: 1fr; gap: 12px; margin: 0; }
.gov.no-photo .gov-list li { padding: 18px 20px; font-size: 0.98rem; background: rgba(255, 255, 255, 0.16); }
.gov.no-photo .gov-list .ic { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--white); color: var(--blue); }
@media (max-width: 960px) { .gov.no-photo { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--white); border-radius: var(--r-md); box-shadow: 0 4px 16px -12px rgba(20,36,56,.35); transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 24px; font-weight: 600; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-content: center; background: var(--ice); color: var(--blue);
  font-size: 1.25rem; font-weight: 500; transition: transform .2s, background-color .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--teal); color: var(--white); }
.faq details p { padding: 0 24px 22px; color: var(--muted); }

/* ---------- Contato ---------- */
.contact-card {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: var(--r-xl);
  background: var(--grad); color: rgba(255, 255, 255, 0.82);
}
.contact-copy h2 { color: var(--white); }
.contact-copy p { margin-top: 14px; max-width: 40ch; font-size: 1.05rem; }
.contact-copy .ct-note { display: flex; align-items: center; gap: 8px; margin-top: 24px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.78); }
.ct-note .ic { flex: none; width: 18px; height: 18px; color: var(--sky); }

/* Formulário de mensagem (dentro do card de contato) */
.c-form {
  display: grid; gap: 18px; padding: clamp(20px, 3vw, 28px); border-radius: var(--r-lg);
  background: var(--white); color: var(--navy); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.55);
}
.c-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.c-form textarea { min-height: 110px; }
.c-form-foot { display: flex; justify-content: flex-end; }
.c-form .form-status { margin-top: 0; }

@media (max-width: 860px) { .contact-card { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .contact-card { padding: 28px 20px; }
  .c-form-grid { grid-template-columns: 1fr; }
  .c-form-foot .btn { width: 100%; }
}

/* Mensagens de envio dos formulários */
.form-status { margin-top: 14px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--soft); color: var(--navy); font-size: 0.9rem; }
.form-status.is-ok { background: #e7f6ee; color: #1b6b3a; }
.form-status.is-err { background: #fdeeed; color: #8a2a24; }
.form-status a { color: inherit; font-weight: 600; }
.field .hint { font-size: 0.78rem; color: var(--muted); }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-privacy { margin-top: 12px; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }
.form-privacy a { color: var(--blue); }
.c-form .form-privacy { margin-top: 0; }

/* Instagram ainda sem perfil */
.social a.is-soon { cursor: default; opacity: 0.7; }
.social a.is-soon:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }

/* ---------- Rodapé (padrão Medix: links em linha + colunas) ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.66); padding-top: 56px; font-size: 0.9rem; }
.footer-top { display: grid; grid-template-columns: 220px 1fr; gap: clamp(32px, 5vw, 64px); padding-bottom: 44px; }
.footer-brand img { width: 170px; }
.social { display: flex; gap: 10px; margin-top: 22px; }
.social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-content: center;
  background: rgba(255, 255, 255, 0.08); color: var(--white); transition: background-color .2s, color .2s;
}
.social a:hover { background: var(--teal); color: var(--navy); }
.social .ic { width: 18px; height: 18px; }
.footer-cols { display: grid; grid-template-columns: 1fr 1.2fr 1.4fr; gap: 32px; }

/* ---------- Áreas do portfólio (home) ---------- */
.areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.area {
  display: flex; flex-direction: column; gap: 10px; padding: 28px 24px;
  border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line);
  color: var(--muted); text-decoration: none;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.area:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.a-icon { width: 56px; height: 56px; margin-bottom: 6px; border-radius: 18px; display: grid; place-content: center; background: var(--grad-teal); color: var(--white); }
.a-icon .ic { width: 28px; height: 28px; }
.area h3 { font-size: 1.15rem; }
.area p { font-size: 0.92rem; }
.a-count { font-size: 0.82rem; font-weight: 600; color: var(--teal-text); }
.area .more { margin-top: auto; padding-top: 6px; }
@media (max-width: 1000px) { .areas { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .areas { grid-template-columns: 1fr; } }

/* ---------- Página de produtos ---------- */
.page-hero { background: var(--grad); color: rgba(255, 255, 255, 0.82); padding-block: clamp(40px, 6vw, 72px); }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); margin-top: 14px; }
.page-hero p { margin-top: 12px; max-width: 60ch; font-size: 1.05rem; }
.crumbs { display: flex; gap: 8px; font-size: 0.88rem; color: rgba(255, 255, 255, 0.7); }
.crumbs a { color: var(--sky); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.catalog-sec { padding-top: 40px; }

/* ---------- Política de privacidade e página 404 ---------- */
.legal { max-width: 760px; }
.legal h2 { font-size: clamp(1.2rem, 2vw, 1.45rem); margin-top: 40px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal ul { margin-top: 12px; }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--navy); }
.page-hero .notfound-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Páginas de categoria e segmento ---------- */
.catalog > .cat-group { grid-column: 1 / -1; margin-top: 20px; font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.catalog > .cat-group:first-child { margin-top: 0; }
.cat h3 a { color: inherit; text-decoration: none; }
.cat h3 a:hover { color: var(--blue); text-decoration: underline; }
.related-title { margin-top: 40px; font-weight: 600; color: var(--navy); }
.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.related a { padding: 8px 16px; border-radius: var(--pill); background: var(--ice); color: var(--navy); font-size: 0.9rem; font-weight: 500; text-decoration: none; }
.related a:hover { background: var(--teal); color: var(--white); }
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--sky); }
.fine { margin-top: 24px; font-size: 0.88rem; color: var(--muted); }
.nav a[aria-current="page"] { color: var(--white); box-shadow: inset 0 -2px 0 var(--teal); }
.site-footer .footer-title { color: var(--white); font-size: 0.95rem; font-weight: 700; line-height: 1.15; margin-bottom: 8px; }
.site-footer address { font-style: normal; }
.footer-cols p + p { margin-top: 2px; }
.footer-cols a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.footer-cols a:hover { color: var(--sky); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1); padding-block: 20px; font-size: 0.82rem;
}

@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 640px) {
  .footer-cols { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { padding-bottom: 92px; } /* espaço para o botão flutuante do WhatsApp */
}

/* Rodapé no celular: tudo centralizado */
@media (max-width: 640px) {
  .site-footer { padding-top: 48px; text-align: center; }
  .footer-top { gap: 28px; padding-bottom: 36px; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-brand img { width: 160px; }
  .social { justify-content: center; margin-top: 18px; }
  .footer-cols { gap: 24px; }
  .footer-cols > div { padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .site-footer .footer-title { margin-bottom: 6px; }
  .footer-bottom { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
}

/* ---------- Barra de cotação e WhatsApp flutuante ---------- */
.quote-bar {
  position: fixed; left: 50%; bottom: 20px; z-index: 40; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; max-width: calc(100% - 32px);
  background: var(--navy); color: var(--white); text-decoration: none; border-radius: var(--pill);
  box-shadow: 0 16px 40px -12px rgba(20, 36, 56, 0.6); font-size: 0.93rem; white-space: nowrap;
  animation: rise .25s ease-out;
}
.quote-bar[hidden] { display: none; }
.quote-bar:hover { color: var(--white); }
.quote-bar-count { min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--pill); display: grid; place-content: center; background: var(--teal); color: var(--navy); font-weight: 700; }
.quote-bar-go { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; padding: 10px 18px; border-radius: var(--pill); background: rgba(255,255,255,.1); font-weight: 600; color: var(--sky); }
.quote-bar-go .ic { width: 16px; height: 16px; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 58px; height: 58px; display: grid; place-content: center;
  background: var(--wa); color: var(--white); border-radius: 50%;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.35); transition: transform .2s;
}
.wa-float:hover { color: var(--white); transform: scale(1.08); }
.wa-float .ic { width: 30px; height: 30px; }

@media (max-width: 640px) {
  .quote-bar { left: 16px; right: 86px; transform: none; bottom: 16px; justify-content: space-between; max-width: none; }
  #quote-bar-text { display: none; }
  .quote-bar-go { margin-left: 0; }
  .wa-float { right: 16px; bottom: 16px; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
