/* ================================================
   CARDIOBREATH — Estilos compartilhados entre páginas
   ================================================ */
:root {
  --azul: #005A87;
  --azul-escuro: #004A59;
  --azul-medio: #0077B5;
  --azul-claro: #5DBBED;
  --azul-suave: #E8F4FB;
  --azul-noite: #002E45;
  --azul-rgb: 0, 90, 135;

  --vermelho: #E30613;
  --vermelho-claro: #FF3344;
  --vermelho-escuro: #B00410;
  --vermelho-rgb: 227, 6, 19;

  --branco: #FFFFFF;
  --neve: #F8FAFC;
  --cinza-claro: #E5EAF0;
  --cinza-medio: #5F6B78;
  --cinza-escuro: #2A3341;
  --preto: #0F1720;
  --linha: rgba(0, 90, 135, 0.10);

  --serif: "Roboto Slab", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 2px 8px rgba(0, 90, 135, 0.06);
  --shadow-md: 0 12px 40px rgba(0, 90, 135, 0.10);
  --shadow-lg: 0 30px 80px rgba(0, 46, 69, 0.22);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 0.5s var(--ease);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
::selection { background: var(--vermelho); color: white; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--preto);
  line-height: 1.55;
  background: var(--branco);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--azul-escuro);
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.35rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* Emoji 3D helper */
.e {
  display: inline-block; vertical-align: -0.18em;
  width: 1.15em; height: 1.15em;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 30, 60, 0.15));
}

/* Header azul */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 0;
  background: rgba(0, 90, 135, 0.85);
  backdrop-filter: blur(22px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--t);
}
header.scrolled { padding: 10px 0; background: rgba(0, 46, 69, 0.96); }
.nav { display: flex; align-items: center; justify-content: space-between; max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.3rem; color: white; letter-spacing: -0.02em; }
.logo-img { height: 36px; width: auto; display: block; }
.footer-logo-img { height: 40px; }
@media (max-width: 500px) { .logo-img { height: 30px; } }
.logo-mark { width: 44px; height: 26px; display: flex; align-items: center; justify-content: center; color: inherit; }
.logo-mark svg { width: 100%; height: 100%; overflow: visible; color: inherit; }
.logo-mark .ecg-line { stroke-dasharray: 200; stroke-dashoffset: 200; animation: ecg-draw 3s ease-in-out infinite; }
@keyframes ecg-draw {
  0% { stroke-dashoffset: 200; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -200; }
}
.logo-text { font-family: var(--serif); font-weight: 700; }
.nav-links { display: flex; gap: 4px; align-items: center; background: rgba(255, 255, 255, 0.10); padding: 6px; border-radius: 999px; }
.nav-links a { padding: 8px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 500; color: rgba(255, 255, 255, 0.95); transition: var(--t); }
.nav-links a:hover, .nav-links a.active { background: white; color: var(--azul); }
.nav-cta {
  background: var(--vermelho) !important; color: white !important;
  padding: 10px 22px !important; font-weight: 700 !important;
  margin-left: 8px;
  box-shadow: 0 6px 18px rgba(var(--vermelho-rgb), 0.4) !important;
}
.nav-cta:hover { background: var(--vermelho-claro) !important; transform: translateY(-2px); }
.menu-toggle { display: none; font-size: 28px; color: white; }
@media (max-width: 1050px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 16px; right: 16px; flex-direction: column; padding: 20px; gap: 8px; background: var(--azul-noite); box-shadow: var(--shadow-md); border-radius: 18px; }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; text-align: center; color: white; }
  .menu-toggle { display: block; }
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), background-color 0.25s ease, box-shadow 0.35s ease, border-color 0.25s ease, color 0.25s ease;
  position: relative; overflow: hidden;
  font-family: var(--sans);
  outline: none; line-height: 1; white-space: nowrap; text-align: center; justify-content: center;
}
.btn:focus-visible { box-shadow: 0 0 0 4px rgba(var(--vermelho-rgb), 0.35), 0 12px 32px rgba(var(--vermelho-rgb), 0.42); }
.btn:active { transform: translateY(-1px) scale(0.98); }
.btn-primary {
  background: var(--vermelho); color: white;
  box-shadow: 0 12px 32px rgba(var(--vermelho-rgb), 0.42);
  font-weight: 700;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(var(--vermelho-rgb), 0.55); background: var(--vermelho-claro); }
.btn-secondary {
  background: white; color: var(--azul); border: 1.5px solid var(--azul);
}
.btn-secondary:hover { background: var(--azul); color: white; transform: translateY(-3px); box-shadow: 0 12px 32px rgba(var(--azul-rgb), 0.35); }
.btn-outline-white {
  background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(10px);
  color: white; border: 1.5px solid rgba(255, 255, 255, 0.30);
}
.btn-outline-white:hover { background: white; color: var(--azul); border-color: white; transform: translateY(-3px); }

/* Footer */
footer {
  background: linear-gradient(180deg, var(--azul-escuro) 0%, var(--azul-noite) 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 90px 0 36px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 50px; margin-bottom: 60px; }
.footer-logo { color: white; font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; letter-spacing: -0.02em; font-family: var(--serif); }
.footer-desc { font-size: 0.92rem; margin-bottom: 24px; max-width: 340px; line-height: 1.65; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  transition: var(--t); color: white;
  border: 1px solid rgba(255,255,255,0.08);
}
.social-link svg, .social-link .icone-wa { width: 18px; height: 18px; }
.social-link:hover { background: var(--vermelho); transform: translateY(-3px); border-color: var(--vermelho); }
footer h4 { color: white; margin-bottom: 20px; font-size: 0.95rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-list { list-style: none; }
.footer-list li { margin-bottom: 12px; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.footer-list a { transition: var(--t); }
.footer-list a:hover { color: var(--vermelho-claro); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 30px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; flex-wrap: wrap; gap: 16px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-bottom { justify-content: center; text-align: center; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.9s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Utility page header */
.page-header {
  padding: 170px 0 80px;
  background: linear-gradient(160deg, var(--azul-claro) 0%, var(--azul) 55%, var(--azul-escuro) 100%);
  color: white;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; top: -200px; right: -200px;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 187, 237, 0.4) 0%, transparent 60%);
  pointer-events: none;
}
.page-header .container { position: relative; z-index: 2; text-align: center; }
.page-header .breadcrumb {
  display: inline-flex; gap: 10px; align-items: center;
  color: rgba(255,255,255,0.85); font-size: 0.85rem;
  margin-bottom: 20px;
  text-transform: uppercase; letter-spacing: 0.15em; font-weight: 600;
}
.page-header .breadcrumb a { transition: var(--t); }
.page-header .breadcrumb a:hover { color: var(--vermelho-claro); }
.page-header h1 { color: white; margin-bottom: 20px; }
.page-header h1 em { font-style: italic; font-weight: 400; color: var(--vermelho-claro); }
.page-header p { color: rgba(255,255,255,0.92); font-size: 1.2rem; max-width: 720px; margin: 0 auto; line-height: 1.6; }

.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--vermelho); font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.18em;
  margin-bottom: 18px;
}
.section-tag::before { content: ''; width: 28px; height: 1.5px; background: var(--vermelho); }


/* ================================================
   AÇÕES FLUTUANTES (WhatsApp + voltar ao topo)
   Mesma aparência do index.html, que traz este bloco embutido.
   ================================================ */
.fab-stack {
  position: fixed; right: 24px; bottom: 24px; z-index: 150;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.fab {
  position: relative;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s cubic-bezier(.22,1,.36,1),
              opacity .35s cubic-bezier(.22,1,.36,1), visibility .35s, background-color .35s ease;
  -webkit-tap-highlight-color: transparent;
}
.fab:hover { transform: translateY(-4px) scale(1.05); }
.fab:active { transform: translateY(-1px) scale(.97); }
.fab:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(255,255,255,.5), 0 0 0 7px var(--azul); }
.fab svg, .fab .icone-wa { width: 26px; height: 26px; position: relative; z-index: 2; }

.fab-wa {
  background: linear-gradient(145deg, #45D268 0%, #22A24C 100%);
  box-shadow: 0 10px 26px rgba(34,162,76,.45), 0 3px 8px rgba(0,40,20,.25),
              inset 0 1px 1px rgba(255,255,255,.35);
}
.fab-wa:hover { box-shadow: 0 18px 40px rgba(34,162,76,.55), inset 0 1px 1px rgba(255,255,255,.4); }
.fab-pulse {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(69,210,104,.75);
  animation: fab-ping 2.8s cubic-bezier(0,0,.2,1) infinite;
  pointer-events: none; z-index: 1;
}
@keyframes fab-ping {
  0%   { transform: scale(1);    opacity: .75; }
  70%  { transform: scale(1.65); opacity: 0; }
  100% { transform: scale(1.65); opacity: 0; }
}

.fab-top {
  background: rgba(0, 46, 69, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 10px 26px rgba(0,46,69,.4), inset 0 1px 1px rgba(255,255,255,.16);
  width: 50px; height: 50px;
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9);
}
.fab-top.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.fab-top.show:hover { transform: translateY(-4px) scale(1.05); background: var(--azul); }
.fab-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.fab-tip {
  position: absolute; right: calc(100% + 14px); top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: var(--azul-noite); color: white;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  padding: 8px 14px; border-radius: 10px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  box-shadow: 0 10px 26px rgba(0,30,50,.35);
}
.fab-tip::after {
  content: ''; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: var(--azul-noite);
}
.fab:hover .fab-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 700px) {
  .fab-stack { right: 16px; bottom: 16px; gap: 12px; }
  .fab { width: 52px; height: 52px; }
  .fab-top { width: 46px; height: 46px; }
  .fab-tip { display: none; }
}
@media (prefers-reduced-motion: reduce) { .fab-pulse { animation: none; opacity: 0; } }

/* Ícone do WhatsApp — arte oficial em assets/whatsapp.png.
   Entra como MÁSCARA (e não como <img>) para herdar a cor do contexto:
   branco sobre o botão verde, branco no rodapé escuro, vermelho no hover —
   exatamente o que o <svg> com currentColor fazia antes. */
.icone-wa {
  display: inline-block;
  width: 18px; height: 18px;
  background-color: currentColor;
  -webkit-mask: url("assets/whatsapp.png") no-repeat center / contain;
  mask: url("assets/whatsapp.png") no-repeat center / contain;
}
