/* ==========================================================================
   CARDIORAD - TELERRADIOLOGIA CARDIOVASCULAR DE ALTA PRECISÃO
   Folha de Estilos Principal (Modern Medical Design System)
   ========================================================================== */

:root {
  --color-navy: #003366;
  --color-navy-dark: #001D3D;
  --color-navy-deeper: #001226;
  --color-navy-light: #004C99;

  --color-crimson: #E63946;
  --color-crimson-dark: #C1121F;
  --color-crimson-light: #FF4D5E;

  --color-emerald: #00E5A0;
  --color-emerald-dark: #0B7A57;
  --color-emerald-deep: #12312A;

  --color-slate-50: #F8FAFC;
  --color-slate-100: #F1F5F9;
  --color-slate-200: #E2E8F0;
  --color-slate-600: #475569;
  --color-slate-800: #1E293B;
  --color-slate-900: #0F172A;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base Reset & Typography */
html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--color-slate-800);
  background-color: #FFFFFF;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 999px;
  border: 2px solid #F1F5F9;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}

/* Subtle Heartbeat Animation */
.heartbeat-subtle {
  animation: heartbeat 2.4s ease-in-out infinite;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.06);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.04);
  }

  70% {
    transform: scale(1);
  }
}

/* Pulsar Anatômico Realista do Coração (Sístole Dupla, Recuo Elástico & Perfusão) */
.heart-realistic-pulse {
  animation: anatomicalHeartBeat 1.85s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
  transform-origin: 50% 65%;
  will-change: transform, filter;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 25px rgba(230, 57, 70, 0.35));
  transition: filter 0.3s ease;
}

@keyframes anatomicalHeartBeat {
  0% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 25px rgba(230, 57, 70, 0.35));
  }
  /* 1º Batimento: Sístole Ventricular Rápida e Expansão Arterial */
  12% {
    transform: scale(1.09) rotate(-1deg);
    filter: drop-shadow(0 28px 45px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 45px rgba(230, 57, 70, 0.8));
  }
  /* Recuo elástico */
  22% {
    transform: scale(0.985) rotate(0.5deg);
    filter: drop-shadow(0 18px 25px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(230, 57, 70, 0.25));
  }
  /* 2º Batimento: Fechamento Valvar e Contração Secundária (Incisure / Lub-Dub) */
  32% {
    transform: scale(1.055) rotate(0deg);
    filter: drop-shadow(0 24px 38px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 35px rgba(230, 57, 70, 0.6));
  }
  /* Início do relaxamento ventricular (Diástole) */
  45% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 25px rgba(230, 57, 70, 0.35));
  }
  /* Pausa diastólica de enchimento fisiológico */
  100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 25px rgba(230, 57, 70, 0.35));
  }
}

/* Live Pulse Animation for 24/7 Status Indicator */
.pulse-emerald {
  box-shadow: 0 0 0 0 rgba(0, 229, 160, 0.7);
  animation: pulse-emerald 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-emerald {
  to {
    box-shadow: 0 0 0 10px rgba(0, 229, 160, 0);
  }
}

/* WhatsApp Floating Button Pulse Animation */
.whatsapp-float {
  animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Background Grids & Patterns */
.grid-pattern-subtle {
  background-image: radial-gradient(rgba(0, 51, 102, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

.grid-pattern-dark {
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Sticky Header Global Fixo em Todas as Páginas */
#site-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000 !important;
}

#sticky-header-wrapper {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#sticky-header-wrapper.header-scrolled {
  box-shadow: 0 10px 30px -10px rgba(0, 29, 61, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
}

#main-header {
  transition: all 0.3s ease;
}

#main-header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom-color: #E2E8F0;
}

/* ==========================================================================
   SIMULADOR DE EXAMES & SLA (Framer Standard Integrated)
   ========================================================================== */

.simulator-container {
  width: 100%;
  box-sizing: border-box;
  container-type: inline-size;
}

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

.simulator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  width: 100%;
}

/* Slider Controls Card */
.slider-card {
  background: #FFFFFF;
  border-radius: 28px;
  padding: clamp(24px, 3.2vw, 40px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.03),
    0 20px 48px -18px rgba(0, 51, 102, 0.12);
}

.slider-row {
  margin-bottom: 26px;
}

.slider-row:last-of-type {
  margin-bottom: 22px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.slider-label {
  font-size: 14.5px;
  font-weight: 600;
  color: #1E293B;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-badge-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #F1F5F9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-navy);
  font-size: 11px;
}

.slider-value {
  font-size: 18px;
  font-weight: 700;
  color: #0B7A57;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Range Input Styling */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  outline: none;
  margin: 14px 0 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #001D3D;
  border: 3.5px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(0, 29, 61, 0.35);
  cursor: grab;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #001D3D;
  border: 3.5px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(0, 29, 61, 0.35);
  cursor: grab;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.range-slider:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.18);
  background: #E63946;
}

.range-slider:active::-moz-range-thumb {
  cursor: grabbing;
  transform: scale(1.18);
  background: #E63946;
}

.range-slider:focus-visible {
  box-shadow: 0 0 0 3px rgba(11, 122, 87, 0.35);
}

.slider-card .note {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Simulator Presets Bar */
.simulator-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #E2E8F0;
}

.preset-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-chip:hover {
  background: #E2E8F0;
  color: #001D3D;
}

.preset-chip.active {
  background: #002244;
  color: #FFFFFF;
  border-color: #002244;
}

/* Result Dark Card */
.result-card {
  background:
    radial-gradient(90% 70% at 80% 0%, #12312A 0%, rgba(11, 12, 14, 0) 65%),
    linear-gradient(165deg, #14181C 0%, #0B0D11 85%);
  border-radius: 28px;
  padding: clamp(24px, 3.2vw, 40px);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.2),
    0 24px 60px -15px rgba(0, 20, 15, 0.45);
  position: relative;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.result-label {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.annual-number {
  margin-top: 8px;
  font-size: clamp(44px, 4.8vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #00E5A0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.annual-description {
  margin: 6px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.monthly-subdetail {
  display: inline-block;
  margin-top: 8px;
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.result-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.small-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.urgent-number {
  margin-top: 6px;
  font-size: clamp(28px, 2.8vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #00E5A0;
  font-variant-numeric: tabular-nums;
}

.sla-text {
  margin: 6px 0 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
  color: #FFFFFF;
}

.sla-text strong {
  color: #00E5A0;
  font-weight: 700;
}

.coverage-pill {
  margin: 24px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 229, 160, 0.06);
  border: 1px solid rgba(0, 229, 160, 0.15);
}

.cta-wrapper {
  margin-top: auto;
  padding-top: 26px;
}

.cta-simulator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: none;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  background: #00E5A0;
  color: #0B0C0E;
  padding: 16px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 20px -2px rgba(0, 229, 160, 0.35);
}

.cta-simulator:hover {
  background: #15f7b0;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -2px rgba(0, 229, 160, 0.5);
}

/* Simulator Responsive Breakpoints */
@container (max-width: 900px) {
  .simulator-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .slider-card,
  .result-card {
    padding: 26px;
  }

  .annual-number {
    font-size: clamp(40px, 8vw, 56px);
  }
}

@container (max-width: 600px) {

  .slider-card,
  .result-card {
    border-radius: 22px;
    padding: 20px;
  }

  .slider-row {
    margin-bottom: 22px;
  }

  .slider-label {
    font-size: 13.5px;
  }

  .slider-value {
    font-size: 16px;
  }

  .result-divider {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .annual-number {
    font-size: clamp(36px, 11vw, 48px);
  }
}

/* ==========================================================================
   ACORDEÃO / FAQ MÉDICO
   ========================================================================== */
.faq-item {
  border-bottom: 1px solid #E2E8F0;
  transition: background-color 0.2s ease;
}

.faq-button {
  width: 100%;
  padding: 20px 0;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  color: var(--color-navy-dark);
  font-size: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.faq-button:hover {
  color: var(--color-crimson);
}

.faq-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  background: var(--color-navy);
  color: #FFFFFF;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  font-size: 14.5px;
  color: var(--color-slate-600);
  line-height: 1.65;
}

.faq-item.active .faq-content {
  max-height: 500px;
  padding-bottom: 20px;
}

/* ==========================================================================
   HEADER FIXO / STICKY GLOBAL COM TRANSIÇÃO SUAVE AO ROLAR
   ========================================================================== */
#site-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  display: block !important;
}

#sticky-header-wrapper {
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#top-bar {
  max-height: 60px;
  opacity: 1;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#sticky-header-wrapper.header-scrolled #top-bar {
  max-height: 0;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-bottom-width: 0 !important;
  overflow: hidden;
}

#main-header {
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#main-header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 25px -5px rgba(0, 51, 102, 0.08), 0 8px 10px -6px rgba(0, 51, 102, 0.04);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

#header-inner {
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#header-logo {
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sticky-header-wrapper.header-scrolled #header-logo {
  height: 46px;
}

@media print {
  #site-header,
  #site-footer,
  .whatsapp-float {
    display: none !important;
    position: static !important;
  }
}