/* ============================================================
   AtmosPressão – Stylesheet
   Dark theme · Medical/scientific · Responsive
   ============================================================ */

:root {
  --bg-900: #060d1a;
  --bg-800: #0b1628;
  --bg-700: #0f1e38;
  --bg-600: #162847;
  --bg-card: #0e1a30;
  --bg-card2: #101e38;

  --accent: #00d4ff;
  --accent2: #0090cc;
  --accent3: #00ffb3;
  --purple: #a855f7;
  --pink: #ec4899;
  --orange: #f97316;
  --red: #ef4444;
  --green: #22c55e;
  --yellow: #eab308;

  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border: rgba(0,212,255,.15);
  --border2: rgba(255,255,255,.08);

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,.45);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.6);

  --font: 'Inter', sans-serif;
  --font-mono: 'Orbitron', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-900);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---- Typography ---- */
h1,h2,h3,h4,h5 {
  font-weight: 700;
  line-height: 1.3;
  color: #f1f5f9;
}
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { color: var(--text-muted); }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent3); }
ul { padding-left: 1.4rem; }
ul li { color: var(--text-muted); margin-bottom: .35rem; }
ol { padding-left: 1.4rem; }
ol li { color: var(--text-muted); margin-bottom: .35rem; }

.accent { color: var(--accent); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================ HEADER */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(6,13,26,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: .9rem 1.5rem;
  display: flex; align-items: center; gap: 2rem;
}
.logo { display: flex; align-items: center; gap: .6rem; }
.logo-icon { font-size: 1.5rem; color: var(--accent); }
.logo-text {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: .04em;
}
#main-nav { display: flex; gap: 1.5rem; margin-left: auto; flex-wrap: wrap; }
#main-nav a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s;
}
#main-nav a:hover { color: var(--accent); }
.nav-toggle {
  display: none;
  background: none; border: none; color: var(--accent);
  font-size: 1.3rem; cursor: pointer; margin-left: auto;
}

/* ============================================================ HERO */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 7rem 1.5rem 4rem;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #0a1f4a 0%, var(--bg-900) 70%);
}
.particles {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.particle {
  position: absolute; border-radius: 50%;
  background: var(--accent);
  opacity: .25;
  animation: float-p linear infinite;
}
@keyframes float-p {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: .3; }
  90%  { opacity: .1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}
.globe-wrap {
  position: absolute; right: 8%; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.globe {
  position: relative; width: 300px; height: 300px;
  display: flex; align-items: center; justify-content: center;
}
.globe-icon {
  font-size: 8rem;
  color: var(--accent);
  opacity: .25;
  animation: rotate-globe 30s linear infinite;
}
@keyframes rotate-globe { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,.25);
  animation: orbit-spin linear infinite;
}
.orbit-1 { width: 200px; height: 200px; animation-duration: 8s; }
.orbit-2 { width: 260px; height: 260px; animation-duration: 14s; animation-direction: reverse; }
.orbit-3 { width: 300px; height: 300px; animation-duration: 22s; }
@keyframes orbit-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.hero-content {
  position: relative; z-index: 2;
  max-width: 680px;
  text-align: center;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-family: var(--font-mono);
  letter-spacing: .03em;
  margin-bottom: 1.2rem;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto; margin-right: auto;
}
.hero-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem;
  margin-bottom: 2rem;
}
.badge {
  background: rgba(0,212,255,.12);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: .4rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
}
.badge i { margin-right: .4rem; }
.btn-hero {
  display: inline-flex; align-items: center; gap: .6rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000;
  font-weight: 700; font-size: 1rem;
  padding: .8rem 2rem; border-radius: 50px;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 0 24px rgba(0,212,255,.4);
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,212,255,.5); color: #000; }

/* ============================================================ SECTIONS */
.section { padding: 6rem 0; }
.section-dark { background: var(--bg-800); }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-tag {
  display: inline-block;
  background: rgba(0,212,255,.1);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 50px;
  padding: .3rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .9rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.section-header h2 { margin-bottom: .7rem; }
.section-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ============================================================ CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  margin-bottom: 2.5rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.card-blue { border-left: 3px solid #4FC3F7; }
.card-blue .card-icon { color: #4FC3F7; }
.card-cyan { border-left: 3px solid var(--accent); }
.card-cyan .card-icon { color: var(--accent); }
.card-teal { border-left: 3px solid var(--accent3); }
.card-teal .card-icon { color: var(--accent3); }
.card-purple { border-left: 3px solid var(--purple); }
.card-purple .card-icon { color: var(--purple); }

/* formula box */
.formula-box {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: center;
}
.formula-item {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 220px;
}
.formula-label {
  display: block;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin-bottom: .4rem;
}
.formula-eq {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent3);
  font-weight: 700;
}

/* ============================================================ LAYERS ACCORDION */
.layers-accordion { margin-bottom: 3rem; }
.layer-item {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  margin-bottom: .8rem;
  overflow: hidden;
}
.layer-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.4rem;
  cursor: pointer;
  user-select: none;
  transition: background .2s;
}
.layer-header:hover { background: var(--bg-600); }
.layer-header strong { font-size: 1rem; }
.layer-range { font-size: .82rem; color: var(--text-dim); margin-left: .5rem; }
.layer-header .fa-chevron-down { margin-left: auto; color: var(--text-dim); transition: transform .3s; }
.layer-color { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.layer-body {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  padding: 0 1.4rem;
}
.layer-body p { padding: 1rem 0; }
.layer-item.open .layer-body { max-height: 300px; }
.layer-item.open .layer-header .fa-chevron-down { transform: rotate(180deg); }

/* altitude chart */
.altitude-chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.chart-title { font-size: 1.1rem; margin-bottom: 1.2rem; color: var(--accent); }

/* ============================================================ BODY SYSTEMS */
.body-systems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
}
.sys-card {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.sys-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.sys-resp .sys-icon { color: #4FC3F7; }
.sys-cardio .sys-icon { color: #f06292; }
.sys-neuro .sys-icon { color: #ce93d8; }
.sys-ear .sys-icon { color: #ffb74d; }
.sys-digest .sys-icon { color: #81c784; }
.sys-vascular .sys-icon { color: #00d4ff; }

.sys-card ul { margin: .8rem 0 1rem; }
.sys-alert {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  font-size: .88rem;
  color: #fca5a5;
  display: flex; gap: .5rem; align-items: flex-start;
}
.sys-alert i { margin-top: .2rem; flex-shrink: 0; color: #ef4444; }

/* ============================================================ VENTILATION */
.vent-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.vent-box {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.vent-natural { border-top: 3px solid var(--accent3); }
.vent-mec { border-top: 3px solid #f06292; }
.vent-box h3 { font-size: 1.1rem; margin-bottom: 1.2rem; }
.vent-phases { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1.2rem; }
.vent-phase { display: flex; flex-direction: column; gap: .3rem; }
.phase-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.pressure-bar {
  background: rgba(255,255,255,.06);
  border-radius: 50px;
  height: 28px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center;
}
.bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: 50px;
  opacity: .7;
}
.pressure-bar span {
  position: relative; z-index: 1;
  font-size: .78rem; font-weight: 600;
  padding: 0 .8rem;
  color: #f1f5f9;
}
.vent-desc { font-size: .92rem; color: var(--text-muted); }

.sub-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
}
.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.comp-card {
  background: var(--bg-card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.comp-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: .9rem;
}
.comp-card h4 { font-size: 1rem; margin-bottom: .5rem; }

/* info boxes */
.info-box {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius);
  margin-top: 1.5rem;
  font-size: .93rem;
}
.info-box i { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.info-cyan {
  background: rgba(0,212,255,.08);
  border: 1px solid rgba(0,212,255,.25);
  color: var(--text-muted);
}
.info-cyan i { color: var(--accent); }
.info-red {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  color: var(--text-muted);
}
.info-red i { color: #ef4444; }

/* ============================================================ CLINICAL */
.clinical-section {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2rem;
}
.clin-header {
  display: flex; gap: 1.4rem; align-items: flex-start;
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border2);
}
.clin-num {
  font-family: var(--font-mono);
  font-size: 2.5rem; font-weight: 700;
  color: var(--accent);
  opacity: .3;
  line-height: 1;
  flex-shrink: 0;
  min-width: 60px;
}
.clin-header h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.clin-header p { font-size: .93rem; }
.clin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.3rem;
}
.clin-item {
  background: var(--bg-700);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 1.3rem;
}
.clin-item h4 {
  font-size: .98rem; margin-bottom: .6rem;
  display: flex; align-items: center; gap: .5rem;
}
.clin-item p { font-size: .88rem; margin-bottom: .7rem; }
.clin-list { margin: .5rem 0 0; padding-left: 1.2rem; }
.clin-list li { font-size: .86rem; margin-bottom: .4rem; }
.clin-values {
  display: flex; flex-direction: column; gap: .3rem;
  margin-top: .8rem;
}
.clin-values span {
  font-size: .8rem;
  background: rgba(0,212,255,.07);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .3rem .7rem;
  color: var(--accent);
  font-family: var(--font-mono);
}
.val-danger {
  background: rgba(239,68,68,.1) !important;
  border-color: rgba(239,68,68,.3) !important;
  color: #fca5a5 !important;
}
.val-warning {
  background: rgba(234,179,8,.1) !important;
  border-color: rgba(234,179,8,.3) !important;
  color: #fde047 !important;
}

/* Hemorrhage stages */
.hemorrhage-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.hstage {
  background: var(--bg-700);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border2);
}
.hstage-header {
  padding: .75rem 1rem;
  display: flex; justify-content: space-between; align-items: center;
}
.hstage-class {
  font-weight: 700; font-size: .95rem;
}
.hstage-vol {
  font-size: .75rem;
  color: var(--text-dim);
}
.hstage-1 .hstage-header { background: rgba(34,197,94,.2); }
.hstage-1 .hstage-class { color: #86efac; }
.hstage-2 .hstage-header { background: rgba(234,179,8,.2); }
.hstage-2 .hstage-class { color: #fde047; }
.hstage-3 .hstage-header { background: rgba(249,115,22,.2); }
.hstage-3 .hstage-class { color: #fdba74; }
.hstage-4 .hstage-header { background: rgba(239,68,68,.25); }
.hstage-4 .hstage-class { color: #fca5a5; }
.hstage-body {
  padding: 1rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.hstage-item {
  font-size: .86rem;
  color: var(--text-muted);
  display: flex; gap: .5rem; align-items: flex-start;
}
.hstage-item i { margin-top: .2rem; flex-shrink: 0; color: var(--accent); }

/* ============================================================ IMMOBILITY */
.immob-timeline {
  display: flex; flex-direction: column; gap: 1.5rem;
  margin-bottom: 3rem;
  border-left: 2px solid var(--border);
  padding-left: 1.8rem;
  margin-left: 1rem;
}
.imm-block { position: relative; }
.imm-icon {
  position: absolute;
  left: -2.9rem;
  top: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  border: 2px solid var(--bg-800);
}
.imm-h24 { background: rgba(0,212,255,.2); color: var(--accent); }
.imm-week { background: rgba(249,115,22,.2); color: #fdba74; }
.imm-month { background: rgba(239,68,68,.2); color: #fca5a5; }
.imm-content {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.imm-content h4 { font-size: 1.05rem; margin-bottom: .8rem; color: var(--accent); }
.imm-content ul li { font-size: .9rem; }

/* Prevention grid */
.prevention-grid { margin-bottom: 3rem; }
.prev-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
}
.prev-card {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.3rem;
  text-align: center;
  transition: transform .2s;
}
.prev-card:hover { transform: translateY(-3px); }
.prev-card i { font-size: 1.8rem; margin-bottom: .7rem; display: block; }
.prev-card h4 { font-size: .95rem; margin-bottom: .5rem; }
.prev-card p { font-size: .84rem; }

/* Escara section */
.escara-section {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2rem;
}
.escara-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.escara-text p, .escara-text ol { margin-bottom: .8rem; font-size: .92rem; }
.escara-stages {
  display: flex; flex-direction: column; gap: .8rem;
}
.escara-grade {
  border-left: 4px solid;
  background: var(--bg-700);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .9rem 1.1rem;
}
.grade-num {
  display: block;
  font-weight: 700; font-size: .9rem;
  margin-bottom: .3rem;
  color: #f1f5f9;
}
.escara-grade p { font-size: .85rem; }

/* ============================================================ SIMULATOR */
.simulator-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2rem;
}
.sim-control { margin-bottom: 1.5rem; }
.sim-control label { font-size: 1rem; font-weight: 600; color: #f1f5f9; display: block; margin-bottom: .6rem; }
.sim-control label strong { color: var(--accent); }
#altSlider {
  width: 100%; height: 6px;
  -webkit-appearance: none;
  background: linear-gradient(to right, var(--accent), var(--accent2));
  border-radius: 50px;
  outline: none;
  cursor: pointer;
  margin-bottom: 1rem;
}
#altSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg-900);
  box-shadow: 0 0 8px rgba(0,212,255,.5);
}
.sim-presets {
  display: flex; flex-wrap: wrap; gap: .6rem;
}
.preset-btn {
  background: rgba(0,212,255,.1);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 50px;
  padding: .35rem .9rem;
  font-size: .82rem;
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: var(--font);
}
.preset-btn:hover { background: var(--accent); color: #000; }
.sim-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.sim-metric {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.sim-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: .4rem; }
.sim-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}
.sim-status { transition: color .3s; }
.sim-chart-wrap {
  background: var(--bg-700);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

/* ============================================================ QUIZ */
.quiz-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 750px;
  margin: 0 auto;
}
.quiz-progress {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.8rem;
}
.quiz-prog-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-600);
  border-radius: 50px;
  overflow: hidden;
}
.quiz-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  border-radius: 50px;
  transition: width .4s;
  width: 10%;
}
#quizCounter { font-size: .85rem; color: var(--text-dim); white-space: nowrap; }
.quiz-question { font-size: 1.15rem; font-weight: 600; color: #f1f5f9; margin-bottom: 1.5rem; }
.quiz-options { display: flex; flex-direction: column; gap: .7rem; }
.quiz-option {
  background: var(--bg-700);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: .9rem 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .95rem;
  transition: background .2s, border-color .2s, color .2s;
  text-align: left;
  font-family: var(--font);
}
.quiz-option:hover { background: var(--bg-600); color: #f1f5f9; border-color: var(--accent); }
.quiz-option.correct { background: rgba(34,197,94,.15); border-color: #22c55e; color: #86efac; }
.quiz-option.wrong { background: rgba(239,68,68,.15); border-color: #ef4444; color: #fca5a5; }
.quiz-option:disabled, .quiz-option[disabled] { cursor: default; }
.quiz-feedback {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
}
.quiz-feedback.correct-fb {
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.3);
  color: #86efac;
}
.quiz-feedback.wrong-fb {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
}
.btn-quiz {
  margin-top: 1.2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000;
  font-weight: 700;
  padding: .7rem 1.8rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font);
  font-size: .95rem;
  transition: transform .2s, box-shadow .2s;
}
.btn-quiz:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,212,255,.4); }
.quiz-result {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  max-width: 750px;
  margin: 0 auto;
}
.quiz-result h3 { font-size: 1.8rem; margin-bottom: .8rem; }
.result-score {
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin: 1rem 0;
}
.hidden { display: none !important; }

/* ============================================================ FOOTER */
.footer {
  background: var(--bg-800);
  border-top: 1px solid var(--border2);
  padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand p { font-size: .9rem; margin-top: .8rem; }
.footer-links, .footer-info {
  display: flex; flex-direction: column; gap: .4rem;
}
.footer-links h4, .footer-info h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-dim);
  margin-bottom: .4rem;
}
.footer-links a { font-size: .9rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }
.footer-info p { font-size: .84rem; color: var(--text-dim); }
.footer-bottom {
  border-top: 1px solid var(--border2);
  padding-top: 1.2rem;
  text-align: center;
}
.footer-bottom p { font-size: .84rem; color: var(--text-dim); }

/* Back to top */
.back-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(0,212,255,.4);
}
.back-top.visible { opacity: 1; pointer-events: all; }
.back-top:hover { transform: translateY(-3px); color: #000; }

/* Piezo link box — conecta pressão atmosférica ao efeito piezo */
.piezo-link-box {
  background: var(--bg-card);
  border: 1px solid rgba(0,255,179,.2);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2.5rem;
}
.piezo-link-box h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--border2);
}
.piezo-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.3rem;
}
.piezo-link-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-700);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
}
.pli-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.piezo-link-item h4 { font-size: .95rem; margin-bottom: .4rem; }
.piezo-link-item p  { font-size: .85rem; }

/* ============================================================ PIEZOELÉTRICO */
.piezo-intro {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.piezo-intro-text h3 { font-size: 1.3rem; margin-bottom: .9rem; }
.piezo-intro-text p  { font-size: .93rem; margin-bottom: 1.2rem; }

.piezo-formula-row {
  display: flex; flex-wrap: wrap; gap: .9rem;
}
.piezo-formula-box {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .8rem 1.1rem;
  min-width: 200px;
  flex: 1;
}
.pf-label  { display:block; font-size:.74rem; text-transform:uppercase; letter-spacing:.08em; color:var(--text-dim); margin-bottom:.3rem; }
.pf-eq     { display:block; font-family:var(--font-mono); font-size:1rem; color:var(--accent3); font-weight:700; margin-bottom:.25rem; }
.pf-desc   { display:block; font-size:.78rem; color:var(--text-muted); }

/* Piezo animation diagram */
.piezo-diagram {
  display: flex; align-items: center; justify-content: center;
}
.piezo-anim {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.piezo-crystal {
  width: 160px;
  display: flex; flex-direction: column;
}
.crystal-layer {
  height: 10px; width: 100%;
  background: rgba(0,212,255,.5);
  border-radius: 4px 4px 0 0;
}
.crystal-layer.crystal-bot { border-radius: 0 0 4px 4px; }
.crystal-body {
  background: rgba(0,212,255,.08);
  border: 1px solid rgba(0,212,255,.3);
  padding: 1rem .8rem;
  text-align: center;
  position: relative;
  min-height: 80px;
}
.crystal-label { font-size: .78rem; color: var(--accent); font-weight:600; }
.crystal-ions {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center;
  margin-top: .5rem;
}
.ion {
  width: 10px; height: 10px;
  border-radius: 50%;
  transition: transform .4s, background .4s;
}
.ion-pos { background: #ef4444; }
.ion-neg { background: #3b82f6; }
.ion.displaced { transform: translateY(4px); }

.piezo-arrows {
  display: flex; gap: 2rem; align-items: center;
}
.pa-down {
  font-size: .82rem; color: #FFB74D; font-weight:600;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  animation: bounce-down 1.6s ease-in-out infinite;
}
.pa-bolt {
  font-size: .82rem; color: var(--accent3); font-weight:600;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  animation: pulse-glow 1.6s ease-in-out infinite;
}
@keyframes bounce-down { 0%,100%{transform:translateY(0)} 50%{transform:translateY(5px)} }
@keyframes pulse-glow  { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Tissue cards */
.piezo-tissues {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.3rem;
}
.pt-card {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .2s;
}
.pt-card:hover { transform: translateY(-3px); }
.pt-icon { font-size: 1.8rem; margin-bottom: .8rem; }
.pt-bone .pt-icon     { color: #e0e0e0; }
.pt-collagen .pt-icon { color: #FFB74D; }
.pt-cartilage .pt-icon{ color: #81C784; }
.pt-skin .pt-icon     { color: #F06292; }
.pt-heart .pt-icon    { color: #ef4444; }
.pt-nerve .pt-icon    { color: #CE93D8; }
.pt-card h4 { font-size: 1rem; margin-bottom: .6rem; }
.pt-card p  { font-size: .87rem; margin-bottom: .7rem; }
.pt-card ul li { font-size: .85rem; }

.pt-alert {
  margin-top: .9rem;
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
  font-size: .83rem;
  display: flex; gap: .5rem; align-items: flex-start;
}
.pt-alert i { margin-top:.15rem; flex-shrink:0; }
.pt-green  { background:rgba(34,197,94,.1);  border:1px solid rgba(34,197,94,.3);  color:#86efac; }
.pt-green i{ color:#22c55e; }
.pt-cyan   { background:rgba(0,212,255,.1);  border:1px solid rgba(0,212,255,.3);  color:#67e8f9; }
.pt-cyan i { color:var(--accent); }
.pt-yellow { background:rgba(234,179,8,.1);  border:1px solid rgba(234,179,8,.3);  color:#fde047; }
.pt-yellow i{color:#eab308; }
.pt-pink   { background:rgba(236,72,153,.1); border:1px solid rgba(236,72,153,.3); color:#f9a8d4; }
.pt-pink i { color:#ec4899; }
.pt-red    { background:rgba(239,68,68,.1);  border:1px solid rgba(239,68,68,.3);  color:#fca5a5; }
.pt-red i  { color:#ef4444; }
.pt-purple { background:rgba(168,85,247,.1); border:1px solid rgba(168,85,247,.3); color:#d8b4fe; }
.pt-purple i{color:#a855f7; }

/* Clinical applications */
.piezo-clinical {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.2rem;
}
.pc-item {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex; gap: 1rem;
}
.pc-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  opacity: .25;
  line-height: 1;
  flex-shrink: 0;
  min-width: 48px;
}
.pc-item h4 { font-size: 1rem; margin-bottom: .5rem; }
.pc-item p  { font-size: .87rem; }

/* ============================================================ CNTP */
.cntp-intro {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  font-size: .95rem;
}

.cntp-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
}
.cntp-table { min-width: 700px; }
.cntp-thead, .cntp-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.3fr 1.1fr .9fr .9fr;
  gap: .5rem;
  padding: .65rem .8rem;
  align-items: center;
}
.cntp-thead {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border2);
  margin-bottom: .3rem;
}
.cntp-row { font-size: .86rem; border-radius: var(--radius-sm); }
.cntp-row span { color: var(--text-muted); }
.cntp-row-alt { background: rgba(255,255,255,.03); }
.cntp-label { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: #f1f5f9 !important; }

/* PVT Simulator */
.pvt-simulator {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2rem;
}
.pvt-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}
.pvt-ctrl-group label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .92rem; font-weight: 600; color: #f1f5f9;
  margin-bottom: .5rem;
}
.pvt-val {
  font-family: var(--font-mono);
  font-size: .95rem;
  color: var(--accent);
}
.pvt-slider {
  width: 100%; height: 6px;
  -webkit-appearance: none;
  border-radius: 50px; outline: none; cursor: pointer;
  margin-bottom: .7rem;
}
.pvt-press { background: linear-gradient(to right, #ef4444, #00d4ff); }
.pvt-vol   { background: linear-gradient(to right, #a855f7, #00ffb3); }
.pvt-temp  { background: linear-gradient(to right, #3b82f6, #f97316); }
.pvt-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  border: 3px solid var(--bg-900);
  box-shadow: 0 0 8px rgba(255,255,255,.3);
}
.pvt-presets {
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.pvt-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  border-radius: 50px;
  padding: .28rem .7rem;
  font-size: .77rem;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s, color .2s;
}
.pvt-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }

.pvt-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .9rem;
  margin-bottom: 1.5rem;
}
.pvt-metric {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .9rem;
  text-align: center;
}
.pvt-metric-label { display:block; font-size:.74rem; text-transform:uppercase; letter-spacing:.07em; color:var(--text-dim); margin-bottom:.3rem; }
.pvt-metric-value { display:block; font-family:var(--font-mono); font-size:1.05rem; font-weight:700; color:var(--accent); transition:color .3s; }

.pvt-chart-wrap {
  background: var(--bg-700);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}
.pvt-explain {
  display: flex; gap: .8rem; align-items: flex-start;
  background: rgba(0,212,255,.07);
  border: 1px solid rgba(0,212,255,.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Gas CNTP section */
.cntp-gas-section {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2rem;
  align-items: start;
}
.cgas-explain p { font-size: .92rem; }
.cgas-formula {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
  margin: .9rem 0;
}
.cgas-label { display:block; font-size:.77rem; text-transform:uppercase; letter-spacing:.07em; color:var(--text-dim); margin-bottom:.4rem; }
.cgas-eq { display:block; font-family:var(--font-mono); font-size:.9rem; color:var(--accent3); }
.cgas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.cgas-card {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
}
.cgas-card h4 { font-size: .93rem; margin-bottom: .6rem; }
.cgas-card ul li { font-size: .83rem; }

/* Temperature & Piezo grid */
.temp-piezo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.tp-card {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.tp-header {
  display: flex; gap: .9rem; align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--border2);
}
.tp-header i { font-size: 1.6rem; flex-shrink: 0; margin-top: .1rem; }
.tp-header h4 { font-size: 1rem; margin-bottom: .2rem; }
.tp-range { font-size: .8rem; color: var(--text-dim); }
.tp-hypo  .tp-header i { color: #93c5fd; }
.tp-normal.tp-header i { color: var(--accent3); }
.tp-fever .tp-header i { color: #fbbf24; }
.tp-hyper .tp-header i { color: #f87171; }
.tp-normal .tp-header i{ color: var(--accent3); }
.tp-card ul li { font-size: .86rem; }
.tp-val {
  margin-top: .9rem;
  padding: .5rem .8rem;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: rgba(255,255,255,.05);
  color: var(--text-muted);
  display: flex; gap: .4rem; align-items: center;
}
.tp-ok     { background: rgba(34,197,94,.12); color: #86efac; }
.tp-warn   { background: rgba(234,179,8,.12); color: #fde047; }
.tp-danger { background: rgba(239,68,68,.12); color: #fca5a5; }

/* ============================================================ RESPONSIVE */
@media (max-width: 900px) {
  .globe-wrap { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .escara-content { grid-template-columns: 1fr; }
  .piezo-intro { grid-template-columns: 1fr; }
  .cntp-gas-section { grid-template-columns: 1fr; }
  .cgas-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  #main-nav { display: none; flex-direction: column; position: fixed; top: 60px; left: 0; right: 0; background: rgba(6,13,26,.97); padding: 1.5rem; gap: 1rem; border-bottom: 1px solid var(--border); z-index: 99; }
  #main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .hero-title { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .vent-comparison { grid-template-columns: 1fr; }
  .hemorrhage-stages { grid-template-columns: 1fr 1fr; }
  .immob-timeline { margin-left: 0; padding-left: 1.2rem; }
  .imm-icon { left: -2.1rem; width: 32px; height: 32px; font-size: .85rem; }
  .quiz-wrap { padding: 1.5rem; }
  .cgas-grid { grid-template-columns: 1fr; }
  .pvt-controls { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hemorrhage-stages { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
  .cntp-table { min-width: 600px; }
}
