/* ==========================================================================
   BIOHACK.PRO — Portal de Otimização Pessoal e Biohacking
   Arquitetura Visual: Engenharia de Performance, SEO Editorial & AdSense UX
   ========================================================================== */

:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f1623;
  --bg-card: #131c2e;
  --bg-card-hover: #182338;
  --bg-input: #0b111e;
  --bg-ad: #0c1320;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-highlight: rgba(16, 185, 129, 0.45);
  --border-ad: rgba(245, 158, 11, 0.25);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.18);
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent-emerald);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-cyan);
}

/* ==========================================================================
   HEADER & NAVEGAÇÃO PRINCIPAL (PILL BUTTONS COM GLOW)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 13, 22, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  color: #04130e;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 0.95rem;
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* BOTÕES PRINCIPAIS: ESTILO "PORTAL HUB" COM FUNDO ESMERALDA E GLOW */
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #021a12;
  text-decoration: none;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #34d399;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #6ee7b7;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.nav-link.active {
  box-shadow: 0 0 0 2px #34d399, 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* O ÚLTIMO BOTÃO (PRIVACIDADE & ADSENSE): DISCRETO E SUTIL */
.nav-link.nav-link-subtle {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-weight: 500;
  box-shadow: none;
}

.nav-link.nav-link-subtle:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(148, 163, 184, 0.45);
  transform: translateY(-1px);
  box-shadow: none;
}

/* ==========================================================================
   MÓDULO 2: ARQUITETURA VISUAL PARA ANÚNCIOS (CLS-SAFE ADSENSE CONTAINERS)
   ========================================================================== */

/* Container Geral de Anúncio com Reserva de Espaço para CLS = 0 */
.ad-container {
  position: relative;
  background: var(--bg-ad);
  border: 1px dashed var(--border-ad);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.ad-label {
  width: 100%;
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 0.22rem 0.5rem;
}

.ad-slot-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  text-align: center;
}

.ad-placeholder-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.85;
  pointer-events: none;
}

.ad-placeholder-meta strong {
  color: var(--accent-amber);
  display: block;
  margin-bottom: 0.2rem;
}

/* 1. Banner Horizontal no Topo (Leaderboard 728x90 / Responsivo) */
.ad-leaderboard-wrapper {
  max-width: 1360px;
  margin: 1.25rem auto 0;
  padding: 0 1.5rem;
}

.ad-slot-leaderboard {
  width: 100%;
  min-height: 118px; /* 90px + barra de rótulo p/ evitar Layout Shift */
  margin: 0 auto;
}

/* 2. Bloco Retangular Integrado Nativamente (Entre Calculadora e Dossiê Textual) */
.ad-slot-native-between {
  width: 100%;
  min-height: 290px; /* 250-280px retangular nativo fluido */
  margin: 2.25rem 0;
  background: linear-gradient(180deg, rgba(15, 22, 35, 0.95) 0%, rgba(12, 19, 32, 0.95) 100%);
}

/* 3. Bloco Fixo (Sticky) na Barra Lateral para Desktop */
.sidebar-column {
  position: relative;
}

.ad-sidebar-sticky-wrap {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ad-slot-sidebar-sticky {
  width: 100%;
  min-height: 600px; /* Half-Page 300x600 AdSense High Viewability */
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.sidebar-widget h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-emerald);
  margin-bottom: 0.75rem;
}

.sidebar-widget ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.88rem;
}

/* ==========================================================================
   LAYOUT PRINCIPAL (GRID CONTEÚDO + SIDEBAR STICKY)
   ========================================================================== */
.hero-banner {
  max-width: 1360px;
  margin: 1.5rem auto 0;
  padding: 2.25rem 1.5rem 1rem;
}

.hero-card {
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.15), transparent 55%),
              linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-emerald-glow);
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-card h1 {
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}

.hero-card p {
  color: var(--text-secondary);
  max-width: 880px;
  font-size: 1.05rem;
}

.quick-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.65rem;
}

.pillar-card {
  background: rgba(9, 13, 22, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pillar-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-emerald);
}

.pillar-card span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.pillar-card h3 {
  font-size: 0.98rem;
  margin: 0.25rem 0;
  color: var(--text-primary);
}

.pillar-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.portal-layout {
  max-width: 1360px;
  margin: 1.5rem auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.25rem;
  align-items: start;
}

.main-column {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

/* ==========================================================================
   MÓDULO 1: CALCULADORAS INTERATIVAS & DASHBOARDS
   ========================================================================== */
.module-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  scroll-margin-top: 90px;
}

.module-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
}

.module-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.module-header h2 {
  font-size: clamp(1.4rem, 2.3vw, 1.95rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.module-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.45rem;
}

.calculator-box {
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-md);
  padding: 1.65rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.35rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.form-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.form-group label span.unit {
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px var(--accent-emerald-glow);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #03150e;
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.78rem 1.4rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

/* Resultados das Calculadoras */
.results-panel {
  background: rgba(9, 13, 22, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.metrics-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-emerald);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.metric-card.cyan {
  border-left-color: var(--accent-cyan);
}

.metric-card.amber {
  border-left-color: var(--accent-amber);
}

.metric-card.rose {
  border-left-color: var(--accent-rose);
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.2rem 0;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.status-banner {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

/* Tabelas de Dados (Treino ABC, Alimentos Regionais, Splits de Corrida) */
.data-table-wrap {
  overflow-x: auto;
  margin-top: 1.1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  background: var(--bg-primary);
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-a { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.badge-b { background: rgba(6, 182, 212, 0.18); color: #22d3ee; }
.badge-c { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }

/* ==========================================================================
   DOSSIÊ TÉCNICO & CONTEÚDO EDITORIAL DENSO (ALTO VALOR DE INVENTÁRIO ADSENSE)
   ========================================================================== */
.technical-dossier {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.82;
}

.dossier-badge-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(6, 182, 212, 0.07);
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.technical-dossier h3 {
  color: var(--text-primary);
  font-size: 1.38rem;
  font-weight: 800;
  margin: 2rem 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-subtle);
}

.technical-dossier h4 {
  color: var(--accent-emerald);
  font-size: 1.12rem;
  font-weight: 700;
  margin: 1.45rem 0 0.55rem;
}

.technical-dossier p {
  margin-bottom: 1.15rem;
  text-align: justify;
}

.technical-dossier ul,
.technical-dossier ol {
  margin: 0.85rem 0 1.35rem 1.4rem;
}

.technical-dossier li {
  margin-bottom: 0.55rem;
}

.technical-dossier strong {
  color: var(--text-primary);
}

.scientific-callout {
  background: rgba(16, 185, 129, 0.06);
  border-left: 4px solid var(--accent-emerald);
  padding: 1.15rem 1.35rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.4rem 0;
  font-size: 0.95rem;
}

.formula-block {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-cyan);
  margin: 1.15rem 0;
  overflow-x: auto;
}

/* ==========================================================================
   RODAPÉ & LINKS DE CONFORMIDADE GOOGLE ADSENSE
   ========================================================================== */
.site-footer {
  background: #060911;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-bottom {
  max-width: 1360px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 1024px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .ad-sidebar-sticky-wrap {
    position: static;
  }

  .ad-slot-sidebar-sticky {
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .module-section {
    padding: 1.25rem;
  }

  .calculator-box {
    padding: 1.1rem;
  }

  .technical-dossier p {
    text-align: left;
  }
}
